After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 323175 - Capplets do not remember their window size
Capplets do not remember their window size
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: general
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 439534 452073 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-04 03:04 UTC by Jean-François Fortin Tam
Modified: 2010-11-16 15:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Save and restore window size (2.43 KB, patch)
2006-01-05 19:31 UTC, David Sedeño Fernández
none Details | Review
Save and restore window size v2 (4.87 KB, patch)
2006-01-06 19:47 UTC, David Sedeño Fernández
needs-work Details | Review

Description Jean-François Fortin Tam 2005-12-04 03:04:29 UTC
Run gnome-background-properties, resize the window the way you like it. change
your wallpaper or whatever, close the window. Open it again, and its size will
be reset to that annoyingly tiny size. You need to scale it up again each time.
It is not so great when you have a huge amount of wallpapers in there.
Comment 1 Thomas Wood 2005-12-05 16:09:46 UTC
I'd like to see this happen. How does this behavior relate to other capplets,
such as the theme manager? If they also have this problem, this bug should
probably be noted for all the capplets it applies too.

If there are no objections to having this feature, I'll see if I can make a patch.
Comment 2 Jean-François Fortin Tam 2005-12-05 23:55:50 UTC
They only remember their size when their "mother" window was not closed
(speaking of the theme manager for example. If I click details, size it, close
it, click details again, it will keep its size. But if I close the entire thing,
the size will be reset).

Also, the window positions are not remembered at all.
Comment 3 David Sedeño Fernández 2006-01-05 19:31:09 UTC
Created attachment 56826 [details] [review]
Save and restore window size

This patch store the size of the window in gconf and restore it when it's started. The key used to do this is: /apps/gnome-background/ui/width (and height). 

The app already use /desktop/background/ but I think more convenient to use the /apps/gnome-background to store this kind of things. What do you think? I it's ok, I will create the schema for it.
Comment 4 Jean-François Fortin Tam 2006-01-05 19:35:21 UTC
I believe gnome-background would make sense, but I'm just a user :) but yes, I am more inclined to look into /apps/ first instead of looking into /desktop/ so this might be a good idea.
Comment 5 Thomas Wood 2006-01-05 19:38:32 UTC
This is an application setting, not a desktop setting, so it should definitely reside in /apps/. One thing to consider is that it would be nice to be able to patch the other appropriate capplets with this functionality (such as the theme manager), so it would be good to consider that they all save their state information in a consistant way.
Comment 6 Jean-François Fortin Tam 2006-01-05 19:42:02 UTC
Ah, I was hoping someone would say this :) so far I've been filing bugs on various parts of the desktop for this same issue. Actually, are there any apps that MUST NOT remember their dimensions? I think this can work with pretty much anything, and I was surprised when I arrived in gnome 2.6 and lots of applications did not have that "functionality".
Comment 7 Rodney Dawes 2006-01-06 01:22:48 UTC
I would much prefer something like "/apps/control-center/<capplet>/<direction>" as the keys for the settings. For gnome-background-properties, this could be, for example, "/apps/control-center/background/{width,height}" and would get rid of the extra "/ui/" tree bit. This also would be a good precedent for other and future capplets to use.

Alternatively, we could also use an ini-style file in ~/.gnome2/ or somewhere.
Comment 8 David Sedeño Fernández 2006-01-06 19:47:17 UTC
Created attachment 56875 [details] [review]
Save and restore window size v2

Updated patch with schema file and using /apps/control-center/background/{height, width }
Comment 9 Jean-François Fortin Tam 2006-03-05 00:12:41 UTC
Sorry to bug you again, but is the patch going into gnome 2.14 after all?
Comment 10 Rodney Dawes 2006-03-05 00:32:00 UTC
Sorry, no. It will not be in 2.14.0. Perhaps in 2.14.1, but I have not had time to look at this any further due to more important issues to solve. I will try to look at it again soon. We really need a standard common way of doing this for all of the capplets, not just copying the code into every capplet.
Comment 11 Jean-François Fortin Tam 2006-11-08 04:52:13 UTC
I have to bug you guys again (it's almost the birthday of that bug ;) if it could get into 2.18.

Is gconf-editor part of this? It does not remember its properties either. Neither does the GTK File Chooser.

If having a big infrastructure for saving this globally would require so much time, why not use the (less elegant) technique of just copy-pasting that code into the applets, if it works for now? Just add a reminder to beautify it sometime.
Comment 12 Rodney Dawes 2007-01-08 16:16:10 UTC
I don't really like having the same code cut-and-pasted. It also adds a new file, with new strings. The background schemas are in libgnome already. I don't think we should have a bunch of separate schemas files for each capplet, just to set up descriptions for keys to store the width/height of the windows. I would prefer that the code that peaks at the allocation to save state, either just peaked into the allocation when calling gconf_set_int rather than copying the allocation's address out, or that _get_allocation or one of the _get_size methods, were used.
Comment 13 David Sedeño Fernández 2007-01-09 20:46:31 UTC
The schema file in libgnome (desktop_gnome_background.schemas.in) is for the settings of the current background selected. There are another for the capplet? (I can find it).

Comment 14 Rodney Dawes 2007-01-09 21:45:51 UTC
No. There are no settings specific to the capplet itself. However, if we really need schemas to store the window size and position, then we should have one schema file for all of control-center, not one for each capplet therein.
Comment 15 Thomas Wood 2007-01-10 23:30:45 UTC
I think this probably ought to go in one of the libraries in capplets/common, (or a new library if an appropriate one doesn't exist).

I'm going to move this bug to the 'general' component to indicate we need a solution for all capplets.
Comment 16 Thomas Wood 2007-01-10 23:35:40 UTC
Updating title too.
Comment 17 Jean-François Fortin Tam 2007-01-27 02:17:51 UTC
If the new "all in one window" control center is to take over the menus in GNOME 2.18, it needs to remember its attributes such as size and position. Otherwise, a lot of folks will likely be horrified to resize up/down the window each time they open it up. Go! Go! Go!
Comment 18 Thomas Wood 2007-05-19 00:26:27 UTC
*** Bug 439534 has been marked as a duplicate of this bug. ***
Comment 19 Jens Granseuer 2007-06-29 16:14:25 UTC
*** Bug 452073 has been marked as a duplicate of this bug. ***
Comment 20 Olaf van der Spek 2007-11-23 12:59:42 UTC
Can't a dialog calculate it's optimal size automatically based on it's contents?
Remembering size (and position) may not be necessary and may not be what users want.
Comment 21 Jean-François Fortin Tam 2010-11-16 14:14:55 UTC
This bug is half a decade old. 

Here are the components in control center, as of today, that typically display lots of elements and that can't easily calculate their optimal size on their own. These are the components that should remember their size:

- appearance
- startup programs
- keyboard shortcuts
- screensaver
- network connections (network manager)
- printers (if part of gnome)
- gnome-volume-control
- gnome-nettool

Could this be looked into for GNOME 3.0? What is needed for this to happen?
Comment 22 Bastien Nocera 2010-11-16 15:44:40 UTC
This is actually a bug for each individual panel, not a throw-it-all bug.

When you've tested the new control-center, feel free to file bugs for panels that don't work as you expect.