Desktop-Notify:_0002-support_hints.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From fc56108b83af0e4966ad615730d09e9bc11b865c Mon Sep 17 00:00:00 2001
  2. From: intrigeri <intrigeri@boum.org>
  3. Date: Mon, 9 Mar 2015 00:46:12 +0000
  4. Subject: [PATCH 2/2] Add support for passing hints to the notification server.
  5. ---
  6. lib/Desktop/Notify/Notification.pm | 15 ++++++++-------
  7. 1 file changed, 8 insertions(+), 7 deletions(-)
  8. diff --git a/lib/Desktop/Notify/Notification.pm b/lib/Desktop/Notify/Notification.pm
  9. index e7710e8..0ac09cb 100644
  10. --- a/usr/share/perl5/Desktop/Notify/Notification.pm
  11. +++ b/usr/share/perl5/Desktop/Notify/Notification.pm
  12. @@ -60,6 +60,7 @@ sub new {
  13. $self->{server} = $server;
  14. $self->{id} = undef;
  15. $self->{actions} ||= {};
  16. + $self->{hints} ||= {};
  17. bless $self, $class;
  18. }
  19. @@ -83,7 +84,7 @@ sub show {
  20. $self->{summary},
  21. $self->{body},
  22. [%{$self->{actions}}],
  23. - {},
  24. + $self->{hints},
  25. $self->{timeout} || 0,
  26. );
  27. $self->{server}->_register_notification($self);
  28. @@ -135,6 +136,12 @@ element in the list is the localized string that will be displayed to the user.
  29. A user-specified function to be called whenever an action is invoked can be
  30. specified with L<Desktop::Notify>'s L<action_callback> method.
  31. +=item hints
  32. +
  33. +Optional hints that can be passed to the server from the client program.
  34. +
  35. +=back
  36. +
  37. =item timeout
  38. The timeout time in milliseconds since the display of the notification at which
  39. @@ -155,12 +162,6 @@ supported by L<Desktop::Notify> at this time
  40. The optional program icon of the calling application.
  41. -=item hints
  42. -
  43. -Optional hints that can be passed to the server from the client program.
  44. -
  45. -=back
  46. -
  47. =cut
  48. 1; # End of Desktop::Notify::Notification
  49. --
  50. 2.1.4