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




commit 33d181e97a3988c0a6421843657175d4493ab1fd
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 840698333..67cdcea21 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -613,6 +613,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;
 
@@ -675,7 +676,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]