aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2003-03-10 03:24:08 +0800
committerXan Lopez <xan@src.gnome.org>2003-03-10 03:24:08 +0800
commit2f46d7cd79bda7c11395223411cfe4e28c6111d6 (patch)
treef2d53a679495f3c7fc8f37ac72fa7665c85a134f
parentdc5e7c29cd4d88a9ce5b329c5a47f274df7f56cb (diff)
downloadgsoc2013-epiphany-2f46d7cd79bda7c11395223411cfe4e28c6111d6.tar
gsoc2013-epiphany-2f46d7cd79bda7c11395223411cfe4e28c6111d6.tar.gz
gsoc2013-epiphany-2f46d7cd79bda7c11395223411cfe4e28c6111d6.tar.bz2
gsoc2013-epiphany-2f46d7cd79bda7c11395223411cfe4e28c6111d6.tar.lz
gsoc2013-epiphany-2f46d7cd79bda7c11395223411cfe4e28c6111d6.tar.xz
gsoc2013-epiphany-2f46d7cd79bda7c11395223411cfe4e28c6111d6.tar.zst
gsoc2013-epiphany-2f46d7cd79bda7c11395223411cfe4e28c6111d6.zip
Properly autocomplete when topics have national characters, fix #107685
Properly autocomplete when topics have national characters, fix #107685
-rw-r--r--ChangeLog7
-rw-r--r--src/bookmarks/ephy-keywords-entry.c13
2 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f0f51193..4e63a22bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2003-03-09 Xan Lopez <xan@masilla.org>
+ * src/bookmarks/ephy-keywords-entry.c: (try_to_expand_keyword):
+
+ Properly autocomplete when topics have national characters, fix
+ #107685
+
+2003-03-09 Xan Lopez <xan@masilla.org>
+
* src/bookmarks/ephy-bookmarks-editor.c: (build_editing_table),
(ephy_bookmarks_editor_construct):
* src/bookmarks/ephy-new-bookmark.c: (build_editing_table):
diff --git a/src/bookmarks/ephy-keywords-entry.c b/src/bookmarks/ephy-keywords-entry.c
index 0894bfcae..eccb83aae 100644
--- a/src/bookmarks/ephy-keywords-entry.c
+++ b/src/bookmarks/ephy-keywords-entry.c
@@ -82,13 +82,12 @@ static void
try_to_expand_keyword (GtkEditable *editable)
{
char *entry_text;
- char *user_text;
+ const char *user_text;
const char *expand_text;
- char *insert_text;
+ const char *insert_text;
int user_text_length;
- int expand_text_length;
int keyword_offset = 0;
- int tmp;
+ int position;
EphyKeywordsEntry *entry = EPHY_KEYWORDS_ENTRY (editable);
EphyNode *node;
@@ -121,14 +120,14 @@ try_to_expand_keyword (GtkEditable *editable)
LOG ("Expand text %s", expand_text)
- expand_text_length = g_utf8_strlen (expand_text, -1);
user_text_length = g_utf8_strlen (user_text, -1);
insert_text = g_utf8_offset_to_pointer (expand_text, user_text_length);
+
gtk_editable_insert_text (editable,
insert_text,
- g_utf8_strlen (insert_text, -1),
- &tmp);
+ strlen (insert_text),
+ &position);
gtk_editable_select_region (editable, user_text_length + keyword_offset, -1);
}
else