[libdazzle] tests: force load internal CSS



commit bcb88f948ef39aa225ef07cc6dd64569e78afe35
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 5 03:31:40 2017 -0700

    tests: force load internal CSS
    
    Since we aren't using a DzlApplication, we need to force this.

 tests/test-desktop-index.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/tests/test-desktop-index.c b/tests/test-desktop-index.c
index d620725..0307131 100644
--- a/tests/test-desktop-index.c
+++ b/tests/test-desktop-index.c
@@ -112,8 +112,14 @@ create_ui (void)
   g_autoptr(DzlFuzzyIndex) index = dzl_fuzzy_index_new ();
   g_autoptr(GFile) file = g_file_new_for_path ("desktop.index");
   g_autoptr(GError) error = NULL;
+  g_autoptr(GtkCssProvider) provider = NULL;
   gboolean r;
 
+  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-1);
+
   timer = g_timer_new ();
 
   r = dzl_fuzzy_index_load_file (index, file, NULL, &error);


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