[gtk/wip/matthiasc/icon-theme: 3/12] Drop gtk_icon_theme_list_contexts
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/icon-theme: 3/12] Drop gtk_icon_theme_list_contexts
- Date: Fri, 18 Oct 2019 13:59:12 +0000 (UTC)
commit 2ea95a7674fcce3f757a8d6091826f445539270d
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 17 16:24:21 2019 -0500
Drop gtk_icon_theme_list_contexts
Contexts in icon themes are not useful for anything.
docs/reference/gtk/gtk4-sections.txt | 1 -
gtk/gtkicontheme.c | 64 ------------------------------------
gtk/gtkicontheme.h | 2 --
3 files changed, 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
@@ -2325,47 +2322,6 @@ gtk_icon_theme_list_icons (GtkIconTheme *self,
return list;
}
-/**
- * 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]