Revision: 45917
          http://brlcad.svn.sourceforge.net/brlcad/?rev=45917&view=rev
Author:   starseeker
Date:     2011-08-11 02:31:51 +0000 (Thu, 11 Aug 2011)

Log Message:
-----------
Don't refuse to start archer just because the html docs aren't around.

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-08-11 02:16:57 UTC (rev 
45916)
+++ brlcad/trunk/src/tclscripts/man_browser.tcl 2011-08-11 02:31:51 UTC (rev 
45917)
@@ -121,6 +121,7 @@
 # Loads a list of enabled commands into ToC, after comparing pages found in
 # 'path' with those listed in 'disabledPages' and 'enabledPages'.
 ::itcl::body ManBrowser::setPageNames {} {
+   if {[file exists $path]} {
     set manFiles [glob -directory $path *.html ]
 
     set pages($this) [list]
@@ -145,6 +146,7 @@
        }
     }
     set pages($this) [lsort $pages($this)]
+  }
 }
 
 ##
@@ -152,16 +154,18 @@
 #
 ::itcl::body ManBrowser::loadPage {pageName} {
     # Get page
-    set pathname [file join $path $pageName.html]
-    set htmlFile [open $pathname]
-    set pageData [read $htmlFile]
-    close $htmlFile
-
-    # Display page
-    set htmlview [[$this childsite].browser.htmlview html]
-    $htmlview reset
-    $htmlview configure -parsemode html
-    $htmlview parse $pageData
+    if {[file exists [file join $path $pageName.html]]} {
+       set pathname [file join $path $pageName.html]
+       set htmlFile [open $pathname]
+       set pageData [read $htmlFile]
+       close $htmlFile
+                                                              
+       # Display page
+       set htmlview [[$this childsite].browser.htmlview html]
+       $htmlview reset
+       $htmlview configure -parsemode html
+       $htmlview parse $pageData
+    }
 }
 
 ##
@@ -271,7 +275,7 @@
     pack $itk_component(browser) -side left -expand yes -fill both
 
     # Load Introduction.html if it's there, otherwise load first page
-    if {[file exists [file join $path Introduction.html]]} {
+    if {[file exists [file join $path introduction.html]]} {
         loadPage Introduction
     } else {
         loadPage [lindex $pages($this) 0]


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to