[nautilus/wip/antoniof/new-list-view-continuation: 13/34] view-icon-controller: Drop unused .get_icon() vfunc




commit 312b2616a7b4d0a8979e5b9acc50f6c42e5eb2cd
Author: António Fernandes <antoniof gnome org>
Date:   Thu Dec 2 00:23:56 2021 +0000

    view-icon-controller: Drop unused .get_icon() vfunc
    
    This is no longer used. nautilus_view_get_icon() picks the icon based
    on the view id alone.

 src/nautilus-files-view.h           |  2 --
 src/nautilus-view-icon-controller.c | 12 ------------
 2 files changed, 14 deletions(-)
---
diff --git a/src/nautilus-files-view.h b/src/nautilus-files-view.h
index 0b0a9b311..e1882b7ba 100644
--- a/src/nautilus-files-view.h
+++ b/src/nautilus-files-view.h
@@ -219,8 +219,6 @@ struct _NautilusFilesViewClass {
 
         GdkRectangle * (* reveal_for_selection_context_menu) (NautilusFilesView *view);
 
-        GIcon *        (* get_icon)          (NautilusFilesView *view);
-
         /* Use this to show an optional visual feedback when the directory is empty.
          * By default it shows a widget overlay on top of the view */
         void           (* check_empty_states)          (NautilusFilesView *view);
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index e0a9c88ad..4b6e86523 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -20,7 +20,6 @@ struct _NautilusViewIconController
 
     GList *cut_files;
 
-    GIcon *view_icon;
     GActionGroup *action_group;
     gint zoom_level;
     GQuark caption_attributes[NAUTILUS_VIEW_ICON_N_CAPTIONS];
@@ -1177,14 +1176,6 @@ real_get_view_id (NautilusFilesView *files_view)
     return NAUTILUS_VIEW_GRID_ID;
 }
 
-static GIcon *
-real_get_icon (NautilusFilesView *files_view)
-{
-    NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (files_view);
-
-    return self->view_icon;
-}
-
 static void
 real_select_first (NautilusFilesView *files_view)
 {
@@ -1498,8 +1489,6 @@ constructed (GObject *object)
                               G_CALLBACK (nautilus_files_view_notify_selection_changed),
                               NAUTILUS_FILES_VIEW (self));
 
-    self->view_icon = g_themed_icon_new ("view-grid-symbolic");
-
     controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
     gtk_widget_add_controller (GTK_WIDGET (content_widget), controller);
     gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_BUBBLE);
@@ -1577,7 +1566,6 @@ nautilus_view_icon_controller_class_init (NautilusViewIconControllerClass *klass
     files_view_class->get_view_id = real_get_view_id;
     files_view_class->get_first_visible_file = real_get_first_visible_file;
     files_view_class->scroll_to_file = real_scroll_to_file;
-    files_view_class->get_icon = real_get_icon;
     files_view_class->select_first = real_select_first;
     files_view_class->restore_standard_zoom_level = real_restore_standard_zoom_level;
     files_view_class->is_zoom_level_default = real_is_zoom_level_default;


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