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



commit 6bb95d77757cd05c974cc9c8ef87a0059510cd53
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 b919dbb48..282be684c 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -644,6 +644,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;
 
@@ -706,7 +707,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]