From: Paweł Pękala Date: Thu, 3 Dec 2009 19:42:45 +0000 (+0000) Subject: 2009-12-03 [pawel] 3.7.3cvs30 X-Git-Tag: rel_3_7_4~29 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=7481d7b98ca65bc6d4009666407c06db5b836345 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 --- diff --git a/ChangeLog b/ChangeLog index fc13189e3..0ff2a544c 100644 --- 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 diff --git a/PATCHSETS b/PATCHSETS index b9d4acd44..0265ec254 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3903,3 +3903,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index 601721456..42fb07926 100644 --- a/configure.ac +++ b/configure.ac @@ -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= diff --git a/src/compose.c b/src/compose.c index d565a4c05..39c550d79 100644 --- a/src/compose.c +++ b/src/compose.c @@ -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)