[gtk+/gtk-2-24] Add a big combobox test case
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] Add a big combobox test case
- Date: Fri, 6 Oct 2017 00:43:57 +0000 (UTC)
commit 9480f6649b850c0c17a3584da5a49de92e548e1e
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Apr 2 09:51:01 2014 -0400
Add a big combobox test case
I've seen many bugs about long combo box popups getting misplaced
or wrongly sized. Time to add a testcase.
tests/testcombo.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/tests/testcombo.c b/tests/testcombo.c
index e17da61..fd6835d 100644
--- a/tests/testcombo.c
+++ b/tests/testcombo.c
@@ -1021,6 +1021,7 @@ main (int argc, char **argv)
GtkTreePath *path;
GtkTreeIter iter;
GdkColor color;
+ gint i;
gtk_init (&argc, &argv);
@@ -1331,6 +1332,18 @@ main (int argc, char **argv)
gtk_tree_path_free (path);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combobox), &iter);
+ tmp = gtk_frame_new ("Looong");
+ gtk_box_pack_start (GTK_BOX (mainbox), tmp, FALSE, FALSE, 0);
+ combobox = gtk_combo_box_text_new ();
+ for (i = 0; i < 200; i++)
+ {
+ gchar *text = g_strdup_printf ("Item %d", i);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), text);
+ g_free (text);
+ }
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 53);
+ gtk_container_add (GTK_CONTAINER (tmp), combobox);
+
#if 1
gdk_threads_add_timeout (1000, (GSourceFunc) capital_animation, model);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]