all repos — tint2 @ e4c5509061d1c0d11b6b45e90ed997f24a2b5fb4

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

New config option: taskbar sort by LRU/MRU (config GUI) (issue #532)
o9000 mrovi9000@gmail.com
commit

e4c5509061d1c0d11b6b45e90ed997f24a2b5fb4

parent

17f94205b45f6fbdbe0bc23f12d1bde0af6118aa

2 files changed, 13 insertions(+), 1 deletions(-)

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

@@ -2785,6 +2785,8 @@ col++;

gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("None")); gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("By title")); gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("By center")); + gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("Most recently used first")); + gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("Most recently used last")); gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 0); gtk_tooltips_set_tip(tooltips, taskbar_sort_order, _("Specifies how tasks should be sorted on the taskbar. \n" "'None' means that new tasks are added to the end, and the user can also reorder task buttons by mouse dragging. \n"
M src/tint2conf/properties_rw.csrc/tint2conf/properties_rw.c

@@ -310,8 +310,14 @@ 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"); - } else { + } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) == 2) { fprintf(fp, "center"); + } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) == 3) { + fprintf(fp, "mru"); + } else if (gtk_combo_box_get_active(GTK_COMBO_BOX(taskbar_sort_order)) == 4) { + fprintf(fp, "lru"); + } else { + fprintf(fp, "none"); } fprintf(fp, "\n");

@@ -1189,6 +1195,10 @@ else if (strcmp(value, "title") == 0)

gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 1); else if (strcmp(value, "center") == 0) gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 2); + else if (strcmp(value, "mru") == 0) + gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 3); + else if (strcmp(value, "lru") == 0) + gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 4); else gtk_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 0); }