[gtk+/combo-refactor: 90/201] Added LISTMODE env var check to testcombo.c so that one can easily test listmode.



commit ff9cce60c35391b9a9157d7098bde4ed7b431e00
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Mon Dec 13 20:17:10 2010 +0900

    Added LISTMODE env var check to testcombo.c so that one can easily test listmode.

 tests/testcombo.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/tests/testcombo.c b/tests/testcombo.c
index b357694..d2fe9d3 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]