summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-12-11 18:00:45 +0100
committerDave Davenport <qball@gmpclient.org>2016-12-11 18:00:45 +0100
commit3b850f447296319243aca51cfb28bdb526e968ae (patch)
tree6864780493d1bc8d0f2108e5062b4ceb57085943
parent7f40ed1065fda7b4531b25e919cc8a46954cd1d7 (diff)
Fix theme_name generator for textbox
-rw-r--r--source/widgets/textbox.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c
index a395cfc2..ad66999f 100644
--- a/source/widgets/textbox.c
+++ b/source/widgets/textbox.c
@@ -104,7 +104,6 @@ textbox* textbox_create ( const char *name, TextboxFlags flags, short x, short y
textbox *tb = g_slice_new0 ( textbox );
tb->widget.name = g_strdup ( name );
- tb->theme_name = g_strdup(name);
tb->widget.draw = textbox_draw;
tb->widget.free = textbox_free;
tb->widget.resize = textbox_resize;
@@ -180,10 +179,10 @@ void textbox_font ( textbox *tb, TextBoxFontType tbft )
tb->color_fg = color->fg;
break;
}
- if ( tb->tbft != tbft ) {
- tb->update = TRUE;
+ if ( tb->tbft != tbft || tb->theme_name == NULL ) {
g_free ( tb->theme_name);
tb->theme_name = g_strjoin ("." , tb->widget.name, mode, state, NULL );
+ tb->update = TRUE;
widget_queue_redraw ( WIDGET ( tb ) );
}
tb->tbft = tbft;