From cd3d8c0f23bbf555da9a0799cd1276048703a96a Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Fri, 28 Jun 2002 09:58:50 +0000 Subject: [PATCH] sync with 0.7.8cvs11 --- src/prefs_common.c | 17 ++++++++++++++--- src/prefs_common.h | 1 + src/summaryview.c | 4 +++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/prefs_common.c b/src/prefs_common.c index a9033a130..15062b410 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -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) diff --git a/src/prefs_common.h b/src/prefs_common.h index b102d9621..e1e0a4272 100644 --- a/src/prefs_common.h +++ b/src/prefs_common.h @@ -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; diff --git a/src/summaryview.c b/src/summaryview.c index f8f9a4dbc..2bc05101d 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -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 { -- 2.25.1