[nautilus/gtk4-preparation-trunk: 40/45] file: Drop useless parameter from get_icon_pixbuf()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gtk4-preparation-trunk: 40/45] file: Drop useless parameter from get_icon_pixbuf()
- Date: Fri, 31 Dec 2021 12:11:19 +0000 (UTC)
commit 4a1cbb93ad0d11b838a10b29b5976856e7116c07
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 9373e08f9..bd3303d7e 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5379,25 +5379,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 3d1c7f587..a50d27df0 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -475,7 +475,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 4641a49f1..7d4225785 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_GRID_ICON_SIZE_SMALL,
- TRUE,
1,
NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS);
source_pixbuf = nautilus_file_get_icon_pixbuf (data->source,
NAUTILUS_GRID_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 657736d6a..82850dafc 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 dc2a2b90b..29a4a1bd2 100644
--- a/src/nautilus-view-icon-item-ui.c
+++ b/src/nautilus-view-icon-item-ui.c
@@ -46,8 +46,7 @@ update_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);
gtk_image_set_from_pixbuf (GTK_IMAGE (self->icon), icon_pixbuf);
gtk_widget_set_size_request (self->fixed_height_box, icon_size, icon_size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]