case ListBox:
case Label: w = opt->handle; break;
case Button: if(opt->handle) w = gtk_bin_get_child(GTK_BIN(opt->handle)); break;
- case TextBox: w = opt->textValue; break;
+ case TextBox: w = (GtkWidget *) opt->textValue; if(!w) w = opt->handle; break;
default: ;
}
-printf("set font %s\n", font);
if(w && font) SetWidgetFont(w, &font);
}
static GtkTextIter end;
static GtkTextTag *fgTags[8], *bgTags[8], *font, *bold, *normal, *attr = NULL;
+ if(!s) {
+ font = NULL;
+ return;
+ }
+
if(!font) {
font = gtk_text_buffer_create_tag(opt->handle, NULL, "font", appData.icsFont, NULL);
gtk_widget_modify_base(GTK_WIDGET(opt->textValue), GTK_STATE_NORMAL, &backgroundColor);