[Xfce4-commits] [apps/xfdashboard] 01/01: Handle "duplicate" id css selectors

noreply at xfce.org noreply at xfce.org
Sat May 16 21:45:54 CEST 2015


This is an automated email from the git hooks/post-receive script.

nomad pushed a commit to branch master
in repository apps/xfdashboard.

commit 6be9a99e6e38a53b7ae861a45300a7165a25c327
Author: Stephan Haller <nomad at froevel.de>
Date:   Sat May 16 21:45:30 2015 +0200

    Handle "duplicate" id css selectors
---
 xfdashboard/css-selector.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xfdashboard/css-selector.c b/xfdashboard/css-selector.c
index 6651dee..0d60020 100644
--- a/xfdashboard/css-selector.c
+++ b/xfdashboard/css-selector.c
@@ -533,6 +533,13 @@ static GTokenType _xfdashboard_css_selector_parse_css_simple_selector(Xfdashboar
 					return(G_TOKEN_ERROR);
 				}
 
+				/* Return immediately if ID was already set because it should be a new child but print a debug message */
+				if(ioRule->id)
+				{
+					g_debug("Unexpected new ID '%s' at rule %p for previous ID '%s' at line %d and position %d", inScanner->value.v_identifier, ioRule, ioRule->id, g_scanner_cur_line(inScanner), g_scanner_cur_position(inScanner));
+					return(G_TOKEN_NONE);
+				}
+
 				ioRule->id=g_strdup(inScanner->value.v_identifier);
 				break;
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list