2009-12-03 [pawel] 3.7.3cvs30
authorPaweł Pękala <c0rn@gazeta.pl>
Thu, 3 Dec 2009 19:42:45 +0000 (19:42 +0000)
committerPaweł Pękala <c0rn@gazeta.pl>
Thu, 3 Dec 2009 19:42:45 +0000 (19:42 +0000)
* src/compose.c
Highlight misspelled words in text inserted from file(s)
or pasted to message body when check_while_typing
options is on

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index fc13189..0ff2a54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-03 [pawel]     3.7.3cvs30
+
+       * src/compose.c
+               Highlight misspelled words in text inserted from file(s)
+               or pasted to message body when check_while_typing
+               options is on
+
 2009-12-02 [pawel]     3.7.3cvs29
 
        * src/compose.c
index b9d4acd..0265ec2 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.526 -r 1.382.2.527 src/compose.c;  cvs diff -u -r 1.50.2.56 -r 1.50.2.57 src/compose.h;  ) > 3.7.3cvs27.patchset
 ( cvs diff -u -r 1.382.2.527 -r 1.382.2.528 src/compose.c;  ) > 3.7.3cvs28.patchset
 ( cvs diff -u -r 1.382.2.528 -r 1.382.2.529 src/compose.c;  ) > 3.7.3cvs29.patchset
+( cvs diff -u -r 1.382.2.529 -r 1.382.2.530 src/compose.c;  ) > 3.7.3cvs30.patchset
index 6017214..42fb079 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=29
+EXTRA_VERSION=30
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d565a4c..39c550d 100644 (file)
@@ -9541,6 +9541,7 @@ static void compose_insert_file_cb(GtkAction *action, gpointer data)
 {
        Compose *compose = (Compose *)data;
        GList *file_list;
+       gint files_inserted = 0;
 
        file_list = filesel_select_multiple_files_open(_("Select file"));
 
@@ -9561,7 +9562,8 @@ static void compose_insert_file_cb(GtkAction *action, gpointer data)
                                alertpanel_error(_("File '%s' contained invalid characters\n"
                                                        "for the current encoding, insertion may be incorrect."),
                                                        shortfile);
-                       }
+                       } else if (res == COMPOSE_INSERT_SUCCESS)
+                               files_inserted++;
 
                        g_free(shortfile);
                        g_free(filedup);
@@ -9569,6 +9571,11 @@ static void compose_insert_file_cb(GtkAction *action, gpointer data)
                }
                g_list_free(file_list);
        }
+
+#ifdef USE_ENCHANT     
+       if (files_inserted > 0 && compose->gtkaspell->check_while_typing)
+               gtkaspell_highlight_all(compose->gtkaspell);
+#endif
 }
 
 static void compose_insert_sig_cb(GtkAction *action, gpointer data)
@@ -9847,6 +9854,12 @@ static void compose_paste_cb(GtkAction *action, gpointer data)
                                prefs_common.linewrap_pastes,
                                GDK_SELECTION_CLIPBOARD, NULL);
        UNBLOCK_WRAP();
+
+#ifdef USE_ENCHANT
+       if (GTK_WIDGET_HAS_FOCUS(compose->text) &&
+           compose->gtkaspell->check_while_typing)
+               gtkaspell_highlight_all(compose->gtkaspell);
+#endif
 }
 
 static void compose_paste_as_quote_cb(GtkAction *action, gpointer data)
@@ -9890,6 +9903,12 @@ static void compose_paste_no_wrap_cb(GtkAction *action, gpointer data)
                entry_paste_clipboard(compose, compose->focused_editable, FALSE,
                        GDK_SELECTION_CLIPBOARD, NULL);
        UNBLOCK_WRAP();
+
+#ifdef USE_ENCHANT
+       if (GTK_WIDGET_HAS_FOCUS(compose->text) &&
+           compose->gtkaspell->check_while_typing)
+               gtkaspell_highlight_all(compose->gtkaspell);
+#endif
 }
 
 static void compose_paste_wrap_cb(GtkAction *action, gpointer data)
@@ -9906,6 +9925,12 @@ static void compose_paste_wrap_cb(GtkAction *action, gpointer data)
                entry_paste_clipboard(compose, compose->focused_editable, TRUE,
                        GDK_SELECTION_CLIPBOARD, NULL);
        UNBLOCK_WRAP();
+
+#ifdef USE_ENCHANT
+       if (GTK_WIDGET_HAS_FOCUS(compose->text) &&
+           compose->gtkaspell->check_while_typing)
+               gtkaspell_highlight_all(compose->gtkaspell);
+#endif
 }
 
 static void compose_allsel_cb(GtkAction *action, gpointer data)