[nautilus/wip/corey/fix-sort: 5/8] list-view: Block using the correct sorter




commit aea3776ad5216fc69177fddabf476a78a63b61ad
Author: Corey Berla <corey berla me>
Date:   Thu Oct 13 13:29:55 2022 -0700

    list-view: Block using the correct sorter
    
    In action_sort_order_changed() we are blocking emission of the
    ::changed signal, so that sorter_changed() isn't called when
    we re-sort the column, but inadvertantly it's being blocked on the
    wrong sorter.

 src/nautilus-list-view.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 2715e7e0e..a525cf438 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -606,6 +606,7 @@ action_sort_order_changed (GSimpleAction *action,
     NautilusFileSortType sort_type;
     NautilusListView *self;
     GListModel *view_columns;
+    NautilusViewModel *model;
     g_autoptr (GtkColumnViewColumn) sort_column = NULL;
     GtkSorter *sorter;
 
@@ -668,7 +669,8 @@ action_sort_order_changed (GSimpleAction *action,
         }
     }
 
-    sorter = gtk_column_view_get_sorter (self->view_ui);
+    model = nautilus_list_base_get_model (NAUTILUS_LIST_BASE (self));
+    sorter = nautilus_view_model_get_sorter (model);
 
     g_signal_handlers_block_by_func (sorter, on_sorter_changed, self);
     /* FIXME: Set NULL to stop drawing the arrow on previous sort column


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