[ekiga] Libnotify component: Ignore info notifications.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Libnotify component: Ignore info notifications.
- Date: Sun, 22 Apr 2012 12:32:24 +0000 (UTC)
commit fbb7d7c30015c33a40bc6c476b96e3a89a5c7c7b
Author: Damien Sandras <dsandras beip be>
Date: Sun Apr 22 14:17:46 2012 +0200
Libnotify component: Ignore info notifications.
lib/engine/components/libnotify/libnotify-main.cpp | 29 +++++++++++---------
lib/engine/components/opal/opal-account.cpp | 4 ++-
2 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/lib/engine/components/libnotify/libnotify-main.cpp b/lib/engine/components/libnotify/libnotify-main.cpp
index 7c475b3..f5ebe61 100644
--- a/lib/engine/components/libnotify/libnotify-main.cpp
+++ b/lib/engine/components/libnotify/libnotify-main.cpp
@@ -133,19 +133,6 @@ on_notif_closed (NotifyNotification* /*notif*/,
void
LibNotify::on_notification_added (boost::shared_ptr<Ekiga::Notification> notification)
{
- NotifyNotification* notif = notify_notification_new (notification->get_title ().c_str (),
- notification->get_body ().c_str (),
- "ekiga"
- // NOTIFY_CHECK_VERSION appeared in 0.5.2 only
-#ifdef NOTIFY_CHECK_VERSION
-#if !NOTIFY_CHECK_VERSION(0,7,0)
- , NULL
-#endif
-#else
- , NULL
-#endif
- );
-
switch (notification->get_level ()) {
case Ekiga::Notification::Error:
@@ -153,11 +140,27 @@ LibNotify::on_notification_added (boost::shared_ptr<Ekiga::Notification> notific
break;
case Ekiga::Notification::Info:
+ return;
+ break;
+
case Ekiga::Notification::Warning:
default:
break;
}
+ NotifyNotification* notif = notify_notification_new (notification->get_title ().c_str (),
+ notification->get_body ().c_str (),
+ "Ekiga"
+ // NOTIFY_CHECK_VERSION appeared in 0.5.2 only
+#ifdef NOTIFY_CHECK_VERSION
+#if !NOTIFY_CHECK_VERSION(0,7,0)
+ , NULL
+#endif
+#else
+ , NULL
+#endif
+ );
+
g_signal_connect (notif, "closed",
G_CALLBACK (on_notif_closed), notification.get ());
boost::signals::connection conn =
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 94258c2..8906917 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -655,7 +655,9 @@ Opal::Account::handle_registration_event (RegistrationState state_,
status = status + " (" + info + ")";
if (!failed_registration_already_notified) {
updated ();
- boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Warning, get_name (), status));
+ std::stringstream msg;
+ msg << _("Could not register to ") << get_name ();
+ boost::shared_ptr<Ekiga::Notification> notif (new Ekiga::Notification (Ekiga::Notification::Warning, msg.str (), info));
notification_core->push_notification (notif);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]