GtkCssProvider: Do not miss the last class name in concatenated classes.

Selectors like .menu.check or .entry.progressbar were being misparsed
and attributed to .menu and .entry.
This commit is contained in:
Carlos Garnacho
2010-11-08 02:51:53 +01:00
parent d321713704
commit 8b267a58da

View File

@@ -1363,6 +1363,7 @@ parse_classes (SelectorPath *path,
if ((pos = strchr (str, '.')) != NULL) if ((pos = strchr (str, '.')) != NULL)
{ {
/* Leave the last class to the call after the loop */
while (pos) while (pos)
{ {
*pos = '\0'; *pos = '\0';
@@ -1372,8 +1373,8 @@ parse_classes (SelectorPath *path,
pos = strchr (str, '.'); pos = strchr (str, '.');
} }
} }
else
selector_path_prepend_class (path, str); selector_path_prepend_class (path, str);
} }
static GTokenType static GTokenType