[Commits] [SCM] claws branch, master, updated. 3.16.0-192-g0bb0077

claws at claws-mail.org claws at claws-mail.org
Sat Jun 9 13:12:38 CEST 2018


The branch, master has been updated
       via  0bb007721f5a1fb10b9491fb6c1a7921fc3cec22 (commit)
      from  0c28ce4c371ae2132cc5b83e418ff36541f3b5ec (commit)

Summary of changes:
 src/mainwindow.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 0bb007721f5a1fb10b9491fb6c1a7921fc3cec22
Author: Paul <paul at claws-mail.org>
Date:   Sat Jun 9 12:12:32 2018 +0100

    fix bug where 'sort_type' is lost when changing 'sort_key' from /View/sort
    
    the bug was apparent with a descending sort. changing the sort_key
    always set it to ascending

diff --git a/src/mainwindow.c b/src/mainwindow.c
index fb6d2a4..ae30619 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -4651,29 +4651,26 @@ static void set_folder_display_item_cb(GtkAction *action, gpointer data)
 static void sort_summary_cb(GtkAction *action, GtkRadioAction *current, gpointer data)
 {
 	MainWindow *mainwin = (MainWindow *)data;
-	FolderItem *item = mainwin->summaryview->folder_item;
 	gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
 
 	if (mainwin->menu_lock_count) return;
 
-	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current)) && item) {
+	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current))) {
 		summary_sort(mainwin->summaryview, (FolderSortKey)value,
-			     item->sort_type);
-		item->sort_key = value;
+			     mainwin->summaryview->sort_type);
 	}
 }
 
 static void sort_summary_type_cb(GtkAction *gaction, GtkRadioAction *current, gpointer data)
 {
 	MainWindow *mainwin = (MainWindow *)data;
-	FolderItem *item = mainwin->summaryview->folder_item;
 	gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
 
 	if (mainwin->menu_lock_count) return;
 
-	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current)) && item)
+	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current)))
 		summary_sort(mainwin->summaryview,
-			     item->sort_key, (FolderSortType)value);
+			     mainwin->summaryview->sort_key, (FolderSortType)value);
 }
 
 static void attract_by_subject_cb(GtkAction *action, gpointer data)

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list