1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

[Textbox] Correctly fall back to content when str is empty.

This commit is contained in:
Dave Davenport 2020-01-02 16:37:24 +01:00
parent b4b85b2a71
commit 25402f44eb

View file

@ -189,7 +189,7 @@ textbox* textbox_create ( widget *parent, WidgetType type, const char *name, Tex
} }
const char *txt = rofi_theme_get_string ( WIDGET ( tb ), "str", text ); const char *txt = rofi_theme_get_string ( WIDGET ( tb ), "str", text );
if ( !txt ){ if ( txt == NULL || (*txt) == '\0' ){
txt = rofi_theme_get_string ( WIDGET ( tb ), "content", text ); txt = rofi_theme_get_string ( WIDGET ( tb ), "content", text );
} }
const char *placeholder = rofi_theme_get_string ( WIDGET(tb), "placeholder", NULL); const char *placeholder = rofi_theme_get_string ( WIDGET(tb), "placeholder", NULL);