1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 09:58:01 +00:00

Now with added menus

[originally from svn r48]
This commit is contained in:
Ben Harris 1999-02-19 23:03:29 +00:00
parent 4e2815c91f
commit 34743b9ef4
2 changed files with 42 additions and 2 deletions

13
mac.c
View File

@ -1,4 +1,4 @@
/* $Id: mac.c,v 1.1.2.1 1999/02/19 21:35:12 ben Exp $ */
/* $Id: mac.c,v 1.1.2.2 1999/02/19 23:03:29 ben Exp $ */
/*
* mac.c -- miscellaneous Mac-specific routines
*/
@ -21,6 +21,8 @@ QDGlobals qd;
int cold = 1;
int main (int argc, char **argv) {
Handle menuBar;
/* Init QuickDraw */
InitGraf(&qd.thePort);
/* Init Font Manager */
@ -35,6 +37,15 @@ int main (int argc, char **argv) {
InitDialogs(nil);
InitCursor();
cold = 0;
menuBar = GetNewMBar(128);
if (menuBar == NULL)
fatalbox("Unable to create menu bar.");
SetMenuBar(menuBar);
AppendResMenu(GetMenuHandle(128), 'DRVR');
/* adjustmenus */
DrawMenuBar();
fatalbox("Init complete");
}

31
putty.r
View File

@ -1,4 +1,4 @@
/* $Id: putty.r,v 1.1.2.2 1999/02/19 22:06:36 ben Exp $ */
/* $Id: putty.r,v 1.1.2.3 1999/02/19 23:03:29 ben Exp $ */
/* PuTTY resources */
#include "Types.r"
@ -241,6 +241,35 @@ resource 'icl8' (130, purgeable) {
* Internal resources
*/
/* Menu bar */
resource 'MBAR' (128, preload) {
{ 128, 129 }
};
resource 'MENU' (128, preload) {
128,
textMenuProc,
0b11111111111111111111111111111101,
enabled,
apple,
{
"About PuTTYÉ", noicon, nokey, nomark, plain,
"-", noicon, nokey, nomark, plain,
}
};
resource 'MENU' (129, preload) {
129,
textMenuProc,
0b11111111111111111111111111111111,
enabled,
"File",
{
"Quit", noicon, "Q", nomark, plain,
}
};
/* Fatal error box. Stolen from the Finder. */
resource 'ALRT' (128, "fatalbox", purgeable) {