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 539790 - [PATCH] Please add three new settings to GtkSettings
[PATCH] Please add three new settings to GtkSettings
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-06-23 17:30 UTC by Lennart Poettering
Modified: 2008-07-14 23:51 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Lennart Poettering 2008-06-23 17:30:51 UTC
Please merge the attached patched which adds three new props to GtkSettings and hooks them up to XSETTINGS.

Basically they are intended to be used:
1) to specify the XDG sound theme to be used
2) to enable/disable event sounds globally
3) to disable only input feedback sounds (i.e. button clicks) but leave other
event sounds (i.e. "you got mail!") enabled.

I will shortly post a longer explanation of these settings to the xdg ml.

Also see bug 539786.
Comment 1 Lennart Poettering 2008-06-23 17:31:24 UTC
Patch is here: http://0pointer.de/public/gtk-canberra.patch
Comment 2 Lennart Poettering 2008-06-23 18:00:01 UTC
Here's the mail to the XDG ML:

http://lists.freedesktop.org/archives/xdg/2008-June/009711.html
Comment 3 Matthias Clasen 2008-06-30 05:28:55 UTC
These new settings will only ever be used by a sound module, correct ?
Might be good to put a little comment to that effect in the docs.
Where will that module live, btw ?

It might be slightly more elegant to install the settings from the module, but I don't know if doing that from a module will cause complications - doing it from widget implementations is fairly common, e.g. see gtk-entry-select-on-focus.
Comment 4 Lennart Poettering 2008-06-30 13:57:30 UTC
(In reply to comment #3)
> These new settings will only ever be used by a sound module, correct ?

I am not sure about that. gtk-enable-input-feedback-sounds should probably be checked from widgets that want to have better control over the sounds generated and hence do the generation themselves instead of relying on libcanberra-gtk-module. Right now the gtk module is the only piece of code that generates feedback sounds, but I am sure it's eventually not going to stay that way. 

Hence: I think these properties are interesting for more than just the sound module.

> Might be good to put a little comment to that effect in the docs.
> Where will that module live, btw ?

It lives in libcanberra right now. I see no reason to change that.
Comment 5 Matthias Clasen 2008-07-01 06:23:16 UTC
> Hence: I think these properties are interesting for more than just the sound
> module.

Ok


> I see no reason to change that.

Agreed. I was just curious.


I've committed your patch:

        * gdk/x11/gdksettings.c:
        * gtk/gtksettings.c: Add event sound settings.
        Patch by Lennart Pöttering.
Comment 6 Lennart Poettering 2008-07-01 10:39:22 UTC
>         Patch by Lennart Pöttering.

Grr. s/Pöttering/Poettering/