metacity r3958 - in trunk: . src/core src/include src/ui



Author: tthurman
Date: Wed Oct 15 21:01:54 2008
New Revision: 3958
URL: http://svn.gnome.org/viewvc/metacity?rev=3958&view=rev

Log:
2008-10-15  Thomas Thurman  <tthurman gnome org>

        Since Patrick Niklaus's checkin of 2008-08-14 dealt with windows with
        no icons not using fallback icons, we don't need fallback icons.

        * src/ui/theme.h: remove fallback icons from struct.
        * src/core/iconcache.c (meta_read_icons): don't look for fallbacks.
        * src/*/ui.[ch] (meta_ui_get_fallback_icons): removed
        * src/ui/theme-parser.c (typedef, parse_toplevel_element): don't
          parse fallback specifications.



Modified:
   trunk/ChangeLog
   trunk/src/core/iconcache.c
   trunk/src/include/ui.h
   trunk/src/ui/theme-parser.c
   trunk/src/ui/theme.h
   trunk/src/ui/ui.c

Modified: trunk/src/core/iconcache.c
==============================================================================
--- trunk/src/core/iconcache.c	(original)
+++ trunk/src/core/iconcache.c	Wed Oct 15 21:01:54 2008
@@ -817,30 +817,14 @@
   if (icon_cache->want_fallback &&
       icon_cache->origin < USING_FALLBACK_ICON)
     {
-      GdkPixbuf *fallback_icon;
-      GdkPixbuf *fallback_mini_icon;
-      
-      fallback_icon = NULL;
-      fallback_mini_icon = NULL;
-
-      meta_ui_get_fallback_icons(&fallback_icon, &fallback_mini_icon);
+      get_fallback_icons (screen,
+                          iconp,
+                          ideal_width,
+                          ideal_height,
+                          mini_iconp,
+                          ideal_mini_width,
+                          ideal_mini_height);
 
-      if (fallback_icon == NULL || fallback_mini_icon == NULL)
-        {
-          get_fallback_icons (screen,
-                              iconp,
-                              ideal_width,
-                              ideal_height,
-                              mini_iconp,
-                              ideal_mini_width,
-                              ideal_mini_height);
-        }
-
-      if (fallback_icon != NULL)
-        *iconp = fallback_icon;
-      if (fallback_mini_icon != NULL)
-        *mini_iconp = fallback_mini_icon;
-      
       replace_cache (icon_cache, USING_FALLBACK_ICON,
                      *iconp, *mini_iconp);
       

Modified: trunk/src/include/ui.h
==============================================================================
--- trunk/src/include/ui.h	(original)
+++ trunk/src/include/ui.h	Wed Oct 15 21:01:54 2008
@@ -204,9 +204,6 @@
 
 GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap   pmap);
 
-void meta_ui_get_fallback_icons (GdkPixbuf **fallback_icon_p,
-                                 GdkPixbuf **fallback_mini_icon_p);
-
 #include "tabpopup.h"
 
 #endif

Modified: trunk/src/ui/theme-parser.c
==============================================================================
--- trunk/src/ui/theme-parser.c	(original)
+++ trunk/src/ui/theme-parser.c	Wed Oct 15 21:01:54 2008
@@ -72,9 +72,8 @@
   STATE_FRAME,
   /* assigning style sets to windows */
   STATE_WINDOW,
-  /* and menu icons */
+  /* things we don't use any more but we can still parse: */
   STATE_MENU_ICON,
-  /* fallback icons */
   STATE_FALLBACK
 } ParseState;
 
@@ -1218,40 +1217,9 @@
     }
   else if (ELEMENT_IS ("fallback"))
     {
-      const char *icon = NULL;
-      const char *mini_icon = NULL;
-      
-      if (!locate_attributes (context, element_name, attribute_names, attribute_values,
-                              error,
-                              "icon", &icon,
-                              "mini_icon", &mini_icon,
-                              NULL))
-        return;
-
-      if (icon)
-        {
-          if (info->theme->fallback_icon != NULL)
-            {
-              set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
-                         _("Theme already has a fallback icon"));
-              return;
-            }
-
-          info->theme->fallback_icon = meta_theme_load_image(info->theme, icon, 64, error);
-        }
-
-      if (mini_icon)
-        {
-          if (info->theme->fallback_mini_icon != NULL)
-            {
-              set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
-                         _("Theme already has a fallback mini_icon"));
-              return;
-            }
-
-          info->theme->fallback_mini_icon = meta_theme_load_image(info->theme, mini_icon, 16, error);
-        }
-
+      /* Not supported any more, but we have to parse it if they include it,
+       * for backwards compatibility.
+       */
       push_state (info, STATE_FALLBACK);
     }
    else

Modified: trunk/src/ui/theme.h
==============================================================================
--- trunk/src/ui/theme.h	(original)
+++ trunk/src/ui/theme.h	Wed Oct 15 21:01:54 2008
@@ -805,8 +805,6 @@
   GHashTable *style_sets_by_name;
   MetaFrameStyleSet *style_sets_by_type[META_FRAME_TYPE_LAST];
 
-  GdkPixbuf *fallback_icon, *fallback_mini_icon;
-
   GQuark quark_width;
   GQuark quark_height;
   GQuark quark_object_width;

Modified: trunk/src/ui/ui.c
==============================================================================
--- trunk/src/ui/ui.c	(original)
+++ trunk/src/ui/ui.c	Wed Oct 15 21:01:54 2008
@@ -997,16 +997,3 @@
 
   return pixbuf;
 }
-  
-void
-meta_ui_get_fallback_icons (GdkPixbuf **fallback_icon_p,
-                            GdkPixbuf **fallback_mini_icon_p)
-{
-  MetaTheme *theme = meta_theme_get_current ();
-
-  if (fallback_icon_p)
-    *fallback_icon_p = theme->fallback_icon;
-
-  if (fallback_mini_icon_p)
-    *fallback_mini_icon_p = theme->fallback_mini_icon;  
-}



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