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 401030 - ToolbarIconSize xsetting has no effect
ToolbarIconSize xsetting has no effect
Status: RESOLVED FIXED
Product: libgnome
Classification: Deprecated
Component: general
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: libgnome maintainer
libgnome maintainer
Depends on:
Blocks: 340457
 
 
Reported: 2007-01-26 15:33 UTC by Sebastien Bacher
Modified: 2007-12-06 21:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
proposed schema modification (724 bytes, patch)
2007-01-27 15:09 UTC, Jens Granseuer
needs-work Details | Review
rename key to toolbar_icons_size (717 bytes, patch)
2007-10-20 12:35 UTC, Jens Granseuer
none Details | Review
schema mod with default and list of options (898 bytes, patch)
2007-10-23 16:53 UTC, Jens Granseuer
committed Details | Review

Description Sebastien Bacher 2007-01-26 15:33:13 UTC
That bug has been described on https://launchpad.net/ubuntu/+source/gtk+2.0/+bug/81247

"When adding a gconf key for /desktop/gnome/interface/toolbar_icon_size nothing happens. Originally the key is empty and after setting a value nothing happens."
Comment 1 Christian Persch 2007-01-26 17:41:49 UTC
I don't think this is a gtk bug.

That gconf key is defined as integer in the libgnome schemas, but gnome-settings-daemon tries to get the value as string.
Comment 2 Jens Granseuer 2007-01-27 15:07:30 UTC
I'd argue that what g-s-d does is actually correct, and the schema should be changed to make that setting a string. Granted, it would work as an int as well, but in all similar cases we seem to be using the strings for enums.
Comment 3 Jens Granseuer 2007-01-27 15:09:09 UTC
Created attachment 81325 [details] [review]
proposed schema modification

What I'm not quite sure about is whether the non-toolbar-related enum values should really be mentioned in the long description.
Comment 4 Christian Persch 2007-01-27 16:14:00 UTC
I don't think we can change the schemas type. What we should do instead is remove this key and add a new one with a different name, and make the settings daemon use that.
Comment 5 Jens Granseuer 2007-01-27 16:50:17 UTC
Would changing it really be a problem? If the gconf database contains the wrong type it simply means it won't work - just like it doesn't work now. Since it didn't work before either, are there any "API stability" promises we have to keep?

If you really think it's a problem, any suggestions on what to call the new key?
Comment 6 Matthias Clasen 2007-01-27 19:57:12 UTC
How about translating GConf strings to XSettings int values in g-s-d ?
Comment 7 Jens Granseuer 2007-01-27 20:02:49 UTC
Matthias, our "problem" is that gconf has toolbar-icon-size as int currently...

The easiest fix would of course be to just use the gconf int as XSetting. But since in similar cases we use the enum strings in gconf (and this is a bit more user-friendly (if it's allowed to use that term in connection with gconf-editor...)) I'd prefer using the strings in gconf.

Apparently, both ints and strings work just fine as XSettings for this. We just need to decide how we want to solve it.
Comment 8 Matthias Clasen 2007-01-27 20:14:03 UTC
Actually, no, I see the problem now. GTK+ is happy with either numerical
or string values, as long as they can be interpreted as values of the 
GtkIconSize enum. Changing the gconf key type to string and setting it
to e.g. large-toolbar or dnd works nicely.
Comment 9 Matthias Clasen 2007-01-27 20:15:20 UTC
I agree that keeping ints in the gconf schema would be very confusing, since people are guaranteed to interpret them as pixel size, not as enum values. That happens with the C api all the time, too.

Comment 10 Christian Neumair 2007-01-27 20:23:01 UTC
We could introduce a new "toolbar-icon-size-text" GConf key that will be favored over the "toolbar-icon-size" key if present and deprecate the old one.

Having inappropriate semantics doesn't rectify breaking them. Instead, the traditional GTK+ route is the introduction of new API/semantics and deprecation of the old one.
Comment 11 Jens Granseuer 2007-01-27 20:51:53 UTC
Only we're not breaking anything. This has never ever worked. We mined through the entire SVN history...
Comment 12 Christian Persch 2007-01-27 22:16:14 UTC
You cannot change the gconf key from int to string _because it won't work_.

Try the following:

Install schema for /apps/test/key, type integer, default 0
Set key to 42 with gconf-editor.
Install schema for /apps/test/key, type string
$ gconftool-2 -T /apps/test/key

Result: int
Comment 13 Jens Granseuer 2007-01-27 23:16:33 UTC
While that is true, I'm not sure whether it's really a problem. You're right that as long as you don't update (unset, set) the setting in gconf-editor the setting won't work (ie. you'll get the warning from g-s-d you get today, only the other way around). But as I said, that's no different from now.

What's more interesting IMO is this:

Install schema for /apps/test/key, type integer, default 0
Set key to 42 with gconf-editor.
Install schema for /apps/test/key, type string
$ gconftool-2 --type string --set /apps/test/key myString
$ gconftool-2 -T /apps/test/key

Result: string

This is presumably what the settings dialog in cc will do eventually.

Additionally, the toolbar_icon_size setting doesn't even specify a default, so 99% of the userbase won't have an int value set in the first place.

Anyway, I don't really mind using a new key either if that's what you prefer. Let's just make a decision and move on.
Comment 14 Jens Granseuer 2007-02-08 18:52:15 UTC
Anybody around who can issue a final verdict?
Comment 15 Christian Persch 2007-06-21 13:50:59 UTC
Let's go with a new key.
Comment 16 Kjartan Maraas 2007-10-01 12:16:39 UTC
Ok, anyone want to whip up a patch?
Comment 17 Jens Granseuer 2007-10-20 12:35:38 UTC
Created attachment 97510 [details] [review]
rename key to toolbar_icons_size

How about this, then?
Comment 18 Christian Persch 2007-10-23 12:23:32 UTC
What about the default value, what should it be? And the <long> description should document all possible values.
Comment 19 Jens Granseuer 2007-10-23 16:53:24 UTC
Created attachment 97739 [details] [review]
schema mod with default and list of options

Ok, we don't strictly need the default, but here it is. I've only mentioned small and large-toolbar in the long description since the other options don't really make sense for toolbars (while they do work fine from a technical pov).
Comment 20 Christian Persch 2007-12-05 19:11:09 UTC
Let's get this in for 2.21.
Comment 21 Jens Granseuer 2007-12-06 21:28:11 UTC
libgnome:

2007-12-06  Jens Granseuer  <jensgr@gmx.net>

        * schemas/desktop_gnome_interface.schemas.in.in: replace the defunct
        toolbar_icon_size integer setting with a string setting and rename it
        so it doesn't conflict with the old one. Bug #401030.

gnome-control-center:
2007-12-06  Jens Granseuer  <jensgr@gmx.net>

        * gnome-settings-xsettings.c: use new setting from libgnome to make
        toolbar icon size setting work (bug #401030)