|
From: creedon <icr...@us...> - 2005-12-31 20:20:55
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22254 Modified Files: shellmenu.c Log Message: for host databases that don't have a Frontier.tools table, provide some of the basic file commands so that folks can work with databases Index: shellmenu.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellmenu.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shellmenu.c 1 Nov 2005 19:11:57 -0000 1.7 --- shellmenu.c 31 Dec 2005 20:20:47 -0000 1.8 *************** *** 55,58 **** --- 55,59 ---- #include "tablestructure.h" #include "ops.h" /* 2005-09-25 creedon */ + #include "langinternal.h" /* 2005-12-27 creedon */ *************** *** 1469,1477 **** /* 2005-09-25 creedon: changed so that all targets can call scripts for some file/edit menu commands added open recent menu ! 7.0d6 PBS: With Pike's now-standard File menu, it's necessary to use ! kernel routines for New and Open. Run scripts in Pike for everything else. 5/19/93 dmb: closefunc uses getfrontwindow, not shellwindow --- 1470,1480 ---- /* + 2005-12-31 creedon: for host databases that don't have a Frontier.tools table, provide some of the basic file commands so that folks can work + with databases + 2005-09-25 creedon: changed so that all targets can call scripts for some file/edit menu commands added open recent menu ! 7.0d6 PBS: With Pike's now-standard File menu, it's necessary to use kernel routines for New and Open. Run scripts in Pike for everything else. 5/19/93 dmb: closefunc uses getfrontwindow, not shellwindow *************** *** 1550,1557 **** boolean flkernelhandledcommand = false, flfoundrootwindow = false; WindowPtr w = shellwindow; Handle hdata; hdlwindowinfo hinfo; ! if (w == nil) { flfoundrootwindow = ccfindrootwindow (&hinfo); --- 1553,1561 ---- boolean flkernelhandledcommand = false, flfoundrootwindow = false; + WindowPtr w = shellwindow; Handle hdata; hdlwindowinfo hinfo; ! if (w == nil) { flfoundrootwindow = ccfindrootwindow (&hinfo); *************** *** 1563,1589 **** case closeitem: /* possibly close an Error Info window */ ! if (shellfindwindow (idlangerrorconfig, &w, &hinfo, &hdata)) { /* is there an Error Info window? */ ! if (w == getfrontwindow ()) { /* is the Error Info window in front? */ shellclose (w, true); /* close the Error Info window */ ! flkernelhandledcommand = true; /* the kernel handled the command */ } /* if */ } /* if */ ! break; ! ! /* case closeitem: ! if (keyboardstatus.floptionkey) ! shellcloseall (w, true); ! else ! shellclose (getfrontwindow (), true); ! ! flkernelhandledcommand = true; ! ! break; */ ! case quititem: --- 1567,1583 ---- case closeitem: /* possibly close an Error Info window */ ! if (shellfindwindow (idlangerrorconfig, &w, &hinfo, &hdata)) { /* is there an Error Info window? */ ! if (w == getfrontwindow ()) { /* is the Error Info window in front? */ shellclose (w, true); /* close the Error Info window */ ! flkernelhandledcommand = true; /* the kernel handled the command */ } /* if */ } /* if */ ! break; ! case quititem: *************** *** 1597,1601 **** #ifndef PIKE ! case newitem: shellnew (); --- 1591,1595 ---- #ifndef PIKE ! case newitem: shellnew (); *************** *** 1604,1608 **** break; ! case pagesetupitem: shellpagesetup (); --- 1598,1602 ---- break; ! case pagesetupitem: shellpagesetup (); *************** *** 1618,1622 **** break; ! case saverunnableitem: shellsaveas (w, nil, true); --- 1612,1616 ---- break; ! case saverunnableitem: shellsaveas (w, nil, true); *************** *** 1625,1637 **** break; ! #endif ! } /*switch*/ ! ! if (!flkernelhandledcommand) /*Run the script if special cases weren't handled above.*/ ! ! runfilemenuscript (iditem); ! break; /* file menu */ } --- 1619,1682 ---- break; ! #endif ! } /*switch*/ ! ! if (!flkernelhandledcommand) { /*Run the script if special cases weren't handled above. */ ! ! #ifndef PIKE ! ! bigstring bs; ! boolean flrunfilemenuscript = langrunstringnoerror ("\x2C" "Frontier.tools.windowTypes.runFileMenuScript", bs); ! ! if (flrunfilemenuscript) ! ! #endif ! ! runfilemenuscript (iditem); ! ! #ifndef PIKE ! ! else { /* if the script is not defined then we try to do some menu items without the script */ ! ! switch (iditem) { ! ! case openitem: ! shellopen (); ! ! break; ! ! case closeitem: ! if (keyboardstatus.floptionkey) ! shellcloseall (w, true); ! else ! shellclose (getfrontwindow (), true); ! ! break; ! ! case saveitem: ! shellsave (w); ! ! break; ! ! case saveasitem: ! shellsaveas (w, nil, false); ! ! break; ! ! case revertitem: ! shellrevert (w, true); ! ! break; ! ! } /*switch*/ ! ! } /* else */ ! ! } ! ! #endif ! break; /* file menu */ } *************** *** 2013,2022 **** /* ! 2005-09-14 creedon: changed name from pikerunfilemenuscript to runfilemenuscript, all targets can now run a script associated with some of the file menu commands - 6.2a2 AR: Call the pike.runFileMenuScript script to eventually run the - script associated with the current menu command. - 7.1b4 PBS: get script string from resource, don't hard-code. */ --- 2058,2067 ---- /* ! 2005-09-14 creedon: changed name from pikerunfilemenuscript to runfilemenuscript, all targets can now run a script associated with some of ! the file menu commands 7.1b4 PBS: get script string from resource, don't hard-code. + + 6.2a2 AR: Call the pike.runFileMenuScript script to eventually run the script associated with the current menu command. */ |