[gnome-builder] app: load styles from .local/share/gtksourceview-3.0
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] app: load styles from .local/share/gtksourceview-3.0
- Date: Thu, 19 Oct 2017 10:04:40 +0000 (UTC)
commit bf7906fe916f5053c08e39eb7c7138975a1891bf
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).
src/libide/application/ide-application.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/libide/application/ide-application.c b/src/libide/application/ide-application.c
index 42ceb6c..07f3fb3 100644
--- a/src/libide/application/ide-application.c
+++ b/src/libide/application/ide-application.c
@@ -133,12 +133,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]