From 0adc963c14c89f572e7f9d26e0984166146cb70a Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Tue, 10 May 2011 13:14:05 +0100 Subject: A contact doesn't support video if we have no camera --- libempathy/empathy-contact.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 42faad483..955ee885f 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -40,6 +40,7 @@ #endif #include "empathy-contact.h" +#include "empathy-camera-monitor.h" #include "empathy-utils.h" #include "empathy-enum-types.h" #include "empathy-marshal.h" @@ -1223,8 +1224,18 @@ empathy_contact_can_do_action (EmpathyContact *self, sensitivity = empathy_contact_can_voip_audio (self); break; case EMPATHY_ACTION_VIDEO_CALL: - sensitivity = empathy_contact_can_voip_video (self); - break; + { + EmpathyCameraMonitor *monitor; + + monitor = empathy_camera_monitor_dup_singleton (); + + sensitivity = empathy_contact_can_voip_video (self); + sensitivity = sensitivity && + empathy_camera_monitor_get_available (monitor); + + g_object_unref (monitor); + break; + } case EMPATHY_ACTION_VIEW_LOGS: sensitivity = contact_has_log (self); break; -- cgit v1.2.3