[gtk+] Deprecate and ignore gtk-fallback-icon-theme



commit aa78c888eb6ee2c66598318d8befe4176164ddac
Author: William Jon McCann <william jon mccann gmail com>
Date:   Wed Jun 26 12:47:43 2013 -0400

    Deprecate and ignore gtk-fallback-icon-theme
    
    The standard icon themes have built in fallbacks.

 gdk/win32/gdkproperty-win32.c |    1 -
 gdk/x11/gdksettings.c         |    1 -
 gtk/gtkicontheme.c            |   27 ++-------------------------
 gtk/gtksettings.c             |    7 +++++++
 4 files changed, 9 insertions(+), 27 deletions(-)
---
diff --git a/gdk/win32/gdkproperty-win32.c b/gdk/win32/gdkproperty-win32.c
index 161bae2..e6dedd6 100644
--- a/gdk/win32/gdkproperty-win32.c
+++ b/gdk/win32/gdkproperty-win32.c
@@ -327,7 +327,6 @@ _gdk_win32_window_delete_property (GdkWindow *window,
   "Xft/HintStyle\0"           "gtk-xft-hintstyle\0"
   "Xft/RGBA\0"                "gtk-xft-rgba\0"
   "Xft/DPI\0"                 "gtk-xft-dpi\0"
-  "Net/FallbackIconTheme\0"   "gtk-fallback-icon-theme\0"
   "Gtk/TouchscreenMode\0"     "gtk-touchscreen-mode\0"
   "Gtk/EnableAccels\0"        "gtk-enable-accels\0"
   "Gtk/ScrolledWindowPlacement\0" "gtk-scrolled-window-placement\0"
diff --git a/gdk/x11/gdksettings.c b/gdk/x11/gdksettings.c
index d7e1b29..188afc4 100644
--- a/gdk/x11/gdksettings.c
+++ b/gdk/x11/gdksettings.c
@@ -52,7 +52,6 @@ static const struct {
   {"Xft/HintStyle",           "gtk-xft-hintstyle"},
   {"Xft/RGBA",                "gtk-xft-rgba"},
   {"Xft/DPI",                 "gtk-xft-dpi"},
-  {"Net/FallbackIconTheme",   "gtk-fallback-icon-theme"},
   {"Gtk/TouchscreenMode",     "gtk-touchscreen-mode"},
   {"Gtk/EnableAccels",        "gtk-enable-accels"},
   {"Gtk/ScrolledWindowPlacement", "gtk-scrolled-window-placement"},
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 9a8e4b3..2414257 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -174,7 +174,6 @@ struct _GtkIconThemePrivate
   GList *info_cache_lru;
 
   gchar *current_theme;
-  gchar *fallback_theme;
   gchar **search_path;
   gint search_path_len;
 
@@ -570,23 +569,14 @@ update_current_theme (GtkIconTheme *icon_theme)
   if (!priv->custom_theme)
     {
       gchar *theme = NULL;
-      gchar *fallback_theme = NULL;
       gboolean changed = FALSE;
 
       if (priv->screen)
        {
          GtkSettings *settings = gtk_settings_get_for_screen (priv->screen);
-         g_object_get (settings, 
-                       "gtk-icon-theme-name", &theme, 
-                       "gtk-fallback-icon-theme", &fallback_theme, NULL);
+         g_object_get (settings, "gtk-icon-theme-name", &theme, NULL);
        }
 
-      /* ensure that the current theme (even when just the default)
-       * is searched before any fallback theme
-       */
-      if (!theme && fallback_theme)
-       theme = g_strdup (DEFAULT_THEME_NAME);
-
       if (theme_changed (priv->current_theme, theme))
        {
          g_free (priv->current_theme);
@@ -596,15 +586,6 @@ update_current_theme (GtkIconTheme *icon_theme)
       else
        g_free (theme);
 
-      if (theme_changed (priv->fallback_theme, fallback_theme))
-       {
-         g_free (priv->fallback_theme);
-         priv->fallback_theme = fallback_theme;
-         changed = TRUE;
-       }
-      else
-       g_free (fallback_theme);
-
       if (changed)
        do_theme_change (icon_theme);
     }
@@ -681,8 +662,6 @@ gtk_icon_theme_set_screen (GtkIconTheme *icon_theme,
                        G_CALLBACK (display_closed), icon_theme);
       g_signal_connect (settings, "notify::gtk-icon-theme-name",
                        G_CALLBACK (theme_changed), icon_theme);
-      g_signal_connect (settings, "notify::gtk-fallback-icon-theme-name",
-                       G_CALLBACK (theme_changed), icon_theme);
     }
 
   update_current_theme (icon_theme);
@@ -1257,9 +1236,7 @@ load_themes (GtkIconTheme *icon_theme)
   if (priv->current_theme)
     insert_theme (icon_theme, priv->current_theme);
 
-  /* Always look in the "default" icon theme, and in a fallback theme */
-  if (priv->fallback_theme)
-    insert_theme (icon_theme, priv->fallback_theme);
+  /* Always look in the "default" icon theme */
   insert_theme (icon_theme, DEFAULT_THEME_NAME);
   priv->themes = g_list_reverse (priv->themes);
 
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 67b3e24..a1c707a 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -448,6 +448,13 @@ gtk_settings_class_init (GtkSettingsClass *class)
                                              NULL);
   g_assert (result == PROP_ICON_THEME_NAME);
 
+  /**
+   * GtkSettings:gtk-fallback-icon-theme:
+   *
+   * Name of a icon theme to fall back to.
+   *
+   * Deprecated: 3.10: This setting is ignored.
+   */
   result = settings_install_property_parser (class,
                                              g_param_spec_string ("gtk-fallback-icon-theme",
                                                                   P_("Fallback Icon Theme Name"),


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