summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-04-09 15:27:23 +0200
committerDave Davenport <qball@gmpclient.org>2017-04-09 15:27:23 +0200
commit79c33cfca6835cef208af294a1f398ca05358027 (patch)
tree9252d82db29d998d9a59cd6a8993b5bda89a7100 /source
parentb227fece109606096065185ec14b029ffe5c153b (diff)
Improve error messages when type does not match.
Diffstat (limited to 'source')
-rw-r--r--source/theme.c28
1 files changed, 28 insertions, 0 deletions
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;