[banshee/stable-1.6] [MeeGo] Keep the search entries synced
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-1.6] [MeeGo] Keep the search entries synced
- Date: Tue, 4 May 2010 18:15:31 +0000 (UTC)
commit 781c691924ecde1dd9d372a825c5cab71d59a150
Author: Gabriel Burt <gabriel burt gmail com>
Date: Tue May 4 11:11:34 2010 -0700
[MeeGo] Keep the search entries synced
Keep the MeeGo panel search entry and the Nereid entry in sync with each
other, so if you enter a query in one and switch to the other, it'll be
there.
src/Clients/Nereid/Nereid/PlayerInterface.cs | 19 +++++++++++++++----
.../Banshee.MeeGo/MediaPanelContents.cs | 7 ++++++-
.../Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs | 6 +++++-
3 files changed, 26 insertions(+), 6 deletions(-)
---
diff --git a/src/Clients/Nereid/Nereid/PlayerInterface.cs b/src/Clients/Nereid/Nereid/PlayerInterface.cs
index 19f7bc7..ed20977 100644
--- a/src/Clients/Nereid/Nereid/PlayerInterface.cs
+++ b/src/Clients/Nereid/Nereid/PlayerInterface.cs
@@ -480,10 +480,21 @@ namespace Nereid
private void OnSourcePropertyChanged (object o, PropertyChangeEventArgs args)
{
- if (args.PropertyName == "Nereid.SourceContents") {
- ThreadAssist.ProxyToMain (delegate {
- UpdateSourceContents (previous_source);
- });
+ switch (args.PropertyName) {
+ case "Nereid.SourceContents":
+ ThreadAssist.ProxyToMain (delegate {
+ UpdateSourceContents (previous_source);
+ });
+ break;
+
+ case "FilterQuery":
+ var source = ServiceManager.SourceManager.ActiveSource;
+ ThreadAssist.ProxyToMain (delegate {
+ view_container.SearchEntry.Ready = false;
+ view_container.SearchEntry.Query = source.FilterQuery;
+ view_container.SearchEntry.Ready = true;
+ });
+ break;
}
}
diff --git a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
index eab010a..d67ad7d 100644
--- a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
+++ b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
@@ -293,6 +293,11 @@ namespace Banshee.MeeGo
});
}
+ internal void SyncSearchEntry ()
+ {
+ OnActiveSourceChanged (null);
+ }
+
#endregion
#region View<->Model binding
@@ -392,4 +397,4 @@ namespace Banshee.MeeGo
#endregion
}
-}
\ No newline at end of file
+}
diff --git a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs
index 40ad80d..88486cb 100644
--- a/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs
+++ b/src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MeeGoPanel.cs
@@ -59,8 +59,12 @@ namespace Banshee.MeeGo
Log.Debug ("Attempting to create MeeGo toolbar panel");
embedded_panel = new PanelGtk ("banshee", Catalog.GetString ("Banshee Media Player"),
null, "media-button", true);
- embedded_panel.ShowBeginEvent += (o, e) =>
+ embedded_panel.ShowBeginEvent += (o, e) => {
ServiceManager.SourceManager.SetActiveSource (ServiceManager.SourceManager.MusicLibrary);
+ if (Contents != null) {
+ Contents.SyncSearchEntry ();
+ }
+ };
while (Gtk.Application.EventsPending ()) {
Gtk.Application.RunIteration ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]