|
From: creedon <icr...@us...> - 2006-01-25 04:05:09
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8819 Modified Files: installNewTools getInfoTable Log Message: use clean tool name script to set shortName Index: getInfoTable =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/getInfoTable,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** getInfoTable 26 Mar 2005 19:42:48 -0000 1.1.1.1 --- getInfoTable 25 Jan 2006 04:04:55 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.getInfoTable ! on getInfoTable () { ÇReturn a table containing info about the Tools in the Tools folder. Each Tool gets a sub-table whose name is the filename of the Tool. Each sub-table contains: Çf -- the path on disk ÇflEnabled -- whether it's enabled or not ÇflInstalled -- whether it's installed or not ÇflOpen -- whether the gdb is open or not Ç01/08/01; 1:15:30 PM by PBS local (f, folder = Frontier.tools.getToolsFolderPath ()); local (infoTable); new (tableType, @infoTable); fileloop (f in folder) { local (fname = file.fileFromPath (f)); local (shortName = string.popSuffix (fname)); local (adrItem = @infoTable.[fname]); new (tableType, adrItem); adrItem^.f = f; adrItem^.flOpen = defined ([f]); adrItem^.flEnabled = false; //default adrItem^.flInstalled = false; //default bundle { //is the Tool installed? if defined (user.tools.databases.[shortName].flInstalled) { adrItem^.flInstalled = user.tools.databases.[shortName].flInstalled}}; bundle { //is the Tool enabled? if adrItem^.flOpen { if Frontier.tools.isEnabled (f) { adrItem^.flEnabled = true}}}}; return (infoTable)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.getInfoTable ! on getInfoTable () { ÇChanges Ç1/23/06; 3:31:21 PM by TAC Çuse clean tool name script to set shortName Ç01/08/01; 1:15:30 PM by PBS Çcreated ÇReturn a table containing info about the Tools in the Tools folder. Each Tool gets a sub-table whose name is the filename of the Tool. Each sub-table contains: Çf -- the path on disk ÇflEnabled -- whether it's enabled or not ÇflInstalled -- whether it's installed or not ÇflOpen -- whether the gdb is open or not local (f, folder = Frontier.tools.getToolsFolderPath ()); local (infoTable); new (tableType, @infoTable); fileloop (f in folder) { local (fname = file.fileFromPath (f)); local (shortName = Frontier.tools.cleanToolName (fname)); local (adrItem = @infoTable.[fname]); new (tableType, adrItem); adrItem^.f = f; adrItem^.flOpen = defined ([f]); adrItem^.flEnabled = false; //default adrItem^.flInstalled = false; //default bundle { //is the Tool installed? if defined (user.tools.databases.[shortName].flInstalled) { adrItem^.flInstalled = user.tools.databases.[shortName].flInstalled}}; bundle { //is the Tool enabled? if adrItem^.flOpen { if Frontier.tools.isEnabled (f) { adrItem^.flEnabled = true}}}}; return (infoTable)} \ No newline at end of file Index: installNewTools =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/installNewTools,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** installNewTools 26 Mar 2005 19:42:49 -0000 1.1.1.1 --- installNewTools 25 Jan 2006 04:04:55 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.installNewTools ! on installNewTools () { ÇInstall any new Tools in the Tools folder. Return a list of file paths of any new Tools that were installed. Ç01/06/01; 3:37:49 PM by PBS ÇChanges: Ç2/24/01; 2:19:45 PM by PBS ÇIf a tool does not have a table in user.tools.databases, create it. This prevents opening and closing disabled tools every 10 seconds, which interrupts typing and causes screen flashing. local (newTools = {}); local (toolsFolder = Frontier.tools.getToolsFolderPath ()); local (f); fileloop (f in toolsFolder) { local (fname = file.fileFromPath (f)); local (shortName = string.popSuffix (fname)); if string.lower (fname) endsWith ".root" { if not (defined ([f])) { //is it a new tool? if not defined (user.tools.databases.[shortName]) { if Frontier.tools.isEnabled (f) { Frontier.tools.install (f); newTools = newTools + f} else { //PBS 02/24/01: set up table for this tool; this prevents opening it every 10 seconds local (adrTable = @user.tools.databases.[shortName]); local (t); new (tableType, @t); t.flInstalled = false; t.lastModified = file.modified (f); t.path = f; adrTable^ = t}}}}}; return (newTools)} //list of file paths of new Tools installed \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.installNewTools ! on installNewTools () { ÇChanges Ç1/23/06; 3:31:21 PM by TAC Çuse clean tool name script to set shortName Ç2/24/01; 2:19:45 PM by PBS ÇIf a tool does not have a table in user.tools.databases, create it. This prevents opening and closing disabled tools every 10 seconds, which interrupts typing and causes screen flashing. Ç01/06/01; 3:37:49 PM by PBS Çcreated ÇInstall any new Tools in the Tools folder. Return a list of file paths of any new Tools that were installed. local (newTools = {}); local (toolsFolder = Frontier.tools.getToolsFolderPath ()); local (f); fileloop (f in toolsFolder) { local (fname = file.fileFromPath (f)); local (shortName = Frontier.tools.cleanToolName (fname)); if string.lower (fname) endsWith ".root" { if not (defined ([f])) { //is it a new tool? if not defined (user.tools.databases.[shortName]) { if Frontier.tools.isEnabled (f) { Frontier.tools.install (f); newTools = newTools + f} else { //PBS 02/24/01: set up table for this tool; this prevents opening it every 10 seconds local (adrTable = @user.tools.databases.[shortName]); local (t); new (tableType, @t); t.flInstalled = false; t.lastModified = file.modified (f); t.path = f; adrTable^ = t}}}}}; return (newTools)} //list of file paths of new Tools installed \ No newline at end of file |