[nautilus/clear-starred-column-header: 4/4] list-view: Properly match for Star column




commit 8a8fa329397cd51627bffec78126dcfdba7abd4e
Author: António Fernandes <antoniojpfernandes gmail com>
Date:   Sat Feb 13 14:54:56 2021 +0000

    list-view: Properly match for Star column
    
    We have been matching the Star column by it's title, ever since it was
    first introduced by commit a9c446afe262b7989bc17ef1f9ab19931db8dede
    
    Worse: we have been using an untranslated string. This means that if
    the string is localized clicking the star icons does nothing.
    
    Match the column by its key in the hash table instead.

 src/nautilus-list-view.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 3ed3e9c95..63e54d11c 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -640,7 +640,7 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
         view->details->first_click_path = gtk_tree_path_copy (path);
     }
 
-    on_star = (g_strcmp0 (gtk_tree_view_column_get_title (column), "Star") == 0 &&
+    on_star = (g_hash_table_lookup (view->details->columns, "starred") == column &&
                !gtk_tree_view_is_blank_at_pos (tree_view,
                                                bin_x,
                                                bin_y,


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