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



commit a8c602b141e15873965c0c54aa5442b7744060da
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..d88740c8d 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]