commit 7481d7b98ca65bc6d4009666407c06db5b836345
parent 2cc230fd2547716aa855efcde60c775d11c59d36
Author: Paweł Pękala <c0rn@gazeta.pl>
Date: Thu, 3 Dec 2009 19:42:45 +0000
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
Diffstat:
4 files changed, 35 insertions(+), 2 deletions(-)
diff --git 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
@@ -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
@@ -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
@@ -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)