summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */