diff options
author | Michal Ratajsky <[email protected]> | 2014-10-31 19:04:08 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-10-31 19:54:50 +0100 |
commit | cededb5aec8b2dc6aea20c712555729cdb59317d (patch) | |
tree | 3285ef57061c77cf98c56bc237aa52623c81c3e8 | |
parent | d9546dd95f2834f56b970f57006c906955f21cce (diff) | |
download | mate-media-cededb5aec8b2dc6aea20c712555729cdb59317d.tar.bz2 mate-media-cededb5aec8b2dc6aea20c712555729cdb59317d.tar.xz |
Fix erroneous behaviour of the sound-theme widget
-rw-r--r-- | sound-theme/gvc-sound-theme-chooser.c | 6 |
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 7cd3ece..75beed6 100644 --- a/sound-theme/gvc-sound-theme-chooser.c +++ b/sound-theme/gvc-sound-theme-chooser.c @@ -111,6 +111,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); @@ -119,8 +123,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 */ |