The Notifications object now handles displaying multiple notifications.
[picture-display.git] / lib / Display / Plugins / MPD.pm
index 7acb4ee..13d92df 100644 (file)
@@ -45,11 +45,9 @@ sub display {
     push @lines, $current->album()  if defined $current->album();
     push @lines, $current->artist() if defined $current->artist();
 
-    $self->{'status'}->set_text(join("\n", @lines));
-
     $self->{'file'} = $current->file();
 
-    $kernel->yield('notifications_add', $self->{'status'}, $self->{'logo'});
+    $kernel->post('display', 'notifications_add', join("\n", @lines), $self->{'logo'});
   }
 
   $self->delay();
@@ -60,10 +58,6 @@ sub init {
 
   $self->{'kernel'}->state('mpd_display', $self, 'display');
 
-  $self->{'status'} = Clutter::Label->new('Sans 20', "Song\nAlbum");
-  $self->{'status'}->set_color(Clutter::Color->parse('White'));
-  $self->{'status'}->set_ellipsize('end');
-
   $self->{'logo'} = "$Bin/share/MPD.png";
 
   $self->{'kernel'}->yield('mpd_display');