[empathy] Display the audio or video icon in incoming call dialog



commit 499b394d0033da606c04e13afae4052818d9a431
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu Dec 17 15:37:53 2009 +0000

    Display the audio or video icon in incoming call dialog
    
    This is more useful than the question mark icon as it can be used to easily
    see if we are receiving an audio or video call.

 src/empathy-event-manager.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 80d3e6d..72708b6 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -336,12 +336,28 @@ event_channel_process_voip_func (EventPriv *event)
   dialog = gtk_message_dialog_new (NULL, 0,
       GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
       video ? _("Incoming video call"): _("Incoming call"));
+
   gtk_message_dialog_format_secondary_text (
     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));
 
+  /* Set image of the dialog */
+  if (video)
+    {
+      image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_VIDEO_CALL,
+          GTK_ICON_SIZE_DIALOG);
+    }
+  else
+    {
+      image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_VOIP,
+          GTK_ICON_SIZE_DIALOG);
+    }
+
+  gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);
+  gtk_widget_show (image);
+
   gtk_dialog_set_default_response (GTK_DIALOG (dialog),
       GTK_RESPONSE_OK);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]