[gnome-builder] plugins/find-other-file: place directories at end of list



commit e71161a64e3a3367a1999e7376a49d44a101d5bf
Author: Christian Hergert <chergert redhat com>
Date:   Fri Aug 19 13:00:41 2022 -0700

    plugins/find-other-file: place directories at end of list
    
    That way the cursor is closer to the files on focus. Reverse the order of
    directories in the browser so that we grow from current directory to the
    root of the project (at the end).

 src/plugins/find-other-file/gbp-find-other-file-browser.c         | 2 +-
 src/plugins/find-other-file/gbp-find-other-file-workspace-addin.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/find-other-file/gbp-find-other-file-browser.c 
b/src/plugins/find-other-file/gbp-find-other-file-browser.c
index 21cee9d69..f7a8a9600 100644
--- a/src/plugins/find-other-file/gbp-find-other-file-browser.c
+++ b/src/plugins/find-other-file/gbp-find-other-file-browser.c
@@ -100,7 +100,7 @@ gbp_find_other_file_browser_reload (GbpFindOtherFileBrowser *self)
              (g_file_has_prefix (parent, self->root) ||
               g_file_equal (parent, self->root)))
         {
-          g_ptr_array_insert (self->items, 0, parent);
+          g_ptr_array_add (self->items, parent);
           parent = g_file_get_parent (parent);
         }
 
diff --git a/src/plugins/find-other-file/gbp-find-other-file-workspace-addin.c 
b/src/plugins/find-other-file/gbp-find-other-file-workspace-addin.c
index 0f56eb6df..a4149253c 100644
--- a/src/plugins/find-other-file/gbp-find-other-file-workspace-addin.c
+++ b/src/plugins/find-other-file/gbp-find-other-file-workspace-addin.c
@@ -115,7 +115,7 @@ gbp_find_other_file_workspace_addin_list_similar_cb (GObject      *object,
   g_assert (GBP_IS_FIND_OTHER_FILE_BROWSER (self->browser));
   g_assert (G_IS_LIST_MODEL (model));
 
-  joined = join_models (G_LIST_MODEL (self->browser), model);
+  joined = join_models (model, G_LIST_MODEL (self->browser));
   gbp_find_other_file_popover_set_model (self->popover, joined);
   gtk_widget_show (GTK_WIDGET (self->menu_button));
 


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