[banshee] [Banshee.Moblin] Improve clicking on recent album
- From: Gabriel Burt <gburt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee] [Banshee.Moblin] Improve clicking on recent album
- Date: Fri, 23 Oct 2009 00:27:30 +0000 (UTC)
commit cb1e09b07195547116871b388902069076e66c93
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Oct 22 15:16:45 2009 -0700
[Banshee.Moblin] Improve clicking on recent album
If there is nothing playing, the clicked album will begin playing.
Also, add a hack to ensure the query is displayed by Nereid's search
entry.
.../Banshee.Moblin/RecentAlbumsView.cs | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.Moblin/Banshee.Moblin/RecentAlbumsView.cs b/src/Extensions/Banshee.Moblin/Banshee.Moblin/RecentAlbumsView.cs
index a7de025..60b55af 100644
--- a/src/Extensions/Banshee.Moblin/Banshee.Moblin/RecentAlbumsView.cs
+++ b/src/Extensions/Banshee.Moblin/Banshee.Moblin/RecentAlbumsView.cs
@@ -58,11 +58,24 @@ namespace Banshee.Moblin
protected override void OnClicked ()
{
var source = ServiceManager.SourceManager.MusicLibrary;
+ var other_source = ServiceManager.SourceManager.VideoLibrary;
if (source != null) {
+ if (other_source != null) {
+ // HACK the Nereid search bar pulls the source's query value when
+ // the active source is changed, so artificially ensure that happens
+ ServiceManager.SourceManager.SetActiveSource (other_source);
+ }
+
source.FilterType = TrackFilterType.None;
source.FilterQuery = String.Format ("artist=\"{0}\" album=\"{1}\"", Album.ArtistName, Album.Title);
ServiceManager.SourceManager.SetActiveSource (source);
ServiceManager.Get<MoblinService> ().PresentPrimaryInterface ();
+
+ var player = ServiceManager.PlayerEngine;
+ if (!player.IsPlaying () || player.CurrentState == Banshee.MediaEngine.PlayerState.Paused) {
+ ServiceManager.PlaybackController.Source = source;
+ ServiceManager.PlaybackController.Next ();
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]