[rhythmbox] notification: close notifications when not playing



commit 998ae82f317b57b57d300522158a32507d2e198e
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu Apr 10 22:44:59 2014 +1000

    notification: close notifications when not playing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727937

 plugins/notification/rb-notification-plugin.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plugins/notification/rb-notification-plugin.c b/plugins/notification/rb-notification-plugin.c
index 5e527e6..231698f 100644
--- a/plugins/notification/rb-notification-plugin.c
+++ b/plugins/notification/rb-notification-plugin.c
@@ -505,12 +505,12 @@ playing_entry_changed_cb (RBShellPlayer *player,
                          RhythmDBEntry *entry,
                          RBNotificationPlugin *plugin)
 {
-       if (entry == NULL && plugin->notification == NULL) {
-               return;
+       if (entry == NULL) {
+               cleanup_notification (plugin);
+       } else {
+               update_current_playing_data (plugin, entry);
+               notify_playing_entry (plugin, FALSE);
        }
-
-       update_current_playing_data (plugin, entry);
-       notify_playing_entry (plugin, FALSE);
 }
 
 static void
@@ -518,11 +518,11 @@ playing_changed_cb (RBShellPlayer *player,
                    gboolean       playing,
                    RBNotificationPlugin *plugin)
 {
-       if (playing == FALSE && plugin->notification == NULL) {
-               return;
+       if (playing) {
+               notify_playing_entry (plugin, FALSE);
+       } else {
+               cleanup_notification (plugin);
        }
-
-       notify_playing_entry (plugin, FALSE);
 }
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]