ekiga r6913 - in trunk: . src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6913 - in trunk: . src/gui
- Date: Wed, 10 Sep 2008 17:59:56 +0000 (UTC)
Author: dsandras
Date: Wed Sep 10 17:59:56 2008
New Revision: 6913
URL: http://svn.gnome.org/viewvc/ekiga?rev=6913&view=rev
Log:
Display a nice icon in the notification.
Added possibility to ignore an incoming call using the close button of
the incoming call notification.
Modified:
trunk/ChangeLog
trunk/src/gui/main.cpp
Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp (original)
+++ trunk/src/gui/main.cpp Wed Sep 10 17:59:56 2008
@@ -3641,13 +3641,30 @@
}
+static void
+closed_cb (NotifyNotification* /*notify*/,
+ gpointer main_window)
+{
+ GmMainWindow *mw = NULL;
+
+ g_return_if_fail (main_window != NULL);
+
+ mw = gm_mw_get_mw (GTK_WIDGET (main_window));
+
+ g_return_if_fail (mw != NULL);
+
+ Ekiga::AudioOutputCore *audiooutput_core = dynamic_cast<Ekiga::AudioOutputCore *> (mw->core.get ("audiooutput-core"));
+ if (audiooutput_core)
+ audiooutput_core->stop_play_event ("incoming_call_sound");
+}
+
+
void gm_main_window_incoming_call_notify (GtkWidget *main_window,
Ekiga::Call & call)
{
NotifyNotification *notify = NULL;
GtkStatusIcon *statusicon = NULL;
- GdkPixbuf *pixbuf = NULL;
gchar *uri = NULL;
gchar *app = NULL;
@@ -3674,14 +3691,10 @@
body = g_strdup_printf ("%s\n%s\n%s", uri, app, account);
- notify = notify_notification_new (title, body, NULL, NULL);
- pixbuf = gtk_widget_render_icon (GTK_WIDGET (main_window),
- GM_STOCK_PHONE_PICK_UP_24,
- GTK_ICON_SIZE_SMALL_TOOLBAR, NULL);
+ notify = notify_notification_new (title, body, GM_ICON_LOGO, NULL);
notify_notification_add_action (notify, "accept", _("Accept"), notify_action_cb, &call, NULL);
notify_notification_add_action (notify, "reject", _("Reject"), notify_action_cb, &call, NULL);
notify_notification_set_timeout (notify, NOTIFY_EXPIRES_NEVER);
- notify_notification_set_icon_from_pixbuf (notify, pixbuf);
notify_notification_attach_to_status_icon (notify, statusicon);
if (!notify_notification_show (notify, NULL))
gm_main_window_incoming_call_dialog_show (main_window, call);
@@ -3692,7 +3705,7 @@
(gpointer) notify));
}
- g_object_unref (pixbuf);
+ g_signal_connect (notify, "closed", G_CALLBACK (closed_cb), main_window);
g_free (uri);
g_free (app);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]