-/* $Id: mac.c,v 1.10 2002/12/30 18:21:17 ben Exp $ */
+/* $Id: mac.c,v 1.12 2002/12/31 01:40:14 ben Exp $ */
/*
* Copyright (c) 1999 Ben Harris
* All rights reserved.
#include <Devices.h>
#include <DiskInit.h>
#include <Gestalt.h>
+#include <LowMem.h>
#include <Resources.h>
#include <Script.h>
#include <TextCommon.h>
windows.about = NULL;
windows.licence = NULL;
+ {
+ short vol;
+ long dirid;
+
+ /* Set the default directory for loading and saving settings. */
+ /* XXX Should we create it? */
+ if (get_session_dir(FALSE, &vol, &dirid) == noErr) {
+ LMSetSFSaveDisk(-vol);
+ LMSetCurDirStore(dirid);
+ }
+ }
init_ucs();
}
break;
}
break;
+ case wSettings:
+ mac_clickdlg(window, event);
+ break;
}
}
case wTerminal:
mac_activateterm(window, active);
break;
+ case wSettings:
+ mac_activatedlg(window, event);
+ break;
case wAbout:
mac_activateabout(window, event);
break;
mac_updateterm(window);
break;
case wAbout:
+ case wSettings:
BeginUpdate(window);
UpdateDialog(window, window->visRgn);
EndUpdate(window);
*/
static int mac_windowtype(WindowPtr window) {
int kind;
+ long refcon;
if (window == NULL)
return wNone;
return wDA;
if (GetWVariant(window) == zoomDocProc)
return wTerminal;
- return GetWRefCon(window);
+ refcon = GetWRefCon(window);
+ if (refcon < 1024)
+ return refcon;
+ else
+ return wSettings;
}
/*