talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit a745da2c4d67d43b63be20c7f72313db38bcd5d5
parent 41930f37f75182d6c61c27f1cdf1f7dea6845b5a
Author: Paul Mangan <paul@claws-mail.org>
Date:   Sat,  6 Aug 2011 07:17:08 +0000

2011-08-06 [paul]	3.7.9cvs42

	* src/compose.c
		fix cursor placement in Forward template

Diffstat:
MChangeLog | 5+++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/compose.c | 11++++++-----
4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-06 [paul] 3.7.9cvs42 + + * src/compose.c + fix cursor placement in Forward template + 2011-08-06 [paul] 3.7.9cvs41 * src/gtk/description_window.c diff --git a/PATCHSETS b/PATCHSETS @@ -4193,3 +4193,4 @@ ( cvs diff -u -r 1.274.2.326 -r 1.274.2.327 src/mainwindow.c; cvs diff -u -r 1.94.2.216 -r 1.94.2.217 src/messageview.c; cvs diff -u -r 1.43.2.123 -r 1.43.2.124 src/toolbar.c; ) > 3.7.9cvs39.patchset ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 claws-mail.desktop; ) > 3.7.9cvs40.patchset ( cvs diff -u -r 1.5.2.30 -r 1.5.2.31 src/gtk/description_window.c; ) > 3.7.9cvs41.patchset +( cvs diff -u -r 1.382.2.577 -r 1.382.2.578 src/compose.c; ) > 3.7.9cvs42.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=9 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=41 +EXTRA_VERSION=42 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c @@ -1679,7 +1679,7 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo, Compose *compose; GtkTextView *textview; GtkTextBuffer *textbuf; - GtkTextIter iter; + gint cursor_pos = -1; ComposeMode mode; cm_return_val_if_fail(msginfo != NULL, NULL); @@ -1833,10 +1833,11 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo, SIGNAL_UNBLOCK(textbuf); - gtk_text_buffer_get_start_iter(textbuf, &iter); - gtk_text_buffer_place_cursor(textbuf, &iter); - - gtk_widget_grab_focus(compose->header_last->entry); + cursor_pos = quote_fmt_get_cursor_pos(); + if (cursor_pos == -1) + gtk_widget_grab_focus(compose->header_last->entry); + else + gtk_widget_grab_focus(compose->text); if (!no_extedit && prefs_common.auto_exteditor) compose_exec_ext_editor(compose);