From 7eb062adf41d045b439210b96967778e3edceeaa Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Tue, 22 Oct 2024 13:11:25 -0400 Subject: [PATCH] nemo-places-sidebar.c: Only register the special eject icon size once. This is only needed once for the application. --- src/nemo-places-sidebar.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nemo-places-sidebar.c b/src/nemo-places-sidebar.c index dca1c42ea..a798e30e0 100644 --- a/src/nemo-places-sidebar.c +++ b/src/nemo-places-sidebar.c @@ -4111,11 +4111,6 @@ nemo_places_sidebar_init (NemoPlacesSidebar *sidebar) GtkTreeSelection *selection; GtkStyleContext *style_context; - gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &menu_icon_pixels, NULL); - EJECT_ICON_SIZE_NOT_HOVERED = gtk_icon_size_register ("menu-icon-size-small", - menu_icon_pixels - EJECT_ICON_SIZE_REDUCTION, - menu_icon_pixels - EJECT_ICON_SIZE_REDUCTION); - sidebar->action_manager = nemo_action_manager_new (); sidebar->actions_changed_id = g_signal_connect_swapped (sidebar->action_manager, "changed", @@ -4489,6 +4484,11 @@ nemo_places_sidebar_class_init (NemoPlacesSidebarClass *class) widget_class->style_set = nemo_places_sidebar_style_set; widget_class->focus = nemo_places_sidebar_focus; + + gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &menu_icon_pixels, NULL); + EJECT_ICON_SIZE_NOT_HOVERED = gtk_icon_size_register ("menu-icon-size-small", + menu_icon_pixels - EJECT_ICON_SIZE_REDUCTION, + menu_icon_pixels - EJECT_ICON_SIZE_REDUCTION); } static gboolean