]> git.0d.be Git - empathy.git/commitdiff
call-window: sync the sensitivity of the button and "send video" menu (#637839)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 24 Jan 2011 15:41:11 +0000 (16:41 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 24 Jan 2011 15:41:11 +0000 (16:41 +0100)
src/empathy-call-window.c
src/empathy-call-window.ui

index e918326f34ab10f5eb9e940556ed14d6fcc954c7..d43ac3af14ff39fc67b5c3725fdae929fc66f36e 100644 (file)
@@ -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);
 }
 
index 5ad7399b9b4d86e305cc83b4c591a69a88df73e9..8b274a126619accf0b9b09c2eedcbfb1634713da 100644 (file)
@@ -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>