From 7b23aad70cb730faabbf867a57b1e8b1618a4cf1 Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Fri, 31 Oct 2014 19:04:08 +0100 Subject: Fix erroneous behaviour of the sound-theme widget --- sound-theme/gvc-sound-theme-chooser.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sound-theme') 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 */ -- cgit v1.2.1