[nautilus/wip/antoniof/gtk4-preparation-drop-outgoing-api: 65/74] icon-info: Drop gtk_icon_size_lookup()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-drop-outgoing-api: 65/74] icon-info: Drop gtk_icon_size_lookup()
- Date: Sun, 17 Oct 2021 12:24:52 +0000 (UTC)
commit d528792c179508e8143d58f076b7078fa0d000d8
Author: Ernestas Kulik <ernestask gnome org>
Date: Tue Jul 10 12:41:13 2018 +0300
icon-info: Drop gtk_icon_size_lookup()
It no longer exists, and the enumeration only contains normal and large
sizes, so hardcoded icon sizes are now used.
src/nautilus-autorun-software.c | 6 ++----
src/nautilus-files-view.c | 7 +++----
src/nautilus-icon-info.c | 12 ------------
src/nautilus-icon-info.h | 2 --
4 files changed, 5 insertions(+), 22 deletions(-)
---
diff --git a/src/nautilus-autorun-software.c b/src/nautilus-autorun-software.c
index 732ec2d52..f989e3d9a 100644
--- a/src/nautilus-autorun-software.c
+++ b/src/nautilus-autorun-software.c
@@ -172,7 +172,6 @@ static void
present_autorun_for_software_dialog (GMount *mount)
{
GIcon *icon;
- int icon_size;
g_autoptr (NautilusIconInfo) icon_info = NULL;
g_autoptr (GdkPixbuf) pixbuf = NULL;
g_autofree char *mount_name = NULL;
@@ -203,10 +202,9 @@ present_autorun_for_software_dialog (GMount *mount)
icon = g_mount_get_icon (mount);
- icon_size = nautilus_get_icon_size_for_stock_size (GTK_ICON_SIZE_DIALOG);
- icon_info = nautilus_icon_info_lookup (icon, icon_size,
+ icon_info = nautilus_icon_info_lookup (icon, 48,
gtk_widget_get_scale_factor (GTK_WIDGET (dialog)));
- pixbuf = nautilus_icon_info_get_pixbuf_at_size (icon_info, icon_size);
+ pixbuf = nautilus_icon_info_get_pixbuf_at_size (icon_info, 48);
gtk_window_set_icon (GTK_WINDOW (dialog), pixbuf);
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 43a132df3..3d709f190 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -4958,13 +4958,12 @@ get_menu_icon_for_file (NautilusFile *file,
{
NautilusIconInfo *info;
GdkPixbuf *pixbuf;
- int size, scale;
+ int scale;
- size = nautilus_get_icon_size_for_stock_size (GTK_ICON_SIZE_MENU);
scale = gtk_widget_get_scale_factor (widget);
- info = nautilus_file_get_icon (file, size, scale, 0);
- pixbuf = nautilus_icon_info_get_pixbuf_nodefault_at_size (info, size);
+ info = nautilus_file_get_icon (file, 16, scale, 0);
+ pixbuf = nautilus_icon_info_get_pixbuf_nodefault_at_size (info, 16);
g_object_unref (info);
return pixbuf;
diff --git a/src/nautilus-icon-info.c b/src/nautilus-icon-info.c
index 5bd8b0119..8bf8a112c 100644
--- a/src/nautilus-icon-info.c
+++ b/src/nautilus-icon-info.c
@@ -611,15 +611,3 @@ nautilus_icon_info_get_used_name (NautilusIconInfo *icon)
{
return icon->icon_name;
}
-
-gint
-nautilus_get_icon_size_for_stock_size (GtkIconSize size)
-{
- gint w, h;
-
- if (gtk_icon_size_lookup (size, &w, &h))
- {
- return MAX (w, h);
- }
- return NAUTILUS_CANVAS_ICON_SIZE_SMALL;
-}
diff --git a/src/nautilus-icon-info.h b/src/nautilus-icon-info.h
index 506acecde..64f643651 100644
--- a/src/nautilus-icon-info.h
+++ b/src/nautilus-icon-info.h
@@ -39,6 +39,4 @@ const char * nautilus_icon_info_get_used_name (NautilusI
void nautilus_icon_info_clear_caches (void);
-gint nautilus_get_icon_size_for_stock_size (GtkIconSize size);
-
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]