2009-07-09 [colin] 3.7.2cvs4
* src/gtk/spell_entry.c Fix bug 1949, 'Spell checker doesn't recognise certain word in Subject header, but does in message body'. Patch by Pawel Pekala.
This commit is contained in:
parent
f087295acc
commit
3b3041f530
4 changed files with 33 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2009-07-09 [colin] 3.7.2cvs4
|
||||
|
||||
* src/gtk/spell_entry.c
|
||||
Fix bug 1949, 'Spell checker doesn't recognise
|
||||
certain word in Subject header, but does in
|
||||
message body'. Patch by Pawel Pekala.
|
||||
|
||||
2009-07-09 [paul] 3.7.2cvs3
|
||||
|
||||
* configure.ac
|
||||
|
|
|
@ -3828,3 +3828,4 @@
|
|||
( cvs diff -u -r 1.1.2.20 -r 1.1.2.21 tools/claws.i18n.status.pl; ) > 3.7.2cvs1.patchset
|
||||
( cvs diff -u -r 1.16.2.37 -r 1.16.2.38 src/prefs_customheader.c; ) > 3.7.2cvs2.patchset
|
||||
( cvs diff -u -r 1.654.2.3896 -r 1.654.2.3897 configure.ac; ) > 3.7.2cvs3.patchset
|
||||
( cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/gtk/spell_entry.c; ) > 3.7.2cvs4.patchset
|
||||
|
|
|
@ -12,7 +12,7 @@ MINOR_VERSION=7
|
|||
MICRO_VERSION=2
|
||||
INTERFACE_AGE=0
|
||||
BINARY_AGE=0
|
||||
EXTRA_VERSION=3
|
||||
EXTRA_VERSION=4
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=
|
||||
|
||||
|
|
|
@ -257,6 +257,29 @@ static gboolean word_misspelled(ClawsSpellEntry *entry, int start, int end)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static gboolean is_word_end (GtkEntry *entry, const int offset)
|
||||
{
|
||||
gchar *p = gtk_editable_get_chars(GTK_EDITABLE(entry), offset, offset+1);
|
||||
gunichar ch;
|
||||
|
||||
ch = g_utf8_get_char(p);
|
||||
g_free(p);
|
||||
|
||||
if (ch == '\0')
|
||||
return TRUE;
|
||||
|
||||
if (ch == '\'') {
|
||||
p = gtk_editable_get_chars(GTK_EDITABLE(entry), offset+1, offset+2);
|
||||
ch = g_utf8_get_char(p);
|
||||
g_free(p);
|
||||
|
||||
return (g_unichar_isspace(ch) || g_unichar_ispunct(ch)
|
||||
|| g_unichar_isdigit(ch));
|
||||
}
|
||||
|
||||
return (g_unichar_isspace(ch) || g_unichar_ispunct(ch));
|
||||
}
|
||||
|
||||
static void entry_strsplit_utf8(GtkEntry *entry, gchar ***set, gint **starts, gint **ends)
|
||||
{
|
||||
PangoLayout *layout;
|
||||
|
@ -286,7 +309,7 @@ static void entry_strsplit_utf8(GtkEntry *entry, gchar ***set, gint **starts, gi
|
|||
|
||||
/* Find the end of this string */
|
||||
cend = i;
|
||||
while (!(log_attrs[cend].is_word_end))
|
||||
while (!is_word_end(entry, cend))
|
||||
cend++;
|
||||
|
||||
/* Copy sub-string */
|
||||
|
|
Loading…
Reference in a new issue