[GRASS5] [bug #3002] (grass) G_parser() for GUIs and HTML help: missing opt->key_desc text
Glynn Clements
glynn at gclements.plus.com
Tue Jul 12 14:51:59 EDT 2005
Harmish Bowman via RT wrote:
> TODO: (by someone who knows some TCL)
> Edit lib/gis/gui.tcl so that the option description in the GUI indicates if
> multiple answers are ok.
>
> e.g. (string[,string,...]; required)
>
> or something like that.
>
> "mult" = 0 or 1 is already there, just need to test & append the string.
Try the attached patch.
--
Glynn Clements <glynn at gclements.plus.com>
-------------- next part --------------
--- lib/gis/gui.tcl~ 2005-01-08 13:08:59.000000000 +0000
+++ lib/gis/gui.tcl 2005-07-12 19:50:31.000000000 +0100
@@ -257,12 +257,13 @@
pack $suf.val$optn.val -side left -fill x -expand yes
}
-proc do_label {dlg optn desc type reqd} {
+proc do_label {dlg optn desc type reqd mult} {
global opt
set suf $opt($dlg,suf)
set req [expr {$reqd ? "required" : "optional"}]
- label $suf.lab$optn -text "$desc ($type, $req):" -anchor w -justify left
+ set multi [expr {$mult ? ", multiple" : ""}]
+ label $suf.lab$optn -text "$desc ($type$multi, $req):" -anchor w -justify left
pack $suf.lab$optn -side top -fill x
}
@@ -316,7 +317,7 @@
set opt($dlg,$optn,$key) $opts($key)
}
- do_label $dlg $optn $opts(desc) $opts(type) $opts(required)
+ do_label $dlg $optn $opts(desc) $opts(type) $opts(required) $opts(multi)
frame $suf.val$optn
if {$opts(options) != {}} {
More information about the grass-dev
mailing list