summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-10-17 16:24:21 -0500
committerMatthias Clasen <mclasen@redhat.com>2019-10-18 08:53:23 -0500
commit2ea95a7674fcce3f757a8d6091826f445539270d (patch)
tree4b442622561b3dc653d79e36fa18808cc74d8647
parentdbbb7eef15f7c23aed3cb828c5bcec221c0faee6 (diff)
downloadgtk+-2ea95a7674fcce3f757a8d6091826f445539270d.tar.gz
Drop gtk_icon_theme_list_contexts
Contexts in icon themes are not useful for anything.
-rw-r--r--docs/reference/gtk/gtk4-sections.txt1
-rw-r--r--gtk/gtkicontheme.c64
-rw-r--r--gtk/gtkicontheme.h2
3 files changed, 0 insertions, 67 deletions
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 19e6d040b5..93485b2def 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -5308,7 +5308,6 @@ gtk_icon_theme_lookup_by_gicon
gtk_icon_theme_lookup_by_gicon_for_scale
gtk_icon_theme_load_icon
gtk_icon_theme_load_icon_for_scale
-gtk_icon_theme_list_contexts
gtk_icon_theme_list_icons
gtk_icon_theme_get_icon_sizes
gtk_icon_theme_get_example_icon_name
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index cbb462c029..bf829c2584 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -313,8 +313,6 @@ static void theme_list_icons (IconTheme *theme,
GQuark context);
static gboolean theme_has_icon (IconTheme *theme,
const gchar *icon_name);
-static void theme_list_contexts (IconTheme *theme,
- GHashTable *contexts);
static void theme_subdir_load (GtkIconTheme *self,
IconTheme *theme,
GKeyFile *theme_file,
@@ -2273,7 +2271,6 @@ add_key_to_list (gpointer key,
* [Icon Theme Specification](http://www.freedesktop.org/wiki/Specifications/icon-theme-spec).
* The standard contexts are listed in the
* [Icon Naming Specification](http://www.freedesktop.org/wiki/Specifications/icon-naming-spec).
- * Also see gtk_icon_theme_list_contexts().
*
* Returns: (element-type utf8) (transfer full): a #GList list
* holding the names of all the icons in the theme. You must
@@ -2326,47 +2323,6 @@ gtk_icon_theme_list_icons (GtkIconTheme *self,
}
/**
- * gtk_icon_theme_list_contexts:
- * @self: a #GtkIconTheme
- *
- * Gets the list of contexts available within the current
- * hierarchy of icon themes.
- * See gtk_icon_theme_list_icons() for details about contexts.
- *
- * Returns: (element-type utf8) (transfer full): a #GList list
- * holding the names of all the contexts in the theme. You must first
- * free each element in the list with g_free(), then free the list
- * itself with g_list_free().
- */
-GList *
-gtk_icon_theme_list_contexts (GtkIconTheme *self)
-{
- GHashTable *contexts;
- GList *list, *l;
-
- ensure_valid_themes (self);
-
- contexts = g_hash_table_new (g_str_hash, g_str_equal);
-
- l = self->themes;
- while (l != NULL)
- {
- theme_list_contexts (l->data, contexts);
- l = l->next;
- }
-
- list = NULL;
-
- g_hash_table_foreach (contexts,
- add_key_to_list,
- &list);
-
- g_hash_table_destroy (contexts);
-
- return list;
-}
-
-/**
* gtk_icon_theme_get_example_icon_name:
* @self: a #GtkIconTheme
*
@@ -2835,26 +2791,6 @@ theme_has_icon (IconTheme *theme,
return FALSE;
}
-static void
-theme_list_contexts (IconTheme *theme,
- GHashTable *contexts)
-{
- GList *l = theme->dirs;
- IconThemeDir *dir;
- const gchar *context;
-
- while (l != NULL)
- {
- dir = l->data;
-
- context = g_quark_to_string (dir->context);
- if (context != NULL)
- g_hash_table_replace (contexts, (gpointer) context, NULL);
-
- l = l->next;
- }
-}
-
static GHashTable *
scan_directory (GtkIconTheme *self,
char *full_dir)
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index 18e895d180..fbe56bf8a7 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -199,8 +199,6 @@ GDK_AVAILABLE_IN_ALL
GList * gtk_icon_theme_list_icons (GtkIconTheme *self,
const gchar *context);
GDK_AVAILABLE_IN_ALL
-GList * gtk_icon_theme_list_contexts (GtkIconTheme *self);
-GDK_AVAILABLE_IN_ALL
char * gtk_icon_theme_get_example_icon_name (GtkIconTheme *self);
GDK_AVAILABLE_IN_ALL