[dconf-editor] Some bookmark_search improvements.



commit 3f85f3586336958f9912778db7c647273232a8bb
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Nov 28 14:25:53 2017 +0100

    Some bookmark_search improvements.

 editor/registry-search.vala |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/editor/registry-search.vala b/editor/registry-search.vala
index 47278cb..e4f6da4 100644
--- a/editor/registry-search.vala
+++ b/editor/registry-search.vala
@@ -478,14 +478,22 @@ class RegistrySearch : Grid, PathElement, BrowsableView
 
     private bool bookmark_search (SettingsModel model, string current_path, string term)
     {
+        string [] installed_bookmarks = {}; // TODO move check in Bookmarks
         foreach (string bookmark in window.get_bookmarks ())
         {
-            bool local_again = model.get_parent_path (bookmark) == current_path;
-            if (local_again)
+            if (bookmark in installed_bookmarks)
                 continue;
+            installed_bookmarks += bookmark;
+
+            if (bookmark == current_path)
+                continue;
+            if (model.get_parent_path (bookmark) == current_path)
+                continue;
+
             SettingObject? setting_object = model.get_object (bookmark);
             if (setting_object == null)
                 continue;
+
             if (term in ((!) setting_object).name)
             {
                 post_bookmarks++;


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