diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.c | 6 | ||||
-rw-r--r-- | src/prefs_common.c | 9 | ||||
-rw-r--r-- | src/prefs_common.h | 1 | ||||
-rw-r--r-- | src/textview.c | 9 | ||||
-rw-r--r-- | src/textview.h | 9 |
5 files changed, 28 insertions, 6 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index fefc77ba..91c23a70 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1119,9 +1119,13 @@ void main_window_reflect_prefs_all(void) else gtk_widget_show(mainwin->exec_btn); - summary_redisplay_msg(mainwin->summaryview); headerview_set_visibility(mainwin->messageview->headerview, prefs_common.display_header_pane); + + textview_reflect_prefs(mainwin->messageview->textview); + textview_reflect_prefs(mainwin->messageview->mimeview->textview); + + summary_redisplay_msg(mainwin->summaryview); } } diff --git a/src/prefs_common.c b/src/prefs_common.c index 92d0f6d1..fb68acc6 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -137,6 +137,7 @@ static struct Message { GtkWidget *chkbtn_disphdrpane; GtkWidget *chkbtn_disphdr; GtkWidget *chkbtn_html; + GtkWidget *chkbtn_cursor; GtkWidget *spinbtn_linespc; GtkObject *spinbtn_linespc_adj; @@ -530,6 +531,9 @@ static PrefParam param[] = { {"render_html", "TRUE", &prefs_common.render_html, P_BOOL, &message.chkbtn_html, prefs_set_data_from_toggle, prefs_set_toggle}, + {"textview_cursor_visible", "FALSE", + &prefs_common.textview_cursor_visible, P_BOOL, + &message.chkbtn_cursor, prefs_set_data_from_toggle, prefs_set_toggle}, {"line_space", "2", &prefs_common.line_space, P_INT, &message.spinbtn_linespc, prefs_set_data_from_spinbtn, prefs_set_spinbtn}, @@ -1692,6 +1696,7 @@ static void prefs_message_create(void) GtkWidget *chkbtn_disphdr; GtkWidget *button_edit_disphdr; GtkWidget *chkbtn_html; + GtkWidget *chkbtn_cursor; GtkWidget *hbox_linespc; GtkWidget *label_linespc; GtkObject *spinbtn_linespc_adj; @@ -1766,6 +1771,9 @@ static void prefs_message_create(void) PACK_CHECK_BUTTON(vbox2, chkbtn_html, _("Render HTML messages as text")); + PACK_CHECK_BUTTON(vbox2, chkbtn_cursor, + _("Display cursor in message view")); + PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2); hbox1 = gtk_hbox_new (FALSE, 32); @@ -1852,6 +1860,7 @@ static void prefs_message_create(void) message.chkbtn_disphdrpane = chkbtn_disphdrpane; message.chkbtn_disphdr = chkbtn_disphdr; message.chkbtn_html = chkbtn_html; + message.chkbtn_cursor = chkbtn_cursor; message.spinbtn_linespc = spinbtn_linespc; message.chkbtn_smoothscroll = chkbtn_smoothscroll; diff --git a/src/prefs_common.h b/src/prefs_common.h index 58aa71cd..e0e53aa9 100644 --- a/src/prefs_common.h +++ b/src/prefs_common.h @@ -166,6 +166,7 @@ struct _PrefsCommon gboolean display_header; gint line_space; gboolean render_html; + gboolean textview_cursor_visible; gboolean enable_smooth_scroll; gint scroll_step; gboolean scroll_halfpage; diff --git a/src/textview.c b/src/textview.c index 2b2734a9..55713019 100644 --- a/src/textview.c +++ b/src/textview.c @@ -355,7 +355,7 @@ void textview_init(TextView *textview) if (!regular_cursor) regular_cursor = gdk_cursor_new(GDK_XTERM); - textview_update_message_colors(); + textview_reflect_prefs(textview); textview_set_all_headers(textview, FALSE); textview_set_font(textview, NULL); textview_create_tags(GTK_TEXT_VIEW(textview->text), textview); @@ -381,6 +381,13 @@ void textview_update_message_colors(void) } } +void textview_reflect_prefs(TextView *textview) +{ + textview_update_message_colors(); + gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(textview->text), + prefs_common.textview_cursor_visible); +} + void textview_show_message(TextView *textview, MimeInfo *mimeinfo, const gchar *file) { diff --git a/src/textview.h b/src/textview.h index 0a017aec..df4a20fc 100644 --- a/src/textview.h +++ b/src/textview.h @@ -49,8 +49,11 @@ struct _TextView MessageView *messageview; }; -TextView *textview_create (void); -void textview_init (TextView *textview); +TextView *textview_create (void); +void textview_init (TextView *textview); +void textview_update_message_colors (void); +void textview_reflect_prefs (TextView *textview); + void textview_show_message (TextView *textview, MimeInfo *mimeinfo, const gchar *file); @@ -74,8 +77,6 @@ void textview_scroll_one_line (TextView *textview, gboolean textview_scroll_page (TextView *textview, gboolean up); -void textview_update_message_colors (void); - gboolean textview_search_string (TextView *textview, const gchar *str, gboolean case_sens); |