[dconf-editor] Remove a public function.



commit d20f530dd533121a841fa92cd34aa850c50046fe
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Sat Mar 17 10:44:20 2018 +0100

    Remove a public function.

 editor/dconf-model.vala     |    7 +------
 editor/registry-search.vala |   12 ++++++------
 2 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/editor/dconf-model.vala b/editor/dconf-model.vala
index 83d7bd4..a536731 100644
--- a/editor/dconf-model.vala
+++ b/editor/dconf-model.vala
@@ -90,15 +90,10 @@ public class SettingsModel : Object
     * * Objects requests
     \*/
 
-    public Directory get_root_directory ()
-    {
-        return new Directory ("/", "/");
-    }
-
     private Directory? get_directory (string path)
     {
         if (path == "/")
-            return get_root_directory ();
+            return new Directory ("/", "/");
 
         uint schemas_count = 0;
         uint subpaths_count = 0;
diff --git a/editor/registry-search.vala b/editor/registry-search.vala
index 4d4d741..1b8f718 100644
--- a/editor/registry-search.vala
+++ b/editor/registry-search.vala
@@ -213,7 +213,7 @@ class RegistrySearch : RegistryList
     private int post_bookmarks;
     private int post_folders;
     private uint? search_source = null;
-    private GLib.Queue<Directory> search_nodes = new GLib.Queue<Directory> ();
+    private GLib.Queue<string> search_nodes = new GLib.Queue<string> ();
 
     public void clean ()
     {
@@ -378,7 +378,7 @@ class RegistrySearch : RegistryList
 
     private void start_global_search (SettingsModel model, string current_path, string term)
     {
-        search_nodes.push_head (model.get_root_directory ());
+        search_nodes.push_head ("/");
         resume_global_search (current_path, term);
     }
 
@@ -405,10 +405,10 @@ class RegistrySearch : RegistryList
         SettingsModel model = modifications_handler.model;
         if (!search_nodes.is_empty ())
         {
-            Directory next = (!) search_nodes.pop_head ();
-            bool local_again = next.full_name == current_path;
+            string next = (!) search_nodes.pop_head ();
+            bool local_again = next == current_path;
 
-            GLib.ListStore? next_key_model = model.get_children (next.full_name);
+            GLib.ListStore? next_key_model = model.get_children (next);
             if (next_key_model == null)
                 return true;
 
@@ -419,7 +419,7 @@ class RegistrySearch : RegistryList
                 {
                     if (!local_again && term in item.name)
                         list_model.insert (post_folders++, item);
-                    search_nodes.push_tail ((Directory) item); // we still search local children
+                    search_nodes.push_tail (item.full_name); // we still search local children
                 }
                 else
                 {


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