2011-07-05 [paul] 3.7.9cvs31
authorPaul Mangan <paul@claws-mail.org>
Tue, 5 Jul 2011 08:57:34 +0000 (08:57 +0000)
committerPaul Mangan <paul@claws-mail.org>
Tue, 5 Jul 2011 08:57:34 +0000 (08:57 +0000)
* src/compose.c
when using a Compose template, only place the cursor
in the body when the cursor symbol, %cursor (%X), is used

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index a4fb11525a136be3edb2daf5decd129483d5fd15..191b7f6d88218afa80a6607ca33bb42ce816c8f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-05 [paul]      3.7.9cvs31
+
+       * src/compose.c
+               when using a Compose template, only place the cursor
+               in the body when the cursor symbol, %cursor (%X), is used
+
 2011-07-03 [paul]      3.7.9cvs30
 
        * src/main.c
 2011-07-03 [paul]      3.7.9cvs30
 
        * src/main.c
index 0d9ff63d1493cb263d52bc787a16fa89bacadff6..85f73024b3589b4c23c6da806b8b8bee27b48272 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.274.2.325 -r 1.274.2.326 src/mainwindow.c;  cvs diff -u -r 1.39.2.60 -r 1.39.2.61 src/mainwindow.h;  cvs diff -u -r 1.395.2.428 -r 1.395.2.429 src/summaryview.c;  ) > 3.7.9cvs28.patchset
 ( cvs diff -u -r 1.1.2.83 -r 1.1.2.84 src/wizard.c;  ) > 3.7.9cvs29.patchset
 ( cvs diff -u -r 1.115.2.238 -r 1.115.2.239 src/main.c;  ) > 3.7.9cvs30.patchset
 ( cvs diff -u -r 1.274.2.325 -r 1.274.2.326 src/mainwindow.c;  cvs diff -u -r 1.39.2.60 -r 1.39.2.61 src/mainwindow.h;  cvs diff -u -r 1.395.2.428 -r 1.395.2.429 src/summaryview.c;  ) > 3.7.9cvs28.patchset
 ( cvs diff -u -r 1.1.2.83 -r 1.1.2.84 src/wizard.c;  ) > 3.7.9cvs29.patchset
 ( cvs diff -u -r 1.115.2.238 -r 1.115.2.239 src/main.c;  ) > 3.7.9cvs30.patchset
+( cvs diff -u -r 1.382.2.576 -r 1.382.2.577 src/compose.c;  ) > 3.7.9cvs31.patchset
index 37c4f6a22c14fe3cb4c3d0ac531ef040ef41f725..f081ba2221733db7faece1bd3f142c666a8f15fe 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=9
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=9
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=30
+EXTRA_VERSION=31
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 7ae586d402125dc37e3a27e7106f04b381760f86..8f27aa95d99f3ffb9b74939f152d9c3c78dfef5b 100644 (file)
@@ -947,6 +947,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
        gchar *mailto_from = NULL;
        PrefsAccount *mailto_account = NULL;
        MsgInfo* dummyinfo = NULL;
        gchar *mailto_from = NULL;
        PrefsAccount *mailto_account = NULL;
        MsgInfo* dummyinfo = NULL;
+       gint cursor_pos = -1;
        MailField mfield = NO_FIELD_PRESENT;
        gchar* buf;
        GtkTextMark *mark;
        MailField mfield = NO_FIELD_PRESENT;
        gchar* buf;
        GtkTextMark *mark;
@@ -1197,7 +1198,11 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
                     * is therefore created before placing the cursor
                     */
                case BODY_FIELD_PRESENT:
                     * is therefore created before placing the cursor
                     */
                case BODY_FIELD_PRESENT:
-                       gtk_widget_grab_focus(compose->text);
+                       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);
                        break;
        }
 
                        break;
        }
 
@@ -1212,7 +1217,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
        compose->modified = FALSE;
        compose_set_title(compose);
 
        compose->modified = FALSE;
        compose_set_title(compose);
 
-  hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
+       hooks_invoke(COMPOSE_CREATED_HOOKLIST, compose);
 
         return compose;
 }
 
         return compose;
 }