summaryrefslogtreecommitdiff
path: root/gtk/gtkcssprovider.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-07-06 12:16:26 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-07-06 22:37:57 -0400
commit295273959359245063c8bb2476da2ed87540b832 (patch)
tree1150767f91625c431cf00a7b1a4508e6d9fa435d /gtk/gtkcssprovider.c
parentb25b33f79faf35619f9c87663a65895864eb2692 (diff)
downloadgtk+-295273959359245063c8bb2476da2ed87540b832.tar.gz
GtkCssProvider: Allow to enable debug at runtime
Add a private function that lets us decide at runtime whether to keep css section information around - this will be useful in the GtkInspector.
Diffstat (limited to 'gtk/gtkcssprovider.c')
-rw-r--r--gtk/gtkcssprovider.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 30881beda1..c8e76ff74b 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1244,13 +1244,22 @@ gtk_css_provider_parsing_error (GtkCssProvider *provider,
}
}
+/* This is exported privately for use in GtkInspector.
+ * It is the callers responsibility to reparse the current theme.
+ */
+void
+gtk_css_provider_set_keep_css_sections (void)
+{
+ gtk_keep_css_sections = TRUE;
+}
+
static void
gtk_css_provider_class_init (GtkCssProviderClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
if (g_getenv ("GTK_CSS_DEBUG"))
- gtk_keep_css_sections = TRUE;
+ gtk_css_provider_set_keep_css_sections ();
/**
* GtkCssProvider::parsing-error: