|
From: creedon <icr...@us...> - 2005-06-13 22:29:16
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11595 Modified Files: init Log Message: tools menu now installed as a sub menu of the Operations menu, added initialization Frontier.tools.data Index: init =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/init,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** init 26 Mar 2005 19:42:49 -0000 1.1.1.1 --- init 13 Jun 2005 22:29:05 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.init ! Ç4/18/01; 1:20:35 AM by JES ÇCribbed from playlist.tools from Radio.root. ÇChanges: Ç11/26/01; 5:55:25 PM by JES ÇCreate callback tables at user.tools.callbacks. Right now, there are four callbacks, beforeInstall, beforeUninstall, afterInstall, and afterUninstall. Ç9/19/01; 5:41:45 PM by JES ÇCreate an empty table at system.temp.Frontier.tools, for storing temporary information about Tools. Ç7/1/01; 7:01:01 PM by JES ÇAdded initialization of windowTypes-related items. Ç6/21/01; 1:20:57 AM by JES ÇIf this is Radio, only check to see if user.menus.tools == @playlist.tools.menu, if playlist.tools.menu is defined. Ç04/22/01; 8:58:49 PM by JES ÇBe sure the user.html.callbacks.fileWriters.ftp table exists. on installCallback (adrcode, name, replaceIfEqualsString=nil, adr...@us...) { local (adrtable = @adrCallbacks^.[name]); if not defined (adrtable^) { new (tableType, adrtable)}; local (adrscript = @adrtable^.tools); if replaceIfEqualsString != nil { if defined (adrscript^) { if string (adrscript^) == replaceIfEqualsString { delete (adrscript)}}}; if not defined (adrscript^) { adrscript^ = @adrcode^.[name]}}; bundle { //init user.tools if not defined (user.tools) { new (tableType, @user.tools)}; if not defined (user.tools.databases) { new (tableType, @user.tools.databases)}; if not defined (user.tools.prefs) { new (tableType, @user.tools.prefs)}; if system.environment.isPike and defined (playlist.tools.menu) { if user.menus.tools == @playlist.tools.menu { delete (@user.menus.tools)}}; if not defined (user.menus.tools) { user.menus.tools = @Frontier.tools.menu}}; bundle { //init temp.Frontier.tools if not defined (system.temp.Frontier) { new (tableType, @system.temp.Frontier)}; if not defined (system.temp.Frontier.tools) { new (tableType, @system.temp.Frontier.tools)}}; bundle { //set up Frontier.tools.thread if not defined (user.scheduler.threads.tools) { user.scheduler.threads.tools = @Frontier.tools.thread}}; bundle { //init user.tools.menus if not defined (user.tools.menus) { new (tabletype, @user.tools.menus)}; if not defined (user.tools.menus.rightClickMenu) { new (menubartype, @user.tools.menus.rightClickMenu)}}; bundle { //init user.tools.nodeTypes if not defined (user.tools.nodeTypes) { new (tabletype, @user.tools.nodeTypes)}}; bundle { //make sure nodeTypes-related callbacks are installed local (adrcode = @Frontier.tools.nodeTypes.callbacks); installCallback (adrcode, "opCollapse", "return (Frontier.tools.opExpandCallback ())"); installCallback (adrcode, "opExpand", "return (Frontier.tools.opExpandCallback ())"); installCallback (adrcode, "opRightClick", "on tools (adrmenu) {\r\treturn (Frontier.tools.opRightClickCallback (adrmenu))}"); Çbundle //old code Çbundle //opCollapse Çlocal (adrtable = @user.callbacks.opCollapse) Çif not defined (adrtable^) Çnew (tableType, adrtable) Çlocal (adrscript = @adrtable^.tools) Çif defined (adrscript^) Çif string (adrscript^) == "return (Frontier.tools.opExpandCallback ())" Çdelete (adrscript) Çif not defined (adrscript^) Çadrscript^ = @adrcode^.opCollapse Çbundle //opExpand Çlocal (adrtable = @user.callbacks.opExpand) Çif not defined (adrtable^) Çnew (tableType, adrtable) Çlocal (adrscript = @adrtable^.tools) Çif defined (adrscript^) Çif string (adrscript^) == "return (Frontier.tools.opExpandCallback ())" Çdelete (adrscript) Çif not defined (adrscript^) Çadrscript^ = @adrcode^.opExpand Çbundle //opRightClick Çlocal (adrtable = @user.callbacks.opRightClick) Çif not defined (adrtable^) Çnew (tableType, adrtable) Çlocal (adrscript = @adrtable^.tools) Çif defined (adrscript^) Çif string (adrscript^) == "on tools (adrmenu) {\r\treturn (Frontier.tools.opRightClickCallback (adrmenu))}" Çdelete (adrscript) Çif not defined (adrscript^) Çadrscript^ = @adrcode^.opRightClick}; bundle { //make sure the html fileWriters callbacks table exists if not defined (user.html.callbacks) { new (tableType, @user.html.callbacks)}; if not defined (user.html.callbacks.fileWriters) { new (tableType, @user.html.callbacks.fileWriters)}; if not defined (user.html.callbacks.fileWriters.ftp) { new (tableType, @user.html.callbacks.fileWriters.ftp)}}; bundle { //init user.tools.windowTypes if not defined (user.tools.windowTypes) { new (tabletype, @user.tools.windowTypes)}}; bundle { //make sure windowTypes-related callbacks are installed local (adrcode = @Frontier.tools.windowTypes.callbacks); ÇBuiltin callbacks installCallback (adrcode, "closeWindow"); installCallback (adrcode, "openWindow"); installCallback (adrcode, "saveWindow"); ÇOutline callbacks installCallback (adrcode, "opReturnKey"); installCallback (adrcode, "opCursorMoved"); }; bundle { //install commandCallbacks, and create user.tools.callbacks tables on sureTable (adrparent, name) { if not defined (adrparent^.[name]) { new (tableType, @adrparent^.[name])}}; local (adrcallbacks = @user.tools.commandCallbacks); if not defined (adrcallbacks^) { new (tableType, adrcallbacks)}; sureTable (adrcallbacks, "isMenuItemEnabled"); sureTable (adrcallbacks, "close"); sureTable (adrcallbacks, "new"); sureTable (adrcallbacks, "open"); sureTable (adrcallbacks, "openUrl"); sureTable (adrcallbacks, "revert"); sureTable (adrcallbacks, "save"); sureTable (adrcallbacks, "saveAs"); sureTable (adrcallbacks, "saveAsHtml"); sureTable (adrcallbacks, "saveAsPlainText"); sureTable (adrcallbacks, "viewInBrowser"); adrcallbacks = @user.tools.callbacks; if not defined (adrcallbacks^) { new (tableType, adrcallbacks)}; sureTable (adrcallbacks, "beforeInstall"); sureTable (adrcallbacks, "afterInstall"); sureTable (adrcallbacks, "beforeUninstall"); sureTable (adrcallbacks, "afterUninstall")}; bundle { //init manila windowTypes, nodeTypes and editResponder if defined (manila.windowTypes) { manila.windowTypes.init ()}; if defined (manila.nodeTypes) { manila.nodeTypes.init ()}; if system.environment.isRadio { if defined (manila.editResponder) { manila.editResponder.init ()}}}; bundle { //init chatClient, xmlStorageSystem, and bookmarksMenu if defined (chatClient) { chatClient.init ()}; if defined (xmlStorageSystem) { xmlStorageSystem.init ()}; if defined (bookmarksMenu) { bookmarksMenu.init ()}}; bundle { //finish installation if not defined (Frontier.tools.data.flInstalled) { Frontier.tools.data.flInstalled = false}; if not Frontier.tools.data.flInstalled { //install wrapper scripts for file and edit menu calls, and isFileMenuItemChecked/Enabled if system.environment.isRadio { if defined (system.verbs.builtins.pike) { delete (@pike.isFileMenuItemChecked); script.newScriptObject ("on isFileMenuItemChecked (cmd) {return (Frontier.tools.windowTypes.isFileMenuItemChecked (cmd))}", @pike.isFileMenuItemChecked); delete (@pike.isFileMenuItemEnabled); script.newScriptObject ("on isFileMenuItemEnabled (cmd) {return (Frontier.tools.windowTypes.isFileMenuItemEnabled (cmd))}", @pike.isFileMenuItemEnabled); delete (@pike.runFileMenuScript); script.newScriptObject ("on runFileMenuScript (itemname) {return (Frontier.tools.windowTypes.runFileMenuScript (itemname))}", @pike.runFileMenuScript); delete (@pike.runEditMenuScript); script.newScriptObject ("on runEditMenuScript (itemname) {return (Frontier.tools.windowTypes.runEditMenuScript (itemname))}", @pike.runEditMenuScript)}}}; bundle { //delete old callback entries local (adr); for adr in @user.callbacks { if defined (adr^.pike) { delete (@adr^.pike)}; if defined (adr^.playlist) { delete (@adr^.playlist)}}}; Frontier.tools.data.flInstalled = true} //only do this once \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.init ! ÇChanges Ç11/29/04; 1:17:12 AM by TAC ÇTools menu now installed as a sub menu of the Operations menu Ç11/14/04; 11:14:42 AM by TAC Çadded initialization Frontier.tools.data Ç11/26/01; 5:55:25 PM by JES ÇCreate callback tables at user.tools.callbacks. Right now, there are four callbacks, beforeInstall, beforeUninstall, afterInstall, and afterUninstall. Ç9/19/01; 5:41:45 PM by JES ÇCreate an empty table at system.temp.Frontier.tools, for storing temporary information about Tools. Ç7/1/01; 7:01:01 PM by JES ÇAdded initialization of windowTypes-related items. Ç6/21/01; 1:20:57 AM by JES ÇIf this is Radio, only check to see if user.menus.tools == @playlist.tools.menu, if playlist.tools.menu is defined. Ç04/22/01; 8:58:49 PM by JES ÇBe sure the user.html.callbacks.fileWriters.ftp table exists. Ç4/18/01; 1:20:35 AM by JES ÇCribbed from playlist.tools from Radio.root. on installCallback (adrcode, name, replaceIfEqualsString=nil, adr...@us...) { local (adrtable = @adrCallbacks^.[name]); if not defined (adrtable^) { new (tableType, adrtable)}; local (adrscript = @adrtable^.tools); if replaceIfEqualsString != nil { if defined (adrscript^) { if string (adrscript^) == replaceIfEqualsString { delete (adrscript)}}}; if not defined (adrscript^) { adrscript^ = @adrcode^.[name]}}; bundle { // 11/14/04; 11:14:42 AM by TAC - init Frontier.tools.data if not (defined (Frontier.tools.data)) { new (tableType, @Frontier.tools.data)}; if not (defined (Frontier.tools.data.nodeTypes)) { new (tableType, @Frontier.tools.data.nodeTypes)}}; bundle { //init user.tools if not defined (user.tools) { new (tableType, @user.tools)}; if not defined (user.tools.databases) { new (tableType, @user.tools.databases)}; if not defined (user.tools.prefs) { new (tableType, @user.tools.prefs)}; if system.environment.isPike and defined (playlist.tools.menu) { if user.menus.tools == @playlist.tools.menu { delete (@user.menus.tools)}}; Çif not defined (user.menus.tools) // 11/29/04; 1:16:55 AM by TAC - disabled Çuser.menus.tools = @Frontier.tools.menu menu.addSubMenu (@system.menus.menubar, "", @Frontier.tools.menu)}; // 11/29/04; 1:21:43 AM by TAC bundle { //init temp.Frontier.tools if not defined (system.temp.Frontier) { new (tableType, @system.temp.Frontier)}; if not defined (system.temp.Frontier.tools) { new (tableType, @system.temp.Frontier.tools)}}; bundle { //set up Frontier.tools.thread if not defined (user.scheduler.threads.tools) { user.scheduler.threads.tools = @Frontier.tools.thread}}; bundle { //init user.tools.menus if not defined (user.tools.menus) { new (tabletype, @user.tools.menus)}; if not defined (user.tools.menus.rightClickMenu) { new (menubartype, @user.tools.menus.rightClickMenu)}}; bundle { //init user.tools.nodeTypes if not defined (user.tools.nodeTypes) { new (tabletype, @user.tools.nodeTypes)}}; bundle { //make sure nodeTypes-related callbacks are installed local (adrcode = @Frontier.tools.nodeTypes.callbacks); installCallback (adrcode, "opCollapse", "return (Frontier.tools.opExpandCallback ())"); installCallback (adrcode, "opExpand", "return (Frontier.tools.opExpandCallback ())"); installCallback (adrcode, "opRightClick", "on tools (adrmenu) {\r\treturn (Frontier.tools.opRightClickCallback (adrmenu))}"); Çbundle //old code Çbundle //opCollapse Çlocal (adrtable = @user.callbacks.opCollapse) Çif not defined (adrtable^) Çnew (tableType, adrtable) Çlocal (adrscript = @adrtable^.tools) Çif defined (adrscript^) Çif string (adrscript^) == "return (Frontier.tools.opExpandCallback ())" Çdelete (adrscript) Çif not defined (adrscript^) Çadrscript^ = @adrcode^.opCollapse Çbundle //opExpand Çlocal (adrtable = @user.callbacks.opExpand) Çif not defined (adrtable^) Çnew (tableType, adrtable) Çlocal (adrscript = @adrtable^.tools) Çif defined (adrscript^) Çif string (adrscript^) == "return (Frontier.tools.opExpandCallback ())" Çdelete (adrscript) Çif not defined (adrscript^) Çadrscript^ = @adrcode^.opExpand Çbundle //opRightClick Çlocal (adrtable = @user.callbacks.opRightClick) Çif not defined (adrtable^) Çnew (tableType, adrtable) Çlocal (adrscript = @adrtable^.tools) Çif defined (adrscript^) Çif string (adrscript^) == "on tools (adrmenu) {\r\treturn (Frontier.tools.opRightClickCallback (adrmenu))}" Çdelete (adrscript) Çif not defined (adrscript^) Çadrscript^ = @adrcode^.opRightClick}; bundle { //make sure the html fileWriters callbacks table exists if not defined (user.html.callbacks) { new (tableType, @user.html.callbacks)}; if not defined (user.html.callbacks.fileWriters) { new (tableType, @user.html.callbacks.fileWriters)}; if not defined (user.html.callbacks.fileWriters.ftp) { new (tableType, @user.html.callbacks.fileWriters.ftp)}}; bundle { //init user.tools.windowTypes if not defined (user.tools.windowTypes) { new (tabletype, @user.tools.windowTypes)}}; bundle { //make sure windowTypes-related callbacks are installed local (adrcode = @Frontier.tools.windowTypes.callbacks); ÇBuiltin callbacks installCallback (adrcode, "closeWindow"); installCallback (adrcode, "openWindow"); installCallback (adrcode, "saveWindow"); ÇOutline callbacks installCallback (adrcode, "opReturnKey"); installCallback (adrcode, "opCursorMoved"); }; bundle { //install commandCallbacks, and create user.tools.callbacks tables on sureTable (adrparent, name) { if not defined (adrparent^.[name]) { new (tableType, @adrparent^.[name])}}; local (adrcallbacks = @user.tools.commandCallbacks); if not defined (adrcallbacks^) { new (tableType, adrcallbacks)}; sureTable (adrcallbacks, "isMenuItemEnabled"); sureTable (adrcallbacks, "close"); sureTable (adrcallbacks, "new"); sureTable (adrcallbacks, "open"); sureTable (adrcallbacks, "openUrl"); sureTable (adrcallbacks, "revert"); sureTable (adrcallbacks, "save"); sureTable (adrcallbacks, "saveAs"); sureTable (adrcallbacks, "saveAsHtml"); sureTable (adrcallbacks, "saveAsPlainText"); sureTable (adrcallbacks, "viewInBrowser"); adrcallbacks = @user.tools.callbacks; if not defined (adrcallbacks^) { new (tableType, adrcallbacks)}; sureTable (adrcallbacks, "beforeInstall"); sureTable (adrcallbacks, "afterInstall"); sureTable (adrcallbacks, "beforeUninstall"); sureTable (adrcallbacks, "afterUninstall")}; Çbundle //init manila windowTypes, nodeTypes and editResponder // 11/14/04; 10:56:38 AM by TAC - don't install Manila Çif defined (manila.windowTypes) Çmanila.windowTypes.init () Çif defined (manila.nodeTypes) Çmanila.nodeTypes.init () Çif system.environment.isRadio Çif defined (manila.editResponder) Çmanila.editResponder.init () bundle { //init chatClient, xmlStorageSystem, and bookmarksMenu Çif defined (chatClient) // 11/14/04; 11:02:00 AM by TAC - no chat client in Frontier.root ÇchatClient.init () if defined (xmlStorageSystem) { // TAC - ? xmlStorageSystem.init ()}; if defined (bookmarksMenu) { // TAC - ? bookmarksMenu.init ()}}; bundle { //finish installation if not defined (Frontier.tools.data.flInstalled) { Frontier.tools.data.flInstalled = false}; if not Frontier.tools.data.flInstalled { //install wrapper scripts for file and edit menu calls, and isFileMenuItemChecked/Enabled if system.environment.isRadio { if defined (system.verbs.builtins.pike) { delete (@pike.isFileMenuItemChecked); script.newScriptObject ("on isFileMenuItemChecked (cmd) {return (Frontier.tools.windowTypes.isFileMenuItemChecked (cmd))}", @pike.isFileMenuItemChecked); delete (@pike.isFileMenuItemEnabled); script.newScriptObject ("on isFileMenuItemEnabled (cmd) {return (Frontier.tools.windowTypes.isFileMenuItemEnabled (cmd))}", @pike.isFileMenuItemEnabled); delete (@pike.runFileMenuScript); script.newScriptObject ("on runFileMenuScript (itemname) {return (Frontier.tools.windowTypes.runFileMenuScript (itemname))}", @pike.runFileMenuScript); delete (@pike.runEditMenuScript); script.newScriptObject ("on runEditMenuScript (itemname) {return (Frontier.tools.windowTypes.runEditMenuScript (itemname))}", @pike.runEditMenuScript)}}}; bundle { //delete old callback entries local (adr); for adr in @user.callbacks { if defined (adr^.pike) { delete (@adr^.pike)}; if defined (adr^.playlist) { delete (@adr^.playlist)}}}; Frontier.tools.data.flInstalled = true} //only do this once \ No newline at end of file |