Fix bug #2728, "erroneous switching from one to three column view"
[claws.git] / src / mainwindow.c
index 7830646bf8a275a67b0d32fbb2060ba5ac13f8bb..7b71254dbe45c019e8fe2f09222f5246e7f29257 100644 (file)
@@ -1145,6 +1145,7 @@ void mainwin_accel_changed_cb (GtkAccelGroup *accelgroup, guint keyval, GdkModif
                        g_free(new_accel);
                }
        }
+       g_list_free(closures);
 }
 
 static void mainwindow_colorlabel_menu_create(MainWindow *mainwin, gboolean refresh)
@@ -1392,7 +1393,7 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
                                    && mainwin->summaryview->folder_item->total_msgs == 0))) {
                                g_signal_stop_emission_by_name(G_OBJECT(widget), 
                                               "key_press_event");
-                               folderview_select_next_unread(mainwin->folderview, TRUE);
+                               folderview_select_next_with_flag(mainwin->folderview, MSG_UNREAD, TRUE);
                        }
                }
                break;
@@ -2381,7 +2382,6 @@ static gboolean main_window_reflect_tags_changes_real(gpointer data)
        MainWindow *mainwin = (MainWindow *)data;
 
        if (summary_is_locked(mainwin->summaryview)) {
-               tags_tag = 0;
                return TRUE;
        }
        /* re-create tags submenu */
@@ -3314,6 +3314,8 @@ do { \
        cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse2", (prefs_common.hide_quotes == 2));
        cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse3", (prefs_common.hide_quotes == 3));
 
+       if (mainwin->summaryview->folder_item && !mainwin->summaryview->folder_item->threaded)
+               cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/HideReadThreads", FALSE);
        if (mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_msgs)
                cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", FALSE);
        if (mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_threads)
@@ -4137,6 +4139,8 @@ static void set_layout_cb(GtkAction *action, GtkRadioAction *current, gpointer d
        mainwindow_reset_paned(GTK_PANED(mainwin->vpaned));
        if (old_layout_mode == SMALL_LAYOUT && layout_mode != SMALL_LAYOUT) {
                mainwindow_reset_paned(GTK_PANED(mainwin->hpaned));
+               if (layout_mode == VERTICAL_LAYOUT)
+                       mainwindow_reset_paned(GTK_PANED(mainwin->vpaned));
        }
        if (old_layout_mode != SMALL_LAYOUT && layout_mode == SMALL_LAYOUT) {
                mainwin_paned_show_first(GTK_PANED(mainwin->hpaned));
@@ -4831,7 +4835,7 @@ static void goto_folder_cb(GtkAction *action, gpointer data)
 static void goto_unread_folder_cb(GtkAction *action, gpointer data)
 {
        MainWindow *mainwin = (MainWindow *)data;
-       folderview_select_next_unread(mainwin->folderview, FALSE);
+       folderview_select_next_with_flag(mainwin->folderview, MSG_UNREAD, FALSE);
 }
 
 static void scroll_prev_line_cb(GtkAction *action, gpointer data)