[ekiga] libnotify: Fixed urgency setting for notifications.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] libnotify: Fixed urgency setting for notifications.
- Date: Thu, 19 Apr 2012 16:03:22 +0000 (UTC)
commit f9b2d495ac8a1b5c60f06d839404489545889d63
Author: Damien Sandras <dsandras beip be>
Date: Sun Apr 15 16:17:00 2012 +0200
libnotify: Fixed urgency setting for notifications.
Also use the Ekiga icon.
lib/engine/components/libnotify/libnotify-main.cpp | 36 +++++++------------
1 files changed, 13 insertions(+), 23 deletions(-)
---
diff --git a/lib/engine/components/libnotify/libnotify-main.cpp b/lib/engine/components/libnotify/libnotify-main.cpp
index 26049f3..1630070 100644
--- a/lib/engine/components/libnotify/libnotify-main.cpp
+++ b/lib/engine/components/libnotify/libnotify-main.cpp
@@ -134,31 +134,9 @@ void
LibNotify::on_notification_added (boost::shared_ptr<Ekiga::Notification> notification)
{
NotifyNotification* notif = NULL;
- const gchar* urgency = NULL;
-
- switch (notification->get_level ()) {
-
- case Ekiga::Notification::Info:
-
- urgency = "gtk-info";
- break;
-
- case Ekiga::Notification::Warning:
-
- urgency = "gtk-warning";
- break;
-
- case Ekiga::Notification::Error:
-
- urgency = "gtk-warning";
- break;
- default:
- urgency = "gtk-info";
- }
-
notif = notify_notification_new (notification->get_title ().c_str (),
notification->get_body ().c_str (),
- urgency
+ "ekiga"
// NOTIFY_CHECK_VERSION appeared in 0.5.2 only
#ifdef NOTIFY_CHECK_VERSION
#if !NOTIFY_CHECK_VERSION(0,7,0)
@@ -169,6 +147,18 @@ LibNotify::on_notification_added (boost::shared_ptr<Ekiga::Notification> notific
#endif
);
+ switch (notification->get_level ()) {
+
+ case Ekiga::Notification::Info:
+ case Ekiga::Notification::Warning:
+ break;
+
+ case Ekiga::Notification::Error:
+
+ notify_notification_set_urgency (notif, NOTIFY_URGENCY_CRITICAL);
+ break;
+ }
+
g_signal_connect (notif, "closed",
G_CALLBACK (on_notif_closed), notification.get ());
boost::signals::connection conn = notification->removed.connect (boost::bind (&LibNotify::on_notification_removed, this, notification));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]