[gtk] icontheme: Stop exporting gtk_icon_info_new_for_file



commit 797739198f1614896d936af745a5c224aefb7a65
Author: Timm Bäder <mail baedert org>
Date:   Tue Oct 30 16:31:09 2018 +0100

    icontheme: Stop exporting gtk_icon_info_new_for_file

 gtk/gtkicontheme.c        | 67 +++++++++++++++++++++++------------------------
 gtk/gtkiconthemeprivate.h |  4 ---
 2 files changed, 33 insertions(+), 38 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 1696995cc4..e728b0bdb7 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -4710,6 +4710,39 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme       *icon_theme,
                                                    size, 1, flags);
 }
 
+static GtkIconInfo *
+gtk_icon_info_new_for_file (GFile *file,
+                            gint   size,
+                            gint   scale)
+{
+  GtkIconInfo *info;
+
+  info = icon_info_new (ICON_THEME_DIR_UNTHEMED, size, 1);
+  info->loadable = G_LOADABLE_ICON (g_file_icon_new (file));
+  info->icon_file = g_object_ref (file);
+  info->is_resource = g_file_has_uri_scheme (file, "resource");
+
+  if (info->is_resource)
+    {
+      gchar *uri;
+
+      uri = g_file_get_uri (file);
+      info->filename = g_strdup (uri + 11); /* resource:// */
+      g_free (uri);
+    }
+  else
+    {
+      info->filename = g_file_get_path (file);
+    }
+
+  info->is_svg = suffix_from_name (info->filename) == ICON_SUFFIX_SVG;
+
+ info->desired_size = size;
+ info->desired_scale = scale;
+ info->forced_size = FALSE;
+
+ return info;
+}
 
 /**
  * gtk_icon_theme_lookup_by_gicon_for_scale:
@@ -4830,37 +4863,3 @@ gtk_icon_info_new_for_pixbuf (GtkIconTheme *icon_theme,
 
   return info;
 }
-
-GtkIconInfo *
-gtk_icon_info_new_for_file (GFile *file,
-                            gint   size,
-                            gint   scale)
-{
-  GtkIconInfo *info;
-
-  info = icon_info_new (ICON_THEME_DIR_UNTHEMED, size, 1);
-  info->loadable = G_LOADABLE_ICON (g_file_icon_new (file));
-  info->icon_file = g_object_ref (file);
-  info->is_resource = g_file_has_uri_scheme (file, "resource");
-
-  if (info->is_resource)
-    {
-      gchar *uri;
-
-      uri = g_file_get_uri (file);
-      info->filename = g_strdup (uri + 11); /* resource:// */
-      g_free (uri);
-    }
-  else
-    {
-      info->filename = g_file_get_path (file);
-    }
-
-  info->is_svg = suffix_from_name (info->filename) == ICON_SUFFIX_SVG;
-
- info->desired_size = size;
- info->desired_scale = scale;
- info->forced_size = FALSE;
-
- return info;
-}
diff --git a/gtk/gtkiconthemeprivate.h b/gtk/gtkiconthemeprivate.h
index ca9d5177b0..132d5154ee 100644
--- a/gtk/gtkiconthemeprivate.h
+++ b/gtk/gtkiconthemeprivate.h
@@ -27,8 +27,4 @@ void        gtk_icon_theme_lookup_symbolic_colors       (GtkCssStyle    *style,
                                                          GdkRGBA        *warning_out,
                                                          GdkRGBA        *error_out);
 
-GtkIconInfo *gtk_icon_info_new_for_file (GFile *file,
-                                         gint   size,
-                                         gint   scale);
-
 #endif /* __GTK_ICON_THEME_PRIVATE_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]