Re: [Banshee-List] Help user in showing how to import music into banshee



Didier, these patches expand on Bertrand's to show a message in the meego interface.

--
--Alex Launi
From fc23ff3ba8540f08e83539ab48897e1b90dc8f33 Mon Sep 17 00:00:00 2001
From: Alex Launi <alex launi gmail com>
Date: Sat, 3 Jul 2010 01:15:51 -0400
Subject: [PATCH 1/2] [Banshee.Library] Show message when Music library is empty telling user to add music.

---
 .../Banshee.Library/MusicLibrarySource.cs          |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs b/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs
index f549c27..8db9a0a 100644
--- a/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs
+++ b/src/Core/Banshee.Services/Banshee.Library/MusicLibrarySource.cs
@@ -83,6 +83,15 @@ namespace Banshee.Library
                     DatabaseTrackModel.Reload ();
                 }
             ));
+
+            DatabaseTrackModel.Reloaded += delegate {
+                if (TrackModel.Count == 0) {
+                    SetStatus (String.Format ("Please move your music to {0}", GetDefaultBaseDirectory ()),
+                               false, false, "dialog-info");
+                } else {
+                    HideStatus ();
+                }
+            };
         }
 
         public static string GetDefaultBaseDirectory ()
-- 
1.7.0.4

From 718c77bdd41a5ad7c3e72e801e9fe353862ddbfd Mon Sep 17 00:00:00 2001
From: Alex Launi <alex launi gmail com>
Date: Sat, 3 Jul 2010 01:16:17 -0400
Subject: [PATCH 2/2] [Meego] Display empty music library message in Meego interface.

---
 .../Banshee.MeeGo/MediaPanelContents.cs            |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
index d67ad7d..556783f 100644
--- a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
+++ b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
@@ -62,7 +62,7 @@ namespace Banshee.MeeGo
         {
         }
 
-        public MediaPanelContents () : base (2, 2, false)
+        public MediaPanelContents () : base (3, 2, false)
         {
             BorderWidth = 5;
             RowSpacing = 6;
@@ -73,6 +73,7 @@ namespace Banshee.MeeGo
             BuildHeader ();
             BuildLibrary ();
             BuildNowPlaying ();
+            BuildMessageBar ();
             ConnectEvents ();
 
             SetSource (ServiceManager.SourceManager.ActiveSource);
@@ -189,6 +190,15 @@ namespace Banshee.MeeGo
                 0, 0);
         }
 
+        private void BuildMessageBar ()
+        {
+            ConnectedMessageBar bar = new ConnectedMessageBar ();
+            Attach (bar, 0, 2, 2, 3,
+                    AttachOptions.Expand | AttachOptions.Fill,
+                    AttachOptions.Shrink, 0, 0);
+            bar.ShowAll ();
+        }
+
         private ScrolledWindow SetupView (Widget view)
         {
             var scrolled = new ScrolledWindow () {
-- 
1.7.0.4



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