all repos — tint2 @ a2c5553f4f84ecd73487b771b570b3ed5d825e99

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Button: make sure icon is optional
o9000 mrovi9000@gmail.com
commit

a2c5553f4f84ecd73487b771b570b3ed5d825e99

parent

63dd4a3e6cd2e7e0079a4e083c6f4fbc3d689eb7

1 files changed, 6 insertions(+), 3 deletions(-)

jump to
M src/tint2conf/properties_rw.csrc/tint2conf/properties_rw.c

@@ -875,9 +875,12 @@

Button *button = &g_array_index(buttons, Button, i); fprintf(fp, "button = new\n"); - fprintf(fp, "button_icon = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_icon))); - fprintf(fp, "button_text = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_text))); - fprintf(fp, "button_tooltip = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_tooltip))); + if (strlen(gtk_entry_get_text(GTK_ENTRY(button->button_icon)))) + fprintf(fp, "button_icon = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_icon))); + if (gtk_entry_get_text(GTK_ENTRY(button->button_text))) + fprintf(fp, "button_text = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_text))); + if (strlen(gtk_entry_get_text(GTK_ENTRY(button->button_tooltip)))) + fprintf(fp, "button_tooltip = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_tooltip))); fprintf(fp, "button_lclick_command = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_left_command))); fprintf(fp, "button_rclick_command = %s\n", gtk_entry_get_text(GTK_ENTRY(button->button_right_command)));