Permalink
Browse files

Use Log::Dispatch::DesktopNotification instead of Log::Dispatch::MacG…

…rowl.
  • Loading branch information...
1 parent f1c0822 commit 2454ec4cd7de021d5c9b3cb7a627a8a0083f056e @rafl rafl committed Feb 7, 2009
Showing with 10 additions and 10 deletions.
  1. +3 −3 Makefile.PL
  2. +7 −7 lib/Test/Continuous/Notifier.pm
View
@@ -25,9 +25,9 @@ requires(
);
features(
- 'Notify with Growl' => [
- -default => ($^O eq 'darwin'),
- "Log::Dispatch::MacGrowl" => 0
+ 'Graphical notifications' => [
+ -default => 1,
+ "Log::Dispatch::DesktopNotification" => 0
]
);
@@ -17,10 +17,10 @@ use self;
);
eval {
- require Log::Dispatch::MacGrowl;
+ require Log::Dispatch::DesktopNotification;
$dispatcher->add(
- Log::Dispatch::MacGrowl->new(
- name => "growl",
+ Log::Dispatch::DesktopNotification->new(
+ name => "continuous_notify",
min_level => "debug",
app_name => "Test::Continuous",
title => "Test Report",
@@ -41,12 +41,12 @@ my %status_icon = (
sub send_notify {
my ($text, $status) = args;
$status ||= 'info';
- if (my $growl = self->_dispatcher->remove("growl")) {
- $growl->{icon_file} = '/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/' .
+ if (my $notify = self->_dispatcher->remove("continuous_notify")) {
+ $notify->{icon_file} = '/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/' .
($status_icon{$status} || 'ToolbarInfo.icns');
- self->_dispatcher->add($growl);
+ self->_dispatcher->add($notify);
}
- self->_dispatcher->notice($text);
+ self->_dispatcher->$status($text);
}

0 comments on commit 2454ec4

Please sign in to comment.