2005-10-30 [colin] 1.9.15cvs127
authorColin Leroy <colin@colino.net>
Sun, 30 Oct 2005 18:25:01 +0000 (18:25 +0000)
committerColin Leroy <colin@colino.net>
Sun, 30 Oct 2005 18:25:01 +0000 (18:25 +0000)
* src/compose.c
Place cursor before rewrapping (fixes cursor
pos if quotation gets rewrapped)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/compose.c

index 3ceb399d970c99543432ba192a16d02f7df718ce..cb6b7d8683037febb96a5008cd9da24aaa2c1dcc 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-30 [colin]     1.9.15cvs127
+
+       * src/compose.c
+               Place cursor before rewrapping (fixes cursor
+               pos if quotation gets rewrapped)
+
 2005-10-29 [paul]      1.9.15cvs126
 
        * src/crash.c
 2005-10-29 [paul]      1.9.15cvs126
 
        * src/crash.c
index 0efab9f507e48599474e1cca02a01777da336904..a47a50e1eb7e1f6c8f0dbac8cf2e95ef4314b5cf 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.144 -r 1.395.2.145 src/summaryview.c;  ) > 1.9.15cvs124.patchset
 ( cvs diff -u -r 1.94.2.67 -r 1.94.2.68 src/messageview.c;  ) > 1.9.15cvs125.patchset
 ( cvs diff -u -r 1.23.2.15 -r 1.23.2.16 src/crash.c;  cvs diff -u -r 1.26.2.20 -r 1.26.2.21 src/foldersel.c;  cvs diff -u -r 1.115.2.64 -r 1.115.2.65 src/main.c;  cvs diff -u -r 1.94.2.68 -r 1.94.2.69 src/messageview.c;  cvs diff -u -r 1.43.2.32 -r 1.43.2.33 src/toolbar.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/gtk/authors.h;  ) > 1.9.15cvs126.patchset
 ( cvs diff -u -r 1.395.2.144 -r 1.395.2.145 src/summaryview.c;  ) > 1.9.15cvs124.patchset
 ( cvs diff -u -r 1.94.2.67 -r 1.94.2.68 src/messageview.c;  ) > 1.9.15cvs125.patchset
 ( cvs diff -u -r 1.23.2.15 -r 1.23.2.16 src/crash.c;  cvs diff -u -r 1.26.2.20 -r 1.26.2.21 src/foldersel.c;  cvs diff -u -r 1.115.2.64 -r 1.115.2.65 src/main.c;  cvs diff -u -r 1.94.2.68 -r 1.94.2.69 src/messageview.c;  cvs diff -u -r 1.43.2.32 -r 1.43.2.33 src/toolbar.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/gtk/authors.h;  ) > 1.9.15cvs126.patchset
+( cvs diff -u -r 1.382.2.190 -r 1.382.2.191 src/compose.c;  ) > 1.9.15cvs127.patchset
index f0beb8fa93ab7c58be7f6b940c0867cd53a7c086..c827bdbbb28ed339dc2e746fee2f121019a8e1c8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=126
+EXTRA_VERSION=127
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 31f7eb28fce3be5dd54649ba55de2f50ddfd85d1..57b00475f9ac7ab36c0aa66d41fb075cb3b2ae44 100644 (file)
@@ -1125,8 +1125,6 @@ static Compose *compose_generic_reply(MsgInfo *msginfo, gboolean quote,
        PrefsAccount *reply_account;
        GtkTextView *textview;
        GtkTextBuffer *textbuf;
        PrefsAccount *reply_account;
        GtkTextView *textview;
        GtkTextBuffer *textbuf;
-       GtkTextIter iter;
-       int cursor_pos;
 
        g_return_val_if_fail(msginfo != NULL, NULL);
        g_return_val_if_fail(msginfo->folder != NULL, NULL);
 
        g_return_val_if_fail(msginfo != NULL, NULL);
        g_return_val_if_fail(msginfo->folder != NULL, NULL);
@@ -1210,11 +1208,6 @@ static Compose *compose_generic_reply(MsgInfo *msginfo, gboolean quote,
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
-       cursor_pos = quote_fmt_get_cursor_pos();
-       gtk_text_buffer_get_start_iter(textbuf, &iter);
-       gtk_text_buffer_get_iter_at_offset(textbuf, &iter, cursor_pos);
-       gtk_text_buffer_place_cursor(textbuf, &iter);
-       
        compose_wrap_all(compose);
 
        gtk_widget_grab_focus(compose->text);
        compose_wrap_all(compose);
 
        gtk_widget_grab_focus(compose->text);
@@ -2105,8 +2098,10 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        gint len;
        gboolean prev_autowrap;
        const gchar *trimmed_body = body;
        gint len;
        gboolean prev_autowrap;
        const gchar *trimmed_body = body;
+       gint cursor_pos = 0;
        GtkTextView *text = GTK_TEXT_VIEW(compose->text);
        GtkTextBuffer *buffer = gtk_text_view_get_buffer(text);
        GtkTextView *text = GTK_TEXT_VIEW(compose->text);
        GtkTextBuffer *buffer = gtk_text_view_get_buffer(text);
+       GtkTextIter iter;
        
        if (!msginfo)
                msginfo = &dummyinfo;
        
        if (!msginfo)
                msginfo = &dummyinfo;
@@ -2151,8 +2146,6 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
                                compose);
        for (p = buf; *p != '\0'; ) {
                GtkTextMark *mark;
                                compose);
        for (p = buf; *p != '\0'; ) {
                GtkTextMark *mark;
-               GtkTextIter iter;
-
                
                mark = gtk_text_buffer_get_insert(buffer);
                gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
                
                mark = gtk_text_buffer_get_insert(buffer);
                gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
@@ -2180,6 +2173,12 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
                        break;
        }
 
                        break;
        }
 
+       cursor_pos = quote_fmt_get_cursor_pos();
+       gtk_text_buffer_get_start_iter(buffer, &iter);
+       gtk_text_buffer_get_iter_at_offset(buffer, &iter, cursor_pos);
+       gtk_text_buffer_place_cursor(buffer, &iter);
+       
+
        compose->autowrap = prev_autowrap;
        if (compose->autowrap)
                compose_wrap_all(compose);
        compose->autowrap = prev_autowrap;
        if (compose->autowrap)
                compose_wrap_all(compose);