1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
From: Jeremy Bicha <jbicha@debian.org>
Date: Sun, 14 Jul 2013 10:37:31 -0500
Subject: Also load plugins from pre-multiarch directory
Forwarded: not-needed
---
gedit/gedit-dirs.c | 11 +++++++++++
gedit/gedit-dirs.h | 2 ++
gedit/gedit-plugins-engine.c | 5 +++++
3 files changed, 18 insertions(+)
--- a/gedit/gedit-dirs.c
+++ b/gedit/gedit-dirs.c
@@ -33,6 +33,7 @@ static gchar *user_plugins_dir = N
static gchar *gedit_locale_dir = NULL;
static gchar *gedit_lib_dir = NULL;
static gchar *gedit_plugins_dir = NULL;
+static gchar *gedit_fallback_plugins_dir = NULL;
static gchar *gedit_plugins_data_dir = NULL;
void
@@ -110,6 +111,9 @@ gedit_dirs_init ()
gedit_plugins_dir = g_build_filename (gedit_lib_dir,
"plugins",
NULL);
+ gedit_fallback_plugins_dir = g_build_filename ("/usr/lib/gedit",
+ "plugins",
+ NULL);
}
void
@@ -122,6 +126,7 @@ gedit_dirs_shutdown ()
g_clear_pointer (&gedit_locale_dir, g_free);
g_clear_pointer (&gedit_lib_dir, g_free);
g_clear_pointer (&gedit_plugins_dir, g_free);
+ g_clear_pointer (&gedit_fallback_plugins_dir, g_free);
g_clear_pointer (&gedit_plugins_data_dir, g_free);
}
@@ -168,6 +173,12 @@ gedit_dirs_get_gedit_plugins_dir (void)
}
const gchar *
+gedit_dirs_get_gedit_fallback_plugins_dir (void)
+{
+ return gedit_fallback_plugins_dir;
+}
+
+const gchar *
gedit_dirs_get_gedit_plugins_data_dir (void)
{
return gedit_plugins_data_dir;
--- a/gedit/gedit-dirs.h
+++ b/gedit/gedit-dirs.h
@@ -46,6 +46,8 @@ const gchar *gedit_dirs_get_gedit_lib_di
const gchar *gedit_dirs_get_gedit_plugins_dir (void);
+const gchar *gedit_dirs_get_gedit_fallback_plugins_dir (void);
+
const gchar *gedit_dirs_get_gedit_plugins_data_dir (void);
G_END_DECLS
--- a/gedit/gedit-plugins-engine.c
+++ b/gedit/gedit-plugins-engine.c
@@ -93,6 +93,11 @@ gedit_plugins_engine_init (GeditPluginsE
gedit_dirs_get_gedit_plugins_dir (),
gedit_dirs_get_gedit_plugins_data_dir ());
+ peas_engine_add_search_path (PEAS_ENGINE (engine),
+ gedit_dirs_get_gedit_fallback_plugins_dir (),
+ gedit_dirs_get_gedit_plugins_data_dir ());
+
+
g_settings_bind (engine->plugin_settings,
GEDIT_SETTINGS_ACTIVE_PLUGINS,
engine,
|