summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/theme.h2
-rw-r--r--lexer/theme-lexer.l1
-rw-r--r--source/widgets/textbox.c3
3 files changed, 4 insertions, 2 deletions
diff --git a/include/theme.h b/include/theme.h
index 448b67b1..16d03c1d 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -442,6 +442,7 @@ gboolean rofi_theme_is_empty ( void );
* Convert old theme colors into default one.
*/
void rofi_theme_convert_old ( void );
+#endif
/**
* @param file File name passed to option.
@@ -450,4 +451,3 @@ void rofi_theme_convert_old ( void );
*/
char *helper_get_theme_path ( const char *file );
#endif
-#endif
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l
index ccd08976..ebf0f28a 100644
--- a/lexer/theme-lexer.l
+++ b/lexer/theme-lexer.l
@@ -37,6 +37,7 @@
#include <gio/gio.h>
#include <helper.h>
#include "rofi.h"
+#include "theme.h"
#include "lexer/theme-parser.h"
diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c
index 8c118baa..cdb94ee0 100644
--- a/source/widgets/textbox.c
+++ b/source/widgets/textbox.c
@@ -134,7 +134,8 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, TextBoxFontType
tbfc->pfd = pango_font_description_from_string ( font );
if ( helper_validate_font ( tbfc->pfd, font ) ) {
tbfc->metrics = pango_context_get_metrics ( p_context, tbfc->pfd, NULL );
- g_hash_table_insert ( tbfc_cache, font, tbfc );
+ // Cast away consts. (*yuck*) because table_insert does not know it is const.
+ g_hash_table_insert ( tbfc_cache, (char *)font, tbfc );
}
else {
pango_font_description_free ( tbfc->pfd );