[banshee] [MeeGo] Show track info display only when not idle



commit d22c2e822b299554369664ba931c375ae5d9b199
Author: Aaron Bockover <abockover novell com>
Date:   Mon Mar 29 15:03:19 2010 -0400

    [MeeGo] Show track info display only when not idle

 .../Banshee.MeeGo/MeeGoSourceContents.cs           |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoSourceContents.cs b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoSourceContents.cs
index bb67d99..5bcb516 100644
--- a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoSourceContents.cs
+++ b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoSourceContents.cs
@@ -32,10 +32,12 @@ using Gtk;
 using Hyena.Data;
 using Hyena.Data.Gui;
 
+using Banshee.ServiceStack;
 using Banshee.Sources;
 using Banshee.Sources.Gui;
 using Banshee.Collection;
 using Banshee.Collection.Gui;
+using Banshee.MediaEngine;
 
 namespace Banshee.MeeGo
 {
@@ -45,6 +47,8 @@ namespace Banshee.MeeGo
         private AlbumListView album_view;
         private TerseTrackListView track_view;
 
+        private MeeGoTrackInfoDisplay track_info_display;
+
         private ISource source;
         private Dictionary<object, double> model_positions = new Dictionary<object, double> ();
 
@@ -62,15 +66,22 @@ namespace Banshee.MeeGo
             side_box.PackStart (SetupView (track_view = new TerseTrackListView ()), true, true, 0);
             track_view.ColumnController.Insert (new Column (null, "indicator",
                 new ColumnCellStatusIndicator (null), 0.05, true, 20, 20), 0);
-            side_box.PackStart (new MeeGoTrackInfoDisplay () { HeightRequest = 64 }, false, false, 0);
+            side_box.PackStart (track_info_display = new MeeGoTrackInfoDisplay (), false, false, 0);
+
+            track_info_display.HeightRequest = 64;
+            track_info_display.NoShowAll = true;
 
             artist_view.WidthRequest = 150;
-            track_view.WidthRequest = 240;
+            track_view.WidthRequest = 220;
             artist_view.DoNotRenderNullModel = true;
             album_view.DoNotRenderNullModel = true;
 
             artist_view.SelectionProxy.Changed += OnBrowserViewSelectionChanged;
             album_view.SelectionProxy.Changed += OnBrowserViewSelectionChanged;
+
+            ServiceManager.PlayerEngine.ConnectEvent ((args) => track_info_display.Visible =
+                ServiceManager.PlayerEngine.CurrentState != PlayerState.Idle,
+                PlayerEvent.StateChange | PlayerEvent.StartOfStream);
         }
 
         private ScrolledWindow SetupView (Widget view)



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