]> git.0d.be Git - empathy.git/commitdiff
CallWindow: get the mic volume upon init
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Fri, 12 Aug 2011 16:45:50 +0000 (17:45 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Mon, 15 Aug 2011 08:44:48 +0000 (09:44 +0100)
Otherwise it'll be zero and when we unmute the mic, we'll
set the volume to zero as we won't know the old value.

https://bugzilla.gnome.org/show_bug.cgi?id=656415

src/empathy-call-window.c

index e2e103c61bebc61ccfe8689b36f937c606793a38..ef335948334458b95505940f6219b5a00c3e298e 100644 (file)
@@ -984,6 +984,11 @@ empathy_call_window_init (EmpathyCallWindow *self)
   empathy_call_window_show_hangup_button (self, TRUE);
 
   priv->settings = g_settings_new (EMPATHY_PREFS_CALL_SCHEMA);
+
+  /* Retrieve initial volume */
+  priv->volume = g_settings_get_double (priv->settings,
+      EMPATHY_PREFS_CALL_SOUND_VOLUME) / 100.0;
+
   g_signal_connect (priv->settings, "changed::"EMPATHY_PREFS_CALL_SOUND_VOLUME,
       G_CALLBACK (empathy_call_window_prefs_volume_changed_cb), self);