sync with 0.7.8cvs11
authorPaul Mangan <paul@claws-mail.org>
Fri, 28 Jun 2002 09:58:50 +0000 (09:58 +0000)
committerPaul Mangan <paul@claws-mail.org>
Fri, 28 Jun 2002 09:58:50 +0000 (09:58 +0000)
src/prefs_common.c
src/prefs_common.h
src/summaryview.c

index a9033a130ee3ae50cd51a30207170c6dbaf9dbb6..15062b410ef2a3b0f7be07249218bad39dc037c0 100644 (file)
@@ -210,6 +210,7 @@ static struct Privacy {
 
 static struct Interface {
        /* GtkWidget *checkbtn_emacs; */
+       GtkWidget *checkbtn_show_msg_with_cursor;
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
@@ -723,7 +724,10 @@ static PrefParam param[] = {
 
        /* {"emulate_emacs", "FALSE", &prefs_common.emulate_emacs, P_BOOL,
         NULL, NULL, NULL}, */
-
+       {"show_message_with_cursor_key", "FALSE",
+        &prefs_common.show_msg_with_cursor_key,
+        P_BOOL, &interface.checkbtn_show_msg_with_cursor,
+        prefs_set_data_from_toggle, prefs_set_toggle},
        {"open_unread_on_enter", "FALSE", &prefs_common.open_unread_on_enter,
         P_BOOL, &interface.checkbtn_openunread,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -2609,6 +2613,7 @@ static void prefs_interface_create(void)
        GtkWidget *vbox2;
        GtkWidget *vbox3;
        /* GtkWidget *checkbtn_emacs; */
+       GtkWidget *checkbtn_show_msg_with_cursor;
        GtkWidget *checkbtn_openunread;
        GtkWidget *checkbtn_openinbox;
        GtkWidget *checkbtn_immedexec;
@@ -2650,6 +2655,10 @@ static void prefs_interface_create(void)
        gtk_label_set_justify (GTK_LABEL (GTK_BIN (checkbtn_emacs)->child),
                               GTK_JUSTIFY_LEFT);   */
 
+       PACK_CHECK_BUTTON
+               (vbox2, checkbtn_show_msg_with_cursor,
+                _("Open message when cursor keys are pressed on summary"));
+
        PACK_CHECK_BUTTON
                (vbox2, checkbtn_openunread,
                 _("Open first unread message when entering a folder"));
@@ -2786,14 +2795,16 @@ static void prefs_interface_create(void)
        stock_pixmap_themes_list_free(avail_pixmap_themes);
 
        /* interface.checkbtn_emacs          = checkbtn_emacs; */
+       interface.checkbtn_show_msg_with_cursor
+                                             = checkbtn_show_msg_with_cursor;
        interface.checkbtn_openunread         = checkbtn_openunread;
        interface.checkbtn_openinbox          = checkbtn_openinbox;
        interface.checkbtn_immedexec          = checkbtn_immedexec;
        interface.optmenu_recvdialog          = optmenu_recvdialog;
        interface.checkbtn_addaddrbyclick     = checkbtn_addaddrbyclick;
        interface.optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
-       interface.combo_pixmap_theme            = combo_pixmap_theme;
-       interface.entry_pixmap_theme            = entry_pixmap_theme;
+       interface.combo_pixmap_theme          = combo_pixmap_theme;
+       interface.entry_pixmap_theme          = entry_pixmap_theme;
 }
 
 static void prefs_other_create(void)
index b102d962110d347ba870e01351de6c010b5a548e..e1e0a4272e1ca2297fbb07049631198ed19a035a 100644 (file)
@@ -216,6 +216,7 @@ struct _PrefsCommon
        gboolean sep_folder;
        gboolean sep_msg;
        gboolean emulate_emacs;
+       gboolean show_msg_with_cursor_key;
        gboolean open_unread_on_enter;
        gboolean open_inbox_on_inc;
        gboolean immediate_exec;
index f8f9a4dbc59ffc3fa225e30bcc2e1c2feaaad5db..2bc05101dff2a6cd9ba4c2bbeca8930c81dc70fd 100644 (file)
@@ -4675,7 +4675,9 @@ static void summary_selected(GtkCTree *ctree, GtkCTreeNode *row,
                break;
        }
 
-       if (summaryview->display_msg) {
+       if (summaryview->display_msg ||
+           (prefs_common.show_msg_with_cursor_key &&
+            messageview_is_visible(summaryview->messageview))) {
                summary_display_msg(summaryview, row);
                summaryview->display_msg = FALSE;
        } else {