add common prefs option '/Interface/Open next message on deletion'
[claws.git] / src / prefs_common.c
index 6150292bafa55eca8813acd2b7076ead3cc50ee7..31efadee5a7a7302f1e96b33ac8f4389f5960e8a 100644 (file)
@@ -207,6 +207,7 @@ static struct Interface {
        GtkWidget *checkbtn_show_msg_with_cursor;
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_mark_as_read_on_newwin;
+       GtkWidget *checkbtn_open_on_delete;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
        GtkWidget *optmenu_recvdialog;
@@ -742,6 +743,10 @@ static PrefParam param[] = {
         &prefs_common.mark_as_read_on_new_window,
         P_BOOL, &interface.checkbtn_mark_as_read_on_newwin,
         prefs_set_data_from_toggle, prefs_set_toggle},
+       {"open_on_delete", "TRUE",
+        &prefs_common.open_on_delete,
+        P_BOOL, &interface.checkbtn_open_on_delete,
+        prefs_set_data_from_toggle, prefs_set_toggle},
        {"open_inbox_on_inc", "FALSE", &prefs_common.open_inbox_on_inc,
         P_BOOL, &interface.checkbtn_openinbox,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -2597,6 +2602,7 @@ static void prefs_interface_create(void)
        GtkWidget *checkbtn_show_msg_with_cursor;
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_mark_as_read_on_newwin;
+       GtkWidget *checkbtn_open_on_delete;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
        GtkWidget *frame_dialogs;
@@ -2648,6 +2654,10 @@ static void prefs_interface_create(void)
                (vbox2, checkbtn_mark_as_read_on_newwin,
                 _("Only mark message as read when opened in new window"));
 
+       PACK_CHECK_BUTTON
+               (vbox2, checkbtn_open_on_delete,
+                _("Open next message on deletion"));
+
        PACK_CHECK_BUTTON
                (vbox2, checkbtn_openinbox,
                 _("Go to inbox after receiving new mail"));
@@ -2784,6 +2794,8 @@ static void prefs_interface_create(void)
        interface.checkbtn_openunread         = checkbtn_openunread;
        interface.checkbtn_mark_as_read_on_newwin
                                              = checkbtn_mark_as_read_on_newwin;
+       interface.checkbtn_open_on_delete
+                                             = checkbtn_open_on_delete;
        interface.checkbtn_openinbox          = checkbtn_openinbox;
        interface.checkbtn_immedexec          = checkbtn_immedexec;
        interface.optmenu_recvdialog          = optmenu_recvdialog;