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 8a62e0c..97be02d 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
index 66b8cd5..818cdaf 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.206 -r 1.382.2.207 src/compose.c;  ) > 1.9.100cvs92.patchset
index ea750c9..912f4cc 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=91
+EXTRA_VERSION=92
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1fb7e1c..77614a5 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,
@@ -1206,11 +1224,15 @@ static Compose *compose_generic_reply(MsgInfo *msginfo, gboolean quote,
                compose_force_encryption(compose, account, FALSE);
        }
 
+       SIGNAL_BLOCK(textbuf);
+       
        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);
@@ -1307,11 +1329,15 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
                procmsg_msginfo_free(full_msginfo);
        }
 
+       SIGNAL_BLOCK(textbuf);
+
        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);
 
@@ -1408,11 +1434,15 @@ Compose *compose_forward_multiple(PrefsAccount *account, GSList *msginfo_list)
                        _("Fw: multiple emails"));
        }
 
+       SIGNAL_BLOCK(textbuf);
+       
        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);
 
@@ -2121,12 +2151,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        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;
@@ -2199,12 +2224,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
 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;