[banshee] [SourceView] Pulse smart playlists when they become unhidden
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [SourceView] Pulse smart playlists when they become unhidden
- Date: Tue, 24 Aug 2010 20:01:34 +0000 (UTC)
commit 74849bfbb28cf90de1c8068e3b79b71f4f9c0d65
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue Aug 24 14:58:43 2010 -0500
[SourceView] Pulse smart playlists when they become unhidden
.../Banshee.SmartPlaylist/SmartPlaylistSource.cs | 6 +++++-
.../Banshee.Sources.Gui/SourceView.cs | 4 ++++
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
index efeab49..186861e 100644
--- a/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
+++ b/src/Core/Banshee.Services/Banshee.SmartPlaylist/SmartPlaylistSource.cs
@@ -367,8 +367,12 @@ namespace Banshee.SmartPlaylist
private bool refreshed = false;
public override void Reload ()
{
- if (!refreshed)
+ if (!refreshed) {
Refresh ();
+ } else {
+ // Don't set this on the first refresh
+ Properties.Set<bool> ("NotifyWhenAdded", IsHiddenWhenEmpty);
+ }
base.Reload ();
diff --git a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
index b7da48a..c869034 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ -341,6 +341,10 @@ namespace Banshee.Sources.Gui
}
UpdateView ();
+
+ if (args.Source.Properties.Get<bool> ("NotifyWhenAdded")) {
+ args.Source.NotifyUser ();
+ }
}
private void OnSourceRowRemoved (object o, SourceRowEventArgs args)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]