aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-05-10 20:14:05 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-12 17:11:08 +0800
commit11b3e6e941f3407de410308191cbe5088cc074e4 (patch)
treea6e201585096d8cd165e0a758142a61f9bbf2e4b /libempathy
parente12ee6f8126a10fb0789e634dfd4251f246e2b90 (diff)
downloadgsoc2013-empathy-11b3e6e941f3407de410308191cbe5088cc074e4.tar
gsoc2013-empathy-11b3e6e941f3407de410308191cbe5088cc074e4.tar.gz
gsoc2013-empathy-11b3e6e941f3407de410308191cbe5088cc074e4.tar.bz2
gsoc2013-empathy-11b3e6e941f3407de410308191cbe5088cc074e4.tar.lz
gsoc2013-empathy-11b3e6e941f3407de410308191cbe5088cc074e4.tar.xz
gsoc2013-empathy-11b3e6e941f3407de410308191cbe5088cc074e4.tar.zst
gsoc2013-empathy-11b3e6e941f3407de410308191cbe5088cc074e4.zip
A contact doesn't support video if we have no camera
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-contact.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 16f1dc900..a4b35dc06 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-individual-manager.h"
#include "empathy-utils.h"
#include "empathy-enum-types.h"
@@ -1301,8 +1302,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;