X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/2b8dca9e8c8ba2d63290060e94103b379f95177c..5211281f4c41ec7259121cfd44b476065a20dd35:/mac/macterm.c diff --git a/mac/macterm.c b/mac/macterm.c index cbf54f53..4f4a9dbb 100644 --- a/mac/macterm.c +++ b/mac/macterm.c @@ -1,4 +1,4 @@ -/* $Id: macterm.c,v 1.51 2003/01/18 16:54:25 ben Exp $ */ +/* $Id: macterm.c,v 1.53 2003/01/25 15:15:40 ben Exp $ */ /* * Copyright (c) 1999 Simon Tatham * Copyright (c) 1999, 2002 Ben Harris @@ -110,8 +110,23 @@ static RoutineDescriptor do_text_for_device_upp = void mac_startsession(Session *s) { char *errmsg; + int i; init_ucs(s); + + /* + * Select protocol. This is farmed out into a table in a + * separate file to enable an ssh-free variant. + */ + s->back = NULL; + for (i = 0; backends[i].backend != NULL; i++) + if (backends[i].protocol == s->cfg.protocol) { + s->back = backends[i].backend; + break; + } + if (s->back == NULL) + fatalbox("Unsupported protocol number found"); + /* XXX: Own storage management? */ if (HAVE_COLOR_QD()) s->window = GetNewCWindow(wTerminal, NULL, (WindowPtr)-1); @@ -400,6 +415,10 @@ void mac_adjusttermmenus(WindowPtr window) { long offset; s = (Session *)GetWRefCon(window); + menu = GetMenuHandle(mFile); + DisableItem(menu, iSave); /* XXX enable if modified */ + EnableItem(menu, iSaveAs); + EnableItem(menu, iDuplicate); menu = GetMenuHandle(mEdit); EnableItem(menu, 0); DisableItem(menu, iUndo);