GNOME Bugzilla – Bug 324097
gnome-search-tool should remember last used window size/position
Last modified: 2005-12-21 02:03:17 UTC
Distribution/Version: ubuntu breezy badger start gnome-search-tool, maximize it, close it and start it again. The dimensions are not saved.
Usability people: I would like some feedback. Should gnome-search-tool remember its previously displayed window size and/or location?
As a HIG freak, I find it pretty strange that this was not raised earlier. If the end user likes to have the maximum space to show his results everytime, shouldn't the app remember that? I guess the location thing might be hard to do because it was a hot metacity debate though. But I'm not sure about that dimension thing either: I see that 99% of the gnome dialogs are reset to a ridiculously tiny size, was that done by design or that was "left to the window manager" or something? I'm talking about the theme window, the wallpapers, the icon chooser, the file chooser, the keyboard prefs, the sessions, all of those windows that usually display a big list of content.
Regarding the default size of the preference windows, do not forget that these windows need to fit on smaller displays (800x600 for example).
I understand that, but I'm not criticizing the default size, just the lack of "keeping the last user-specified size" ;) the default size can be small, no problems with that. Just being able to remember the last one would be nice however.
I have a small patch, adding a couple of keys to the schema, that (re)stores window size from gconf.
Created attachment 56181 [details] [review] the proposed patch there's a minimal performance impact caused by gconf... I'm still working on this.
Thanks for the patch. It's a good start. Is there a way to know if the window is maximized? Because if gnome-search-tool is maximized and then closed, when it is launched the again it will fill the entire screen but not be maximized.
Just asking, do you think this could be applied to other areas (when stable), such as the theme dialogs/background selector, etc? Or that's for another bug report ? Otherwise I could write down every app I belive would be "eligible" (usability-wise) to this change
I would recommend opening separate bugs for other modules.
Created attachment 56188 [details] [review] Updated patch This patch still has issues the maximized issue, but cleans up other issues in the previous patch.
Created attachment 56189 [details] [review] Proposed patch This patch addresses the maximized window issue. It works for me, but can someone try it out? Thanks.
patch from comment #11 looks good.
uhm, thinking better at it, we shouldn't use GConf to store state value, as GConf might be locked down. we should use a session file inside $HOME/.gnome2, e.g. gnome-search-tool.session, where we store the last search and the window geometry; this would also come in handy for session re-start support. the session file might look like this: [GSearchSession] LastQuery=*.txt WindowWidth=520 WindowHeight=430 this could be read using GKeyFile upon start-up and wrote inside the destroy callback of the main window and the save-yourself/die callbacks of the GnomeClient object. the functions for getting the stored settings would look like: void set_stored_query (const gchar *query); const gchar * get_stored_query (void); void set_stored_geometry (gint width, gint height); void get_stored_geometry (gint *width, gint *height);
I am not too worried about using gconf to store these new settings. We already use gconf for similar purposes, for example the stored column order. I applied a patch similar to that in comment #11 to cvs HEAD. Thanks.