New config option: taskbar sort by LRU/MRU (config GUI) (issue #532)
o9000 mrovi9000@gmail.com
2 files changed,
13 insertions(+),
1 deletions(-)
M
src/tint2conf/properties.c
→
src/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.c
→
src/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); }