Opened 11 years ago
Closed 9 years ago
#2077 closed enhancement (fixed)
implement drop-down menu for barscale styles
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 7.0.0 |
Component: | wxGUI | Version: | svn-trunk |
Keywords: | d.barscale | Cc: | martinl |
CPU: | All | Platform: | All |
Description
Would be nice to implement drop-down menu for barscale styles (1), ie. d.barscale style=
and probably also for d.barscale north_arrow=
similarly to d.vect symbol=
.
(1) http://grasswiki.osgeo.org/wiki/Cartography#Display_monitors
Attachments (1)
Change History (23)
comment:1 by , 11 years ago
Version: | unspecified → svn-trunk |
---|
follow-up: 3 comment:2 by , 11 years ago
Just to make it clear, do you want to create the images once and keep it in the repository or generate it during compilation (like color tables)?
comment:3 by , 11 years ago
Replying to annakrat:
Just to make it clear, do you want to create the images once and keep it in the repository or generate it during compilation (like color tables)?
Hi Anna,
I don't see any benefit to rebuild every time, happy to create them once and then update manually in svn as needed. I don't expect to update them often.
thanks, Hamish
follow-up: 5 comment:4 by , 11 years ago
Done in r57698. I am not sure about the north arrows, I used the PNGs which are already there for symbols, but they look little differently than the arrow created by d.barscale (fill color is gray, not black, and the 'N' is not there).
Feel free to put the barscale pictures in a separate directory, I just didn't want to spend time with the Makefile. Also, it would be nice to put the images in the manual page like r.colors color tables.
comment:5 by , 11 years ago
Replying to annakrat:
Done in r57698. I am not sure about the north arrows, I used the PNGs which are already there for symbols, but they look little differently than the arrow created by d.barscale (fill color is gray, not black, and the 'N' is not there).
good work!
Unfortunately the patch has probably one side-effect. After this change some widgets are not visible, see attachment:d-barscale.png
Python 2.7.5+ (default, Aug 4 2013, 10:07:17) >>> wx.__version__ '2.8.12.1'
follow-up: 7 comment:6 by , 11 years ago
It should be fixed in r57701 (wrong if condition), thanks for noticing it.
comment:7 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:8 by , 11 years ago
Small note: generated images of barscale are currently stored in source:grass/trunk/gui/images. Better place would be gui/images/barscale
or something similar.
follow-ups: 11 15 comment:9 by , 11 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
BTW, any chance to add barscale images to the manual, similarly to r.colors
?
follow-up: 12 comment:10 by , 11 years ago
Another issue, after splitting out the module to d.barscale
and d.northarrow
, the dialog of d.northarrow
lacks generated images of the styles.
follow-ups: 13 14 comment:11 by , 11 years ago
Replying to martinl:
BTW, any chance to add barscale images to the manual, similarly to
r.colors
?
This issue and the one with barscale directory is already in comment 5. I am leaving this to others (because of Makefiles).
comment:12 by , 11 years ago
comment:13 by , 11 years ago
comment:14 by , 11 years ago
comment:15 by , 11 years ago
Replying to martinl:
BTW, any chance to add barscale images to the manual, similarly to
r.colors
?
Done in r57735.
I am not sure about current solution, barscale previews are copied to $(DIST)/gui/images
directory which seems to be a natural place for them. Previews in the manual link to this directory which is probably not a good idea. GRASS installation could be distributed without GUI, then the previews will be missing in the manual. We have two options
(1) redundancy - copy barscales previews to two directories, ie.
gui/images
anddocs/html
. Already used for toolbar icons.
(2) copy barscales only to
docs\html
Second option could be problem for distributions without documentation, then the previews would be missing. But it's quite improbable situation.
BTW, colorstable previews are currently copied only to docs/html
.
follow-ups: 17 20 comment:16 by , 11 years ago
The GUI should depend on documentation not the other way around, so 2 or 1 are the right options.
Do we know that documentation is always in $GISBASE/docs/html
on all platforms? Are there any distributions which put the documentation somewhere else? The first option (redundancy) would be the safest option in this case.
Currently, the documentation path in the GUI is used for accessing the pages, e.g. in module dialogs/forms. So, the option 2 (things in docs/html) is already used and it seems to work. (But are we sure that it is always $GISBASE/docs/html
?)
By the way, I'm wondering how the compilation of HTML works in non-unix enviroments. Do I need to have sed
installed?
follow-up: 18 comment:17 by , 11 years ago
Replying to wenzeslaus:
The GUI should depend on documentation not the other way around, so 2 or 1 are the right options.
Agreed, I would suggest to move barscale thumbs to display/d.barscale
and copy them to $GISBASE/docs/html
(similarly to r.colors
's color tables).
Do we know that documentation is always in
$GISBASE/docs/html
on all platforms? Are there any distributions which put the documentation somewhere else? The first option (redundancy) would be the safest option in this case.
Not sure about that.
Currently, the documentation path in the GUI is used for accessing the pages, e.g. in module dialogs/forms. So, the option 2 (things in docs/html) is already used and it seems to work. (But are we sure that it is always
$GISBASE/docs/html
?)By the way, I'm wondering how the compilation of HTML works in non-unix enviroments. Do I need to have
sed
installed?
AFAIK, sed
is required.
grep -w 'sed' --include=Makefile -R | cut -d':' -f1 | uniq macosx/app/Makefile macosx/Makefile raster/r.colors/Makefile lib/python/script/Makefile lib/python/ctypes/Makefile lib/init/Makefile mswindows/Makefile include/Makefile demolocation/Makefile vector/v.colors/Makefile display/d.barscale/Makefile
follow-up: 19 comment:18 by , 11 years ago
Replying to martinl:
Replying to wenzeslaus:
The GUI should depend on documentation not the other way around, so 2 or 1 are the right options.
Agreed, I would suggest to move barscale thumbs to
display/d.barscale
and copy them to$GISBASE/docs/html
(similarly tor.colors
's color tables).
done in r57801. Similarly we could include symbols thumbnails in d.vect's manual page and probably move gui/images/symbols
to display/d.vect/symbols
(?)
comment:19 by , 11 years ago
Replying to martinl:
Similarly we could include symbols thumbnails in d.vect's manual page and probably move
gui/images/symbols
todisplay/d.vect/symbols
(?)
not for symbols because symbols are independent of d.vect (e.g. d.graph, ps.map), whereas d.barscale contains the code to render the barscale internally.
for the color scales r.colors makes them as part of its Makefile, so it makes some sense for them to be built into raster/r.colors/ then installed from there.
Don't worry about prepping things for the debian/ubuntu packaging, it's all manually picked into the various packages by hand & 'make install' is not run there. A goal of the packaging is to keep platform dependent code (e.g. exe binaries) and platform independent code (e.g. help pages, png images) in separate packages so the platform-independent files can be shared across all, and only the platform-specific files need to be duplicated on the download servers. (etc/ is a bit of a tricky one to untangle, since it has both in the same dir structure and while hand picked, it's easier to do/maintain that by dir than by file)
Having said that, I don't think it's a big deal if the help pages have broken links to the thumbnails if the grass-gui package is not installed, it's more important that the drop-down menus work. Duplication is not good, but I can see the case where the docs should be self-contained in html/ dir (+subdirs). Similarly, I can see the case that the GUI shouldn't have to hunt in $GISBASE/etc/docs/ for support files, but I guess anything in etc/ is fair game. These files are pretty tiny anyway..
AFAIK, sed is required.
note that 'sed' is ok, but 'sed -i' is not portable to Mac/BSD.
thanks, Hamish
comment:20 by , 11 years ago
Replying to wenzeslaus:
Do we know that documentation is always in
$GISBASE/docs/html
on all platforms? Are there any distributions which put the documentation somewhere else?
fwiw Debian has it's strict packaging rules, so the html dir is installed to /usr/share/doc/grass-doc/html/ and $GISBASE/docs/html is a symlink to that, so GRASS doesn't have to do anything special. (& GRASS man pages are installed to /usr/share/man/man1/)
regards, Hamish
comment:21 by , 10 years ago
Images in manual work for:
They don't work for:
Although wxGUI dialog for d.northarrow
shows the arrows.
comment:22 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Original issue solved. G7:d.northarrow manual page images continued in #3032.
Hi,
yes, I think that would be helpful as it's a bit difficult to find specific names for all of the different styles, and of course being locked into English those names in the current drop down list are not so helpful when using GRASS translated. (fwiw, also I've been trying to keep them all starting with a unique letter)
for the north arrows I didn't even try to describe them in a single word. those already have png icon versions for
d.vect symbol=
, but probably better to have a second set for this at ~ 75-100px square. see Anna's /trunk/gui/images/symbols/README for standardized thumbnail creation instructions.thanks, Hamish