Fix 539, 544
This commit is contained in:
parent
8bccaf62cd
commit
38fc757688
4 changed files with 26 additions and 5 deletions
|
@ -1,3 +1,13 @@
|
|||
2004-07-24 [colin] 0.9.12cvs33.14
|
||||
|
||||
* src/gtk/gtkaspell.c
|
||||
Don't change cursor position in insert-text
|
||||
callback
|
||||
Reencode non-ascii chars to dictionary's
|
||||
encoding
|
||||
(Fixes 539 Word wrapping on input transposes letters)
|
||||
(Fixes 544 Spell check broken non english locale)
|
||||
|
||||
2004-07-24 [colin] 0.9.12cvs33.13
|
||||
|
||||
* src/summaryview.c
|
||||
|
|
|
@ -67,3 +67,4 @@
|
|||
( cvs diff -u -r 1.2.2.9 -r 1.2.2.10 src/gtk/filesel.c; ) > 0.9.12cvs33.11.patchset
|
||||
( cvs diff -u -r 1.204.2.16 -r 1.204.2.17 src/prefs_common.c; ) > 0.9.12cvs33.12.patchset
|
||||
( cvs diff -u -r 1.395.2.24 -r 1.395.2.25 src/summaryview.c; ) > 0.9.12cvs33.13.patchset
|
||||
( cvs diff -u -r 1.9.2.3 -r 1.9.2.4 src/gtk/gtkaspell.c; ) > 0.9.12cvs33.14.patchset
|
||||
|
|
|
@ -13,7 +13,7 @@ INTERFACE_AGE=0
|
|||
BINARY_AGE=0
|
||||
EXTRA_VERSION=33
|
||||
EXTRA_RELEASE=
|
||||
EXTRA_GTK2_VERSION=.13
|
||||
EXTRA_GTK2_VERSION=.14
|
||||
|
||||
if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
|
||||
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
|
||||
|
|
|
@ -923,14 +923,23 @@ static guchar get_text_index_whar(GtkAspell *gtkaspell, int pos)
|
|||
GtkTextBuffer *buffer = gtk_text_view_get_buffer(view);
|
||||
GtkTextIter start, end;
|
||||
const gchar *utf8chars;
|
||||
guchar a;
|
||||
guchar a = '\0';
|
||||
|
||||
gtk_text_buffer_get_iter_at_offset(buffer, &start, pos);
|
||||
gtk_text_buffer_get_iter_at_offset(buffer, &end, pos+1);
|
||||
|
||||
utf8chars = gtk_text_iter_get_text(&start, &end);
|
||||
a = utf8chars ? utf8chars[0] : 0 ;
|
||||
g_free(utf8chars);
|
||||
if (is_ascii_str(utf8chars)) {
|
||||
a = utf8chars ? utf8chars[0] : '\0' ;
|
||||
} else {
|
||||
gchar *tr = conv_iconv_strdup(utf8chars, CS_UTF_8,
|
||||
gtkaspell->gtkaspeller->dictionary->encoding);
|
||||
if (tr) {
|
||||
a = tr[0];
|
||||
g_free(tr);
|
||||
}
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
|
@ -1008,9 +1017,10 @@ static gboolean get_word_from_pos(GtkAspell *gtkaspell, gint pos,
|
|||
|
||||
if (buf) {
|
||||
if (end - start < buflen) {
|
||||
for (pos = start; pos < end; pos++)
|
||||
for (pos = start; pos < end; pos++) {
|
||||
buf[pos - start] =
|
||||
get_text_index_whar(gtkaspell, pos);
|
||||
}
|
||||
buf[pos - start] = 0;
|
||||
} else
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue