# HG changeset patch # User Aleksej Bobylev # Date 1457105821 -7200 # Node ID 668e3b18eda443ba448a8ee4372f04e495b1f737 # Parent 278af74ed921102c3ed9f412d0dda533752ba1c3 libnotify: patch to print and replace id diff -r 278af74ed921 -r 668e3b18eda4 libnotify/description.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libnotify/description.txt Fri Mar 04 17:37:01 2016 +0200 @@ -0,0 +1,11 @@ +libnotify implements a standard for a desktop notifications service, through +which applications can generate passive popups to notify the user in an +asynchronous manner of events. + +Example use cases include: + + * Messages from chat programs + * Scheduled alarm + * Completed file transfer + * New mail notification + * Low disk space/battery warnings diff -r 278af74ed921 -r 668e3b18eda4 libnotify/receipt --- a/libnotify/receipt Thu Mar 03 23:30:14 2016 +0200 +++ b/libnotify/receipt Fri Mar 04 17:37:01 2016 +0200 @@ -22,7 +22,8 @@ # Rules to configure and make the package. compile_rules() { - cd $src + patch -p1 -i $stuff/print-and-replace-id-v3.patch + sed -e 's/REQ_GTK_VERSION=2.90/REQ_GTK_VERSION=2.24/' \ -e 's/tests_modules="gtk+-3.0 >= $REQ_GTK_VERSION"/tests_modules="gtk+-2.0 >= $REQ_GTK_VERSION"/' \ -i configure @@ -35,7 +36,7 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/lib - cp -a $install/usr/bin $fs/usr - cp -a $install/usr/lib/*.so* $fs/usr/lib + mkdir -p $fs/usr/lib + cp -a $install/usr/bin $fs/usr + cp -a $install/usr/lib/*.so* $fs/usr/lib } diff -r 278af74ed921 -r 668e3b18eda4 libnotify/stuff/print-and-replace-id-v3.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libnotify/stuff/print-and-replace-id-v3.patch Fri Mar 04 17:37:01 2016 +0200 @@ -0,0 +1,50 @@ +https://bugs.launchpad.net/ubuntu/+source/libnotify/+bug/257135/comments/10 +https://launchpadlibrarian.net/105791133/print-and-replace-id-v3.patch + +Index: libnotify-0.7.5/tools/notify-send.c +=================================================================== +--- libnotify-0.7.5.orig/tools/notify-send.c 2011-10-14 11:24:15.000000000 +1300 ++++ libnotify-0.7.5/tools/notify-send.c 2012-05-22 22:15:43.370979671 +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,12 @@ + if (!hint_error) + notify_notification_show (notify, NULL); + ++ if (print_id) { ++ gint id; ++ g_object_get (notify, "id", &id, NULL); ++ g_printf ("%d\n", id); ++ } ++ + g_object_unref (G_OBJECT (notify)); + + notify_uninit ();