[gnome-builder/gnome-builder-3-26] app: load styles from .local/share/gtksourceview-3.0



commit 58586fb2cd2f23da65441a4815cdcdb2ce0cd798
Author: Christian Hergert <chergert redhat com>
Date:   Thu Oct 19 03:02:59 2017 -0700

    app: load styles from .local/share/gtksourceview-3.0
    
    This might be necessary when we are in flatpak, but we want to
    try to locate styles installed in the users home directory
    (instead of our private data dir).

 libide/application/ide-application.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libide/application/ide-application.c b/libide/application/ide-application.c
index 4f76a17..9a0ace9 100644
--- a/libide/application/ide-application.c
+++ b/libide/application/ide-application.c
@@ -126,12 +126,22 @@ ide_application_register_search_paths (IdeApplication *self)
   GtkSourceLanguageManager *languages;
   g_autofree gchar *gedit_path = NULL;
   g_autofree gchar *lang_path = NULL;
+  g_autofree gchar *style_path = NULL;
   const gchar * const *path;
 
   g_assert (IDE_IS_APPLICATION (self));
 
   manager = gtk_source_style_scheme_manager_get_default ();
 
+  /* We might need to set this up in case we're in flatpak */
+  style_path = g_build_filename (g_get_home_dir (),
+                                 ".local",
+                                 "share",
+                                 "gtksourceview-3.0",
+                                 "styles",
+                                 NULL);
+  gtk_source_style_scheme_manager_append_search_path (manager, style_path);
+
   gtk_source_style_scheme_manager_append_search_path (manager,
                                                       PACKAGE_DATADIR"/gtksourceview-3.0/styles/");
 


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