[rhythmbox] Notification Plugin: fix updating for Play/Pause



commit 5f2863c0c54d94a3630b70b6c8f531a99f210a4a
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Aug 14 12:32:45 2012 +0200

    Notification Plugin: fix updating for Play/Pause
    
    When the playing status changes, reemit the notification. This
    ensures that the central action button is correctly updated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=681824

 plugins/notification/rb-notification-plugin.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/plugins/notification/rb-notification-plugin.c b/plugins/notification/rb-notification-plugin.c
index 0671b3d..d04514d 100644
--- a/plugins/notification/rb-notification-plugin.c
+++ b/plugins/notification/rb-notification-plugin.c
@@ -485,10 +485,15 @@ playing_entry_changed_cb (RBShellPlayer *player,
 			  RBNotificationPlugin *plugin)
 {
 	update_current_playing_data (plugin, entry);
+	notify_playing_entry (plugin, FALSE);
+}
 
-	if (entry != NULL) {
-		notify_playing_entry (plugin, FALSE);
-	}
+static void
+playing_changed_cb (RBShellPlayer *player,
+		    gboolean       playing,
+		    RBNotificationPlugin *plugin)
+{
+	notify_playing_entry (plugin, FALSE);
 }
 
 static gboolean
@@ -540,6 +545,7 @@ impl_activate (PeasActivatable *bplugin)
 	g_signal_connect_object (shell, "notify-custom", G_CALLBACK (shell_notify_custom_cb), plugin, 0);
 
 	g_signal_connect_object (plugin->shell_player, "playing-song-changed", G_CALLBACK (playing_entry_changed_cb), plugin, 0);
+	g_signal_connect_object (plugin->shell_player, "playing-changed", G_CALLBACK (playing_changed_cb), plugin, 0);
 
 	g_signal_connect_object (plugin->db, "entry_extra_metadata_notify::" RHYTHMDB_PROP_STREAM_SONG_TITLE,
 				 G_CALLBACK (db_stream_metadata_cb), plugin, 0);



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