From 499b394d0033da606c04e13afae4052818d9a431 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 17 Dec 2009 15:37:53 +0000 Subject: 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 file changed, 16 insertions(+) (limited to 'src/empathy-event-manager.c') diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index 80d3e6d6d..72708b6b5 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); -- cgit v1.2.3