aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Tellier <jonathan.tellier@gmail.com>2009-06-22 21:10:29 +0800
committerjtellier <jonathan.tellier@collabora.co.uk>2009-06-23 21:46:45 +0800
commit03fa531203802810a57bc723132368bf2761e19c (patch)
tree38bbdf7af2289796108f2b4d356c5943d9addafe
parentcf5cd933ff677c2a36aba86cab7921339503362c (diff)
downloadgsoc2013-empathy-03fa531203802810a57bc723132368bf2761e19c.tar
gsoc2013-empathy-03fa531203802810a57bc723132368bf2761e19c.tar.gz
gsoc2013-empathy-03fa531203802810a57bc723132368bf2761e19c.tar.bz2
gsoc2013-empathy-03fa531203802810a57bc723132368bf2761e19c.tar.lz
gsoc2013-empathy-03fa531203802810a57bc723132368bf2761e19c.tar.xz
gsoc2013-empathy-03fa531203802810a57bc723132368bf2761e19c.tar.zst
gsoc2013-empathy-03fa531203802810a57bc723132368bf2761e19c.zip
Fixed Bug 586284 – Crasher: click on the microphone once disconnected
-rw-r--r--src/empathy-call-window.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 4ad1b2609..75c6abfc7 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -488,7 +488,7 @@ empathy_call_window_mic_volume_changed_cb (GtkAdjustment *adj,
priv->volume = volume;
/* Ensure that the toggle button is active if the volume is > 0 and inactive
- * if it's smaller then 0 */
+ * if it's smaller than 0 */
if ((volume > 0) != gtk_toggle_tool_button_get_active (
GTK_TOGGLE_TOOL_BUTTON (priv->mic_button)))
gtk_toggle_tool_button_set_active (
@@ -1201,13 +1201,17 @@ empathy_call_window_disconnected (EmpathyCallWindow *self)
gtk_action_set_sensitive (priv->redial, TRUE);
gtk_widget_set_sensitive (priv->redial_button, TRUE);
- /* Reseting the send_video and camera_buton to their initial state */
+ /* Reseting the send_video, camera_buton and mic_button to their
+ initial state */
gtk_widget_set_sensitive (priv->camera_button, FALSE);
+ gtk_widget_set_sensitive (priv->mic_button, FALSE);
gtk_action_set_sensitive (priv->send_video, FALSE);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->send_video),
initial_video);
gtk_toggle_tool_button_set_active (
GTK_TOGGLE_TOOL_BUTTON (priv->camera_button), initial_video);
+ gtk_toggle_tool_button_set_active (
+ GTK_TOGGLE_TOOL_BUTTON (priv->mic_button), TRUE);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (priv->show_preview),
FALSE);
@@ -1348,6 +1352,8 @@ empathy_call_window_connected (gpointer user_data)
gtk_action_set_sensitive (priv->redial, FALSE);
gtk_widget_set_sensitive (priv->redial_button, FALSE);
+ gtk_widget_set_sensitive (priv->mic_button, TRUE);
+
empathy_call_window_update_avatars_visibility (call, self);
g_object_unref (call);
@@ -1850,6 +1856,9 @@ empathy_call_window_mic_toggled_cb (GtkToggleToolButton *toggle,
EmpathyCallWindowPriv *priv = GET_PRIV (window);
gboolean active;
+ if (priv->audio_input == NULL)
+ return;
+
active = (gtk_toggle_tool_button_get_active (toggle));
if (active)