all repos — tint2 @ 298f60f1b033b0e4547062e45532de0b85ded55e

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

tint2conf: Fix taskbar_sort_order, taskbar_name_padding
o9000 o9000
commit

298f60f1b033b0e4547062e45532de0b85ded55e

parent

7794272f8ec0f3654eb630d9088885ba7dfa2a17

4 files changed, 24 insertions(+), 6 deletions(-)

jump to
M src/config.csrc/config.c

@@ -474,6 +474,7 @@ }

else if (strcmp (key, "taskbar_name_padding") == 0) { extract_values(value, &value1, &value2, &value3); panel_config.g_taskbar.area_name.paddingxlr = panel_config.g_taskbar.area_name.paddingx = atoi (value1); + if (value2) panel_config.g_taskbar.area_name.paddingy = atoi (value2); } else if (strcmp (key, "taskbar_name_background_id") == 0) { int id = atoi (value);
M src/tint2conf/properties.csrc/tint2conf/properties.c

@@ -44,7 +44,7 @@

// taskbar GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing; GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor; -GtkWidget *taskbar_name_padding_x, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font; +GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font; GtkWidget *taskbar_active_background, *taskbar_inactive_background; GtkWidget *taskbar_name_active_background, *taskbar_name_inactive_background; GtkWidget *taskbar_distribute_size, *taskbar_sort_order;

@@ -2379,6 +2379,21 @@ gtk_widget_show(taskbar_name_padding_x);

gtk_table_attach(GTK_TABLE(table), taskbar_name_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; gtk_tooltips_set_tip(tooltips, taskbar_name_padding_x, "Specifies the horizontal padding of the desktop name. " + "This is the space between the border and the text inside.", NULL); + + col = 2; + row++; + label = gtk_label_new(_("Vertical padding")); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_widget_show(label); + gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + col++; + + taskbar_name_padding_y = gtk_spin_button_new_with_range(0, 500, 1); + gtk_widget_show(taskbar_name_padding_y); + gtk_table_attach(GTK_TABLE(table), taskbar_name_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + col++; + gtk_tooltips_set_tip(tooltips, taskbar_name_padding_y, "Specifies the vertical padding of the desktop name. " "This is the space between the border and the text inside.", NULL); col = 2;
M src/tint2conf/properties.hsrc/tint2conf/properties.h

@@ -48,7 +48,7 @@

// taskbar extern GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing; extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor; -extern GtkWidget *taskbar_name_padding_x, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font; +extern GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color, *taskbar_name_font; extern GtkWidget *taskbar_active_background, *taskbar_inactive_background; extern GtkWidget *taskbar_name_active_background, *taskbar_name_inactive_background; extern GtkWidget *taskbar_distribute_size, *taskbar_sort_order;
M src/tint2conf/properties_rw.csrc/tint2conf/properties_rw.c

@@ -183,7 +183,7 @@ fprintf(fp, "panel_layer = ");

if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 0) { fprintf(fp, "top"); } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(panel_combo_layer)) == 1) { - fprintf(fp, "center"); + fprintf(fp, "normal"); } else { fprintf(fp, "bottom"); }

@@ -240,8 +240,9 @@ fprintf(fp, "taskbar_name = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_show_name)) ? 1 : 0);

fprintf(fp, "taskbar_hide_inactive_tasks = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_inactive_tasks)) ? 1 : 0); fprintf(fp, "taskbar_hide_different_monitor = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor)) ? 1 : 0); fprintf(fp, - "taskbar_name_padding = %d\n", - (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_name_padding_x))); + "taskbar_name_padding = %d %d\n", + (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_name_padding_x)), + (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(taskbar_name_padding_y))); fprintf(fp, "taskbar_name_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_name_inactive_background))); fprintf(fp, "taskbar_name_active_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_name_active_background))); fprintf(fp, "taskbar_name_font = %s\n", gtk_font_button_get_font_name(GTK_FONT_BUTTON(taskbar_name_font)));

@@ -262,7 +263,7 @@

fprintf(fp, "taskbar_distribute_size = %d\n", gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_distribute_size)) ? 1 : 0); fprintf(fp, "taskbar_sort_order = "); - if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) == 0) { + if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) <= 0) { fprintf(fp, "none"); } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) == 1) { fprintf(fp, "title");

@@ -1010,6 +1011,7 @@ }

else if (strcmp(key, "taskbar_name_padding") == 0) { extract_values(value, &value1, &value2, &value3); gtk_spin_button_set_value(GTK_SPIN_BUTTON(taskbar_name_padding_x), atoi(value1)); + if (value2) gtk_spin_button_set_value(GTK_SPIN_BUTTON(taskbar_name_padding_y), atoi(value2)); } else if (strcmp(key, "taskbar_name_background_id") == 0) { int id = background_index_safe(atoi(value));