don't switch from 'Thread Date' to 'Date' when clicking column header
authorPaul <paul@claws-mail.org>
Sat, 5 Jul 2014 06:57:15 +0000 (07:57 +0100)
committerPaul <paul@claws-mail.org>
Sat, 5 Jul 2014 06:57:15 +0000 (07:57 +0100)
When sorting by Thread Date, make clicking the Date columm header not switch to sorting by
Date, but remain sorting by Thread Date, just toggling between ascending/desending, and
maintaining the previous behaviour when sorting by Date.

src/summaryview.c

index 2c3e345a1d620e271bfe838e4314db10c8690565..d1f2eee608f02c9e72341c06085d4e4a5e3ca684 100644 (file)
@@ -2807,7 +2807,9 @@ static void summary_set_column_titles(SummaryView *summaryview)
                        gtk_box_pack_start(GTK_BOX(hbox), label,
                                           FALSE, FALSE, 0);
 
-               if (summaryview->sort_key == sort_by[type]) {
+               if (summaryview->sort_key == sort_by[type] ||
+                   (summaryview->sort_key == SORT_BY_THREAD_DATE &&
+                    sort_by[SORT_BY_DATE])) {
                        arrow = gtk_arrow_new
                                (summaryview->sort_type == SORT_ASCENDING
                                 ? GTK_ARROW_DOWN : GTK_ARROW_UP,
@@ -7107,7 +7109,10 @@ static void summary_size_clicked(GtkWidget *button, SummaryView *summaryview)
 
 static void summary_date_clicked(GtkWidget *button, SummaryView *summaryview)
 {
-       summary_sort_by_column_click(summaryview, SORT_BY_DATE);
+       if (summaryview->sort_key == SORT_BY_DATE)
+               summary_sort_by_column_click(summaryview, SORT_BY_DATE);
+       else
+               summary_sort_by_column_click(summaryview, SORT_BY_THREAD_DATE);
 }
 
 static void summary_from_clicked(GtkWidget *button, SummaryView *summaryview)