diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-12-13 20:17:10 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2011-01-04 23:37:13 +0900 |
commit | 6ae724c0d319bec2a08ec57de45b546da18d318c (patch) | |
tree | 70d10f0e78011e0ab8a857d570c34b05a25f0418 /tests/testcombo.c | |
parent | 57857f13dfed9cc31da0a12e7ca3d3786a977ce6 (diff) | |
download | gtk+-6ae724c0d319bec2a08ec57de45b546da18d318c.tar.gz |
Added LISTMODE env var check to testcombo.c so that one can easily test listmode.
Diffstat (limited to 'tests/testcombo.c')
-rw-r--r-- | tests/testcombo.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testcombo.c b/tests/testcombo.c index 437a72cda3..0f7d5cee3d 100644 --- a/tests/testcombo.c +++ b/tests/testcombo.c @@ -1102,6 +1102,20 @@ main (int argc, char **argv) if (g_getenv ("RTL")) gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL); + if (g_getenv ("LISTMODE")) + { + GtkCssProvider *provider = gtk_css_provider_new (); + + gtk_css_provider_load_from_data (provider, + "* { -GtkComboBox-appears-as-list: true; }", + -1, NULL); + + gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), + GTK_STYLE_PROVIDER (provider), + GTK_STYLE_PROVIDER_PRIORITY_FALLBACK); + + } + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_container_set_border_width (GTK_CONTAINER (window), 5); g_signal_connect (window, "destroy", gtk_main_quit, NULL); |