2005-12-28 [wwp] 1.9.100cvs110
[claws.git] / src / compose.c
index 24e652546b3d97b70a8b2e2e6132ea23c9841959..0b0425993900e0d2193e4f0049ee1d7b47b1afd7 100644 (file)
@@ -72,7 +72,9 @@
 #endif
 #include <signal.h>
 #include <errno.h>
+#ifndef G_OS_WIN32  /* fixme we should have a configure test. */
 #include <libgen.h>
+#endif
 
 #if (HAVE_WCTYPE_H && HAVE_WCHAR_H)
 #  include <wchar.h>
@@ -3292,6 +3294,7 @@ static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter,
        }
 
        /* go until paragraph end (empty line) */
+       
        while (!gtk_text_iter_ends_line(&iter)) {
                gchar *scanpos = NULL;
                /* parse table - in order of priority */
@@ -3326,6 +3329,11 @@ static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter,
                gchar *o_walk = NULL, *walk = NULL, *bp = NULL, *ep = NULL;
                gint walk_pos;
                
+               if (!prev_autowrap)
+                       g_signal_handlers_block_by_func(G_OBJECT(buffer),
+                                       G_CALLBACK(text_inserted),
+                                       compose);
+               
                if (gtk_text_iter_has_tag(&iter, compose->no_wrap_tag) && !force)
                        goto colorize;
 
@@ -3400,6 +3408,10 @@ static void compose_beautify_paragraph(Compose *compose, GtkTextIter *par_iter,
                }
 
 colorize:
+               if (!prev_autowrap)
+                       g_signal_handlers_unblock_by_func(G_OBJECT(buffer),
+                                       G_CALLBACK(text_inserted),
+                                       compose);
                end_of_line = iter;
                while (!gtk_text_iter_ends_line(&end_of_line)) {
                        gtk_text_iter_forward_char(&end_of_line);
@@ -3764,6 +3776,7 @@ gint compose_send(Compose *compose)
                                   "the main window to retry."));
                if (prefs_common.send_dialog_mode == SEND_DIALOG_ALWAYS) {
                        compose->sending = FALSE;
+                       compose->modified = TRUE; 
                        compose_allow_user_actions (compose, TRUE);
                }
                return 0;
@@ -3793,6 +3806,7 @@ gint compose_send(Compose *compose)
                                   "the main window to retry."));
                if (prefs_common.send_dialog_mode == SEND_DIALOG_ALWAYS) {
                        compose_allow_user_actions (compose, TRUE);
+                       compose->modified = TRUE; 
                        compose->sending = FALSE;               
                }
                return -1;
@@ -3803,6 +3817,7 @@ gint compose_send(Compose *compose)
 bail:
        compose_allow_user_actions (compose, TRUE);
        compose->sending = FALSE;
+       compose->modified = TRUE; 
 
        return -1;
 }