2005-06-15 [colin] 1.9.11cvs68
authorColin Leroy <colin@colino.net>
Wed, 15 Jun 2005 03:03:47 +0000 (03:03 +0000)
committerColin Leroy <colin@colino.net>
Wed, 15 Jun 2005 03:03:47 +0000 (03:03 +0000)
* src/compose.c
Fix bug #421 (Fix undo on wrapping)

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

index eb80569a5414299fc0403877ff13272570ae518e..29af10355b3229c4bc01193165e46c8c575de9b2 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-15 [colin]     1.9.11cvs68
+
+       * src/compose.c
+               Fix bug #421 (Fix undo on wrapping)
+
 2005-06-15 [colin]     1.9.11cvs67
 
        * src/folder.c
index 662314d80e59689522969e465f1932122e30da0a..43b79e240444cab6d70758d925ea2290d80365ac 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.179.2.31 -r 1.179.2.32 src/imap.c;  ) > 1.9.11cvs65.patchset
 ( cvs diff -u -r 1.61.2.26 -r 1.61.2.27 src/account.c;  cvs diff -u -r 1.149.2.25 -r 1.149.2.26 src/inc.c;  cvs diff -u -r 1.17.2.12 -r 1.17.2.13 src/send_message.c;  cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/gtk/progressdialog.c;  cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/gtk/progressdialog.h;  ) > 1.9.11cvs66.patchset
 ( cvs diff -u -r 1.213.2.33 -r 1.213.2.34 src/folder.c;  cvs diff -u -r 1.179.2.32 -r 1.179.2.33 src/imap.c;  ) > 1.9.11cvs67.patchset
+( cvs diff -u -r 1.382.2.130 -r 1.382.2.131 src/compose.c;  ) > 1.9.11cvs68.patchset
index 8060a18fbdce47640fb45cdceab3055c224a299d..c790ba6f4c95790908110f58daca468c0e4274a7 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=67
+EXTRA_VERSION=68
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index fe5a0f309082a72c4c4036a58e52f3a323c7c851..30c214f132679c375369f4e798885fcab731d4ac 100644 (file)
@@ -903,31 +903,6 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
         return compose;
 }
 
-/*
-Compose *compose_new_followup_and_replyto(PrefsAccount *account,
-                                          const gchar *followupto, gchar * to)
-{
-       Compose *compose;
-
-       if (!account) account = cur_account;
-       g_return_val_if_fail(account != NULL, NULL);
-       g_return_val_if_fail(account->protocol != A_NNTP, NULL);
-
-       compose = compose_create(account, COMPOSE_NEW);
-
-       if (prefs_common.auto_sig)
-               compose_insert_sig(compose);
-       gtk_editable_set_position(GTK_EDITABLE(compose->text), 0);
-       gtk_stext_set_point(GTK_STEXT(compose->text), 0);
-
-       compose_entry_append(compose, to, COMPOSE_TO);
-       compose_entry_append(compose, followupto, COMPOSE_NEWSGROUPS);
-       gtk_widget_grab_focus(compose->subject_entry);
-
-       return compose;
-}
-*/
-
 void compose_reply_mode(ComposeMode mode, GSList *msginfo_list, gchar *body)
 {
        MsgInfo *msginfo;
@@ -2240,7 +2215,7 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
        g_signal_handlers_unblock_by_func(G_OBJECT(buffer),
                                        G_CALLBACK(compose_changed_cb),
                                        compose);
-       
+               
        compose->autowrap = prev_autowrap;
        if (compose->autowrap)
                compose_wrap_all(compose);
@@ -2939,6 +2914,8 @@ static void compose_wrap_paragraph(Compose *compose, GtkTextIter *par_iter)
 
        buffer = gtk_text_view_get_buffer(text);
 
+       undo_block(compose->undostruct);
+       
        if (par_iter) {
                iter = *par_iter;
        } else {
@@ -3021,6 +2998,7 @@ static void compose_wrap_paragraph(Compose *compose, GtkTextIter *par_iter)
        if (par_iter)
                *par_iter = iter;
 
+       undo_unblock(compose->undostruct);
        compose->autowrap = prev_autowrap;
 }
 
@@ -3037,9 +3015,13 @@ static void compose_wrap_all_full(Compose *compose, gboolean autowrap)
 
        buffer = gtk_text_view_get_buffer(text);
 
+       undo_block(compose->undostruct);
+
        gtk_text_buffer_get_start_iter(buffer, &iter);
        while (!gtk_text_iter_is_end(&iter))
                compose_wrap_paragraph(compose, &iter);
+
+       undo_unblock(compose->undostruct);
 }
 
 static void compose_set_title(Compose *compose)