aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-15 01:32:59 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-16 01:27:35 +0800
commit5217557e08ac29fb01bfe92dd901d92502154135 (patch)
tree3942c24f25104dcb3ce2e8aefaa28ff9612f4a10
parent33999734f01e9f8d3a85532904bb04dcb3271f0b (diff)
downloadgsoc2013-empathy-5217557e08ac29fb01bfe92dd901d92502154135.tar
gsoc2013-empathy-5217557e08ac29fb01bfe92dd901d92502154135.tar.gz
gsoc2013-empathy-5217557e08ac29fb01bfe92dd901d92502154135.tar.bz2
gsoc2013-empathy-5217557e08ac29fb01bfe92dd901d92502154135.tar.lz
gsoc2013-empathy-5217557e08ac29fb01bfe92dd901d92502154135.tar.xz
gsoc2013-empathy-5217557e08ac29fb01bfe92dd901d92502154135.tar.zst
gsoc2013-empathy-5217557e08ac29fb01bfe92dd901d92502154135.zip
say if incoming call are video or not (#582596)
-rw-r--r--src/empathy-event-manager.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 86956e7f9..80d3e6d6d 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -319,6 +319,8 @@ event_channel_process_voip_func (EventPriv *event)
GtkWidget *dialog;
GtkWidget *button;
GtkWidget *image;
+ EmpathyTpCall *call;
+ gboolean video;
if (event->approval->dialog != NULL)
{
@@ -326,10 +328,17 @@ event_channel_process_voip_func (EventPriv *event)
return;
}
+ call = EMPATHY_TP_CALL (empathy_dispatch_operation_get_channel_wrapper (
+ event->approval->operation));
+
+ video = empathy_tp_call_has_initial_video (call);
+
dialog = gtk_message_dialog_new (NULL, 0,
- GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("Incoming call"));
+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
+ video ? _("Incoming video call"): _("Incoming call"));
gtk_message_dialog_format_secondary_text (
- GTK_MESSAGE_DIALOG (dialog),
+ GTK_MESSAGE_DIALOG (dialog), video ?
+ _("%s is video calling you, do you want to answer?"):
_("%s is calling you, do you want to answer?"),
empathy_contact_get_name (event->approval->contact));
@@ -451,12 +460,22 @@ event_manager_media_channel_got_contact (EventManagerApproval *approval)
{
EmpathyEventManagerPriv *priv = GET_PRIV (approval->manager);
gchar *header;
+ EmpathyTpCall *call;
+ gboolean video;
+
+ call = EMPATHY_TP_CALL (empathy_dispatch_operation_get_channel_wrapper (
+ approval->operation));
+
+ video = empathy_tp_call_has_initial_video (call);
- header = g_strdup_printf (_("Incoming call from %s"),
+ header = g_strdup_printf (
+ video ? _("Incoming video call from %s") :_("Incoming call from %s"),
empathy_contact_get_name (approval->contact));
event_manager_add (approval->manager, approval->contact,
- EMPATHY_EVENT_TYPE_VOIP, EMPATHY_IMAGE_VOIP, header, NULL, approval,
+ EMPATHY_EVENT_TYPE_VOIP,
+ video ? EMPATHY_IMAGE_VIDEO_CALL : EMPATHY_IMAGE_VOIP,
+ header, NULL, approval,
event_channel_process_voip_func, NULL);
g_free (header);