[gnome-shell] st-texture-cache: Remove unused St.IconType.APPLICATION/DOCUMENT



commit 21e8097b9c238f662a7f8bed8b106a7ebc82fa6b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Mar 15 18:24:51 2012 -0400

    st-texture-cache: Remove unused St.IconType.APPLICATION/DOCUMENT
    
    No reason to have special handling for fallbacks that we can do (and do do)
    in the JS.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671656

 src/st/st-icon.c          |    4 +---
 src/st/st-texture-cache.c |   35 -----------------------------------
 src/st/st-types.h         |    4 +---
 3 files changed, 2 insertions(+), 41 deletions(-)
---
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
index 9477327..9c2ac5e 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -481,9 +481,7 @@ st_icon_update (StIcon *icon)
   if (priv->gicon)
     {
       priv->pending_texture = st_texture_cache_load_gicon (cache,
-                                                           (priv->icon_type != ST_ICON_APPLICATION &&
-                                                            priv->icon_type != ST_ICON_DOCUMENT) ?
-                                                           theme_node : NULL,
+                                                           theme_node,
                                                            priv->gicon,
                                                            priv->icon_size);
     }
diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c
index 4ec5cf9..20d23d8 100644
--- a/src/st/st-texture-cache.c
+++ b/src/st/st-texture-cache.c
@@ -1149,22 +1149,12 @@ st_texture_cache_load_sliced_image (StTextureCache    *cache,
  * StIconType:
  * @ST_ICON_SYMBOLIC: a symbolic (ie, mostly monochrome) icon
  * @ST_ICON_FULLCOLOR: a full-color icon
- * @ST_ICON_APPLICATION: a full-color icon, which is expected
- *   to be an application icon
- * @ST_ICON_DOCUMENT: a full-color icon, which is expected
- *   to be a document (MIME type) icon
  *
  * Describes what style of icon is desired in a call to
  * st_texture_cache_load_icon_name() or st_texture_cache_load_gicon().
  * Use %ST_ICON_SYMBOLIC for symbolic icons (eg, for the panel and
  * much of the rest of the shell chrome) or %ST_ICON_FULLCOLOR for a
  * full-color icon.
- *
- * If you know that the requested icon is either an application icon
- * or a document type icon, you should use %ST_ICON_APPLICATION or
- * %ST_ICON_DOCUMENT, which may do a better job of selecting the
- * correct theme icon for those types. If you are unsure what kind of
- * icon you are loading, use %ST_ICON_FULLCOLOR.
  */
 
 /* generates names like g_themed_icon_new_with_default_fallbacks(),
@@ -1236,31 +1226,6 @@ st_texture_cache_load_icon_name (StTextureCache    *cache,
 
   switch (icon_type)
     {
-    case ST_ICON_APPLICATION:
-      themed = g_themed_icon_new (name);
-      texture = load_gicon_with_colors (cache, themed, size, NULL);
-      g_object_unref (themed);
-      if (texture == NULL)
-        {
-          themed = g_themed_icon_new ("application-x-executable");
-          texture = load_gicon_with_colors (cache, themed, size, NULL);
-          g_object_unref (themed);
-        }
-      return CLUTTER_ACTOR (texture);
-      break;
-    case ST_ICON_DOCUMENT:
-      themed = g_themed_icon_new (name);
-      texture = load_gicon_with_colors (cache, themed, size, NULL);
-      g_object_unref (themed);
-      if (texture == NULL)
-        {
-          themed = g_themed_icon_new ("x-office-document");
-          texture = load_gicon_with_colors (cache, themed, size, NULL);
-          g_object_unref (themed);
-        }
-
-      return CLUTTER_ACTOR (texture);
-      break;
     case ST_ICON_SYMBOLIC:
       names = symbolic_names_for_icon (name);
       themed = g_themed_icon_new_from_names (names, -1);
diff --git a/src/st/st-types.h b/src/st/st-types.h
index edcbbfd..2bbe141 100644
--- a/src/st/st-types.h
+++ b/src/st/st-types.h
@@ -44,9 +44,7 @@ typedef enum {
 
 typedef enum {
   ST_ICON_SYMBOLIC,
-  ST_ICON_FULLCOLOR,
-  ST_ICON_APPLICATION,
-  ST_ICON_DOCUMENT
+  ST_ICON_FULLCOLOR
 } StIconType;
 
 typedef enum {



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