Opened 16 years ago

Closed 10 years ago

#88 closed task (fixed)

opt->guisection and opt->label for a better GUI world

Reported by: hamish Owned by: grass-dev@…
Priority: minor Milestone: 6.4.4
Component: Default Version: unspecified
Keywords: guisection Cc:
CPU: All Platform: All

Description

this was wish # 238 on the old gforge system. moving it here. http://wald.intevation.org/tracker/index.php?func=detail&aid=238&group_id=21&atid=188


2006-11-18

I have updated a few complicated modules to use opt->guisection for nicer GUI menus using tabs.

>  d.legend
>  d.vect
>  r.report
>  r.watershed
>  r.sunmask
>  v.buffer
>  v.label
> 
> already done by Cedric:
>  r.in.wms
>  g.region
> 
> to be done: 
>  (see below)

Wierdness-

order of tabs:

the tab containing the first flag determines which tab comes first. the default tab "Options" should always be first.

tcltk bug:

guisections with a space in them cause a tcl error (quoting? list vs string?) e.g. r.watershed, r.sunmask (I've used underscores)

I also updated parser.c to use opt->label a little more. (if opt->label is used, it becomes the option's description, and the opt->description text becomes the tooltip.

Suggestion- opt->description is long established, don't mess with it.

change opt->label to opt->tooltip and reverse its meaning. Tooltips are good.

Suggestion 2- move G_define_module(), G_define_flag(), G_define_option(),

and G_define_standard_option() out of parser.c. It's a 2,500 line long monster.

back to guisection: The hierarchical rule of thumb is if it has more than 12 subordinates, split it into smaller groups. But it's not a hard rule, e.g. I think r.in.xyz is ok in a single tab.

here are the modules with more than 12 options+flags. I have removed the ones already mentioned above.

> cd $GISBASE/docs/html/
> # ($1 -2) is to ignore --q,--v
> 
> grep "<DT><b>" * | cut -f1 -d: | uniq -c | sort -n | \
>   awk '{if($1 -2 > 12) print }' | sed -e 's/\.html$//'

[rerun 11 Mar 2006]

     15 d.grid
     15 d.path
     15 d.vect.chart
     15 g.remove
     15 i.atcorr
     15 r.terraflow
     15 v.net.path
     16 d.legend
     16 d.nviz
     16 r3.out.vtk
     16 r.ros
     17 g.proj
     17 r.cost
     17 r.in.xyz
     17 r.out.vtk
     17 r.report
     17 v.distance
     18 r.topmodel
     19 r.in.bin
     19 r.le.patch
     19 r.slope.aspect
     19 v.in.ascii
     19 v.lrs.create
     20 d.text.freetype
     20 d.text
     20 r3.gwflow
     20 r.stats
     20 r.sunmask
     20 r.walk
     20 r.watershed
     20 v.transform
     21 r.resamp.rst
     21 r.spread
     22 r.texture
     22 v.in.ogr
     23 r.sim.sediment
     23 v.generalize
     23 v.lrs.label
     24 r.sun
     24 v.edit
     25 v.label
     26 r.gwflow
     26 r.in.wms
     27 r.sim.water
     27 v.vol.rst
     28 d.vect.thematic
     31 v.surf.rst
     33 d.vect
     36 g.region

old bug history: (reverse order)

Followup:
Message

Date: 2007-04-22 21:27
Sender: Hamish B

v.distance is done.


Hamish

Date: 2007-03-23 17:28
Sender: Hamish B

v.in.ascii is done.


Hamish

Date: 2006-11-27 17:10
Sender: Hamish B

d.vect.thematic has been done by Michael.

d.what.vect is a false positive.


This leaves these ones TODO:

15 g.remove
15 r.flow
15 r.terraflow
16 d.nviz
16 r.out.vtk
16 r3.out.vtk
16 r.ros
16 d.text.new
17 d.text.freetype
17 r.cost
17 v.distance
17 v.lrs.create
18 r.topmodel
19 r.le.patch
20 r.stats
20 r.walk
20 v.in.ogr
21 r.spread
21 v.in.ascii
21 v.lrs.label


Hamish


Hamish

Date: 2006-11-22 14:50
Sender: Hamish B

v.vol.rst
r.texture
r.resamp.rst

are done.

Hamish

Date: 2006-11-19 04:03
Sender: Hamish B

v.transform is done.

Hamish

Date: 2006-11-19 03:47
Sender: Hamish B

done for these:

r.sim.water
r.sim.sediment
r.slope.aspect
r.in.bin
r.sun
v.surf.rst


these remain:
>      15 d.what.vect
>      15 g.remove
>      15 r.flow
>      15 r.terraflow
>      16 d.nviz
>      16 d.text.new
>      16 r.out.vtk
>      16 r.ros
>      16 r3.out.vtk
>      16 v.transform
>      17 d.text.freetype
>      17 r.cost
>      17 v.distance
>      17 v.lrs.create
>      18 r.topmodel
>      19 r.le.patch
>      20 r.stats
>      20 r.walk
>      20 v.in.ogr
>      21 r.resamp.rst
>      21 r.spread
>      21 v.in.ascii
>      21 v.lrs.label
>      23 r.texture
>      26 v.vol.rst
>      28 d.vect.thematic

Change History (3)

comment:1 by hamish, 11 years ago

CPU: All
Keywords: guisection added
Milestone: 6.4.06.4.4
Platform: All

lots done by Martin et al., but still ongoing.

need to re-run the 'grep' to check the current status.

(I'd also argue that tabs with only 1 or 2 items in them might be worth reconsidering for a merge with another tab; if the module only has 4 options, no point in making the user look in 3 pages..)

Hamish

comment:2 by martinl, 10 years ago

Is this bug report still relevant?

in reply to:  2 comment:3 by wenzeslaus, 10 years ago

Resolution: fixed
Status: newclosed

Replying to martinl:

Is this bug report still relevant?

Apparently not, closing. Please, open a new ticket with a specific description of a given problem if needed.

Note: See TracTickets for help on using tickets.