diff options
author | Timm Bäder <mail@baedert.org> | 2018-12-30 06:53:35 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-02-05 08:11:43 -0500 |
commit | e6c5b9348dc856a76edc92d1e0588bcd3767fca7 (patch) | |
tree | 76bf0058fffaf4a8164ef6b30785a23312142206 /gtk/gtkwindow.c | |
parent | 55b99e99167db7b832bf99d810e3c8cd50411a6c (diff) | |
download | gtk+-e6c5b9348dc856a76edc92d1e0588bcd3767fca7.tar.gz |
window: Remove default icon list
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index d98b85b356..bd217ab9c9 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -522,7 +522,6 @@ static void gtk_window_state_flags_changed (GtkWidget *widget, static GListStore *toplevel_list = NULL; static guint window_signals[LAST_SIGNAL] = { 0 }; -static GList *default_icon_list = NULL; static gchar *default_icon_name = NULL; static guint default_icon_serial = 0; static gboolean disable_startup_notification = FALSE; @@ -4557,14 +4556,6 @@ gtk_window_realize_icon (GtkWindow *window) icon_list = ensure_icon_info (priv->transient_parent)->icon_list; if (icon_list) info->using_parent_icon = TRUE; - } - - /* Inherit from default */ - if (icon_list == NULL) - { - icon_list = default_icon_list; - if (icon_list) - info->using_default_icon = TRUE; } /* Look up themed icon */ @@ -4675,9 +4666,6 @@ gtk_window_get_icon_for_size (GtkWindow *window, return icon_from_list (info->icon_list, size); } - if (default_icon_list != NULL) - return icon_from_list (default_icon_list, size); - if (default_icon_name != NULL) return icon_from_name (default_icon_name, size); @@ -4774,58 +4762,6 @@ gtk_window_get_icon_name (GtkWindow *window) } /** - * gtk_window_set_default_icon_list: - * @list: (element-type GdkTexture) (transfer container): a list of #GdkTextures - * - * Sets an icon list to be used as fallback for windows that haven't - * had gtk_window_set_icon_list() called on them to set up a - * window-specific icon list. This function allows you to set up the - * icon for all windows in your app at once. - * - * See gtk_window_set_icon_list() for more details. - * - **/ -void -gtk_window_set_default_icon_list (GList *list) -{ - GList *toplevels; - GList *tmp_list; - if (list == default_icon_list) - return; - - /* Update serial so we don't used cached pixmaps/masks - */ - default_icon_serial++; - - g_list_foreach (list, - (GFunc) g_object_ref, NULL); - - g_list_free_full (default_icon_list, g_object_unref); - - default_icon_list = g_list_copy (list); - - /* Update all toplevels */ - toplevels = gtk_window_list_toplevels (); - tmp_list = toplevels; - while (tmp_list != NULL) - { - GtkWindowIconInfo *info; - GtkWindow *w = tmp_list->data; - - info = get_icon_info (w); - if (info && info->using_default_icon) - { - gtk_window_unrealize_icon (w); - if (_gtk_widget_get_realized (GTK_WIDGET (w))) - gtk_window_realize_icon (w); - } - - tmp_list = tmp_list->next; - } - g_list_free (toplevels); -} - -/** * gtk_window_set_default_icon_name: * @name: the name of the themed icon * @@ -4846,9 +4782,6 @@ gtk_window_set_default_icon_name (const gchar *name) g_free (default_icon_name); default_icon_name = g_strdup (name); - g_list_free_full (default_icon_list, g_object_unref); - default_icon_list = NULL; - /* Update all toplevels */ toplevels = gtk_window_list_toplevels (); tmp_list = toplevels; @@ -4887,22 +4820,6 @@ gtk_window_get_default_icon_name (void) return default_icon_name; } -/** - * gtk_window_get_default_icon_list: - * - * Gets the value set by gtk_window_set_default_icon_list(). - * The list is a copy and should be freed with g_list_free(), - * but the surfaces in the list have not had their reference count - * incremented. - * - * Returns: (element-type GdkTexture) (transfer container): copy of default icon list - **/ -GList* -gtk_window_get_default_icon_list (void) -{ - return g_list_copy (default_icon_list); -} - #define INCLUDE_CSD_SIZE 1 #define EXCLUDE_CSD_SIZE -1 |