summaryrefslogtreecommitdiff
path: root/gtk/gtkiconcache.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-10-14 19:19:36 +0200
committerBenjamin Otte <otte@redhat.com>2015-10-22 16:42:49 +0200
commitd3bf602c60e8899f5e0e1ee6c6e26cd1550cfb3b (patch)
tree0992aea50929a99d5efb3dda2fe398a645c04f11 /gtk/gtkiconcache.c
parent371f5016326692396a1a957e3e250a24cbc709e3 (diff)
downloadgtk+-d3bf602c60e8899f5e0e1ee6c6e26cd1550cfb3b.tar.gz
iconcache: Remove unused function
Diffstat (limited to 'gtk/gtkiconcache.c')
-rw-r--r--gtk/gtkiconcache.c82
1 files changed, 0 insertions, 82 deletions
diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c
index 3102003041..ef9ecfad8a 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;
-}
-