[gnome-builder] gui: bring back loading of custom gtksourceview style-scheme paths



commit 85dcf63b57feeaed67ed9c9891257be32b49e425
Author: Christian Hergert <chergert redhat com>
Date:   Thu Feb 7 11:11:32 2019 -0800

    gui: bring back loading of custom gtksourceview style-scheme paths
    
    This got lost in the refactor, so lets bring it back before too many more
    people notice I broke it.
    
    Thanks Luke!

 src/libide/gui/ide-application.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/libide/gui/ide-application.c b/src/libide/gui/ide-application.c
index 51a3dfc08..b0c6a7914 100644
--- a/src/libide/gui/ide-application.c
+++ b/src/libide/gui/ide-application.c
@@ -139,9 +139,18 @@ ide_application_startup (GApplication *app)
 
   if (IS_UI_PROCESS (self))
     {
+      g_autofree gchar *style_path = NULL;
+      GtkSourceStyleSchemeManager *styles;
+
       /* Setup access to private icons dir */
       gtk_icon_theme_prepend_search_path (gtk_icon_theme_get_default (), PACKAGE_ICONDIR);
 
+      /* Add custom style locations for gtksourceview schemes */
+      styles = gtk_source_style_scheme_manager_get_default ();
+      style_path = g_build_filename (g_get_home_dir (), ".local", "share", "gtksourceview-4", "styles", 
NULL);
+      gtk_source_style_scheme_manager_append_search_path (styles, style_path);
+      gtk_source_style_scheme_manager_append_search_path (styles, PACKAGE_DATADIR"/gtksourceview-4/styles/");
+
       /* Load color settings (Night Light, Dark Mode, etc) */
       _ide_application_init_color (self);
     }


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