diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-04-09 15:27:23 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-04-09 15:27:23 +0200 |
commit | 79c33cfca6835cef208af294a1f398ca05358027 (patch) | |
tree | 9252d82db29d998d9a59cd6a8993b5bda89a7100 /source | |
parent | b227fece109606096065185ec14b029ffe5c153b (diff) |
Improve error messages when type does not match.
Diffstat (limited to 'source')
-rw-r--r-- | source/theme.c | 28 |
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; |