[gtk+] testaccel: Add another focus location
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] testaccel: Add another focus location
- Date: Sat, 6 Sep 2014 23:03:33 +0000 (UTC)
commit 56bbf12fcd07ecc585d05034ce3e18306c56ccb5
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Sep 6 16:30:59 2014 -0400
testaccel: Add another focus location
It turns out GtkCellRendererAccel does not deal well with focus
being elsewhere. Adding an entry here makes this much easier to
reproduce.
tests/testaccel.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/tests/testaccel.c b/tests/testaccel.c
index e7cf1d7..ef213c9 100644
--- a/tests/testaccel.c
+++ b/tests/testaccel.c
@@ -64,13 +64,17 @@ key_test (void)
GtkTreeViewColumn *column;
GtkCellRenderer *rend;
gint i;
+ GtkWidget *box, *entry;
/* create window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+ gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (window), sw);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
+ gtk_widget_show (box);
+ gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_box_pack_start (GTK_BOX (box), sw, TRUE, TRUE, 0);
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));
@@ -105,8 +109,10 @@ key_test (void)
gtk_list_store_append (store, &iter);
}
- /* done */
-
+ entry = gtk_entry_new ();
+ gtk_widget_show (entry);
+ gtk_container_add (GTK_CONTAINER (box), entry);
+
return window;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]