[libdazzle] tests: load application CSS theme



commit 06c4e15cf9918f0453469d33ffd77a0d52f68cbd
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 8 00:15:04 2017 -0700

    tests: load application CSS theme
    
    This is needed to load what whould normally get loaded by DzlApplication.

 tests/test-stack-list.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-stack-list.c b/tests/test-stack-list.c
index 5bb261b..82910ba 100644
--- a/tests/test-stack-list.c
+++ b/tests/test-stack-list.c
@@ -79,6 +79,17 @@ row_activated (DzlStackList  *stack_list,
                        g_object_unref);
 }
 
+static void
+load_css (void)
+{
+  g_autoptr(GtkCssProvider) provider = NULL;
+
+  provider = dzl_css_provider_new ("/org/gnome/dazzle/themes");
+  gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
+                                             GTK_STYLE_PROVIDER (provider),
+                                             GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+}
+
 gint
 main (gint   argc,
       gchar *argv[])
@@ -94,6 +105,8 @@ main (gint   argc,
 
   gtk_init (&argc, &argv);
 
+  load_css ();
+
   root = g_file_new_for_path ("/");
   file_system_model = dzl_directory_model_new (root);
 


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