Index: trunk/gui/scripts/heightmapviewer.tcl
===================================================================
--- trunk/gui/scripts/heightmapviewer.tcl	(revision 1293)
+++ trunk/gui/scripts/heightmapviewer.tcl	(revision 1294)
@@ -1,3 +1,2 @@
-
 # ----------------------------------------------------------------------
 #  COMPONENT: heightmapviewer - 3D volume rendering
@@ -42,15 +41,15 @@
     itk_option define -plotoutline plotOutline PlotOutline ""
 
-    constructor { hostlist args } { 
-        Rappture::VisViewer::constructor $hostlist 
-    } { 
-        # defined below 
-    }
-    destructor { 
-        # defined below 
+    constructor { hostlist args } {
+        Rappture::VisViewer::constructor $hostlist
+    } {
+        # defined below
+    }
+    destructor {
+        # defined below
     }
 
     public proc SetServerList { namelist } {
-	Rappture::VisViewer::SetServerList "nanovis" $namelist
+        Rappture::VisViewer::SetServerList "nanovis" $namelist
     }
     public method add {dataobj {settings ""}}
@@ -59,6 +58,6 @@
     public method scale {args}
     public method download {option args}
-    public method parameters {title args} { 
-        # do nothing 
+    public method parameters {title args} {
+        # do nothing
     }
     protected method Connect {}
@@ -95,5 +94,5 @@
 
     private common settings_      ;# Array used for checkbuttons and radiobuttons
-                        
+
 }
 
@@ -133,6 +132,6 @@
         psi     0
         zoom    1.0
-        dx	0
-        dy	0
+        dx      0
+        dy      0
     }
     set obj2id_(count) 0
@@ -203,10 +202,10 @@
     Rappture::Balloon $itk_component(controls).panel -title "Settings"
     set inner [$itk_component(controls).panel component inner]
-    
+
     frame $inner.f
     pack $inner.f -side top -fill x
     grid columnconfigure $inner.f 1 -weight 1
     set fg [option get $itk_component(hull) font Font]
-    
+
     set ::Rappture::HeightmapViewer::settings_($this-grid) 1
     ::checkbutton $inner.f.grid \
@@ -233,5 +232,5 @@
     ::checkbutton $inner.f.wireframe \
         -text "Wireframe" \
-	-onvalue "wireframe" -offvalue "fill" \
+        -onvalue "wireframe" -offvalue "fill" \
         -variable ::Rappture::HeightmapViewer::settings_($this-wireframe) \
         -command [itcl::code $this _fixSettings wireframe]
@@ -289,14 +288,14 @@
     # Bindings for zoom via keyboard
     bind $itk_component(3dview) <KeyPress-Prior> \
-	[itcl::code $this _zoom out]
+        [itcl::code $this _zoom out]
     bind $itk_component(3dview) <KeyPress-Next> \
-	[itcl::code $this _zoom in]
+        [itcl::code $this _zoom in]
 
     bind $itk_component(3dview) <Enter> "focus $itk_component(3dview)"
 
     if {[string equal "x11" [tk windowingsystem]]} {
-	# Bindings for zoom via mouse
-	bind $itk_component(3dview) <4> [itcl::code $this _zoom out]
-	bind $itk_component(3dview) <5> [itcl::code $this _zoom in]
+        # Bindings for zoom via mouse
+        bind $itk_component(3dview) <4> [itcl::code $this _zoom out]
+        bind $itk_component(3dview) <5> [itcl::code $this _zoom in]
     }
 
@@ -601,5 +600,5 @@
             # tell the engine to expect some data
             set nbytes [string length $data]
-	    if { ![SendBytes "heightmap data follows $nbytes"] } {
+            if { ![SendBytes "heightmap data follows $nbytes"] } {
                 return
 
@@ -787,6 +786,6 @@
                 psi     0
                 zoom    1.0
-		dx 0
-		dy 0
+                dx      0
+                dy      0
             }
             set xyz [Euler2XYZ $view_(theta) $view_(phi) $view_(psi)]
@@ -801,5 +800,5 @@
 # USAGE: $this _pan click x y
 #        $this _pan drag x y
-#	 $this _pan release x y
+#        $this _pan release x y
 #
 # Called automatically when the user clicks on one of the zoom
@@ -811,24 +810,24 @@
     set h [winfo height $itk_component(3dview)]
     if { $option == "set" } {
-	set x [expr $x / double($w)]
-	set y [expr $y / double($h)]
-	set view_(dx) [expr $view_(dx) + $x]
-	set view_(dy) [expr $view_(dy) + $y]
+        set x [expr $x / double($w)]
+        set y [expr $y / double($h)]
+        set view_(dx) [expr $view_(dx) + $x]
+        set view_(dy) [expr $view_(dy) + $y]
         _send "camera pan $view_(dx) $view_(dy)"
-	return
-    }
-    if { $option == "click" } { 
-	set click_(x) $x
-	set click_(y) $y
+        return
+    }
+    if { $option == "click" } {
+        set click_(x) $x
+        set click_(y) $y
         $itk_component(3dview) configure -cursor hand1
     }
     if { $option == "drag" || $option == "release" } {
-	set dx [expr ($click_(x) - $x)/double($w)]
-	set dy [expr ($click_(y) - $y)/double($h)]
-	set click_(x) $x
-	set click_(y) $y
-	set view_(dx) [expr $view_(dx) - $dx]
-	set view_(dy) [expr $view_(dy) - $dy]
-	_send "camera pan $view_(dx) $view_(dy)"
+        set dx [expr ($click_(x) - $x)/double($w)]
+        set dy [expr ($click_(y) - $y)/double($h)]
+        set click_(x) $x
+        set click_(y) $y
+        set view_(dx) [expr $view_(dx) - $dx]
+        set view_(dy) [expr $view_(dy) - $dy]
+        _send "camera pan $view_(dx) $view_(dy)"
     }
     if { $option == "release" } {
@@ -849,10 +848,10 @@
         click {
             $itk_component(3dview) configure -cursor fleur
-	    array set click_ [subst {
-		x       $x
-		y       $y
-		theta   $view_(theta)
-		phi     $view_(phi)
-	    }]
+            array set click_ [subst {
+                x       $x
+                y       $y
+                theta   $view_(theta)
+                phi     $view_(phi)
+            }]
         }
         drag {
@@ -945,5 +944,5 @@
             set h [expr {[winfo height $itk_component(legend)]-20-$lineht}]
             set imap ""
-            
+
             set dataobj [lindex [get] 0]
             if {"" != $dataobj} {
@@ -1032,8 +1031,8 @@
             # add spikes in the middle
             set xval [expr {double($i)/($levels+1)}]
-	    lappend wmap [expr {$xval-$delta-0.01}] 0.0
-	    lappend wmap [expr {$xval-$delta}] $opacity 
-	    lappend wmap [expr {$xval+$delta}] $opacity
-	    lappend wmap [expr {$xval+$delta+0.01}] 0.0
+            lappend wmap [expr {$xval-$delta-0.01}] 0.0
+            lappend wmap [expr {$xval-$delta}] $opacity 
+            lappend wmap [expr {$xval+$delta}] $opacity
+            lappend wmap [expr {$xval+$delta+0.01}] 0.0
         }
         lappend wmap 1.0 0.0
@@ -1042,7 +1041,7 @@
         set delta 0.05
         foreach xval [split $levels ,] {
-            lappend wmap [expr {$xval-$delta}] 0.0  
-	    lappend $xval $opacity
-	    lappend [expr {$xval+$delta}] 0.0
+            lappend wmap [expr {$xval-$delta}] 0.0
+            lappend $xval $opacity
+            lappend [expr {$xval+$delta}] 0.0
         }
         lappend wmap 1.0 0.0
Index: trunk/gui/scripts/visviewer.tcl
===================================================================
--- trunk/gui/scripts/visviewer.tcl	(revision 1293)
+++ trunk/gui/scripts/visviewer.tcl	(revision 1294)
@@ -35,5 +35,5 @@
     private variable idleTimeout_ 43200000; # 12 hours
     #private variable idleTimeout_ 5000;    # 5 seconds
-    #private variable idleTimeout_ 0;	    # No timeout
+    #private variable idleTimeout_ 0;       # No timeout
 
     protected variable _dispatcher ""   ;# dispatcher for !events
@@ -133,7 +133,7 @@
     #
     itk_component add drawer {
- 	panedwindow $itk_interior.drawer \
- 	    -orient horizontal -opaqueresize 1 -handlepad 0 \
- 	    -handlesize 1 -sashwidth 2     
+        panedwindow $itk_interior.drawer \
+            -orient horizontal -opaqueresize 1 -handlepad 0 \
+            -handlesize 1 -sashwidth 2
     }
     pack $itk_component(drawer) -expand yes -fill both
@@ -207,9 +207,9 @@
 # Connect --
 #
-#    Connect to the visualization server (e.g. nanovis, pymolproxy).  
-#    Creates an event callback that is triggered when we are idle 
-#    (no I/O with the server) for some specified time. Sends the server 
-#    some estimate of the size of our job [soon to be deprecated].  
-#    If it's too busy, that server may forward us to another [this 
+#    Connect to the visualization server (e.g. nanovis, pymolproxy).
+#    Creates an event callback that is triggered when we are idle
+#    (no I/O with the server) for some specified time. Sends the server
+#    some estimate of the size of our job [soon to be deprecated].
+#    If it's too busy, that server may forward us to another [this
 #    was been turned off in nanoscale].
 #
@@ -260,7 +260,7 @@
             # release the busy window over the hull.
             $_dispatcher cancel !serverDown
-	    if { $idleTimeout_ > 0 } {
-		$_dispatcher event -after $idleTimeout_ !timeout
-	    }
+            if { $idleTimeout_ > 0 } {
+                $_dispatcher event -after $idleTimeout_ !timeout
+            }
             blt::busy release $itk_component(hull)
             fconfigure $sid_ -buffering line
@@ -308,12 +308,12 @@
 itcl::body Rappture::VisViewer::_CheckConnection {} {
     if { [IsConnected] } {
-	if { [eof $sid_] } {
-	    error "unexpected eof on socket"
-	}
-	$_dispatcher cancel !timeout
-	if { $idleTimeout_ > 0 } {
-	    $_dispatcher event -after $idleTimeout_ !timeout
-	}
-	return 1
+        if { [eof $sid_] } {
+            error "unexpected eof on socket"
+        }
+        $_dispatcher cancel !timeout
+        if { $idleTimeout_ > 0 } {
+            $_dispatcher event -after $idleTimeout_ !timeout
+        }
+        return 1
     }
     # If we aren't connected, assume it's because the connection to the
@@ -326,10 +326,10 @@
     set code [catch { Connect } ok]
     if { $code == 0 && $ok} {
-	$_dispatcher event -idle !rebuild
-	Rappture::Tooltip::cue hide 
-	return 1
+        $_dispatcher event -idle !rebuild
+        Rappture::Tooltip::cue hide
+        return 1
     } else {
-	Rappture::Tooltip::cue @$x,$y "Can't connect to visualization server.  This may be a network problem.  Wait a few moments and try resetting the view."
-	return 0
+        Rappture::Tooltip::cue @$x,$y "Can't connect to visualization server.  This may be a network problem.  Wait a few moments and try resetting the view."
+        return 0
     }
 }
@@ -356,5 +356,5 @@
 itcl::body Rappture::VisViewer::_SendHelper {} {
     if { ![_CheckConnection] } {
-	return 0
+        return 0
     }
     puts $sid_ $buffer_(out)
@@ -374,5 +374,5 @@
 itcl::body Rappture::VisViewer::_SendHelper.old {} {
     if { ![_CheckConnection] } {
-	return 0
+        return 0
     }
     set bytesLeft [string length $buffer_(out)]
@@ -407,5 +407,5 @@
 
     if { ![_CheckConnection] } {
-	return 0
+        return 0
     }
     # Even though the data is sent in only 1 "puts", we need to verify that
@@ -429,5 +429,5 @@
 itcl::body Rappture::VisViewer::ReceiveBytes { size } {
     if { ![_CheckConnection] } {
-	return 0
+        return 0
     }
     set bytes [read $sid_ $size]
@@ -457,33 +457,33 @@
 itcl::body Rappture::VisViewer::_ReceiveHelper {} {
     if { ![_CheckConnection] } {
-	return 0
+        return 0
     }
     set n [gets $sid_ line]
-    
+
     if { $n < 0 } {
-	Disconnect
-	return 0
+        Disconnect
+        return 0
     }
     set line [string trim $line]
     if { $line == "" } {
-	return
+        return
     }
     if { [string compare -length 3 $line "nv>"] == 0 } {
-	ReceiveEcho <<line $line
-	append buffer_(in) [string range $line 3 end]
-	append buffer_(in) "\n"
-	if {[info complete $buffer_(in)]} {
-	    set request $buffer_(in)
-	    set buffer_(in) ""
-	    $_parser eval $request
-	}
+        ReceiveEcho <<line $line
+        append buffer_(in) [string range $line 3 end]
+        append buffer_(in) "\n"
+        if {[info complete $buffer_(in)]} {
+            set request $buffer_(in)
+            set buffer_(in) ""
+            $_parser eval $request
+        }
     } elseif { [string compare -length 20 $line "NanoVis Server Error:"] == 0} {
-	# this shows errors coming back from the engine
-	ReceiveEcho <<error $line
-	puts stderr "Render Server Error: $line\n"
+        # this shows errors coming back from the engine
+        ReceiveEcho <<error $line
+        puts stderr "Render Server Error: $line\n"
     } else {
-	# this shows errors coming back from the engine
-	ReceiveEcho <<error $line
-	puts stderr "Garbled message: $line\n"
+        # this shows errors coming back from the engine
+        ReceiveEcho <<error $line
+        puts stderr "Garbled message: $line\n"
     }
 }
