Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- lib/Growl/Any.pm | 17 +++++++++++++++++
- 1 files changed, 17 insertions(+), 0 deletions(-)
- diff --git a/lib/Growl/Any.pm b/lib/Growl/Any.pm
- index 5c1f909..916fdbd 100644
- --- a/lib/Growl/Any.pm
- +++ b/lib/Growl/Any.pm
- @@ -45,6 +45,23 @@ if (eval { require Mac::Growl; }) {
- Mac::Growl::PostNotification($self->{name}, $event, $title, $message, 0, 0, $icon);
- unlink $icon if defined $icon && -e $icon;
- };
- +} elsif (eval { require Cocoa::Growl; }) {
- + *Growl::Any::register = sub {
- + my ($self, $appname, $events) = @_;
- + Cocoa::Growl::growl_register(
- + app => $appname,
- + notifications => $events,
- + );
- + };
- + *Growl::Any::notify = sub {
- + my ($self, $event, $title, $message, $icon) = @_;
- + Cocoa::Growl::growl_notify(
- + name => $event,
- + title => $title,
- + description => $message,
- + icon => $icon,
- + );
- + };
- } elsif (which('notify-send')) {
- *Growl::Any::register = sub {
- my ($self, $appname, $events) = @_;
- --
- 1.7.3.1
Add Comment
Please, Sign In to add comment