summaryrefslogtreecommitdiffstats
path: root/config/chroot_local-patches
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2015-03-09 00:55:05 +0000
committerintrigeri <intrigeri@boum.org>2015-03-09 01:13:19 +0000
commita257e520382d96de9a00a2905794b3dd2cf93c84 (patch)
tree68a096b5536c23131b3518de4793c265094adb3d /config/chroot_local-patches
parent9c3c7ee37a3f00f2c11cb5caf8bae12c811815dc (diff)
Make Desktop::Notify support "hints".
Patch submitted upstream: https://rt.cpan.org/Ticket/Display.html?id=102644 This is required so that we can flag some notifications as "transient", which is sometimes needed: GNOME Shell ignores the timeout we pass it. So, the NotificationClosed signal is never send, and then the program that's waiting for it would stay around forever, unless the user explicitly dismisses the notification. This can lead to increased memory consumption. So, let's give us the power to decide, for each notification we send, whether: * it should stay around until the user dismisses it (or clicks on the action button, if any), at the cost of some memory usage for the user, or of a more complicated system that's left to be invented and implemented by us; or, * it will disappear after 4 seconds (see NOTIFICATION_TIMEOUT in js/ui/messageTray.js, in the GNOME Shell source code), regardless of whether the user has interacted with it.
Diffstat (limited to 'config/chroot_local-patches')
-rw-r--r--config/chroot_local-patches/Desktop-Notify:_0002-support_hints.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/config/chroot_local-patches/Desktop-Notify:_0002-support_hints.patch b/config/chroot_local-patches/Desktop-Notify:_0002-support_hints.patch
new file mode 100644
index 0000000..2c9eec1
--- /dev/null
+++ b/config/chroot_local-patches/Desktop-Notify:_0002-support_hints.patch
@@ -0,0 +1,59 @@
+From fc56108b83af0e4966ad615730d09e9bc11b865c Mon Sep 17 00:00:00 2001
+From: intrigeri <intrigeri@boum.org>
+Date: Mon, 9 Mar 2015 00:46:12 +0000
+Subject: [PATCH 2/2] Add support for passing hints to the notification server.
+
+---
+ lib/Desktop/Notify/Notification.pm | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/lib/Desktop/Notify/Notification.pm b/lib/Desktop/Notify/Notification.pm
+index e7710e8..0ac09cb 100644
+--- a/usr/share/perl5/Desktop/Notify/Notification.pm
++++ b/usr/share/perl5/Desktop/Notify/Notification.pm
+@@ -60,6 +60,7 @@ sub new {
+ $self->{server} = $server;
+ $self->{id} = undef;
+ $self->{actions} ||= {};
++ $self->{hints} ||= {};
+ bless $self, $class;
+ }
+
+@@ -83,7 +84,7 @@ sub show {
+ $self->{summary},
+ $self->{body},
+ [%{$self->{actions}}],
+- {},
++ $self->{hints},
+ $self->{timeout} || 0,
+ );
+ $self->{server}->_register_notification($self);
+@@ -135,6 +136,12 @@ element in the list is the localized string that will be displayed to the user.
+ A user-specified function to be called whenever an action is invoked can be
+ specified with L<Desktop::Notify>'s L<action_callback> method.
+
++=item hints
++
++Optional hints that can be passed to the server from the client program.
++
++=back
++
+ =item timeout
+
+ The timeout time in milliseconds since the display of the notification at which
+@@ -155,12 +162,6 @@ supported by L<Desktop::Notify> at this time
+
+ The optional program icon of the calling application.
+
+-=item hints
+-
+-Optional hints that can be passed to the server from the client program.
+-
+-=back
+-
+ =cut
+
+ 1; # End of Desktop::Notify::Notification
+--
+2.1.4
+