aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-12 21:45:50 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-08-15 16:44:48 +0800
commit7660dd99c14c92e097eceade559297b8d569e34d (patch)
tree47f87efb162bde3d1e61f32ec46a063ef3b09197
parent8263f671cd8a38e6e0259e50610bca20cab2e19f (diff)
downloadgsoc2013-empathy-7660dd99c14c92e097eceade559297b8d569e34d.tar
gsoc2013-empathy-7660dd99c14c92e097eceade559297b8d569e34d.tar.gz
gsoc2013-empathy-7660dd99c14c92e097eceade559297b8d569e34d.tar.bz2
gsoc2013-empathy-7660dd99c14c92e097eceade559297b8d569e34d.tar.lz
gsoc2013-empathy-7660dd99c14c92e097eceade559297b8d569e34d.tar.xz
gsoc2013-empathy-7660dd99c14c92e097eceade559297b8d569e34d.tar.zst
gsoc2013-empathy-7660dd99c14c92e097eceade559297b8d569e34d.zip
CallWindow: fix toggling the microphone on and off
We are changing the GSettings key, and also listening to changes on it and reacting to them, but we don't want to react to our own changes! https://bugzilla.gnome.org/show_bug.cgi?id=656415
-rw-r--r--src/empathy-call-window.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 3398a7b45..e2e103c61 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2848,13 +2848,18 @@ empathy_call_window_set_send_video (EmpathyCallWindow *window,
static void
empathy_call_window_mic_toggled_cb (GtkToggleToolButton *toggle,
- EmpathyCallWindow *window)
+ EmpathyCallWindow *self)
{
- EmpathyCallWindowPriv *priv = GET_PRIV (window);
+ EmpathyCallWindowPriv *priv = GET_PRIV (self);
gboolean active;
active = (gtk_toggle_tool_button_get_active (toggle));
+ /* We don't want the settings callback to react to this change to avoid
+ * a loop. */
+ g_signal_handlers_block_by_func (priv->settings,
+ empathy_call_window_prefs_volume_changed_cb, self);
+
if (active)
{
g_settings_set_double (priv->settings, EMPATHY_PREFS_CALL_SOUND_VOLUME,
@@ -2870,6 +2875,9 @@ empathy_call_window_mic_toggled_cb (GtkToggleToolButton *toggle,
g_settings_set_double (priv->settings, EMPATHY_PREFS_CALL_SOUND_VOLUME,
0);
}
+
+ g_signal_handlers_unblock_by_func (priv->settings,
+ empathy_call_window_prefs_volume_changed_cb, self);
}
static void