[nautilus/wip/antoniof/gtk4-pre-switch-regressions: 37/40] file: Drop useless parameter from get_icon_pixbuf()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-pre-switch-regressions: 37/40] file: Drop useless parameter from get_icon_pixbuf()
- Date: Thu, 23 Dec 2021 01:05:13 +0000 (UTC)
commit 1959b05e9cd51902507f048cafeea94c52bb51b5
Author: António Fernandes <antoniof gnome org>
Date: Wed Dec 22 20:41:34 2021 +0000
file: Drop useless parameter from get_icon_pixbuf()
Callers always pass TRUE nowadays anyway.
src/nautilus-file.c | 15 ++-------------
src/nautilus-file.h | 1 -
src/nautilus-list-model.c | 2 +-
src/nautilus-operations-ui-manager.c | 2 --
src/nautilus-shell-search-provider.c | 2 +-
src/nautilus-view-icon-item-ui.c | 3 +--
6 files changed, 5 insertions(+), 20 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index ae18a4714..5ec4b8119 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5411,25 +5411,14 @@ out:
GdkPixbuf *
nautilus_file_get_icon_pixbuf (NautilusFile *file,
int size,
- gboolean force_size,
int scale,
NautilusFileIconFlags flags)
{
- NautilusIconInfo *info;
- GdkPixbuf *pixbuf;
+ g_autoptr (NautilusIconInfo) info = NULL;
info = nautilus_file_get_icon (file, size, scale, flags);
- if (force_size)
- {
- pixbuf = nautilus_icon_info_get_pixbuf_at_size (info, size);
- }
- else
- {
- pixbuf = nautilus_icon_info_get_pixbuf (info);
- }
- g_object_unref (info);
- return pixbuf;
+ return nautilus_icon_info_get_pixbuf_at_size (info, size);
}
gboolean
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index 6946be5f8..21eeb2561 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -473,7 +473,6 @@ NautilusIconInfo * nautilus_file_get_icon (Nautilu
NautilusFileIconFlags
flags);
GdkPixbuf * nautilus_file_get_icon_pixbuf (NautilusFile
*file,
int size,
- gboolean
force_size,
int
scale,
NautilusFileIconFlags
flags);
diff --git a/src/nautilus-list-model.c b/src/nautilus-list-model.c
index e828ab5b5..701fc3eaf 100644
--- a/src/nautilus-list-model.c
+++ b/src/nautilus-list-model.c
@@ -421,7 +421,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
}
}
- icon = nautilus_file_get_icon_pixbuf (file, icon_size, TRUE, icon_scale, flags);
+ icon = nautilus_file_get_icon_pixbuf (file, icon_size, icon_scale, flags);
if (priv->highlight_files != NULL &&
g_list_find_custom (priv->highlight_files,
diff --git a/src/nautilus-operations-ui-manager.c b/src/nautilus-operations-ui-manager.c
index be6badcbe..d2edc0e4c 100644
--- a/src/nautilus-operations-ui-manager.c
+++ b/src/nautilus-operations-ui-manager.c
@@ -228,13 +228,11 @@ set_images (FileConflictDialogData *data)
destination_pixbuf = nautilus_file_get_icon_pixbuf (data->destination,
NAUTILUS_CANVAS_ICON_SIZE_SMALL,
- TRUE,
1,
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
source_pixbuf = nautilus_file_get_icon_pixbuf (data->source,
NAUTILUS_CANVAS_ICON_SIZE_SMALL,
- TRUE,
1,
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index b65f4bebe..94d0790a3 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -658,7 +658,7 @@ result_list_attributes_ready_cb (GList *file_list,
if (gicon == NULL)
{
- gicon = G_ICON (nautilus_file_get_icon_pixbuf (file, 128, TRUE,
+ gicon = G_ICON (nautilus_file_get_icon_pixbuf (file, 128,
icon_scale,
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS));
}
diff --git a/src/nautilus-view-icon-item-ui.c b/src/nautilus-view-icon-item-ui.c
index 259badfa8..9f63a05a7 100644
--- a/src/nautilus-view-icon-item-ui.c
+++ b/src/nautilus-view-icon-item-ui.c
@@ -42,8 +42,7 @@ create_icon (NautilusViewIconItemUi *self)
NAUTILUS_FILE_ICON_FLAGS_USE_EMBLEMS |
NAUTILUS_FILE_ICON_FLAGS_USE_ONE_EMBLEM;
- icon_pixbuf = nautilus_file_get_icon_pixbuf (file, icon_size,
- TRUE, 1, flags);
+ icon_pixbuf = nautilus_file_get_icon_pixbuf (file, icon_size, 1, flags);
icon = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_pixbuf));
gtk_widget_set_hexpand (GTK_WIDGET (icon), TRUE);
gtk_widget_set_vexpand (GTK_WIDGET (icon), TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]