[brlcad-commits] SF.net SVN: brlcad:[44904] brlcad/trunk/src/tclscripts/man_browser.tcl
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <bhi...@us...> - 2011-06-12 20:43:54
|
Revision: 44904 http://brlcad.svn.sourceforge.net/brlcad/?rev=44904&view=rev Author: bhinesley Date: 2011-06-12 20:43:47 +0000 (Sun, 12 Jun 2011) Log Message: ----------- There was a common variable for a listbox -listvariable; changed it to an array so that multiple instances could use it. Modified Paths: -------------- brlcad/trunk/src/tclscripts/man_browser.tcl Modified: brlcad/trunk/src/tclscripts/man_browser.tcl =================================================================== --- brlcad/trunk/src/tclscripts/man_browser.tcl 2011-06-11 04:57:31 UTC (rev 44903) +++ brlcad/trunk/src/tclscripts/man_browser.tcl 2011-06-12 20:43:47 UTC (rev 44904) @@ -52,7 +52,7 @@ } private { - common pages [list] + common pages variable pageData } @@ -84,7 +84,7 @@ set disabledPages [lsort $disabledPages] # Reset pages list - if {[info exists pages] && $pages != {}} { + if {[info exists pages($this)] && $pages($this) != {}} { setPageNames } } @@ -96,7 +96,7 @@ set enabledPages [lsort $enabledPages] # Reset pages list - if {[info exists pages] && $pages != {}} { + if {[info exists pages($this)] && $pages($this) != {}} { setPageNames } } @@ -104,7 +104,7 @@ ::itcl::body ManBrowser::setPageNames {} { set manFiles [glob -directory $path *.html ] - set pages [list] + set pages($this) [list] foreach manFile $manFiles { set rootName [file rootname [file tail $manFile]] @@ -122,15 +122,15 @@ # Obviously, if the page is both disabled/enabled, it will be disabled if {!$isDisabled && $isEnabled} { - lappend pages $rootName + lappend pages($this) $rootName } } - set pages [lsort $pages] + set pages($this) [lsort $pages($this)] } ::itcl::body ManBrowser::select {pageName} { # Select the requested man page - set idx [lsearch -sorted -exact $pages $pageName] + set idx [lsearch -sorted -exact $pages($this) $pageName] if {$idx != -1} { set result True @@ -217,7 +217,7 @@ -width 16 \ -exportselection false \ -yscroll "$toc.toc_scrollbar set" \ - -listvariable [scope pages] + -listvariable [scope pages($this)] } {} $toc.toc_scrollbar configure -command "$toc.toc_listbox yview" @@ -251,7 +251,7 @@ if {[file exists [file join $path Introduction.html]]} { loadPage Introduction } else { - loadPage [lindex $pages 0] + loadPage [lindex $pages($this) 0] } bind $toc.toc_listbox <<ListboxSelect>> { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |