Revision: 40647
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40647&view=rev
Author:   bob1961
Date:     2010-09-22 18:28:48 +0000 (Wed, 22 Sep 2010)

Log Message:
-----------
Changed the argument list for ArcherCore::backgroundColor from {r g b} to 
{_color}.

Modified Paths:
--------------
    brlcad/trunk/src/tclscripts/archer/Archer.tcl
    brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl

Modified: brlcad/trunk/src/tclscripts/archer/Archer.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/Archer.tcl       2010-09-22 18:28:17 UTC 
(rev 40646)
+++ brlcad/trunk/src/tclscripts/archer/Archer.tcl       2010-09-22 18:28:48 UTC 
(rev 40647)
@@ -532,7 +532,7 @@
        updateSaveMode
        updateUndoMode
     } else {
-       eval backgroundColor $mBackground
+       backgroundColor $mBackgroundColor
     }
 
     set mInstanceInit 0
@@ -4182,19 +4182,22 @@
     }
     $itk_component(${_prefix}backgroundmenu) add command \
        -label "Black" \
-       -command [::itcl::code $this backgroundColor 0 0 0]
+       -command [::itcl::code $this backgroundColor black]
     $itk_component(${_prefix}backgroundmenu) add command \
        -label "Grey" \
-       -command [::itcl::code $this backgroundColor 100 100 100]
+       -command [::itcl::code $this backgroundColor grey]
     $itk_component(${_prefix}backgroundmenu) add command \
        -label "White" \
-       -command [::itcl::code $this backgroundColor 255 255 255]
+       -command [::itcl::code $this backgroundColor white]
     $itk_component(${_prefix}backgroundmenu) add command \
        -label "Cyan" \
-       -command [::itcl::code $this backgroundColor 0 200 200]
+       -command [::itcl::code $this backgroundColor cyan]
     $itk_component(${_prefix}backgroundmenu) add command \
        -label "Blue" \
-       -command [::itcl::code $this backgroundColor 0 0 160]
+       -command [::itcl::code $this backgroundColor blue]
+    $itk_component(${_prefix}backgroundmenu) add command \
+       -label "Navy" \
+       -command [::itcl::code $this backgroundColor navy]
     $itk_component(${_prefix}displaymenu) add cascade \
        -label "Background Color" \
        -menu $itk_component(${_prefix}backgroundmenu) \
@@ -5456,6 +5459,8 @@
                    -helpstr "Set display background to cyan"
                command blue -label "Blue" \
                    -helpstr "Set display background to blue"
+               command navy -label "Navy" \
+                   -helpstr "Set display background to navy"
            }
 
            cascade standard -label "Standard Views" -menu {
@@ -5496,15 +5501,17 @@
        -command [::itcl::code $this doViewCenter] \
        -state disabled
     $itk_component(menubar) menuconfigure .display.background.black \
-       -command [::itcl::code $this backgroundColor 0 0 0]
+       -command [::itcl::code $this backgroundColor black]
     $itk_component(menubar) menuconfigure .display.background.grey \
-       -command [::itcl::code $this backgroundColor 100 100 100]
+       -command [::itcl::code $this backgroundColor grey]
     $itk_component(menubar) menuconfigure .display.background.white \
-       -command [::itcl::code $this backgroundColor 255 255 255]
+       -command [::itcl::code $this backgroundColor white]
     $itk_component(menubar) menuconfigure .display.background.cyan \
-       -command [::itcl::code $this backgroundColor 0 200 200]
+       -command [::itcl::code $this backgroundColor cyan]
     $itk_component(menubar) menuconfigure .display.background.blue \
-       -command [::itcl::code $this backgroundColor 0 0 160]
+       -command [::itcl::code $this backgroundColor blue]
+    $itk_component(menubar) menuconfigure .display.background.navy \
+       -command [::itcl::code $this backgroundColor navy]
     $itk_component(menubar) menuconfigure .display.standard.front \
        -command [::itcl::code $this doAe 0 0]
     $itk_component(menubar) menuconfigure .display.standard.rear \
@@ -7726,7 +7733,7 @@
        }
     }
 
-    eval backgroundColor $mBackground
+    backgroundColor $mBackgroundColor
     gedCmd configure -measuringStickColor $mMeasuringStickColor
     gedCmd configure -measuringStickMode $mMeasuringStickMode
     gedCmd configure -primitiveLabelColor $mPrimitiveLabelColor
@@ -7754,8 +7761,10 @@
 
     if {$mBackgroundColor != $mBackgroundColorPref} {
        set mBackgroundColor $mBackgroundColorPref
-       set mBackground [getRgbColor $mBackgroundColor]
-       eval backgroundColor $mBackground
+       backgroundColor $mBackgroundColor
+#      set mBackground [getRgbColor $mBackgroundColor]
+#      eval backgroundColor $mBackground
+#      eval backgroundColor [getRgbColor $mBackgroundColor]
     }
 
     if {$mPrimitiveLabelColor != $mPrimitiveLabelColorPref} {
@@ -8330,7 +8339,7 @@
        }
     }
 
-    eval backgroundColor $mBackground
+    backgroundColor $mBackgroundColor
 
     if {!$mDelayCommandViewBuild} {
        ::update

Modified: brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2010-09-22 18:28:17 UTC 
(rev 40646)
+++ brlcad/trunk/src/tclscripts/archer/ArcherCore.tcl   2010-09-22 18:28:48 UTC 
(rev 40647)
@@ -471,8 +471,8 @@
 Popup Menu    Right or Ctrl-Left
 "
 
-       variable mColorList {Grey Black Blue Cyan Green Magenta Red White 
Yellow Triple}
-       variable mColorListNoTriple {Grey Black Blue Cyan Green Magenta Red 
White Yellow}
+       variable mColorList {Grey Black Navy Blue Cyan Green Magenta Red White 
Yellow Triple}
+       variable mColorListNoTriple {Grey Black Navy Blue Cyan Green Magenta 
Red White Yellow}
        variable mDefaultNodeColor {150 150 150}
 
        variable mDoStatus 1
@@ -791,7 +791,7 @@
        method validateTickInterval {_ti}
        method validateColorComp {_c}
 
-       method backgroundColor {_r _g _b}
+       method backgroundColor {_color}
 
        method updateHPaneFractions {}
        method updateVPaneFractions {}
@@ -1051,10 +1051,6 @@
        updateSaveMode
     }
 
-    backgroundColor [lindex $mBackground 0] \
-       [lindex $mBackground 1] \
-       [lindex $mBackground 2]
-
     initImages
     initTreeImages
     if {!$mDelayCommandViewBuild} {
@@ -1236,27 +1232,31 @@
                options -tearoff 0
 
                command black -label "Black" \
-                   -helpstr "Set background color black"
+                   -helpstr "Set background color to black"
                command grey -label "Grey" \
-                   -helpstr "Set background color grey"
+                   -helpstr "Set background color to grey"
                command white -label "White" \
-                   -helpstr "Set background color white"
-               command lblue -label "Light Blue" \
-                   -helpstr "Set background color light blue"
-               command dblue -label "Dark Blue" \
-                   -helpstr "Set background color dark blue"
+                   -helpstr "Set background color to white"
+               command cyan -label "Cyan" \
+                   -helpstr "Set background color to cyan"
+               command blue -label "Light Blue" \
+                   -helpstr "Set background color to blue"
+               command navy -label "Navy" \
+                   -helpstr "Set background color to navy"
            }
 
        $itk_component(canvas_menu) menuconfigure .background.black \
-           -command [::itcl::code $this backgroundColor 0 0 0]
+           -command [::itcl::code $this backgroundColor black]
        $itk_component(canvas_menu) menuconfigure .background.grey \
-           -command [::itcl::code $this backgroundColor 100 100 100]
+           -command [::itcl::code $this backgroundColor grey]
        $itk_component(canvas_menu) menuconfigure .background.white \
-           -command [::itcl::code $this backgroundColor 255 255 255]
-       $itk_component(canvas_menu) menuconfigure .background.lblue \
-           -command [::itcl::code $this backgroundColor 0 198 255]
-       $itk_component(canvas_menu) menuconfigure .background.dblue \
-           -command [::itcl::code $this backgroundColor 0 0 160]
+           -command [::itcl::code $this backgroundColor white]
+       $itk_component(canvas_menu) menuconfigure .background.cyan \
+           -command [::itcl::code $this backgroundColor cyan]
+       $itk_component(canvas_menu) menuconfigure .background.blue \
+           -command [::itcl::code $this backgroundColor blue]
+       $itk_component(canvas_menu) menuconfigure .background.navy \
+           -command [::itcl::code $this backgroundColor navy]
 
     # Raytrace Menu
        $itk_component(canvas_menu) add menubutton raytrace \
@@ -2701,10 +2701,18 @@
 }
 
 
-::itcl::body ArcherCore::backgroundColor {r g b} {
+::itcl::body ArcherCore::backgroundColor {_color} {
     set mCurrentPaneName ""
-    set mBackground [list $r $g $b]
+    set mBackgroundColor $_color
 
+    if {[catch {getRgbColor $mBackgroundColor} mBackground]} {
+       set mBackgroundColor black
+       set mBackground {0 0 0}
+    }
+
+    if {[info exists itk_component(ged)]} {
+       eval $itk_component(ged) bg_all $mBackground
+    }
 }
 
 
@@ -3334,20 +3342,16 @@
 ::itcl::body ArcherCore::fillTreeColumns {_cnode _ctext} {
     if {$mTreeAttrColumns != {}} {
        set vals {}
-       set anames {}
-       set avals {}
 
-       if {![catch {gedCmd attr get $_ctext} alist]} {
-           foreach {aname aval} $alist {
-               lappend anames $aname
-               lappend avals $aval
-           }
+       if {[catch {gedCmd attr get $_ctext} alist]} {
+           set alist {}
        }
 
        foreach attr $mTreeAttrColumns {
-           set ai [lsearch $anames $attr]
+           set ai [lsearch -index 0 $alist $attr]
            if {$ai != -1} {
-               lappend vals [lindex $avals $ai]
+               incr ai
+               lappend vals [lindex $alist $ai]
            } else {
                lappend vals {}
            }


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

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to