From 03fa531203802810a57bc723132368bf2761e19c Mon Sep 17 00:00:00 2001 From: Jonathan Tellier Date: Mon, 22 Jun 2009 09:10:29 -0400 Subject: [PATCH] =?utf8?q?Fixed=20=20Bug=20586284=20=E2=80=93=20Crasher:?= =?utf8?q?=20click=20on=20the=20microphone=20once=20disconnected?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/empathy-call-window.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 4ad1b260..75c6abfc 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) -- 2.39.2