[GRASS-SVN] r31340 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 14 02:32:57 EDT 2008


Author: cmbarton
Date: 2008-05-14 02:32:57 -0400 (Wed, 14 May 2008)
New Revision: 31340

Modified:
   grass/branches/develbranch_6/lib/gis/gui.tcl
Log:
I think this fixes the problem with the "Required" tab not being first. If such a tab exists, it is now the first tab and initially selected. This works on my Mac in OSX 10.5. Please test on other platforms.

Modified: grass/branches/develbranch_6/lib/gis/gui.tcl
===================================================================
--- grass/branches/develbranch_6/lib/gis/gui.tcl	2008-05-13 22:02:52 UTC (rev 31339)
+++ grass/branches/develbranch_6/lib/gis/gui.tcl	2008-05-14 06:32:57 UTC (rev 31340)
@@ -356,7 +356,11 @@
 			set guisection {Options}
 		}
 		set path $opt($dlg,path)
-		set optpane [$path.nb insert end $guisection -text $glabel]
+		if {$glabel == "Required"} {
+			set optpane [$path.nb insert 0 $guisection -text $glabel]
+		} else {
+			set optpane [$path.nb insert end $guisection -text $glabel]			
+		}
 		# Specials don't get scrolling frames:
 		if {$optn == -1} {
 			$path.nb raise $guisection
@@ -413,7 +417,12 @@
 		set guisection {{}}
 		set guisection {Options}
 	}
+	
+	set firstpg [$path.nb pages 0]
 	$path.nb raise $guisection
+	
+	#Make the first tab the active one instead of the "options" tab
+	$path.nb raise $firstpg
 }
 
 proc layout_raise_special_frame {dlg guisection key} {
@@ -710,6 +719,7 @@
 
 	foreach key {label desc} {
 		set opt($dlg,$key) $opts($key)
+		
 	}
 
 	# Replace all non-ascii chars, spaces, $ and braces in path with undescore
@@ -735,7 +745,7 @@
 	set root $opt($dlg,root)
 
 	make_dialog_end $dlg $path $root
-
+	
 	if {$n > 0} {
 		layout_raise_frame $dlg $opt($dlg,1,guisection) 1
 	}



More information about the grass-commit mailing list