|
From: <cre...@us...> - 2006-04-25 22:42:20
|
Revision: 1336 Author: creecode Date: 2006-04-25 15:42:16 -0700 (Tue, 25 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1336&view=rev Log Message: ----------- minor formatting tweaks add handler can dereference through a mixture of addresses and addresses as strings moved type handling into add () so that hardcoded menus such as user.menus.menubar can be any datatype allow string representation of an adr, which can point to Guest ODB without a (fragile) hardcoded path deleted old commented-out code to improve clarity Modified Paths: -------------- ODBs/trunk/frontierRoot/system/menus/buildMenuBar.fvc Modified: ODBs/trunk/frontierRoot/system/menus/buildMenuBar.fvc =================================================================== --- ODBs/trunk/frontierRoot/system/menus/buildMenuBar.fvc 2006-04-25 03:00:10 UTC (rev 1335) +++ ODBs/trunk/frontierRoot/system/menus/buildMenuBar.fvc 2006-04-25 22:42:16 UTC (rev 1336) @@ -1,61 +1,55 @@ -FrontierVcsFile:1:scpt:system.menus.buildMenuBar +FrontierVcsFile:2:scpt:system.menus.buildMenuBar -\xC7Changes - \xC72/14/06; 4:01:07 PM by TAC - \xC7use script to build help menu which are different between Mac and Windows - \xC79/5/05; 8:46:08 AM by TAC - \xC7can now run a script to install a menu - \xC712/4/04; 11:59:40 PM by TAC - \xC7commented out bookmarkmenu in case statement - \xC7disabled modal menu install, let agent handle it +«Changes + «4/25/06; 1:36:18 PM by SSL & TAC + «minor formatting tweaks + «add handler can dereference through a mixture of addresses and addresses as strings + «moved type handling into add () so that hardcoded menus such as user.menus.menubar can be any datatype + «allow string representation of an adr, which can point to Guest ODB without a (fragile) hardcoded path + «deleted old commented-out code to improve clarity + «2/14/06; 4:01:07 PM by TAC + «use script to build help menu which are different between Mac and Windows + «9/5/05; 8:46:08 AM by TAC + «can now run a script to install a menu + «12/4/04; 11:59:40 PM by TAC + «commented out bookmarkmenu in case statement + «disabled modal menu install, let agent handle it + «8/13/98 by PBS + «add additional user menus -on add (adrmenu) { +on add (adrMenu) { try { - menu.install (adrmenu)}}; + case typeOf (adrMenu^) { + addressType; + stringType { + add (address (adrMenu^))}; + + menuBarType { + menu.install (adrMenu)}; + + scriptType { + adrMenu^ ()}}}}; menu.clearMenuBar (); -bundle { //install menus +bundle { // install menus if defined (user.menus.menubar) { add (@user.menus.menubar)} else { add (@system.menus.menubar)}; - \xC7html.menu.install () // 11/27/04; 12:07:59 PM by TAC - \xC7add (@user.menus.bookmarkMenu) // 11/27/04; 12:08:05 PM by TAC + add (@user.menus.customMenu); local (i); - for i = 1 to sizeOf (user.menus) { //PBS 8/13/98: add additional user menus - local (adrMenu = @user.menus [i]); - - if typeOf (adrMenu^) == addressType { //menus can be address - if not defined (adrMenu^^) { - continue}; - - adrMenu = adrMenu^}; - - if typeOf (adrMenu^) == menuBarType { - case string.lower (nameOf (user.menus [i])) { - \xC7"bookmarkmenu" - "custommenu"; - "menubar" { - continue}}; - - add (adrMenu)}; - - if typeOf (adrMenu^) == scriptType { // 9/5/05; 8:46:08 AM by TAC - adrMenu^ ()}}; + for i = 1 to sizeOf (user.menus) { + case string.lower (nameOf (user.menus [i])) { // skip if added above + "custommenu"; + "menubar" { + continue}} + else { + add (@user.menus [i])}}; system.menus.buildHelpMenu ()}; - \xC7add (@system.menus.helpMenu) -\xC7bundle //add the modal menu, based on the type of the frontmost window - \xC7local (winType = window.getType (window.frontmost ())) - \xC7try - \xC7menu.install (@system.menus.modals.[winType]) - \xC7else - \xC7winType = 0 - \xC7system.menus.data.currentMenuType = winType //see system.menus.agent - -menu.buildMenuBar () //force update \ No newline at end of file +menu.buildMenuBar () // force update \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |