[Xfce4-commits] <xfce4-panel:master> Move module panel plugins in $libdir/xfce4/panel/plugins.

Nick Schermer noreply at xfce.org
Thu Aug 26 21:22:01 CEST 2010


Updating branch refs/heads/master
         to 6c653999bc3bc8efb3cd3da95c8a3a373d31c5a9 (commit)
       from fa611018403071097cdbfad05bc741e34e31086f (commit)

commit 6c653999bc3bc8efb3cd3da95c8a3a373d31c5a9
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Aug 26 21:20:46 2010 +0200

    Move module panel plugins in $libdir/xfce4/panel/plugins.
    
    We still support the old location, but this one is nicer.

 panel/panel-module.c                 |   21 ++++++++++++++++-----
 plugins/actions/Makefile.am          |    2 +-
 plugins/applicationsmenu/Makefile.am |    2 +-
 plugins/clock/Makefile.am            |    2 +-
 plugins/directorymenu/Makefile.am    |    2 +-
 plugins/launcher/Makefile.am         |    2 +-
 plugins/pager/Makefile.am            |    2 +-
 plugins/separator/Makefile.am        |    2 +-
 plugins/showdesktop/Makefile.am      |    2 +-
 plugins/systray/Makefile.am          |    2 +-
 plugins/tasklist/Makefile.am         |    2 +-
 plugins/windowmenu/Makefile.am       |    2 +-
 12 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/panel/panel-module.c b/panel/panel-module.c
index bb9b428..4313fd2 100644
--- a/panel/panel-module.c
+++ b/panel/panel-module.c
@@ -34,8 +34,8 @@
 #include <panel/panel-plugin-external-wrapper.h>
 #include <panel/panel-plugin-external-46.h>
 
-#define PANEL_PLUGINS_LIB_DIR LIBDIR G_DIR_SEPARATOR_S "panel-plugins"
-
+#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")
 
 
 typedef enum _PanelModuleRunMode PanelModuleRunMode;
@@ -301,6 +301,7 @@ panel_module_new_from_desktop_file (const gchar *filename,
   gchar       *path;
   const gchar *module_exec;
   const gchar *module_unique;
+  gboolean     found;
 
   panel_return_val_if_fail (!exo_str_is_empty (filename), NULL);
   panel_return_val_if_fail (!exo_str_is_empty (name), NULL);
@@ -333,13 +334,23 @@ panel_module_new_from_desktop_file (const gchar *filename,
           /* show a messsage if the old module path key still exists */
           g_message ("Plugin %s: The \"X-XFCE-Module-Path\" key is "
                      "ignored in \"%s\", the panel will look for the "
-                     "module in " PANEL_PLUGINS_LIB_DIR ". See bug "
-                     "#5455 why this decision was made", name, filename);
+                     "module in %s. See bug #5455 why this decision was made",
+                     name, filename, PANEL_PLUGINS_LIB_DIR);
         }
 #endif
 
       path = g_module_build_path (PANEL_PLUGINS_LIB_DIR, module_name);
-      if (G_LIKELY (g_file_test (path, G_FILE_TEST_EXISTS)))
+      found = g_file_test (path, G_FILE_TEST_EXISTS);
+
+      if (!found)
+        {
+          /* deprecated location for module plugin directories */
+          g_free (path);
+          path = g_module_build_path (PANEL_PLUGINS_LIB_DIR_OLD, module_name);
+          found = g_file_test (path, G_FILE_TEST_EXISTS);
+        }
+
+      if (G_LIKELY (found))
         {
           /* create new module */
           module = g_object_new (PANEL_TYPE_MODULE, NULL);
diff --git a/plugins/actions/Makefile.am b/plugins/actions/Makefile.am
index 960100d..4b1e18f 100644
--- a/plugins/actions/Makefile.am
+++ b/plugins/actions/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
 	-DG_LOG_DOMAIN=\"libactions\" \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libactions.la
diff --git a/plugins/applicationsmenu/Makefile.am b/plugins/applicationsmenu/Makefile.am
index 568eea2..0c031e8 100644
--- a/plugins/applicationsmenu/Makefile.am
+++ b/plugins/applicationsmenu/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
 	-DG_LOG_DOMAIN=\"libapplicationsmenu\" \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libapplicationsmenu.la
diff --git a/plugins/clock/Makefile.am b/plugins/clock/Makefile.am
index acf364b..69df3d6 100644
--- a/plugins/clock/Makefile.am
+++ b/plugins/clock/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
 	-DG_LOG_DOMAIN=\"libclock\" \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libclock.la
diff --git a/plugins/directorymenu/Makefile.am b/plugins/directorymenu/Makefile.am
index 1953ce8..e69b905 100644
--- a/plugins/directorymenu/Makefile.am
+++ b/plugins/directorymenu/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
 	-DG_LOG_DOMAIN=\"libdirectorymenu\" \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libdirectorymenu.la
diff --git a/plugins/launcher/Makefile.am b/plugins/launcher/Makefile.am
index 0bf2ea5..f7e7365 100644
--- a/plugins/launcher/Makefile.am
+++ b/plugins/launcher/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = \
 	-DSN_API_NOT_YET_FROZEN \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	liblauncher.la
diff --git a/plugins/pager/Makefile.am b/plugins/pager/Makefile.am
index 19a927b..5872349 100644
--- a/plugins/pager/Makefile.am
+++ b/plugins/pager/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = \
 	-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libpager.la
diff --git a/plugins/separator/Makefile.am b/plugins/separator/Makefile.am
index cae7abe..9bbdf6a 100644
--- a/plugins/separator/Makefile.am
+++ b/plugins/separator/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
 	-DG_LOG_DOMAIN=\"libseparator\" \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libseparator.la
diff --git a/plugins/showdesktop/Makefile.am b/plugins/showdesktop/Makefile.am
index 8d82fb4..4d035ec 100644
--- a/plugins/showdesktop/Makefile.am
+++ b/plugins/showdesktop/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = \
 	-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libshowdesktop.la
diff --git a/plugins/systray/Makefile.am b/plugins/systray/Makefile.am
index c4d118f..10532fd 100644
--- a/plugins/systray/Makefile.am
+++ b/plugins/systray/Makefile.am
@@ -4,7 +4,7 @@ INCLUDES = \
 	-DG_LOG_DOMAIN=\"libsystray\" \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libsystray.la
diff --git a/plugins/tasklist/Makefile.am b/plugins/tasklist/Makefile.am
index 8ed73a0..a6c0977 100644
--- a/plugins/tasklist/Makefile.am
+++ b/plugins/tasklist/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = \
 	-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libtasklist.la
diff --git a/plugins/windowmenu/Makefile.am b/plugins/windowmenu/Makefile.am
index 728a8fd..36695e2 100644
--- a/plugins/windowmenu/Makefile.am
+++ b/plugins/windowmenu/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = \
 	-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
 	$(PLATFORM_CPPFLAGS)
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = \
 	libwindowmenu.la



More information about the Xfce4-commits mailing list