[nautilus/gtk4-preparation-trunk: 54/60] 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: 54/60] file: Drop useless parameter from get_icon_pixbuf()
- Date: Fri, 24 Dec 2021 03:11:26 +0000 (UTC)
commit daec6f0c230feb6c322e4ec743ea6d7f74b754f9
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 | 2 +-
6 files changed, 5 insertions(+), 19 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 9e08ded9c..1a2b8ee3e 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5377,25 +5377,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 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 dc2a2b90b..d5747a557 100644
--- a/src/nautilus-view-icon-item-ui.c
+++ b/src/nautilus-view-icon-item-ui.c
@@ -47,7 +47,7 @@ update_icon (NautilusViewIconItemUi *self)
NAUTILUS_FILE_ICON_FLAGS_USE_ONE_EMBLEM;
icon_pixbuf = nautilus_file_get_icon_pixbuf (file, icon_size,
- TRUE, 1, flags);
+ 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]