summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-01-12 16:05:36 -0500
committerCosimo Cecchi <cosimoc@gnome.org>2013-01-14 10:20:02 -0500
commit8db750fd470ce3545258b043cbc0e839c45da288 (patch)
tree8317fbee00fc37e85b3c2e242298612bb8fdf745
parent0ee7f3b67e729dbd0f8a8c9a472c9a616283eac0 (diff)
downloadnautilus-8db750fd470ce3545258b043cbc0e839c45da288.tar.gz
Add source hints to notifications
This makes it easier for gnome-shell to apply filtering. See https://live.gnome.org/GnomeGoals/NotificationSource https://bugzilla.gnome.org/show_bug.cgi?id=690995
-rw-r--r--src/nautilus-application.c4
-rw-r--r--src/nautilus-progress-ui-handler.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 780b04df3..047090108 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -146,6 +146,8 @@ nautilus_application_notify_unmount_done (NautilusApplication *application,
strings = g_strsplit (message, "\n", 0);
unplug = notify_notification_new (strings[0], strings[1],
"media-removable");
+ notify_notification_set_hint (unplug,
+ "desktop-entry", g_variant_new_string ("nautilus"));
notify_notification_show (unplug, NULL);
g_object_unref (unplug);
@@ -167,6 +169,8 @@ nautilus_application_notify_unmount_show (NautilusApplication *application,
"media-removable");
notify_notification_set_hint (application->priv->unmount_notify,
+ "desktop-entry", g_variant_new_string ("nautilus"));
+ notify_notification_set_hint (application->priv->unmount_notify,
"transient", g_variant_new_boolean (TRUE));
notify_notification_set_urgency (application->priv->unmount_notify,
NOTIFY_URGENCY_CRITICAL);
diff --git a/src/nautilus-progress-ui-handler.c b/src/nautilus-progress-ui-handler.c
index 5598cf533..020ec04d3 100644
--- a/src/nautilus-progress-ui-handler.c
+++ b/src/nautilus-progress-ui-handler.c
@@ -112,6 +112,8 @@ progress_ui_handler_ensure_notification (NautilusProgressUIHandler *self)
notify_notification_set_category (notify, "transfer");
notify_notification_set_hint (notify, "resident",
g_variant_new_boolean (TRUE));
+ notify_notification_set_hint (notify,
+ "desktop-entry", g_variant_new_string ("nautilus"));
notify_notification_add_action (notify, ACTION_DETAILS,
_("Show Details"),
@@ -272,6 +274,8 @@ progress_ui_handler_show_complete_notification (NautilusProgressUIHandler *self)
complete_notification = notify_notification_new (_("File Operations"),
_("All file operations have been successfully completed"),
NULL);
+ notify_notification_set_hint (complete_notification,
+ "desktop-entry", g_variant_new_string ("nautilus"));
notify_notification_show (complete_notification, NULL);
g_object_unref (complete_notification);