Browse Source

Some initial work on making old external plugins work again.

upstream/xfce4-panel-4.10.1
Nick Schermer 13 years ago
parent
commit
7755b1a55e
  1. 6
      configure.in.in
  2. 13
      libxfce4panel/Makefile.am
  3. 4
      libxfce4panel/libxfce4panel-1.0.pc.in
  4. 50
      libxfce4panel/libxfce4panel-deprecated.h
  5. 2
      libxfce4panel/libxfce4panel-enums.h
  6. 2
      libxfce4panel/xfce-arrow-button.h
  7. 2
      libxfce4panel/xfce-hvbox.h
  8. 2
      libxfce4panel/xfce-panel-convenience.h
  9. 3
      libxfce4panel/xfce-panel-macros.h
  10. 3
      libxfce4panel/xfce-panel-plugin.h
  11. 6
      panel/Makefile.am
  12. 3
      panel/panel-application.c
  13. 7
      panel/panel-module-factory.c
  14. 5
      panel/panel-module.c
  15. 1
      panel/panel-module.h
  16. 4
      panel/panel-plugin-external.c
  17. 4
      plugins/actions/Makefile.am
  18. 4
      plugins/clock/Makefile.am
  19. 4
      plugins/launcher/Makefile.am
  20. 4
      plugins/pager/Makefile.am
  21. 4
      plugins/separator/Makefile.am
  22. 4
      plugins/showdesktop/Makefile.am
  23. 4
      plugins/systray/Makefile.am
  24. 4
      plugins/tasklist/Makefile.am
  25. 4
      plugins/windowmenu/Makefile.am

6
configure.in.in

@ -8,8 +8,8 @@ dnl
dnl ***************************
dnl *** Version information ***
dnl ***************************
m4_define([libxfce4panel_verinfo], [0:0:0])
m4_define([libxfce4panel_version_api], [2])
m4_define([libxfce4panel_verinfo], [2:2:1])
m4_define([libxfce4panel_version_api], [1.0])
m4_define([xfce4_panel_version_major], [4])
m4_define([xfce4_panel_version_minor], [7])
m4_define([xfce4_panel_version_micro], [0])
@ -181,7 +181,7 @@ AC_OUTPUT([
Makefile
common/Makefile
libxfce4panel/Makefile
libxfce4panel/libxfce4panel-2.pc
libxfce4panel/libxfce4panel-1.0.pc
migrate/Makefile
panel/Makefile
wrapper/Makefile

13
libxfce4panel/Makefile.am

@ -6,7 +6,7 @@ INCLUDES = \
$(PLATFORM_CPPFLAGS)
lib_LTLIBRARIES = \
libxfce4panel-2.la
libxfce4panel-1.0.la
libxfce4panel_public_built_sources = \
libxfce4panel-enum-types.h
@ -21,6 +21,7 @@ libxfce4panel_built_sources = \
libxfce4panel_headers = \
libxfce4panel.h \
libxfce4panel-deprecated.h \
libxfce4panel-enums.h \
xfce-arrow-button.h \
xfce-hvbox.h \
@ -36,7 +37,7 @@ libxfce4panel_include_HEADERS = \
$(libxfce4panel_public_built_sources) \
$(libxfce4panel_headers)
libxfce4panel_2_la_SOURCES = \
libxfce4panel_1_0_la_SOURCES = \
$(libxfce4panel_built_sources) \
$(libxfce4panel_headers) \
xfce-arrow-button.c \
@ -47,19 +48,19 @@ libxfce4panel_2_la_SOURCES = \
xfce-panel-plugin-provider.h \
xfce-panel-image.c
libxfce4panel_2_la_CFLAGS = \
libxfce4panel_1_0_la_CFLAGS = \
$(GTK_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
$(PLATFORM_CFLAGS)
libxfce4panel_2_la_LDFLAGS = \
libxfce4panel_1_0_la_LDFLAGS = \
-no-undefined \
-export-dynamic \
-version-info $(LIBXFCE4PANEL_VERINFO) \
-export-symbols-regex '^[^_].*' \
$(PLATFORM_LDFLAGS)
libxfce4panel_2_la_LIBADD = \
libxfce4panel_1_0_la_LIBADD = \
$(GTK_LIBS) \
$(LIBXFCE4UTIL_LIBS)
@ -67,7 +68,7 @@ libxfce4panel_2_la_LIBADD = \
# Pkg-config file
#
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxfce4panel-2.pc
pkgconfig_DATA = libxfce4panel-$(LIBXFCE4PANEL_VERSION_API).pc
#
# Build sources

4
libxfce4panel/libxfce4panel-2.pc.in → libxfce4panel/libxfce4panel-1.0.pc.in

@ -1,11 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
datadir=@datadir@
libdir=@libdir@
includedir=@includedir@
libexecdir=@libexecdir@
localedir=@localedir@
datarootdir=@datarootdir@
Name: libxfce4panel
Description: Library for the Xfce Panel

50
libxfce4panel/libxfce4panel-deprecated.h

@ -0,0 +1,50 @@
/*
* Copyright (C) 2009 Nick Schermer <nick@xfce.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __LIBXFCE4PANEL_DEPRECATED_H__
#define __LIBXFCE4PANEL_DEPRECATED_H__
//#ifndef XFCE_DISABLE_DEPRECATED
G_BEGIN_DECLS
#define panel_slice_alloc(block_size) (g_slice_alloc ((block_size)))
#define panel_slice_alloc0(block_size) (g_slice_alloc0 ((block_size)))
#define panel_slice_free1(block_size, mem_block) G_STMT_START{ g_slice_free1 ((block_size), (mem_block)); }G_STMT_END
#define panel_slice_new(type) (g_slice_new (type))
#define panel_slice_new0(type) (g_slice_new0 (type))
#define panel_slice_free(type, ptr) G_STMT_START{ g_slice_free (type, (ptr)); }G_STMT_END
#define PANEL_PARAM_READABLE (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
#define PANEL_PARAM_WRITABLE (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)
#define PANEL_PARAM_READWRITE (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
#define _panel_assert(expr) g_assert (expr)
#define _panel_assert_not_reached() g_assert_not_reached ()
#define _panel_return_if_fail(expr) g_return_if_fail (expr)
#define _panel_return_val_if_fail(expr, val) g_return_val_if_fail (expr, (val))
#define _panel_g_type_register_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init) \
g_type_register_static_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init, 0)
G_END_DECLS
//#endif /* !XFCE_DISABLE_DEPRECATED */
#endif /* !__LIBXFCE4PANEL_DEPRECATED_H__ */

2
libxfce4panel/libxfce4panel-enums.h

@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)&& !defined(XFCE_DISABLE_DEPRECATED)
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif

2
libxfce4panel/xfce-arrow-button.h

@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION) && !defined(XFCE_DISABLE_DEPRECATED)
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif

2
libxfce4panel/xfce-hvbox.h

@ -21,7 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION) && !defined(XFCE_DISABLE_DEPRECATED)
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif

2
libxfce4panel/xfce-panel-convenience.h

@ -17,7 +17,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION) && !defined(XFCE_DISABLE_DEPRECATED)
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif

3
libxfce4panel/xfce-panel-macros.h

@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION) && !defined(XFCE_DISABLE_DEPRECATED)
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif
@ -25,6 +25,7 @@
#include <glib.h>
#include <libxfce4panel/xfce-panel-plugin.h>
#include <libxfce4panel/libxfce4panel-deprecated.h>
G_BEGIN_DECLS

3
libxfce4panel/xfce-panel-plugin.h

@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
#if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION) && !defined(XFCE_DISABLE_DEPRECATED)
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif
@ -25,6 +25,7 @@
#include <gtk/gtk.h>
#include <libxfce4panel/libxfce4panel-enums.h>
#include <libxfce4panel/libxfce4panel-deprecated.h>
G_BEGIN_DECLS

6
panel/Makefile.am

@ -2,9 +2,9 @@
INCLUDES = \
-I$(top_srcdir) \
-DG_LOG_DOMAIN=\"xfce4-panel\" \
-DDATADIR=\"$(datadir)/xfce4/panel\" \
-DLIBDIR=\"$(libdir)/xfce4/panel\" \
-DLIBEXECDIR=\"$(libexecdir)/xfce4/panel\" \
-DDATADIR=\"$(datadir)/xfce4\" \
-DLIBDIR=\"$(libdir)/xfce4\" \
-DLIBEXECDIR=\"$(libexecdir)/xfce4\" \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
-DDBUS_API_SUBJECT_TO_CHANGE \
$(PLATFORM_CPPFLAGS)

3
panel/panel-application.c

@ -46,6 +46,7 @@
#include <panel/panel-plugin-external.h>
#define AUTOSAVE_INTERVAL (10 * 60)
#define MIGRATE_BIN LIBEXECDIR G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "migrate"
@ -189,7 +190,7 @@ panel_application_init (PanelApplication *application)
/* check for any configuration */
if (!xfconf_channel_has_property (application->xfconf, "/panels"))
{
if (!g_spawn_command_line_sync (LIBEXECDIR G_DIR_SEPARATOR_S "migrate", NULL, NULL, NULL, &error))
if (!g_spawn_command_line_sync (MIGRATE_BIN, NULL, NULL, NULL, &error))
{
xfce_dialog_show_error (NULL, error, _("Failed to launch the migration application"));
g_error_free (error);

7
panel/panel-module-factory.c

@ -38,6 +38,8 @@
#include <panel/panel-module.h>
#include <panel/panel-module-factory.h>
#define PANEL_PLUGINS_DATA_DIR DATADIR G_DIR_SEPARATOR_S "panel-plugins"
static void panel_module_factory_finalize (GObject *object);
@ -150,7 +152,7 @@ panel_module_factory_load_modules (PanelModuleFactory *factory)
gchar *internal_name;
/* try to open the directory */
dir = g_dir_open (DATADIR, 0, NULL);
dir = g_dir_open (PANEL_PLUGINS_DATA_DIR, 0, NULL);
if (G_UNLIKELY (dir == NULL))
return;
@ -169,7 +171,7 @@ panel_module_factory_load_modules (PanelModuleFactory *factory)
continue;
/* create the full .desktop filename */
filename = g_build_filename (DATADIR, name, NULL);
filename = g_build_filename (PANEL_PLUGINS_DATA_DIR, name, NULL);
/* find the dot in the name, this cannot
* fail since it pasted the .desktop suffix check */
@ -185,7 +187,6 @@ panel_module_factory_load_modules (PanelModuleFactory *factory)
/* try to load the module */
module = panel_module_new_from_desktop_file (filename,
internal_name,
LIBDIR,
force_all_external);
if (G_LIKELY (module != NULL))

5
panel/panel-module.c

@ -33,6 +33,8 @@
#include <panel/panel-module-factory.h>
#include <panel/panel-plugin-external.h>
#define PANEL_PLUGINS_LIB_DIR LIBDIR G_DIR_SEPARATOR_S "panel-plugins"
static void panel_module_dispose (GObject *object);
@ -271,7 +273,6 @@ panel_module_plugin_destroyed (gpointer user_data,
PanelModule *
panel_module_new_from_desktop_file (const gchar *filename,
const gchar *name,
const gchar *lib_directory,
gboolean force_external)
{
PanelModule *module = NULL;
@ -295,7 +296,7 @@ panel_module_new_from_desktop_file (const gchar *filename,
if (G_LIKELY (module_name != NULL))
{
/* build the module path */
path = g_module_build_path (lib_directory, module_name);
path = g_module_build_path (PANEL_PLUGINS_LIB_DIR, module_name);
/* test if the library exists */
if (G_LIKELY (g_file_test (path, G_FILE_TEST_EXISTS)))

1
panel/panel-module.h

@ -41,7 +41,6 @@ GType panel_module_get_type (void) G_GNUC_CONST;
PanelModule *panel_module_new_from_desktop_file (const gchar *filename,
const gchar *name,
const gchar *lib_directory,
gboolean force_external) G_GNUC_MALLOC;
GtkWidget *panel_module_new_plugin (PanelModule *module,

4
panel/panel-plugin-external.c

@ -52,6 +52,8 @@
#define N_RESTART_TRIES (2)
#endif
#define WRAPPER_BIN LIBEXECDIR G_DIR_SEPARATOR_S "panel" G_DIR_SEPARATOR_S "wrapper"
static void panel_plugin_external_provider_init (XfcePanelPluginProviderIface *iface);
@ -418,7 +420,7 @@ panel_plugin_external_realize (GtkWidget *widget)
/* setup the basic argv */
argv = g_new0 (gchar *, argc);
argv[0] = (gchar *) LIBEXECDIR G_DIR_SEPARATOR_S "wrapper";
argv[0] = (gchar *) WRAPPER_BIN;
argv[1] = (gchar *) "-n";
argv[2] = (gchar *) panel_module_get_name (external->module);
argv[3] = (gchar *) "-i";

4
plugins/actions/Makefile.am

@ -4,7 +4,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"libactions\" \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libactions.la
@ -48,7 +48,7 @@ libactions_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = actions.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/clock/Makefile.am

@ -4,7 +4,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"libclock\" \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libclock.la
@ -60,7 +60,7 @@ libclock_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = clock.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/launcher/Makefile.am

@ -5,7 +5,7 @@ INCLUDES = \
-DSN_API_NOT_YET_FROZEN \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
liblauncher.la
@ -55,7 +55,7 @@ liblauncher_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = launcher.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/pager/Makefile.am

@ -5,7 +5,7 @@ INCLUDES = \
-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libpager.la
@ -51,7 +51,7 @@ libpager_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = pager.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/separator/Makefile.am

@ -4,7 +4,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"libseparator\" \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libseparator.la
@ -50,7 +50,7 @@ libseparator_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = separator.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/showdesktop/Makefile.am

@ -5,7 +5,7 @@ INCLUDES = \
-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libshowdesktop.la
@ -39,7 +39,7 @@ libshowdesktop_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = showdesktop.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/systray/Makefile.am

@ -4,7 +4,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"libsystray\" \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libsystray.la
@ -58,7 +58,7 @@ libsystray_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = systray.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/tasklist/Makefile.am

@ -5,7 +5,7 @@ INCLUDES = \
-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libtasklist.la
@ -52,7 +52,7 @@ libtasklist_la_DEPENDENCIES = \
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = tasklist.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

4
plugins/windowmenu/Makefile.am

@ -5,7 +5,7 @@ INCLUDES = \
-DWNCK_I_KNOW_THIS_IS_UNSTABLE \
$(PLATFORM_CPPFLAGS)
plugindir = $(libdir)/xfce4/panel
plugindir = $(libdir)/xfce4/panel-plugins
plugin_LTLIBRARIES = \
libwindowmenu.la
@ -60,7 +60,7 @@ xfce4-popup-windowmenu: xfce4-popup-windowmenu.in Makefile
#
# .desktop file
#
desktopdir = $(datadir)/xfce4/panel
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_in_files = windowmenu.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

Loading…
Cancel
Save