summaryrefslogtreecommitdiff
path: root/sound-theme
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-03-19 13:47:25 +0300
committerStefano Karapetsas <[email protected]>2015-03-23 10:21:31 +0100
commitc2a83bb51b890a08d07ca71867573019aa33e283 (patch)
tree4bda0f9b787aadf7ea20e5d959bfaedd52f6d148 /sound-theme
parent52fd538bd1d823b6263efa3526bab797f0ab0827 (diff)
downloadmate-media-c2a83bb51b890a08d07ca71867573019aa33e283.tar.bz2
mate-media-c2a83bb51b890a08d07ca71867573019aa33e283.tar.xz
first connect to settings, then read them.
fixes the issue with GLib >= 2.43, https://git.gnome.org/browse/glib/commit/?id=8ff5668a458344da22d30491e3ce726d861b3619 Closes https://github.com/mate-desktop/mate-media/pull/58
Diffstat (limited to 'sound-theme')
-rw-r--r--sound-theme/gvc-sound-theme-chooser.c18
-rw-r--r--sound-theme/gvc-sound-theme-editor.c19
2 files changed, 18 insertions, 19 deletions
diff --git a/sound-theme/gvc-sound-theme-chooser.c b/sound-theme/gvc-sound-theme-chooser.c
index 75beed6..77ae932 100644
--- a/sound-theme/gvc-sound-theme-chooser.c
+++ b/sound-theme/gvc-sound-theme-chooser.c
@@ -1083,6 +1083,15 @@ gvc_sound_theme_chooser_init (GvcSoundThemeChooser *chooser)
chooser->priv->sound_settings = g_settings_new (KEY_SOUNDS_SCHEMA);
chooser->priv->marco_settings = g_settings_new (KEY_MARCO_SCHEMA);
+ g_signal_connect (chooser->priv->sound_settings,
+ "changed",
+ G_CALLBACK (on_key_changed),
+ chooser);
+ g_signal_connect (chooser->priv->marco_settings,
+ "changed::" AUDIO_BELL_KEY,
+ G_CALLBACK (on_key_changed),
+ chooser);
+
str = g_strdup_printf ("<b>%s</b>", _("C_hoose an alert sound:"));
chooser->priv->selection_box = box = gtk_frame_new (str);
g_free (str);
@@ -1125,15 +1134,6 @@ gvc_sound_theme_chooser_init (GvcSoundThemeChooser *chooser)
G_CALLBACK (on_click_feedback_toggled),
chooser);
- g_signal_connect (chooser->priv->sound_settings,
- "changed",
- G_CALLBACK (on_key_changed),
- chooser);
- g_signal_connect (chooser->priv->marco_settings,
- "changed::" AUDIO_BELL_KEY,
- G_CALLBACK (on_key_changed),
- chooser);
-
/* FIXME: should accept drag and drop themes. should also
add an "Add Theme..." item to the theme combobox */
}
diff --git a/sound-theme/gvc-sound-theme-editor.c b/sound-theme/gvc-sound-theme-editor.c
index 3c8cebf..08e0b37 100644
--- a/sound-theme/gvc-sound-theme-editor.c
+++ b/sound-theme/gvc-sound-theme-editor.c
@@ -1282,10 +1282,18 @@ gvc_sound_theme_editor_init (GvcSoundThemeEditor *editor)
editor->priv->combo_box = gtk_combo_box_new ();
gtk_box_pack_start (GTK_BOX (editor->priv->theme_box), editor->priv->combo_box, FALSE, FALSE, 0);
-
editor->priv->sound_settings = g_settings_new (KEY_SOUNDS_SCHEMA);
editor->priv->marco_settings = g_settings_new (KEY_MARCO_SCHEMA);
+ g_signal_connect (editor->priv->sound_settings,
+ "changed",
+ G_CALLBACK (on_key_changed),
+ editor);
+ g_signal_connect (editor->priv->marco_settings,
+ "changed::" AUDIO_BELL_KEY,
+ G_CALLBACK (on_key_changed),
+ editor);
+
editor->priv->selection_box = box = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (editor), box, TRUE, TRUE, 0);
@@ -1317,15 +1325,6 @@ gvc_sound_theme_editor_init (GvcSoundThemeEditor *editor)
G_CALLBACK (on_click_feedback_toggled),
editor);
- g_signal_connect (editor->priv->sound_settings,
- "changed",
- G_CALLBACK (on_key_changed),
- editor);
- g_signal_connect (editor->priv->marco_settings,
- "changed::" AUDIO_BELL_KEY,
- G_CALLBACK (on_key_changed),
- editor);
-
/* FIXME: should accept drag and drop themes. should also
add an "Add Theme..." item to the theme combobox */
}