[Patch] Fix for parser tab in prefs dialog

Mo DeJong supermo@bayarea.net
Tue Feb 26 12:51:00 GMT 2002

The ChangeLog entry says it all.


2002-02-26  Mo DeJong  <supermo@bayarea.net>

	* gui/preferences.tcl (AddParser): Use a grid layout
	for the "Language Extensions" entries in the Parser tab.
	The previous implementation would grow the left entry
	at the expense of the right entry. One could make the
	right entry vanish by typing a lot of text into the
	left entry.

Index: gui/preferences.tcl
RCS file: /cvs/sourcenav/src/snavigator/gui/preferences.tcl,v
retrieving revision 1.2
diff -u -r1.2 preferences.tcl
--- preferences.tcl	2002/02/22 03:31:49	1.2
+++ preferences.tcl	2002/02/26 20:26:53
@@ -910,17 +910,15 @@
         ${ext} config -background $sn_options(def,layout-bg)
         set win [${Parser}.ext subwidget frame]
         pack ${ext} -fill x -side top -anchor c
-        foreach type [lsort -dictionary ${Avail_Parsers}] {
-            set fr ${win}.${type}
-            set ext ${fr}.edit
-            set externaled ${fr}.external
-            #file extensitions for there types
-            pack [frame ${fr}] -side top -fill x
+        set row 0
+        foreach type [lsort -dictionary ${Avail_Parsers}] {
+            set ext ${win}.edit${row}
+            set externaled ${win}.external${row}
             Entry& ${ext} -width -1 -labelwidth 10 -label ${type}\
               -textvariable opt_Parser_Info(${type},SUF)
-            pack ${ext} -side left -fill x -expand y
+            grid ${ext} -row $row -column 0 -sticky ew
             #external editors
             LabelEntryButton& ${externaled} -text [get_indep String\
@@ -929,8 +927,11 @@
               -buttonballoon [get_indep String ChooseINFO]\
               -extensions $sn_options(executable_ext)\
               -defaultextension $sn_options(executable_defaultext)
-            pack ${externaled} -side left
+            grid ${externaled} -row $row -column 1
+            incr row
+        grid columnconfigure ${win} 0 -weight 1
         #Macro files
         set macfr [tixLabelFrame ${Parser}.macros -label [get_indep String\

More information about the Sourcenav mailing list