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



commit a821b6e66a4823d76e353b8e68a501c7e6a2dc57
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]