On 4/25/05, borco <[EMAIL PROTECTED]> wrote:
* is there a special way for a gnome app to store/restore its size and pos (a simpler and better way than that for a bare gtk app)?
I don't know of a good simple way to do this, but would like to hear it if anyone else does! For my app, I developed a module that handles this by default, so that windows stay in the same place they were left and can return expander/toggle/etc. widgets to their prior state.
Here's a link to my CVS tree for your copying/modifying/using as you like: http://cvs.sourceforge.net/viewcvs.py/grecipe-manager/grm/src/lib/WidgetSaver.py?rev=1.2&view=markup
I'd also be glad to hear that there's a better solution!
Hi,
I've already looked at that file before. It is for bare gtk aps and I am curious if gnome apps can do better than that. Not to mention that your solution (and the one I've try) are not working nicely on Win$$.
The basic problem is that I want to store both the size of the window and its state. I've done this before, in a similar way with yours. The problem with that solution is that you can't simply remember the size of your window when you terminate the application, because the window might be maximized or in fullscreen mode and you'll get the size of the screen or something like that. Also, if I try to set the size of the window and imediately make the window maximized or fullscreen (when I restart the app), when I revert to the normal state, the size of the window is still the size of the screen not the one I've set programatically (so I end up with a 1024x768 unmaximized window, for example, instead of a 100x200 unmaximized window).
However, many Gnome apps remember quite nicely their size/position/state so there is a way to do it. My hope was that this can be easyly done with gnome. Otherwise, at least for my small app, there is no need to use gnome at all, as it would bring nothing new to the scene ...
Cheers,
-- Ionutz Borcoman
http://borco.net/ http://developer.berlios.de/projects/pcv/ _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
