2005-12-14 [cleroy] 1.9.100cvs88
authorColin Leroy <colin@colino.net>
Wed, 14 Dec 2005 07:49:10 +0000 (07:49 +0000)
committerColin Leroy <colin@colino.net>
Wed, 14 Dec 2005 07:49:10 +0000 (07:49 +0000)
* src/compose.c
Fix bug #875 (Freeze On Inline Forward of
Large Message)

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 7327e8b..edbad3f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-12-14 [cleroy]    1.9.100cvs88
+
+       * src/compose.c
+               Fix bug #875 (Freeze On Inline Forward of 
+               Large Message)
+
 2005-12-13 [colin]     1.9.100cvs87
 
        * src/compose.c
index f545b67..758849f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.75.2.14 -r 1.75.2.15 src/matcher.c;  ) > 1.9.100cvs85.patchset
 ( cvs diff -u -r 1.179.2.83 -r 1.179.2.84 src/imap.c;  cvs diff -u -r 1.101.2.18 -r 1.101.2.19 src/news.c;  cvs diff -u -r 1.13.2.10 -r 1.13.2.11 src/common/plugin.c;  cvs diff -u -r 1.1.4.25 -r 1.1.4.26 src/etpan/imap-thread.c;  ) > 1.9.100cvs86.patchset
 ( cvs diff -u -r 1.382.2.203 -r 1.382.2.204 src/compose.c;  ) > 1.9.100cvs87.patchset
+( cvs diff -u -r 1.382.2.204 -r 1.382.2.205 src/compose.c;  ) > 1.9.100cvs88.patchset
index 96497f8..506eb7e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=87
+EXTRA_VERSION=88
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 60e850e..9d8d960 100644 (file)
@@ -2120,6 +2120,14 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        GtkTextIter iter;
        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);
+
        if (!msginfo)
                msginfo = &dummyinfo;
 
@@ -2132,7 +2140,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
                if (buf == NULL)
                        alertpanel_error(_("Quote mark format error."));
                else
-                       Xstrdup_a(quote_str, buf, return NULL)
+                       Xstrdup_a(quote_str, buf, goto error)
        }
 
        if (fmt && *fmt != '\0') {
@@ -2147,7 +2155,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
                buf = quote_fmt_get_buffer();
                if (buf == NULL) {
                        alertpanel_error(_("Message reply/forward format error."));
-                       return NULL;
+                       goto error;
                }
        } else
                buf = "";
@@ -2155,13 +2163,6 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        prev_autowrap = compose->autowrap;
        compose->autowrap = FALSE;
 
-       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);
-
        mark = gtk_text_buffer_get_insert(buffer);
        gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
        if (g_utf8_validate(buf, -1, NULL)) { 
@@ -2193,6 +2194,11 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        if (compose->autowrap && rewrap)
                compose_wrap_all(compose);
 
+       goto ok;
+
+error:
+       buf = NULL;
+ok:
        g_signal_handlers_unblock_by_func(G_OBJECT(buffer),
                                G_CALLBACK(compose_changed_cb),
                                compose);