[banshee/stable-1.6] [Nereid] Fix glitchy search entry



commit 249ffa325ea9dbc1d257c8ebe6b0a2c6f24049b5
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue Aug 10 16:17:41 2010 -0700

    [Nereid] Fix glitchy search entry
    
    Sometimes when searching the cursor would get moved to the start,
    messing up your query.  Fixes bgo#619036

 src/Clients/Nereid/Nereid/PlayerInterface.cs |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/Clients/Nereid/Nereid/PlayerInterface.cs b/src/Clients/Nereid/Nereid/PlayerInterface.cs
index 2d89650..2479146 100644
--- a/src/Clients/Nereid/Nereid/PlayerInterface.cs
+++ b/src/Clients/Nereid/Nereid/PlayerInterface.cs
@@ -469,11 +469,14 @@ namespace Nereid
 
                 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;
-                    });
+                    var search_entry = source.Properties.Get<SearchEntry> ("Nereid.SearchEntry") ?? view_container.SearchEntry;
+                    if (!search_entry.HasFocus) {
+                        ThreadAssist.ProxyToMain (delegate {
+                            view_container.SearchEntry.Ready = false;
+                            view_container.SearchEntry.Query = source.FilterQuery;
+                            view_container.SearchEntry.Ready = true;
+                        });
+                    }
                     break;
             }
         }



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