summaryrefslogtreecommitdiff
path: root/src/theme-parser.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2002-02-07 03:25:34 +0000
committerHavoc Pennington <hp@src.gnome.org>2002-02-07 03:25:34 +0000
commit84c3050a7cb24c672c58bdbdf586c88f163dcd71 (patch)
treebd18d1db04cc42e4b3747053b9bc1e00dd8c4dc5 /src/theme-parser.c
parent8ae714eeaef03db0a55c11fc31834c8d65e2ea03 (diff)
downloadmetacity-84c3050a7cb24c672c58bdbdf586c88f163dcd71.tar.gz
redo window sizes/appearance when the theme changes
2002-02-06 Havoc Pennington <hp@pobox.com> * src/main.c (prefs_changed_callback): redo window sizes/appearance when the theme changes * src/display.c (meta_display_retheme_all): new function * src/theme-parser.c (locate_attributes): remove error handling for MAX_ATTRS reached, add an assert instead, the way this code ended up the attrs in the array depend on the code not the theme file.
Diffstat (limited to 'src/theme-parser.c')
-rw-r--r--src/theme-parser.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/theme-parser.c b/src/theme-parser.c
index dfeed94a..bc7805c6 100644
--- a/src/theme-parser.c
+++ b/src/theme-parser.c
@@ -356,14 +356,7 @@ locate_attributes (GMarkupParseContext *context,
{
g_return_val_if_fail (retloc != NULL, FALSE);
- if (n_attrs == MAX_ATTRS)
- {
- set_error (error, context, G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE,
- _("Element <%s> has more than %d attributes, can't possibly be valid"),
- element_name, MAX_ATTRS);
- retval = FALSE;
- goto out;
- }
+ g_assert (n_attrs < MAX_ATTRS);
attrs[n_attrs].name = name;
attrs[n_attrs].retloc = retloc;
@@ -374,7 +367,6 @@ locate_attributes (GMarkupParseContext *context,
retloc = va_arg (args, const char**);
}
- out:
va_end (args);
if (!retval)
@@ -402,7 +394,7 @@ locate_attributes (GMarkupParseContext *context,
_("Attribute \"%s\" repeated twice on the same <%s> element"),
attrs[j].name, element_name);
retval = FALSE;
- goto out2;
+ goto out;
}
*retloc = attribute_values[i];
@@ -420,13 +412,13 @@ locate_attributes (GMarkupParseContext *context,
_("Attribute \"%s\" is invalid on <%s> element in this context"),
attribute_names[i], element_name);
retval = FALSE;
- goto out2;
+ goto out;
}
++i;
}
- out2:
+ out:
return retval;
}