commit 236e109893d24fe2cdbe0b51710c4b7c8720388a
parent 6e157bdd25fb7c0dbb8fadcb2486c48bfd5a9ade
Author: Paul Mangan <paul@claws-mail.org>
Date: Wed, 18 Mar 2009 21:35:02 +0000
2009-03-18 [paul] 3.7.1cvs21
* src/gtk/spell_entry.c
fix "[BUG] Wrong word replaced in 'Subject:'
when spell-checking correction used"
Patch by Pawel Pekala
Diffstat:
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-18 [paul] 3.7.1cvs21
+
+ * src/gtk/spell_entry.c
+ fix "[BUG] Wrong word replaced in 'Subject:'
+ when spell-checking correction used"
+ Patch by Pawel Pekala
+
2009-03-17 [colin] 3.7.1cvs20
* src/common/utils.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3760,3 +3760,4 @@
( cvs diff -u -r 1.16.2.66 -r 1.16.2.67 src/msgcache.c; cvs diff -u -r 1.204.2.188 -r 1.204.2.189 src/prefs_common.c; cvs diff -u -r 1.103.2.122 -r 1.103.2.123 src/prefs_common.h; cvs diff -u -r 1.1.2.36 -r 1.1.2.37 src/prefs_other.c; cvs diff -u -r 1.5.2.16 -r 1.5.2.17 src/common/prefs.c; ) > 3.7.1cvs18.patchset
( cvs diff -u -r 1.382.2.504 -r 1.382.2.505 src/compose.c; ) > 3.7.1cvs19.patchset
( cvs diff -u -r 1.36.2.167 -r 1.36.2.168 src/common/utils.c; ) > 3.7.1cvs20.patchset
+( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/gtk/spell_entry.c; ) > 3.7.1cvs21.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=7
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=20
+EXTRA_VERSION=21
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/gtk/spell_entry.c b/src/gtk/spell_entry.c
@@ -562,7 +562,7 @@ static void claws_spell_entry_populate_popup(ClawsSpellEntry *entry, GtkMenu *me
{
GtkAspell *gtkaspell = entry->gtkaspell;
gint start, end;
- gchar *word;
+ gchar *word, *text;
if (gtkaspell == NULL)
return;
@@ -575,7 +575,12 @@ static void claws_spell_entry_populate_popup(ClawsSpellEntry *entry, GtkMenu *me
}
gtkaspell->misspelled = word_misspelled(entry, start, end);
-
+
+ text = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1);
+ gtkaspell->start_pos = g_utf8_pointer_to_offset(text, (text+start));
+ gtkaspell->end_pos = g_utf8_pointer_to_offset(text, (text+end));
+ g_free(text);
+
claws_spell_entry_context_set(entry);
gtkaspell_make_context_menu(menu, gtkaspell);
}