[empathy] call-window: sync the sensitivity of the button and "send video" menu (#637839)
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] call-window: sync the sensitivity of the button and "send video" menu (#637839)
- Date: Mon, 24 Jan 2011 15:48:35 +0000 (UTC)
commit f18f2746690b0ceae80c3b362529decc112ca77f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Jan 24 16:41:11 2011 +0100
call-window: sync the sensitivity of the button and "send video" menu (#637839)
src/empathy-call-window.c | 5 +++++
src/empathy-call-window.ui | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index e918326..d43ac3a 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -136,6 +136,7 @@ struct _EmpathyCallWindowPriv
GtkAction *redial;
GtkAction *menu_fullscreen;
GtkAction *action_camera;
+ GtkAction *action_camera_on;
GtkWidget *tool_button_camera_off;
GtkWidget *tool_button_camera_preview;
GtkWidget *tool_button_camera_on;
@@ -1056,6 +1057,7 @@ empathy_call_window_init (EmpathyCallWindow *self)
"camera_preview", &priv->tool_button_camera_preview,
"camera_on", &priv->tool_button_camera_on,
"action_camera_off", &priv->action_camera,
+ "action_camera_on", &priv->action_camera_on,
"details_vbox", &priv->details_vbox,
"vcodec_encoding_label", &priv->vcodec_encoding_label,
"acodec_encoding_label", &priv->acodec_encoding_label,
@@ -1947,6 +1949,7 @@ empathy_call_window_disconnected (EmpathyCallWindow *self,
/* Unsensitive the camera and mic button */
gtk_widget_set_sensitive (priv->tool_button_camera_on, FALSE);
+ gtk_action_set_sensitive (priv->action_camera_on, FALSE);
gtk_widget_set_sensitive (priv->mic_button, FALSE);
/* Be sure that the mic button is enabled */
@@ -2485,6 +2488,7 @@ empathy_call_window_connected (gpointer user_data)
GTK_TOGGLE_TOOL_BUTTON (priv->tool_button_camera_on),
priv->sending_video && priv->video_input != NULL);
gtk_widget_set_sensitive (priv->tool_button_camera_on, can_send_video);
+ gtk_action_set_sensitive (priv->action_camera_on, can_send_video);
gtk_action_set_sensitive (priv->redial, FALSE);
gtk_widget_set_sensitive (priv->redial_button, FALSE);
@@ -2686,6 +2690,7 @@ empathy_call_window_remove_video_input (EmpathyCallWindow *self)
priv->video_preview = NULL;
gtk_widget_set_sensitive (priv->tool_button_camera_on, FALSE);
+ gtk_action_set_sensitive (priv->action_camera_on, FALSE);
gtk_widget_set_sensitive (priv->tool_button_camera_preview, FALSE);
}
diff --git a/src/empathy-call-window.ui b/src/empathy-call-window.ui
index 5ad7399..8b274a1 100644
--- a/src/empathy-call-window.ui
+++ b/src/empathy-call-window.ui
@@ -55,6 +55,7 @@
<object class="GtkRadioAction" id="action_camera_on">
<property name="name">action_camera_on</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="label" translatable="yes">Video On</property>
<property name="draw_as_radio">True</property>
<property name="group">action_camera_off</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]