Button: make sure icon is optional
o9000 mrovi9000@gmail.com
2 files changed,
8 insertions(+),
3 deletions(-)
M
src/config.c
→
src/config.c
@@ -750,14 +750,14 @@
/* Button */ else if (strcmp(key, "button") == 0) { panel_config.button_list = g_list_append(panel_config.button_list, create_button()); - } else if (strcmp(key, "button_icon") == 0) { + } else if (strcmp(key, "button_icon") == 0 && strlen(value)) { Button *button = get_or_create_last_button(); button->backend->icon_name = strdup(value); - } else if (strcmp(key, "button_text") == 0) { + } else if (strcmp(key, "button_text") == 0 && strlen(value)) { Button *button = get_or_create_last_button(); free_and_null(button->backend->text); button->backend->text = strdup(value); - } else if (strcmp(key, "button_tooltip") == 0) { + } else if (strcmp(key, "button_tooltip") == 0 && strlen(value)) { Button *button = get_or_create_last_button(); free_and_null(button->backend->tooltip); button->backend->tooltip = strdup(value);