[banshee] [Meego] Make search entry in MeeGo panel correctly show query



commit 1a2f179f8ea9e347aaeeb9bf6a4cdfc826658c9c
Author: Zhou Ting <ting z zhou intel com>
Date:   Thu Nov 18 10:15:11 2010 +0800

    [Meego] Make search entry in MeeGo panel correctly show query
    
    https://bugzilla.gnome.org/show_bug.cgi?id=634662

 .../Banshee.MeeGo/MediaPanelContents.cs            |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
index d67ad7d..452a1bb 100644
--- a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
+++ b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
@@ -41,6 +41,7 @@ using Banshee.Sources.Gui;
 using Banshee.Collection;
 using Banshee.Collection.Gui;
 using Banshee.MediaEngine;
+using Banshee.Gui;
 using Banshee.Gui.Widgets;
 
 namespace Banshee.MeeGo
@@ -82,6 +83,9 @@ namespace Banshee.MeeGo
         {
             ServiceManager.SourceManager.ActiveSourceChanged += OnActiveSourceChanged;
 
+            ServiceManager.Get<InterfaceActionService> ().TrackActions ["SearchForSameArtistAction"].Activated += OnProgrammaticSearch;
+            ServiceManager.Get<InterfaceActionService> ().TrackActions ["SearchForSameAlbumAction"].Activated += OnProgrammaticSearch;
+
             ServiceManager.PlayerEngine.ConnectEvent ((args) => track_info_display.Visible =
                 ServiceManager.PlayerEngine.CurrentState != PlayerState.Idle,
                 PlayerEvent.StateChange | PlayerEvent.StartOfStream);
@@ -246,6 +250,14 @@ namespace Banshee.MeeGo
 
 #region Event Handlers
 
+        private void OnProgrammaticSearch (object o, EventArgs args)
+        {
+            Source source = ServiceManager.SourceManager.ActiveSource;
+            search_entry.Ready = false;
+            search_entry.Query = source.FilterQuery;
+            search_entry.Ready = true;
+        }
+
         private void OnBrowserViewSelectionChanged (object o, EventArgs args)
         {
             // Scroll the raising filter view to the top if "all" is selected



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