summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/theme.h1
-rw-r--r--lexer/theme-parser.y10
-rw-r--r--source/theme.c28
3 files changed, 34 insertions, 5 deletions
diff --git a/include/theme.h b/include/theme.h
index b55c4d0a..db249dd9 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -89,6 +89,7 @@ typedef enum
P_HIGHLIGHT,
} PropertyType;
+
/**
* Represent the color in theme.
*/
diff --git a/lexer/theme-parser.y b/lexer/theme-parser.y
index 4a5368b8..293675ad 100644
--- a/lexer/theme-parser.y
+++ b/lexer/theme-parser.y
@@ -82,11 +82,11 @@ int yylex (YYSTYPE *, YYLTYPE *);
%token <sval> T_LINK
%token <sval> FIRST_NAME
-%token BOPEN "bracket open"
-%token BCLOSE "bracket close"
-%token PSEP "property separator"
-%token PCLOSE "property close"
-%token NSEP "Name separator"
+%token BOPEN "bracket open ('{')"
+%token BCLOSE "bracket close ('}')"
+%token PSEP "property separator (':')"
+%token PCLOSE "property close (';')"
+%token NSEP "Name separator (' ' or '.')"
%token NAME_PREFIX "Element section ('# {name} { ... }')"
%token WHITESPACE "White space"
%token PDEFAULTS "Default settings section ( '* { ... }')"
diff --git a/source/theme.c b/source/theme.c
index 67fb1943..f5ee02e4 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -13,6 +13,29 @@
/** Logging domain for theme */
#define LOG_DOMAIN "Theme"
+/**
+ * Name of the property type
+ */
+const char *PropertyTypeName[] = {
+ /** Integer */
+ "Integer",
+ /** Double */
+ "Double",
+ /** String */
+ "String",
+ /** Boolean */
+ "Boolean",
+ /** Color */
+ "Color",
+ /** Padding */
+ "Padding",
+ /** Link to global setting */
+ "Reference",
+ /** Position */
+ "Position",
+ /** Highlight */
+ "Highlight",
+};
void yyerror ( YYLTYPE *ylloc, const char *, const char * );
static gboolean distance_compare ( Distance d, Distance e )
{
@@ -395,6 +418,11 @@ Property *rofi_theme_find_property ( ThemeWidget *widget, PropertyType type, con
if ( p->type == P_INTEGER && type == P_PADDING ) {
return p;
}
+ g_log ( LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Found property: '%s' on '%s', but type %s does not match expected type %s.",
+ property, widget->name,
+ PropertyTypeName[p->type],
+ PropertyTypeName[type]
+ );
}
if ( exact ) {
return NULL;