You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

53 lines
1.9 KiB

From ea41593b670a894a6ef1daa4295bd5b5723baa97 Mon Sep 17 00:00:00 2001
From: Lionel Le Folgoc <lionel@lefolgoc.net>
Date: Fri, 7 Oct 2011 22:28:38 +0200
Subject: Look for modules in {non-,}multiarch LIBDIRs
This will let a multiarch enabled xfce4-panel find plugins built against a
non-multiarch panel (load plugins from both /usr/lib/$triplet and /usr/lib).
---
panel/panel-module.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/panel/panel-module.c b/panel/panel-module.c
index ba39320..de4c52e 100644
--- a/panel/panel-module.c
+++ b/panel/panel-module.c
@@ -38,6 +38,12 @@
#define PANEL_PLUGINS_LIB_DIR (LIBDIR G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "plugins")
#define PANEL_PLUGINS_LIB_DIR_OLD (LIBDIR G_DIR_SEPARATOR_S "panel-plugins")
+static const gchar *compat_paths[] =
+{
+ PANEL_PLUGINS_LIB_DIR_OLD,
+ "/usr/lib/xfce4/panel/plugins",
+ "/usr/lib/xfce4/panel-plugins"
+};
typedef enum _PanelModuleRunMode PanelModuleRunMode;
typedef enum _PanelModuleUnique PanelModuleUnique;
@@ -303,6 +309,7 @@ panel_module_new_from_desktop_file (const gchar *filename,
const gchar *module_exec;
const gchar *module_unique;
gboolean found;
+ gsize i;
panel_return_val_if_fail (!exo_str_is_empty (filename), NULL);
panel_return_val_if_fail (!exo_str_is_empty (name), NULL);
@@ -343,11 +350,11 @@ panel_module_new_from_desktop_file (const gchar *filename,
path = g_module_build_path (PANEL_PLUGINS_LIB_DIR, module_name);
found = g_file_test (path, G_FILE_TEST_EXISTS);
- if (!found)
+ for (i = 0; !found && i < G_N_ELEMENTS (compat_paths); ++i)
{
/* deprecated location for module plugin directories */
g_free (path);
- path = g_module_build_path (PANEL_PLUGINS_LIB_DIR_OLD, module_name);
+ path = g_module_build_path (compat_paths[i], module_name);
found = g_file_test (path, G_FILE_TEST_EXISTS);
}
--
1.7.6.3