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




commit 7e7b6f4b2224d634138f109c43b127664f28c229
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 e9b6841c9..e8e3d507c 100644
--- a/src/nautilus-files-view.h
+++ b/src/nautilus-files-view.h
@@ -222,8 +222,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 3e30aca92..93459ab3b 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];
@@ -1186,14 +1185,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)
 {
@@ -1505,8 +1496,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);
@@ -1584,7 +1573,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->get_zoom_level_percentage = real_get_zoom_level_percentage;


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