GNOME Bugzilla – Bug 349552
problem with parsing (enum) style properties
Last modified: 2011-02-04 16:10:38 UTC
The following gtkrc will throw a parser error with cvs head. style "asdf" { GtkMenuItem::selected_shadow_type = GTK_SHADOW_IN xthickness = 2 } mitch says it is his fault :-)
Created attachment 70122 [details] [review] Patch fixing the bug This is ugly, but I don't see another way to fix the bug (except adding an unget facility to GScanner, which won't help us now either).
Ugh indeed. Can we at least store the configuration in some local variables and restore it to the previous values, rather than hardcode magic configuration values there ?
Created attachment 70128 [details] [review] Same uglyness, larger patch :)
Maybe add a little "FIXME - we need g_scanner_unget(), see bug #..." in the comment. Other than that, looks ok
FIXME added, fixed in CVS: 2006-08-03 Michael Natterer <mitch@imendio.com> * gtk/gtkrc.c (gtk_rc_parse_assignment): reset scanner config to default values while checking if an expression(foobar) follows, because if no expression follows the scanner's "next token" must be usable for the caller of this function (fixes bug #349552).
*** Bug 348909 has been marked as a duplicate of this bug. ***