From 8b267a58da7051c23c97074eb723b5de95723956 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 8 Nov 2010 02:51:53 +0100 Subject: [PATCH] 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. --- gtk/gtkcssprovider.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index eaf850b944..d97435b71f 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1363,6 +1363,7 @@ parse_classes (SelectorPath *path, if ((pos = strchr (str, '.')) != NULL) { + /* Leave the last class to the call after the loop */ while (pos) { *pos = '\0'; @@ -1372,8 +1373,8 @@ parse_classes (SelectorPath *path, pos = strchr (str, '.'); } } - else - selector_path_prepend_class (path, str); + + selector_path_prepend_class (path, str); } static GTokenType