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

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 512e3b43058e8127c3a2cf8340aa933a0eaa3b02..91aa6f3ae0ad0e21103de284bcbb3de89d0b7705 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-16 [colin]     3.0.0cvs13
+
+       * src/compose.c
+               Fix scrolling to cursor
+
 2007-09-16 [paul]      3.0.0cvs12
 
        * po/sr.po
index 7678e42031e78456477444204bd82d9d2fa1c886..6a58279421728c73876144507fe90c3292347a87 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/prefs_folder_column.c;  cvs diff -u -r 1.10.2.19 -r 1.10.2.20 src/prefs_summary_column.c;  ) > 3.0.0cvs10.patchset
 ( cvs diff -u -r 1.213.2.159 -r 1.213.2.160 src/folder.c;  ) > 3.0.0cvs11.patchset
 ( cvs diff -u -r 1.17.2.27 -r 1.17.2.28 po/sr.po;  ) > 3.0.0cvs12.patchset
+( cvs diff -u -r 1.382.2.407 -r 1.382.2.408 src/compose.c;  ) > 3.0.0cvs13.patchset
index 23edf0bb086275ce18389be729c4d992016b5578..a897e855b7d34b63169d9e27bfed0cb70d003e93 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=12
+EXTRA_VERSION=13
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1d981130b0a26c43b61dad9cb026afb017bbd1ca..1c55908b4ac8248619135e4b3f48ceb019f5bce3 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);