[gtk+] tests: Store keycode in tree for testaccel
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Store keycode in tree for testaccel
- Date: Wed, 26 Oct 2011 11:48:01 +0000 (UTC)
commit aa3ddb2a34b4006ec9062fbba59c596c1e77ae7f
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 26 12:47:07 2011 +0100
tests: Store keycode in tree for testaccel
Useful for testing keys without a keysym.
tests/testaccel.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/testaccel.c b/tests/testaccel.c
index 537ef07..bc3c8eb 100644
--- a/tests/testaccel.c
+++ b/tests/testaccel.c
@@ -39,6 +39,7 @@ accel_edited_callback (GtkCellRendererText *cell,
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
0, (gint)mask,
1, keyval,
+ 2, hardware_keycode,
-1);
gtk_tree_path_free (path);
}
@@ -59,7 +60,7 @@ key_test (void)
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_container_add (GTK_CONTAINER (window), sw);
- store = gtk_list_store_new (2, G_TYPE_INT, G_TYPE_UINT);
+ store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_UINT, G_TYPE_UINT);
tv = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
gtk_container_add (GTK_CONTAINER (sw), tv);
column = gtk_tree_view_column_new ();
@@ -78,6 +79,7 @@ key_test (void)
gtk_tree_view_column_set_attributes (column, rend,
"accel-mods", 0,
"accel-key", 1,
+ "keycode", 2,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (tv), column);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]