2007-09-16 [colin] 3.0.0cvs7-stable
authorColin Leroy <colin@colino.net>
Sun, 16 Sep 2007 18:25:20 +0000 (18:25 +0000)
committerColin Leroy <colin@colino.net>
Sun, 16 Sep 2007 18:25:20 +0000 (18:25 +0000)
* src/compose.c
From 3.0.0cvs13
Fix scrolling to cursor

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 83f9f4fccf55a820c9513dcad6352855effb2c4f..5642490bc6469b397c2b7c72e280b18b26e28cd8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-16 [colin]     3.0.0cvs7-stable
+
+       * src/compose.c
+               From 3.0.0cvs13
+               Fix scrolling to cursor
+
 2007-09-16 [colin]     3.0.0cvs6-stable
 
        * src/folder.c
index b8e4d940725a46a5ba6e181b2a182e8f7aa95fdd..4a12b4b2373ef804fb5890b1b0a7c4951a66fe47 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.149.2.80.2.1 -r 1.149.2.80.2.2 src/inc.c;  ) > 3.0.0cvs4-stable.patchset
 ( cvs diff -u -r 1.10.2.34 -r 1.10.2.35 src/prefs_gtk.c;  ) > 3.0.0cvs5-stable.patchset
 ( cvs diff -u -r 1.213.2.158.2.1 -r 1.213.2.158.2.2 src/folder.c;  ) > 3.0.0cvs6-stable.patchset
+( cvs diff -u -r 1.382.2.406 -r 1.382.2.407 src/compose.c;  ) > 3.0.0cvs7-stable.patchset
index bf5e18319494e5dd8b5e30e172dd40b8140bdeac..2ace89dea89bde382dc11bf927d9ceb8e499f124 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=6
+EXTRA_VERSION=7
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=-stable
 
index 3cb9886f421d2274b62d4be4fab5a8140c301163..a9840e6c6c5f3c68024f082aeb1e8063c0616c54 100644 (file)
@@ -975,6 +975,15 @@ Compose *compose_new_with_list( PrefsAccount *account, GList *listAddress )
        return compose_generic_new( account, NULL, NULL, NULL, listAddress );
 }
 
+#define SCROLL_TO_CURSOR(compose) {                            \
+       GtkTextMark *cmark = gtk_text_buffer_get_insert(        \
+               gtk_text_view_get_buffer(                       \
+                       GTK_TEXT_VIEW(compose->text)));         \
+       gtk_text_view_scroll_mark_onscreen(                     \
+               GTK_TEXT_VIEW(compose->text),                   \
+               cmark);                                         \
+}
+
 Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderItem *item,
                             GPtrArray *attach_files, GList *listAddress )
 {
@@ -1145,6 +1154,8 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
                compose_exec_ext_editor(compose);
 
        compose->draft_timeout_tag = -1;
+       SCROLL_TO_CURSOR(compose);
+
        compose->modified = FALSE;
        compose_set_title(compose);
         return compose;
@@ -1510,7 +1521,8 @@ static Compose *compose_generic_reply(MsgInfo *msginfo,
 
        compose->updating = FALSE;
        compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
-
+       SCROLL_TO_CURSOR(compose);
+       
        if (compose->deferred_destroy) {
                compose_destroy(compose);
                return NULL;
@@ -1656,6 +1668,7 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
 
        compose->updating = FALSE;
        compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
+       SCROLL_TO_CURSOR(compose);
 
        if (compose->deferred_destroy) {
                compose_destroy(compose);
@@ -1758,6 +1771,7 @@ static Compose *compose_forward_multiple(PrefsAccount *account, GSList *msginfo_
 
        compose->updating = FALSE;
        compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
+       SCROLL_TO_CURSOR(compose);
 
        if (compose->deferred_destroy) {
                compose_destroy(compose);
@@ -2073,6 +2087,7 @@ Compose *compose_reedit(MsgInfo *msginfo, gboolean batch)
 
        compose->updating = FALSE;
        compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
+       SCROLL_TO_CURSOR(compose);
 
        if (compose->deferred_destroy) {
                compose_destroy(compose);
@@ -2182,6 +2197,7 @@ Compose *compose_redirect(PrefsAccount *account, MsgInfo *msginfo,
        compose_set_title(compose);
        compose->updating = FALSE;
        compose->draft_timeout_tag = -1; /* desinhibit auto-drafting after loading */
+       SCROLL_TO_CURSOR(compose);
 
        if (compose->deferred_destroy) {
                compose_destroy(compose);