summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Thurman <tthurman@gnome.org>2008-10-15 21:01:54 +0000
committerThomas James Alexander Thurman <tthurman@src.gnome.org>2008-10-15 21:01:54 +0000
commit7d67a9aee9bce86f478f3f83caeb8205da7dd398 (patch)
tree34d9e7740885395911c2bca060e93185e902ded5
parentb1b8d5126406d454375f0556b7a82dfd60ec8b04 (diff)
downloadmetacity-7d67a9aee9bce86f478f3f83caeb8205da7dd398.tar.gz
Since Patrick Niklaus's checkin of 2008-08-14 dealt with windows with no
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. svn path=/trunk/; revision=3958
-rw-r--r--ChangeLog11
-rw-r--r--src/core/iconcache.c30
-rw-r--r--src/include/ui.h3
-rw-r--r--src/ui/theme-parser.c40
-rw-r--r--src/ui/theme.h2
-rw-r--r--src/ui/ui.c13
6 files changed, 22 insertions, 77 deletions
diff --git a/ChangeLog b/ChangeLog
index cea99d12..c4fedcb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
2008-10-13 Thomas Thurman <tthurman@gnome.org>
* po/POTFILES.in: add screen-bindings.h
diff --git a/src/core/iconcache.c b/src/core/iconcache.c
index db96bbbb..c4fd19f5 100644
--- a/src/core/iconcache.c
+++ b/src/core/iconcache.c
@@ -817,30 +817,14 @@ meta_read_icons (MetaScreen *screen,
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);
-
- 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);
- }
+ 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);
diff --git a/src/include/ui.h b/src/include/ui.h
index 08dd42f2..a4d7fea7 100644
--- a/src/include/ui.h
+++ b/src/include/ui.h
@@ -204,9 +204,6 @@ MetaUIDirection meta_ui_get_direction (void);
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
diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c
index 7cafae08..71559f1c 100644
--- a/src/ui/theme-parser.c
+++ b/src/ui/theme-parser.c
@@ -72,9 +72,8 @@ typedef enum
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 @@ parse_toplevel_element (GMarkupParseContext *context,
}
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
diff --git a/src/ui/theme.h b/src/ui/theme.h
index be6114f3..2d48b08c 100644
--- a/src/ui/theme.h
+++ b/src/ui/theme.h
@@ -805,8 +805,6 @@ struct _MetaTheme
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;
diff --git a/src/ui/ui.c b/src/ui/ui.c
index ca0affcc..b72f114e 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -997,16 +997,3 @@ meta_ui_get_pixbuf_from_pixmap (Pixmap pmap)
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;
-}