summaryrefslogtreecommitdiff
path: root/sound-theme
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-10-31 19:04:08 +0100
committerMichal Ratajsky <[email protected]>2014-10-31 19:04:08 +0100
commit7b23aad70cb730faabbf867a57b1e8b1618a4cf1 (patch)
tree2384c77e486b4c91d72adf284b17b08f463f814e /sound-theme
parent06f8c3ef06d0f184921dda709780d2b392b9613b (diff)
downloadmate-media-7b23aad70cb730faabbf867a57b1e8b1618a4cf1.tar.bz2
mate-media-7b23aad70cb730faabbf867a57b1e8b1618a4cf1.tar.xz
Fix erroneous behaviour of the sound-theme widget
Diffstat (limited to 'sound-theme')
-rw-r--r--sound-theme/gvc-sound-theme-chooser.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound-theme/gvc-sound-theme-chooser.c b/sound-theme/gvc-sound-theme-chooser.c
index 0d382d7..303c08b 100644
--- a/sound-theme/gvc-sound-theme-chooser.c
+++ b/sound-theme/gvc-sound-theme-chooser.c
@@ -109,6 +109,10 @@ on_combobox_changed (GtkComboBox *widget,
g_assert (theme_name != NULL);
+ /* It is necessary to update the theme name before any other setting as
+ * the "changed" notification will reload the contents of the widget */
+ g_settings_set_string (chooser->priv->sound_settings, SOUND_THEME_KEY, theme_name);
+
/* special case for no sounds */
if (strcmp (theme_name, NO_SOUNDS_THEME_NAME) == 0) {
g_settings_set_boolean (chooser->priv->sound_settings, EVENT_SOUNDS_KEY, FALSE);
@@ -117,8 +121,6 @@ on_combobox_changed (GtkComboBox *widget,
g_settings_set_boolean (chooser->priv->sound_settings, EVENT_SOUNDS_KEY, TRUE);
}
- g_settings_set_string (chooser->priv->sound_settings, SOUND_THEME_KEY, theme_name);
-
g_free (theme_name);
/* FIXME: reset alert model */