Add some strings containing multibyte characters.

2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* tests/testentrycompletion.c (create_simple_completion_model): Add
	some strings containing multibyte characters.

	* gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix):
	Fix prefix insertion for multibyte characters.  (#316095,
	Tommi Komulainen)
This commit is contained in:
Matthias Clasen 2005-09-13 15:08:43 +00:00 committed by Matthias Clasen
parent 6c8be091ef
commit 90196d7e5e
4 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,12 @@
2005-09-13 Matthias Clasen <mclasen@redhat.com>
* tests/testentrycompletion.c (create_simple_completion_model): Add
some strings containing multibyte characters.
* gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix):
Fix prefix insertion for multibyte characters. (#316095,
Tommi Komulainen)
* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
* gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): Silently
return NULL if the widget is not realized. (#316023,

View File

@ -1,5 +1,12 @@
2005-09-13 Matthias Clasen <mclasen@redhat.com>
* tests/testentrycompletion.c (create_simple_completion_model): Add
some strings containing multibyte characters.
* gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix):
Fix prefix insertion for multibyte characters. (#316095,
Tommi Komulainen)
* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
* gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): Silently
return NULL if the widget is not realized. (#316023,

View File

@ -1552,7 +1552,7 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion,
gint pos = prefix_len;
gtk_editable_insert_text (GTK_EDITABLE (completion->priv->entry),
prefix + key_len, -1, &pos);
prefix + strlen (key), -1, &pos);
gtk_editable_select_region (GTK_EDITABLE (completion->priv->entry),
key_len, prefix_len);

View File

@ -111,6 +111,12 @@ create_simple_completion_model (void)
gtk_list_store_set (store, &iter, 0, "Totipalmi", -1);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, "zombie", -1);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, "a\303\246x", -1);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, "a\303\246y", -1);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter, 0, "a\303\246z", -1);
return GTK_TREE_MODEL (store);
}
@ -314,6 +320,7 @@ main (int argc, char *argv[])
/* Create the completion object */
completion = gtk_entry_completion_new ();
gtk_entry_completion_set_inline_completion (completion, TRUE);
/* Assign the completion to the entry */
gtk_entry_set_completion (GTK_ENTRY (entry), completion);