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
This commit is contained in:
Thomas Thurman 2008-10-15 21:01:54 +00:00 committed by Thomas James Alexander Thurman
parent b1b8d51264
commit 7d67a9aee9
6 changed files with 22 additions and 77 deletions

View File

@ -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> 2008-10-13 Thomas Thurman <tthurman@gnome.org>
* po/POTFILES.in: add screen-bindings.h * po/POTFILES.in: add screen-bindings.h

View File

@ -817,29 +817,13 @@ meta_read_icons (MetaScreen *screen,
if (icon_cache->want_fallback && if (icon_cache->want_fallback &&
icon_cache->origin < USING_FALLBACK_ICON) icon_cache->origin < USING_FALLBACK_ICON)
{ {
GdkPixbuf *fallback_icon; get_fallback_icons (screen,
GdkPixbuf *fallback_mini_icon; iconp,
ideal_width,
fallback_icon = NULL; ideal_height,
fallback_mini_icon = NULL; mini_iconp,
ideal_mini_width,
meta_ui_get_fallback_icons(&fallback_icon, &fallback_mini_icon); 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, replace_cache (icon_cache, USING_FALLBACK_ICON,
*iconp, *mini_iconp); *iconp, *mini_iconp);

View File

@ -204,9 +204,6 @@ MetaUIDirection meta_ui_get_direction (void);
GdkPixbuf *meta_ui_get_pixbuf_from_pixmap (Pixmap pmap); 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" #include "tabpopup.h"
#endif #endif

View File

@ -72,9 +72,8 @@ typedef enum
STATE_FRAME, STATE_FRAME,
/* assigning style sets to windows */ /* assigning style sets to windows */
STATE_WINDOW, STATE_WINDOW,
/* and menu icons */ /* things we don't use any more but we can still parse: */
STATE_MENU_ICON, STATE_MENU_ICON,
/* fallback icons */
STATE_FALLBACK STATE_FALLBACK
} ParseState; } ParseState;
@ -1218,40 +1217,9 @@ parse_toplevel_element (GMarkupParseContext *context,
} }
else if (ELEMENT_IS ("fallback")) else if (ELEMENT_IS ("fallback"))
{ {
const char *icon = NULL; /* Not supported any more, but we have to parse it if they include it,
const char *mini_icon = NULL; * for backwards compatibility.
*/
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);
}
push_state (info, STATE_FALLBACK); push_state (info, STATE_FALLBACK);
} }
else else

View File

@ -805,8 +805,6 @@ struct _MetaTheme
GHashTable *style_sets_by_name; GHashTable *style_sets_by_name;
MetaFrameStyleSet *style_sets_by_type[META_FRAME_TYPE_LAST]; MetaFrameStyleSet *style_sets_by_type[META_FRAME_TYPE_LAST];
GdkPixbuf *fallback_icon, *fallback_mini_icon;
GQuark quark_width; GQuark quark_width;
GQuark quark_height; GQuark quark_height;
GQuark quark_object_width; GQuark quark_object_width;

View File

@ -997,16 +997,3 @@ meta_ui_get_pixbuf_from_pixmap (Pixmap pmap)
return pixbuf; 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;
}