summaryrefslogtreecommitdiff
path: root/gst-mixer/src
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 /gst-mixer/src
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 'gst-mixer/src')
-rw-r--r--gst-mixer/src/preferences.c4
-rw-r--r--gst-mixer/src/window.c9
2 files changed, 6 insertions, 7 deletions
diff --git a/gst-mixer/src/preferences.c b/gst-mixer/src/preferences.c
index 76fbcf9..99556cf 100644
--- a/gst-mixer/src/preferences.c
+++ b/gst-mixer/src/preferences.c
@@ -191,12 +191,12 @@ mate_volume_control_preferences_new (GstElement *element)
prefs = g_object_new (MATE_VOLUME_CONTROL_TYPE_PREFERENCES, NULL);
prefs->settings = g_settings_new (MATE_VOLUME_CONTROL_SCHEMA);
- mate_volume_control_preferences_change (prefs, element);
-
/* gsettings */
g_signal_connect (prefs->settings, "changed::" MATE_VOLUME_CONTROL_KEY_SHOWN_ELEMENTS,
G_CALLBACK (cb_gsettings), prefs);
+ mate_volume_control_preferences_change (prefs, element);
+
return GTK_WIDGET (prefs);
}
diff --git a/gst-mixer/src/window.c b/gst-mixer/src/window.c
index 58188c6..b179afa 100644
--- a/gst-mixer/src/window.c
+++ b/gst-mixer/src/window.c
@@ -265,6 +265,10 @@ mate_volume_control_window_init (MateVolumeControlWindow *win)
g_set_application_name (_("Volume Control"));
gtk_window_set_title (GTK_WINDOW (win), _("Volume Control"));
+ /* gsettings */
+ g_signal_connect (win->settings, "changed::" MATE_VOLUME_CONTROL_KEY_ACTIVE_ELEMENT,
+ G_CALLBACK (cb_gsettings_active_element), win);
+
/* To set the window according to previous geometry */
width = g_settings_get_int (win->settings, MATE_VOLUME_CONTROL_KEY_WINDOW_WIDTH);
if (width < 250)
@@ -358,11 +362,6 @@ mate_volume_control_window_new (GList *elements)
gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), active_element_num);
g_signal_connect (combo_box, "changed", G_CALLBACK (cb_change), win);
-
- /* gsettings */
- g_signal_connect (win->settings, "changed::" MATE_VOLUME_CONTROL_KEY_ACTIVE_ELEMENT,
- G_CALLBACK (cb_gsettings_active_element), win);
-
win->use_default_mixer = (active_el_str == NULL);
/* add the combo box to choose the device */