[Xfce4-commits] <xfce4-screenshooter:master> Build panel plugin as a library.

Jérôme Guelfucci noreply at xfce.org
Wed Apr 18 22:22:01 CEST 2012


Updating branch refs/heads/master
         to e317aa8558b34500a457cbc1dd93a88431fed101 (commit)
       from 12c253d56bd59d57dd2bd89e4f4a4b31891b66de (commit)

commit e317aa8558b34500a457cbc1dd93a88431fed101
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Wed Apr 18 22:19:49 2012 +0200

    Build panel plugin as a library.

 Makefile.am                                        |   27 +++++++------------
 NEWS                                               |    2 +
 panel-plugin/screenshooter-plugin.c                |    2 +-
 ...oter.desktop.in.in => screenshooter.desktop.in} |    3 +-
 4 files changed, 15 insertions(+), 19 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index fe2474c..e712fe0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -115,10 +115,10 @@ src/xfce4-screenshooter.desktop.in: src/xfce4-screenshooter.desktop.in.in
 	)
 
 # Panel plugin
-plugindir = $(libexecdir)/xfce4/panel-plugins
-plugin_PROGRAMS = panel-plugin/xfce4-screenshooter-plugin
+plugindir = $(libdir)/xfce4/panel/plugins
+plugin_LTLIBRARIES = panel-plugin/libscreenshooterplugin.la
 
-panel_plugin_xfce4_screenshooter_plugin_CFLAGS =	\
+panel_plugin_libscreenshooterplugin_la_CFLAGS =	\
 	-DPACKAGE_LOCALE_DIR=\"$(localedir)\"	\
 	-I$(top_srcdir)	\
 	-I$(top_srcdir)/lib/	\
@@ -128,31 +128,24 @@ panel_plugin_xfce4_screenshooter_plugin_CFLAGS =	\
 	@GTHREAD_CFLAGS@ \
 	@SOUP_CFLAGS@
 
-panel_plugin_xfce4_screenshooter_plugin_LDFLAGS = \
+panel_plugin_libscreenshooterplugin_la_LDFLAGS = \
 	@EXO_LIBS@ \
 	@LIBXFCE4PANEL_LIBS@ \
 	@GTHREAD_LIBS@ \
 	@SOUP_LIBS@ \
 	@LIBXFCE4UI_LIBS@
 
-panel_plugin_xfce4_screenshooter_plugin_LDADD = lib/libscreenshooter.la
+panel_plugin_libscreenshooterplugin_la_LIBADD = lib/libscreenshooter.la
 
-panel_plugin_xfce4_screenshooter_plugin_SOURCES = \
+panel_plugin_libscreenshooterplugin_la_SOURCES = \
 	panel-plugin/screenshooter-plugin.c
 
 # Panel plugin desktop file
-panel_desktopdir = $(datadir)/xfce4/panel-plugins
-panel_desktop_in_in_files = panel-plugin/screenshooter.desktop.in.in
-panel_desktop_in_files = $(panel_desktop_in_in_files:.desktop.in.in=.desktop.in)
+panel_desktopdir = $(datadir)/xfce4/panel/plugins
+panel_desktop_in_files = panel-plugin/screenshooter.desktop.in
 panel_desktop_DATA = $(panel_desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-panel-plugin/screenshooter.desktop.in: panel-plugin/screenshooter.desktop.in.in
-	$(AM_V_GEN) ( \
-		sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \
-			$< > $@ \
-	)
-
 # Fallback icons
 
 # 48x48 icons
@@ -436,7 +429,7 @@ EXTRA_DIST = \
 	intltool-update.in \
 	lib/screenshooter-marshal.list \
 	$(app_desktop_in_in_files) \
-	$(panel_desktop_in_in_files) \
+	$(panel_desktop_in_files) \
 	$(48icons_DATA) \
 	$(scalicons_DATA) \
 	docs/manual/xfce-nochunk.xsl \
@@ -463,7 +456,7 @@ DISTCLEANFILES = \
 	$(lib_libscreenshooter_built_sources) \
 	lib/stamp-screenshooter-marshal.h \
 	$(app_desktop_DATA) $(app_desktop_in_files) \
-	$(panel_desktop_DATA) $(panel_desktop_in_files)
+	$(panel_desktop_DATA)
 
 # Man pages
 dist_man_MANS = xfce4-screenshooter.1
diff --git a/NEWS b/NEWS
index 35ba056..7c66b2f 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
   * Enhancements:
     - Adapting the panel plugin to xfce4-panel 4.9+. Andrzej.
     - Add a clipboard CLI option (bug #8483). Tom Hope.
+    - Panel plugin is now built as a library.
 
   * Bugs fixed:
     - Fix crash with some window managers (bug #8080). Bruno Ramos.
@@ -10,6 +11,7 @@
     - Install documentation to new location (bug #8116).
     - Drop AC_PROG_LIBTOOL in favor of LT_PREREQ and LT_INIT.
     - Add explicit -lm link to LIBADD (bug #8230).
+    - Plugin installation location compatible with xfce4-panel 4.9+.
 
 === Version 1.8.0 ===
 
diff --git a/panel-plugin/screenshooter-plugin.c b/panel-plugin/screenshooter-plugin.c
index f5159f1..4687106 100644
--- a/panel-plugin/screenshooter-plugin.c
+++ b/panel-plugin/screenshooter-plugin.c
@@ -412,4 +412,4 @@ screenshooter_plugin_construct (XfcePanelPlugin *plugin)
   g_signal_connect (plugin, "configure-plugin",
                     G_CALLBACK (cb_properties_dialog), pd);
 }
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (screenshooter_plugin_construct);
+XFCE_PANEL_PLUGIN_REGISTER (screenshooter_plugin_construct);
diff --git a/panel-plugin/screenshooter.desktop.in.in b/panel-plugin/screenshooter.desktop.in
similarity index 74%
rename from panel-plugin/screenshooter.desktop.in.in
rename to panel-plugin/screenshooter.desktop.in
index 3e66275..5fd9957 100644
--- a/panel-plugin/screenshooter.desktop.in.in
+++ b/panel-plugin/screenshooter.desktop.in
@@ -3,5 +3,6 @@ Type=X-XFCE-PanelPlugin
 _Name=Screenshot
 _Comment=Take screenshots of the entire screen, of the active window or of a region
 Icon=applets-screenshooter
-X-XFCE-Exec=@PLUGIN_PATH@/xfce4-screenshooter-plugin
+X-XFCE-Internal=FALSE
+X-XFCE-Module=screenshooterplugin
 


More information about the Xfce4-commits mailing list