[nautilus/wip/antoniof/switch-to-gtk4: 33/40] general: Drop GtkIconSize parameters
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/switch-to-gtk4: 33/40] general: Drop GtkIconSize parameters
- Date: Sun, 9 Jan 2022 00:43:49 +0000 (UTC)
commit 75eb70dcba3823a218d248c5e6ed303fd9e14a62
Author: António Fernandes <antoniof gnome org>
Date: Fri Dec 31 15:08:42 2021 +0000
general: Drop GtkIconSize parameters
As per migration guide.
src/nautilus-compress-dialog-controller.c | 20 +++++---------------
src/nautilus-floating-bar.c | 2 +-
src/nautilus-notebook.c | 2 +-
src/nautilus-pathbar.c | 5 ++---
src/nautilus-progress-info-widget.c | 8 ++------
src/nautilus-toolbar.c | 3 +--
src/nautilus-x-content-bar.c | 2 +-
7 files changed, 13 insertions(+), 29 deletions(-)
---
diff --git a/src/nautilus-compress-dialog-controller.c b/src/nautilus-compress-dialog-controller.c
index 0d32525d7..17a5be4b7 100644
--- a/src/nautilus-compress-dialog-controller.c
+++ b/src/nautilus-compress-dialog-controller.c
@@ -213,21 +213,11 @@ update_selected_format (NautilusCompressDialogController *self,
gtk_stack_set_visible_child (GTK_STACK (self->extension_stack),
active_label);
- gtk_image_set_from_icon_name (GTK_IMAGE (self->zip_checkmark),
- NULL,
- GTK_ICON_SIZE_BUTTON);
- gtk_image_set_from_icon_name (GTK_IMAGE (self->encrypted_zip_checkmark),
- NULL,
- GTK_ICON_SIZE_BUTTON);
- gtk_image_set_from_icon_name (GTK_IMAGE (self->tar_xz_checkmark),
- NULL,
- GTK_ICON_SIZE_BUTTON);
- gtk_image_set_from_icon_name (GTK_IMAGE (self->seven_zip_checkmark),
- NULL,
- GTK_ICON_SIZE_BUTTON);
- gtk_image_set_from_icon_name (GTK_IMAGE (active_checkmark),
- "object-select-symbolic",
- GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->zip_checkmark), NULL);
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->encrypted_zip_checkmark), NULL);
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->tar_xz_checkmark), NULL);
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->seven_zip_checkmark), NULL);
+ gtk_image_set_from_icon_name (GTK_IMAGE (active_checkmark), "object-select-symbolic");
g_settings_set_enum (nautilus_compression_preferences,
NAUTILUS_PREFERENCES_DEFAULT_COMPRESSION_FORMAT,
diff --git a/src/nautilus-floating-bar.c b/src/nautilus-floating-bar.c
index 295ef7ad2..ef545e6f3 100644
--- a/src/nautilus-floating-bar.c
+++ b/src/nautilus-floating-bar.c
@@ -389,7 +389,7 @@ nautilus_floating_bar_constructed (GObject *obj)
self->details_label_widget = w;
gtk_widget_show (w);
- w = gtk_button_new_from_icon_name ("process-stop-symbolic", GTK_ICON_SIZE_MENU);
+ w = gtk_button_new_from_icon_name ("process-stop-symbolic");
context = gtk_widget_get_style_context (w);
gtk_style_context_add_class (context, "circular");
gtk_style_context_add_class (context, "flat");
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index 9579f5f98..96a8ca97b 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -269,7 +269,7 @@ build_tab_label (GtkNotebook *notebook,
gtk_widget_show (label);
/* Tab close button */
- close_button = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_MENU);
+ close_button = gtk_button_new_from_icon_name ("window-close-symbolic");
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (close_button)),
"flat");
/* don't allow focus on the close button */
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index db294c2c1..dddc1308f 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -239,8 +239,7 @@ nautilus_path_bar_init (NautilusPathBar *self)
self->current_view_menu_button = gtk_menu_button_new ();
gtk_menu_button_set_child (GTK_MENU_BUTTON (self->current_view_menu_button),
- gtk_image_new_from_icon_name ("view-more-symbolic",
- GTK_ICON_SIZE_MENU));
+ gtk_image_new_from_icon_name ("view-more-symbolic"));
gtk_box_append (GTK_BOX (self), self->current_view_menu_button);
builder = gtk_builder_new ();
@@ -756,7 +755,7 @@ nautilus_path_bar_update_button_appearance (ButtonData *button_data,
icon = get_gicon (button_data);
if (icon != NULL)
{
- gtk_image_set_from_gicon (GTK_IMAGE (button_data->image), icon, GTK_ICON_SIZE_MENU);
+ gtk_image_set_from_gicon (GTK_IMAGE (button_data->image), icon);
gtk_widget_show (GTK_WIDGET (button_data->image));
g_object_unref (icon);
}
diff --git a/src/nautilus-progress-info-widget.c b/src/nautilus-progress-info-widget.c
index fd70d9781..d2b4a3ff4 100644
--- a/src/nautilus-progress-info-widget.c
+++ b/src/nautilus-progress-info-widget.c
@@ -49,9 +49,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (NautilusProgressInfoWidget, nautilus_progress_info_w
static void
info_finished (NautilusProgressInfoWidget *self)
{
- gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image),
- "object-select-symbolic",
- GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image), "object-select-symbolic");
gtk_widget_set_sensitive (self->priv->button, FALSE);
}
@@ -127,9 +125,7 @@ nautilus_progress_info_widget_constructed (GObject *obj)
if (nautilus_progress_info_get_is_finished (self->priv->info))
{
- gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image),
- "object-select-symbolic",
- GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image), "object-select-symbolic");
}
gtk_widget_set_sensitive (self->priv->button,
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 758d387ee..ddd090151 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -802,8 +802,7 @@ nautilus_toolbar_constructed (GObject *object)
self->location_entry = nautilus_location_entry_new ();
gtk_box_append (GTK_BOX (self->location_entry_container),
self->location_entry);
- self->location_entry_close_button = gtk_button_new_from_icon_name ("window-close-symbolic",
- GTK_ICON_SIZE_BUTTON);
+ self->location_entry_close_button = gtk_button_new_from_icon_name ("window-close-symbolic");
gtk_box_append (GTK_BOX (self->location_entry_container),
self->location_entry_close_button);
g_signal_connect (self->location_entry_close_button, "clicked",
diff --git a/src/nautilus-x-content-bar.c b/src/nautilus-x-content-bar.c
index 837ebe122..fe4b61578 100644
--- a/src/nautilus-x-content-bar.c
+++ b/src/nautilus-x-content-bar.c
@@ -181,7 +181,7 @@ nautilus_x_content_bar_set_x_content_types (NautilusXContentBar *bar,
icon = g_app_info_get_icon (default_app);
if (icon != NULL)
{
- image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_BUTTON);
+ image = gtk_image_new_from_gicon (icon);
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]