Guest User

Untitled

a guest
Jul 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. ---
  2. lib/Growl/Any.pm | 17 +++++++++++++++++
  3. 1 files changed, 17 insertions(+), 0 deletions(-)
  4.  
  5. diff --git a/lib/Growl/Any.pm b/lib/Growl/Any.pm
  6. index 5c1f909..916fdbd 100644
  7. --- a/lib/Growl/Any.pm
  8. +++ b/lib/Growl/Any.pm
  9. @@ -45,6 +45,23 @@ if (eval { require Mac::Growl; }) {
  10. Mac::Growl::PostNotification($self->{name}, $event, $title, $message, 0, 0, $icon);
  11. unlink $icon if defined $icon && -e $icon;
  12. };
  13. +} elsif (eval { require Cocoa::Growl; }) {
  14. + *Growl::Any::register = sub {
  15. + my ($self, $appname, $events) = @_;
  16. + Cocoa::Growl::growl_register(
  17. + app => $appname,
  18. + notifications => $events,
  19. + );
  20. + };
  21. + *Growl::Any::notify = sub {
  22. + my ($self, $event, $title, $message, $icon) = @_;
  23. + Cocoa::Growl::growl_notify(
  24. + name => $event,
  25. + title => $title,
  26. + description => $message,
  27. + icon => $icon,
  28. + );
  29. + };
  30. } elsif (which('notify-send')) {
  31. *Growl::Any::register = sub {
  32. my ($self, $appname, $events) = @_;
  33. --
  34. 1.7.3.1
Add Comment
Please, Sign In to add comment