summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard2015-10-01 11:44:13 +0200
committerRichard2015-10-01 11:44:13 +0200
commitfd36ecf43ec020d1766a51d62a9cc1e6d7b71eb0 (patch)
tree0ee3cb5bf9e2ebb6aab6df331bfed7a538545d3c
parent5fe761428cca60f1d89df70bc803f236372c9757 (diff)
downloadaur-fd36ecf43ec020d1766a51d62a9cc1e6d7b71eb0.tar.gz
Added patch
-rw-r--r--notifysend.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/notifysend.patch b/notifysend.patch
new file mode 100644
index 000000000000..337e326c0c1c
--- /dev/null
+++ b/notifysend.patch
@@ -0,0 +1,49 @@
+Index: libnotify-0.7.6/tools/notify-send.c
+===================================================================
+--- libnotify-0.7.6.orig/tools/notify-send.c 2011-10-14 11:24:15.000000000 +1300
++++ libnotify-0.7.6/tools/notify-send.c 2012-05-22 20:47:16.228540669 +1200
+@@ -130,6 +130,8 @@
+ static char *icons = NULL;
+ static char **n_text = NULL;
+ static char **hints = NULL;
++ static gboolean print_id = FALSE;
++ static gint replace_id = 0;
+ static gboolean do_version = FALSE;
+ static gboolean hint_error = FALSE;
+ static glong expire_timeout = NOTIFY_EXPIRES_DEFAULT;
+@@ -159,6 +161,10 @@
+ N_
+ ("Specifies basic extra data to pass. Valid types are int, double, string and byte."),
+ N_("TYPE:NAME:VALUE")},
++ {"print-id", 'p', 0, G_OPTION_ARG_NONE, &print_id,
++ N_ ("Print the notification ID."), NULL},
++ {"replace-id", 'r', 0, G_OPTION_ARG_INT, &replace_id,
++ N_ ("The ID of the notification to replace."), N_("REPLACE_ID")},
+ {"version", 'v', 0, G_OPTION_ARG_NONE, &do_version,
+ N_("Version of the package."),
+ NULL},
+@@ -233,6 +239,9 @@
+
+ g_free (body);
+
++ if (replace_id)
++ g_object_set (notify, "id", replace_id, NULL);
++
+ /* Set hints */
+ if (hints != NULL) {
+ gint i = 0;
+@@ -272,6 +281,14 @@
+ if (!hint_error)
+ notify_notification_show (notify, NULL);
+
++ if (print_id) {
++ gint id;
++ g_object_get (notify, "id", &id, NULL);
++ if (id) {
++ g_printf ("%d\n", id);
++ }
++ }
++
+ g_object_unref (G_OBJECT (notify));
+
+ notify_uninit ();