]> git.0d.be Git - empathy.git/commitdiff
CallWindow: make video buttons unsensitive when video not supported
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 31 Aug 2011 08:20:28 +0000 (09:20 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 31 Aug 2011 08:49:53 +0000 (09:49 +0100)
If we're calling an audio-only contact, make the camera buttons
unsensitive.

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

src/empathy-call-window.c

index c936bb5037949e50ffc2bc22a6ea9d6ad7cf1958..ccec9f628c9243c38a18b8de46bca436f16a0830 100644 (file)
@@ -2004,6 +2004,12 @@ empathy_call_window_constructed (GObject *object)
   g_object_get (priv->handler, "target-contact", &priv->contact, NULL);
   g_assert (priv->contact != NULL);
 
+  if (!empathy_contact_can_voip_video (priv->contact))
+    {
+      gtk_widget_set_sensitive (priv->video_call_button, FALSE);
+      gtk_widget_set_sensitive (priv->camera_button, FALSE);
+    }
+
   empathy_call_window_setup_avatars (self, priv->handler);
   empathy_call_window_set_state_connecting (self);