Opened 16 years ago

Closed 16 years ago

#130 closed enhancement (fixed)

wxgrass: Remember the position of gui windows on Grass exit

Reported by: epatton Owned by: martinl
Priority: trivial Milestone: 6.4.0
Component: Python Version: svn-trunk
Keywords: gui, monitor, position Cc: grass-dev@…
CPU: Unspecified Platform: Unspecified

Description

I'd like to submit a request to have wxgrass remember the position of the respective gui windows on the monitor upon Grass exit, so that they may be restored to the same positions on Grass startup (alleviates the need to manually re-position the windows every time).

~ Eric.

Attachments (1)

wxgui-pref-win-pos.png (19.4 KB ) - added by martinl 16 years ago.
save default window layout

Download all attachments as: .zip

Change History (8)

comment:1 by martinl, 16 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:2 by hamish, 16 years ago

Eric:

I'd like to submit a request to have wxgrass remember the position of the respective gui windows on the monitor upon Grass exit, so that they may be restored to the same positions on Grass startup (alleviates the need to manually re-position the windows every time).

we did this for a short time with the tck/tk gui. IIRC the display window was hinted to go into the top left, the layer manager to the top right, and the output window to hug the bottom right corner.

specific window sizes and non-relative pixel placements were a problem because some folks use 800x600 displays (old hardware; 7" car LCD; OLPC/eeePC; ...)

it was then disccussed on the mailing list thread and decided that an app should not override a user's window manager settings, and the hinting was reverted.

Perhaps on Mac and Windows where the user has little or no control over the window manager the binary packagers could patch that or some #ifdef type thing could be triggered.

FWIW, here are my settings for gis.m windows from ~/.fluxbox/apps to deal with this:

[app] (name=mapcan\(1\)) (class=Toplevel)
  [Dimensions]  {778 885}
  [Position]    (UPPERLEFT)     {12 3}
[end]
[app] (name=gm_tcl) (class=Gm_tcl)
  [Position]    (UPPERLEFT)     {793 0}
[end]
[app] (name=gronsole) (class=Toplevel)
  [Position]    (UPPERLEFT)     {690 508}
[end]
[app] (name=form.tcl) (class=Form.tcl)
  [Layer]       {6}
[end]
[app] (name=sqlitebrowser) (class=Sqlitebrowser) (role=mainForm)
  [Dimensions]  {905 922}
[end]

I assume metacity et al. will let you do simiar things. (if not, get sawfish)

Hamish

comment:3 by martinl, 16 years ago

I have updated workspace file definition to store also window dimension (position and size), r31034. When loading workspace all displays and layer manager window are positioned based on information in workspace file (the last time you saved the file). You can suppress positioning of displays and layer manager separately in GUI user settings ('Config->Preferences').

Next step could be to enable user to store windows position as default and override workspace settings or OS window positioning(?).

Martin

in reply to:  3 comment:4 by martinl, 16 years ago

Replying to martinl:

Next step could be to enable user to store windows position as default and override workspace settings or OS window positioning(?).

Now implemented, r31041.

'Config->Preferences', tab 'General', 'Save current window layout as default' -> click 'Save'. Can be overridden by workspace settings.

Testing welcomed. Martin

comment:5 by epatton, 16 years ago

Martin, thanks! Nice turnaround.

Hm, strange; I synced my source repo to revision 31071, and I can see the edits you've made to preferences.py, but nothing shows up in the gui under Config/Preferences/General - I don't see any options to save the window geometry. I've compiled and installed from scratch twice now. No errors from make except for "-lgdi" could not be found (see http://article.gmane.org/gmane.comp.gis.grass.user/23595 for details)

Not sure what I'm missing;

~ Eric.

in reply to:  5 comment:6 by martinl, 16 years ago

Replying to epatton:

Hm, strange; I synced my source repo to revision 31071, and I can see the edits you've made to preferences.py, but nothing shows up in the gui under Config/Preferences/General - I don't see

that's strange, see the attached screenshot. You can save default window dimension here, also workspace file now contains information about windows layout (can be suppressed in 'Workspace' tab in GUI preferences dialog, e.g.

...
   <layer_manager dim="594,266,652,462">
    </layer_manager>
    <display render="0" mode="0" showCompExtent="0" dim="10,26,680,520">
...

any options to save the window geometry. I've compiled and installed from scratch twice now. No errors from make except for "-lgdi" could not be found (see http://article.gmane.org/gmane.comp.gis.grass.user/23595 for details)

see

http://svn.osgeo.org/grass/grass/trunk/gui/wxpython/README

-> '7 - DIGITIZATION TOOL'

Martin

by martinl, 16 years ago

Attachment: wxgui-pref-win-pos.png added

save default window layout

comment:7 by martinl, 16 years ago

Resolution: fixed
Status: assignedclosed

Confirmed by Eric, closing the ticket. Martin

Note: See TracTickets for help on using tickets.