2005-12-15 [cleroy] 1.9.100cvs92
authorColin Leroy <colin@colino.net>
Thu, 15 Dec 2005 07:43:47 +0000 (07:43 +0000)
committerColin Leroy <colin@colino.net>
Thu, 15 Dec 2005 07:43:47 +0000 (07:43 +0000)
* src/compose.c
Further fix bug #875

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 8a62e0cf555857fe395063dbeea76974a7813a82..97be02df6c6f449267de48d41e877548f2fffc0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-15 [cleroy]    1.9.100cvs92
+
+       * src/compose.c
+               Further fix bug #875
+
 2005-12-15 [paul]      1.9.100cvs91
 
        * src/gtk/filesel.c
 2005-12-15 [paul]      1.9.100cvs91
 
        * src/gtk/filesel.c
index 66b8cd591574361b2637302163acfd25f43a4466..818cdafa6ecf5e7fe7fb1adacfc23d1c5080b9c9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.205 -r 1.382.2.206 src/compose.c;  cvs diff -u -r 1.179.2.84 -r 1.179.2.85 src/imap.c;  cvs diff -u -r 1.52.2.16 -r 1.52.2.17 src/prefs_folder_item.c;  cvs diff -u -r 1.395.2.151 -r 1.395.2.152 src/summaryview.c;  cvs diff -u -r 1.9.2.33 -r 1.9.2.34 src/gtk/gtkaspell.c;  ) > 1.9.100cvs89.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 manual/ack.xml;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 manual/keyboard.xml;  cvs diff -u -r 1.60.2.20 -r 1.60.2.21 po/es.po;  ) > 1.9.100cvs90.patchset
 ( cvs diff -u -r 1.2.2.18 -r 1.2.2.19 src/gtk/filesel.c;  ) > 1.9.100cvs91.patchset
 ( cvs diff -u -r 1.382.2.205 -r 1.382.2.206 src/compose.c;  cvs diff -u -r 1.179.2.84 -r 1.179.2.85 src/imap.c;  cvs diff -u -r 1.52.2.16 -r 1.52.2.17 src/prefs_folder_item.c;  cvs diff -u -r 1.395.2.151 -r 1.395.2.152 src/summaryview.c;  cvs diff -u -r 1.9.2.33 -r 1.9.2.34 src/gtk/gtkaspell.c;  ) > 1.9.100cvs89.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 manual/ack.xml;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 manual/keyboard.xml;  cvs diff -u -r 1.60.2.20 -r 1.60.2.21 po/es.po;  ) > 1.9.100cvs90.patchset
 ( cvs diff -u -r 1.2.2.18 -r 1.2.2.19 src/gtk/filesel.c;  ) > 1.9.100cvs91.patchset
+( cvs diff -u -r 1.382.2.206 -r 1.382.2.207 src/compose.c;  ) > 1.9.100cvs92.patchset
index ea750c9b9192400a3170d658ef0d7ba93f39aba8..912f4cc18d813c8ca8f8e8e0d51ad0d13fa3dee7 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=91
+EXTRA_VERSION=92
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1fb7e1c94f36264a6ff12ce3136d6264730540b7..77614a50a410e66f9e0a2d3c798e4c3aa7531768 100644 (file)
@@ -1114,6 +1114,24 @@ static void compose_extract_original_charset(Compose *compose)
        }
 }
 
        }
 }
 
+#define SIGNAL_BLOCK(buffer) {                                 \
+       g_signal_handlers_block_by_func(G_OBJECT(buffer),       \
+                               G_CALLBACK(compose_changed_cb), \
+                               compose);                       \
+       g_signal_handlers_block_by_func(G_OBJECT(buffer),       \
+                               G_CALLBACK(text_inserted),      \
+                               compose);                       \
+}
+
+#define SIGNAL_UNBLOCK(buffer) {                               \
+       g_signal_handlers_unblock_by_func(G_OBJECT(buffer),     \
+                               G_CALLBACK(compose_changed_cb), \
+                               compose);                       \
+       g_signal_handlers_unblock_by_func(G_OBJECT(buffer),     \
+                               G_CALLBACK(text_inserted),      \
+                               compose);                       \
+}
+
 static Compose *compose_generic_reply(MsgInfo *msginfo, gboolean quote,
                                  gboolean to_all, gboolean to_ml,
                                  gboolean to_sender,
 static Compose *compose_generic_reply(MsgInfo *msginfo, gboolean quote,
                                  gboolean to_all, gboolean to_ml,
                                  gboolean to_sender,
@@ -1206,11 +1224,15 @@ static Compose *compose_generic_reply(MsgInfo *msginfo, gboolean quote,
                compose_force_encryption(compose, account, FALSE);
        }
 
                compose_force_encryption(compose, account, FALSE);
        }
 
+       SIGNAL_BLOCK(textbuf);
+       
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
        compose_wrap_all(compose);
 
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
        compose_wrap_all(compose);
 
+       SIGNAL_UNBLOCK(textbuf);
+       
        gtk_widget_grab_focus(compose->text);
 
        undo_unblock(compose->undostruct);
        gtk_widget_grab_focus(compose->text);
 
        undo_unblock(compose->undostruct);
@@ -1307,11 +1329,15 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
                procmsg_msginfo_free(full_msginfo);
        }
 
                procmsg_msginfo_free(full_msginfo);
        }
 
+       SIGNAL_BLOCK(textbuf);
+
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
        compose_wrap_all(compose);
 
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
        compose_wrap_all(compose);
 
+       SIGNAL_UNBLOCK(textbuf);
+       
        gtk_text_buffer_get_start_iter(textbuf, &iter);
        gtk_text_buffer_place_cursor(textbuf, &iter);
 
        gtk_text_buffer_get_start_iter(textbuf, &iter);
        gtk_text_buffer_place_cursor(textbuf, &iter);
 
@@ -1408,11 +1434,15 @@ Compose *compose_forward_multiple(PrefsAccount *account, GSList *msginfo_list)
                        _("Fw: multiple emails"));
        }
 
                        _("Fw: multiple emails"));
        }
 
+       SIGNAL_BLOCK(textbuf);
+       
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
        compose_wrap_all(compose);
 
        if (account->auto_sig)
                compose_insert_sig(compose, FALSE);
 
        compose_wrap_all(compose);
 
+       SIGNAL_UNBLOCK(textbuf);
+       
        gtk_text_buffer_get_start_iter(textbuf, &iter);
        gtk_text_buffer_place_cursor(textbuf, &iter);
 
        gtk_text_buffer_get_start_iter(textbuf, &iter);
        gtk_text_buffer_place_cursor(textbuf, &iter);
 
@@ -2121,12 +2151,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        GtkTextMark *mark;
        
 
        GtkTextMark *mark;
        
 
-       g_signal_handlers_block_by_func(G_OBJECT(buffer),
-                               G_CALLBACK(compose_changed_cb),
-                               compose);
-       g_signal_handlers_block_by_func(G_OBJECT(buffer),
-                               G_CALLBACK(text_inserted),
-                               compose);
+       SIGNAL_BLOCK(buffer);
 
        if (!msginfo)
                msginfo = &dummyinfo;
 
        if (!msginfo)
                msginfo = &dummyinfo;
@@ -2199,12 +2224,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
 error:
        buf = NULL;
 ok:
 error:
        buf = NULL;
 ok:
-       g_signal_handlers_unblock_by_func(G_OBJECT(buffer),
-                               G_CALLBACK(compose_changed_cb),
-                               compose);
-       g_signal_handlers_unblock_by_func(G_OBJECT(buffer),
-                               G_CALLBACK(text_inserted),
-                               compose);
+       SIGNAL_UNBLOCK(buffer);
 
 
        return buf;
 
 
        return buf;