[gtk+] iconcache: Remove unused function



commit d3bf602c60e8899f5e0e1ee6c6e26cd1550cfb3b
Author: Benjamin Otte <otte redhat com>
Date:   Wed Oct 14 19:19:36 2015 +0200

    iconcache: Remove unused function

 gtk/gtkiconcache.c |   82 ----------------------------------------------------
 gtk/gtkiconcache.h |   16 ----------
 2 files changed, 0 insertions(+), 98 deletions(-)
---
diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c
index 3102003..ef9ecfa 100644
--- a/gtk/gtkiconcache.c
+++ b/gtk/gtkiconcache.c
@@ -541,85 +541,3 @@ G_GNUC_END_IGNORE_DEPRECATIONS
   return pixbuf;
 }
 
-GtkIconData  *
-_gtk_icon_cache_get_icon_data  (GtkIconCache *cache,
-                               const gchar  *icon_name,
-                               gint          directory_index)
-{
-  guint32 offset, image_data_offset, meta_data_offset;
-  GtkIconData *data;
-  int i;
-
-  offset = find_image_offset (cache, icon_name, directory_index);
-  if (!offset)
-    return NULL;
-
-  image_data_offset = GET_UINT32 (cache->buffer, offset + 4);
-  if (!image_data_offset)
-    return NULL;
-
-  meta_data_offset = GET_UINT32 (cache->buffer, image_data_offset + 4);
-  
-  if (!meta_data_offset)
-    return NULL;
-
-  data = g_slice_new0 (GtkIconData);
-  data->ref = 1;
-
-  offset = GET_UINT32 (cache->buffer, meta_data_offset);
-  if (offset)
-    {
-      data->has_embedded_rect = TRUE;
-      data->x0 = GET_UINT16 (cache->buffer, offset);
-      data->y0 = GET_UINT16 (cache->buffer, offset + 2);
-      data->x1 = GET_UINT16 (cache->buffer, offset + 4);
-      data->y1 = GET_UINT16 (cache->buffer, offset + 6);
-    }
-
-  offset = GET_UINT32 (cache->buffer, meta_data_offset + 4);
-  if (offset)
-    {
-      data->n_attach_points = GET_UINT32 (cache->buffer, offset);
-      data->attach_points = g_new (GdkPoint, data->n_attach_points);
-      for (i = 0; i < data->n_attach_points; i++)
-       {
-         data->attach_points[i].x = GET_UINT16 (cache->buffer, offset + 4 + 4 * i); 
-         data->attach_points[i].y = GET_UINT16 (cache->buffer, offset + 4 + 4 * i + 2); 
-       }
-    }
-
-  offset = GET_UINT32 (cache->buffer, meta_data_offset + 8);
-  if (offset)
-    {
-      gint n_names;
-      gchar *lang, *name;
-      gchar **langs;
-      GHashTable *table = g_hash_table_new (g_str_hash, g_str_equal);
-
-      n_names = GET_UINT32 (cache->buffer, offset);
-      
-      for (i = 0; i < n_names; i++)
-       {
-         lang = cache->buffer + GET_UINT32 (cache->buffer, offset + 4 + 8 * i);
-         name = cache->buffer + GET_UINT32 (cache->buffer, offset + 4 + 8 * i + 4);
-         
-         g_hash_table_insert (table, lang, name);
-       }
-      
-      langs = (gchar **)g_get_language_names ();
-      for (i = 0; langs[i]; i++)
-       {
-         name = g_hash_table_lookup (table, langs[i]);
-         if (name)
-           {
-             data->display_name = g_strdup (name);
-             break;
-           }
-       }
-
-      g_hash_table_destroy (table);
-    }
-
-  return data;
-}
-
diff --git a/gtk/gtkiconcache.h b/gtk/gtkiconcache.h
index 1ec47b0..da3c95a 100644
--- a/gtk/gtkiconcache.h
+++ b/gtk/gtkiconcache.h
@@ -21,19 +21,6 @@
 #include <gdk/gdk.h>
 
 typedef struct _GtkIconCache GtkIconCache;
-typedef struct _GtkIconData GtkIconData;
-
-struct _GtkIconData
-{
-  gint ref;
-  gboolean has_embedded_rect;
-  gint x0, y0, x1, y1;
-  
-  GdkPoint *attach_points;
-  gint n_attach_points;
-
-  gchar *display_name;
-};
 
 GtkIconCache *_gtk_icon_cache_new            (const gchar  *data);
 GtkIconCache *_gtk_icon_cache_new_for_path   (const gchar  *path);
@@ -56,9 +43,6 @@ gint          _gtk_icon_cache_get_icon_flags (GtkIconCache *cache,
 GdkPixbuf    *_gtk_icon_cache_get_icon       (GtkIconCache *cache,
                                              const gchar  *icon_name,
                                              gint          directory_index);
-GtkIconData  *_gtk_icon_cache_get_icon_data  (GtkIconCache *cache,
-                                             const gchar  *icon_name,
-                                             gint          directory_index);
 
 GtkIconCache *_gtk_icon_cache_ref            (GtkIconCache *cache);
 void          _gtk_icon_cache_unref          (GtkIconCache *cache);


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