[gtk+] Drop gtk_recent_info_get_icon



commit 8b84df422b83e73c1b0325537e351a4a71388887
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 23 06:20:08 2017 +0200

    Drop gtk_recent_info_get_icon
    
    We are moving away from pixbuf-based apis.
    Use gtk_recent_info_get_gicon instead.

 docs/reference/gtk/gtk4-sections.txt |    1 -
 gtk/gtkrecentmanager.c               |   36 ----------------------------------
 gtk/gtkrecentmanager.h               |    3 --
 3 files changed, 0 insertions(+), 40 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 040f2ae..d524bdd 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -2391,7 +2391,6 @@ gtk_recent_info_has_application
 gtk_recent_info_create_app_info
 gtk_recent_info_get_groups
 gtk_recent_info_has_group
-gtk_recent_info_get_icon
 gtk_recent_info_get_gicon
 gtk_recent_info_get_short_name
 gtk_recent_info_get_uri_display
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c
index 65bb375..c655091 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -2011,42 +2011,6 @@ get_icon_fallback (const gchar *icon_name,
 }
 
 /**
- * gtk_recent_info_get_icon:
- * @info: a #GtkRecentInfo
- * @size: the size of the icon in pixels
- *
- * Retrieves the icon of size @size associated to the resource MIME type.
- *
- * Returns: (nullable) (transfer full): a #GdkPixbuf containing the icon,
- *     or %NULL. Use g_object_unref() when finished using the icon.
- *
- * Since: 2.10
- */
-GdkPixbuf *
-gtk_recent_info_get_icon (GtkRecentInfo *info,
-                          gint           size)
-{
-  GdkPixbuf *retval = NULL;
-
-  g_return_val_if_fail (info != NULL, NULL);
-
-  if (info->mime_type)
-    retval = get_icon_for_mime_type (info->mime_type, size);
-
-  /* this function should never fail */
-  if (!retval)
-    {
-      if (info->mime_type &&
-          strcmp (info->mime_type, "x-directory/normal") == 0)
-        retval = get_icon_fallback ("folder", size);
-      else
-        retval = get_icon_fallback ("text-x-generic", size);
-    }
-
-  return retval;
-}
-
-/**
  * gtk_recent_info_get_gicon:
  * @info: a #GtkRecentInfo
  *
diff --git a/gtk/gtkrecentmanager.h b/gtk/gtkrecentmanager.h
index 9f15abe..f77684c 100644
--- a/gtk/gtkrecentmanager.h
+++ b/gtk/gtkrecentmanager.h
@@ -247,9 +247,6 @@ GDK_AVAILABLE_IN_ALL
 gboolean              gtk_recent_info_has_group            (GtkRecentInfo  *info,
                                                            const gchar    *group_name);
 GDK_AVAILABLE_IN_ALL
-GdkPixbuf *           gtk_recent_info_get_icon             (GtkRecentInfo  *info,
-                                                           gint            size);
-GDK_AVAILABLE_IN_ALL
 GIcon *               gtk_recent_info_get_gicon            (GtkRecentInfo  *info);
 GDK_AVAILABLE_IN_ALL
 gchar *               gtk_recent_info_get_short_name       (GtkRecentInfo  *info) G_GNUC_MALLOC;


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