[banshee] [ThickClient] Fix logic bug in info display idling



commit 87e97dc4e6e395c0a1ebf26aefb1a451dc521f9b
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon Oct 25 17:56:16 2010 -0500

    [ThickClient] Fix logic bug in info display idling
    
    If it saw two state=idle, it was possible for it to ignore both and not
    render the idle track info display.

 .../Banshee.Gui.Widgets/TrackInfoDisplay.cs        |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
index fefaf87..aae18b4 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
@@ -385,10 +385,8 @@ namespace Banshee.Gui.Widgets
             } else if (args.Event == PlayerEvent.StateChange && (incoming_track != null || incoming_image != null)) {
                 PlayerEventStateChangeArgs state = (PlayerEventStateChangeArgs)args;
                 if (state.Current == PlayerState.Idle) {
-                    if (idle_timeout_id > 0) {
-                        GLib.Source.Remove (idle_timeout_id);
-                    } else {
-                        GLib.Timeout.Add (100, IdleTimeout);
+                    if (idle_timeout_id == 0) {
+                        idle_timeout_id = GLib.Timeout.Add (100, IdleTimeout);
                     }
                 }
             }



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