summary refs log tree commit diff
path: root/pkgs/desktops/xfce/core/thunar/thunarx_plugins_directory.patch
blob: 594a81c829efae2d28fae457d1d88a9a66ca256e (plain) (blame)
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
diff --git a/thunarx/thunarx-provider-factory.c b/thunarx/thunarx-provider-factory.c
index 94b11545..1f66c982 100644
--- a/thunarx/thunarx-provider-factory.c
+++ b/thunarx/thunarx-provider-factory.c
@@ -150,12 +150,19 @@ static GList*
 thunarx_provider_factory_load_modules (ThunarxProviderFactory *factory)
 {
   ThunarxProviderModule *module;
+  const gchar           *thunar_dir;
   const gchar           *name;
   GList                 *modules = NULL;
   GList                 *lp;
   GDir                  *dp;
 
-  dp = g_dir_open (THUNARX_DIRECTORY, 0, NULL);
+  thunar_dir = g_getenv("THUNARX_MODULE_DIR");
+  if (NULL == thunar_dir)
+    {
+      thunar_dir = THUNARX_DIRECTORY;
+    }
+
+  dp = g_dir_open (thunar_dir, 0, NULL);
   if (G_LIKELY (dp != NULL))
     {
       /* determine the types for all existing plugins */
diff --git a/thunarx/thunarx-provider-module.c b/thunarx/thunarx-provider-module.c
index 023ad2ae..b1d1be8f 100644
--- a/thunarx/thunarx-provider-module.c
+++ b/thunarx/thunarx-provider-module.c
@@ -174,10 +174,17 @@ static gboolean
 thunarx_provider_module_load (GTypeModule *type_module)
 {
   ThunarxProviderModule *module = THUNARX_PROVIDER_MODULE (type_module);
+  const gchar           *thunar_dir;
   gchar                 *path;
 
+  thunar_dir = g_getenv("THUNARX_MODULE_DIR");
+  if (NULL == thunar_dir)
+    {
+      thunar_dir = THUNARX_DIRECTORY;
+    }
+
   /* load the module using the runtime link editor */
-  path = g_build_filename (THUNARX_DIRECTORY, type_module->name, NULL);
+  path = g_build_filename (thunar_dir, type_module->name, NULL);
   module->library = g_module_open (path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
   g_free (path);