[GRASS-dev] [bug #4960] (grass) gis.m has menu entries for nonexisting modules

Maciej Sieczka tutey at o2.pl
Fri Aug 4 04:47:41 EDT 2006


Ma-ris Nartišs napisa?(a):

> --- gui/tcltk/gis.m/runandoutput.tcl.orig       2006-07-22 
> 12:29:48.000000000 +0300
> +++ gui/tcltk/gis.m/runandoutput.tcl    2006-08-03 23:09:43.000000000 +0300
> @@ -65,10 +65,15 @@
>  }
>  
>  proc run_ui {cmd} {
> -    global dlg path
> +    global dlg path env
>  
>      set program [lindex $cmd 0]
>  
> +    if { ![file executable $env(GISBASE)/bin/$program] }  {
> +      tk_messageBox -icon error -message [G_msg "Sorry, your GRASS 
> installation lacks module \"$program\""]
> +      return
> +    }
> +
>      set code [exec -- $program --tcltk]
>  
>      set path .dialog$dlg

Ma-ris,

Very good, in my opinion. Easy to implement and making user's life
easier. I'd like to see it applied.

Maybe let's add to the message: "See REQUIREMENTS.html/Optional
requirements for details." (or something like that)

Maciek




More information about the grass-dev mailing list