summaryrefslogtreecommitdiff
path: root/gtk/gtksettings.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2008-07-01 06:22:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2008-07-01 06:22:04 +0000
commit44e2afaadbd264c15a8691086b85dbc0d532fe65 (patch)
treecd59e07dc0b13c9c7cbc58e1b3949774fade352f /gtk/gtksettings.c
parentbabcfbf01d4f0d263f6a5c26d6a6fd603c065f8a (diff)
downloadgtk+-44e2afaadbd264c15a8691086b85dbc0d532fe65.tar.gz
Add event sound settings. Patch by Lennart Pöttering.
* gdk/x11/gdksettings.c: * gtk/gtksettings.c: Add event sound settings. Patch by Lennart Pöttering. svn path=/trunk/; revision=20717
Diffstat (limited to 'gtk/gtksettings.c')
-rw-r--r--gtk/gtksettings.c70
1 files changed, 69 insertions, 1 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index fad288d8b7..40d8ebaafa 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -112,7 +112,10 @@ enum {
PROP_RECENT_FILES_LIMIT,
PROP_IM_MODULE,
PROP_RECENT_FILES_MAX_AGE,
- PROP_FONTCONFIG_TIMESTAMP
+ PROP_FONTCONFIG_TIMESTAMP,
+ PROP_SOUND_THEME_NAME,
+ PROP_ENABLE_INPUT_FEEDBACK_SOUNDS,
+ PROP_ENABLE_EVENT_SOUNDS
};
@@ -857,6 +860,71 @@ gtk_settings_class_init (GtkSettingsClass *class)
g_assert (result == PROP_FONTCONFIG_TIMESTAMP);
+ /**
+ * GtkSettings:gtk-sound-theme-name:
+ *
+ * The XDG sound theme to use for event sounds.
+ *
+ * See the <ulink url="http://www.freedesktop.org/wiki/Specifications/sound-theme-spec">Sound Theme spec</ulink>
+ * for more information on event sounds and sound themes.
+ *
+ * GTK+ itself does not support event sounds, you have to use a loadable
+ * module like the one that comes with libcanberra.
+ *
+ * Since: 2.14
+ */
+ result = settings_install_property_parser (class,
+ g_param_spec_string ("gtk-sound-theme-name",
+ P_("Sound Theme Name"),
+ P_("XDG sound theme name"),
+ "freedesktop",
+ GTK_PARAM_READWRITE),
+ NULL);
+ g_assert (result == PROP_SOUND_THEME_NAME);
+
+ /**
+ * GtkSettings:gtk-enable-input-feedback-sounds:
+ *
+ * Whether to play event sounds as feedback to user input.
+ *
+ * See the <ulink url="http://www.freedesktop.org/wiki/Specifications/sound-theme-spec">Sound Theme spec</ulink>
+ * for more information on event sounds and sound themes.
+ *
+ * GTK+ itself does not support event sounds, you have to use a loadable
+ * module like the one that comes with libcanberra.
+ *
+ * Since: 2.14
+ */
+ result = settings_install_property_parser (class,
+ g_param_spec_boolean ("gtk-enable-input-feedback-sounds",
+ P_("Aureal Input Feedback"),
+ P_("Whether to play event sounds as feedback to user input"),
+ TRUE,
+ GTK_PARAM_READWRITE),
+ NULL);
+ g_assert (result == PROP_ENABLE_INPUT_FEEDBACK_SOUNDS);
+
+ /**
+ * GtkSettings:gtk-enable-event-sounds:
+ *
+ * Whether to play any event sounds at all.
+ *
+ * See the <ulink url="http://www.freedesktop.org/wiki/Specifications/sound-theme-spec">Sound Theme spec</ulink>
+ * for more information on event sounds and sound themes.
+ *
+ * GTK+ itself does not support event sounds, you have to use a loadable
+ * module like the one that comes with libcanberra.
+ *
+ * Since: 2.14
+ */
+ result = settings_install_property_parser (class,
+ g_param_spec_boolean ("gtk-enable-event-sounds",
+ P_("Enable Event Sounds"),
+ P_("Whether to play any event sounds at all"),
+ TRUE,
+ GTK_PARAM_READWRITE),
+ NULL);
+ g_assert (result == PROP_ENABLE_EVENT_SOUNDS);
}
static void