[Xfce4-commits] <xfce4-mailwatch-plugin:master> Update to the new panel plugin model
Ján SuÄan
noreply at xfce.org
Sun Sep 1 12:54:01 CEST 2013
Updating branch refs/heads/master
to 1532580be875df056d077c7abd7a248eb20c75f3 (commit)
from 7c655539383fd9180b79f282d2c5a2e7502059e8 (commit)
commit 1532580be875df056d077c7abd7a248eb20c75f3
Author: Ján Sučan <sucan at runbox.com>
Date: Sun Sep 1 12:51:55 2013 +0200
Update to the new panel plugin model
panel-plugin/Makefile.am | 55 +++++++++-----------
panel-plugin/mailwatch-plugin.c | 3 +-
...ailwatch.desktop.in.in => mailwatch.desktop.in} | 3 +-
3 files changed, 28 insertions(+), 33 deletions(-)
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index df2c2d8..d966700 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,10 +1,18 @@
-plugindir = $(libexecdir)/xfce4/panel-plugins
-plugin_PROGRAMS = xfce4-mailwatch-plugin
+#
+# Mailwatch plugin
+#
+plugindir = $(libdir)/xfce4/panel-plugins
+
+plugin_LTLIBRARIES = \
+ libmailwatch-plugin.la
-xfce4_mailwatch_plugin_SOURCES = \
+libmailwatch_plugin_la_SOURCES = \
mailwatch-plugin.c
-xfce4_mailwatch_plugin_CFLAGS = \
+libmailwatch_plugin_la_DEPENDENCIES = \
+ $(top_builddir)/libmailwatch-core/libmailwatch-core.la
+
+libmailwatch_plugin_la_CFLAGS = \
-I$(top_srcdir)/libmailwatch-core \
@GTHREAD_CFLAGS@ \
@LIBXFCE4PANEL_CFLAGS@ \
@@ -12,10 +20,13 @@ xfce4_mailwatch_plugin_CFLAGS = \
-DDATADIR=\"$(datadir)\" \
-DLOCALEDIR=\"$(localedir)\"
-xfce4_mailwatch_plugin_DEPENDENCIES = \
- $(top_builddir)/libmailwatch-core/libmailwatch-core.la
+libmailwatch_plugin_la_LDFLAGS = \
+ -avoid-version \
+ -module \
+ -no-undefined \
+ -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)'
-xfce4_mailwatch_plugin_LDADD = \
+libmailwatch_plugin_la_LIBADD = \
$(top_builddir)/libmailwatch-core/libmailwatch-core.la \
@GTHREAD_LIBS@ \
@LIBXFCE4PANEL_LIBS@ \
@@ -23,31 +34,15 @@ xfce4_mailwatch_plugin_LDADD = \
@GNUTLS_LIBS@ \
@LIBGCRYPT_LIBS@
-if HAVE_CYGWIN
- xfce4_mailwatch_plugin_LDFLAGS = \
- -no-undefined
-endif
-
-# .desktop file
#
-# Some automake trickery here. Because we cannot use $(libexecdir) in the
-# automake stage, we'll use sed to get the full path into the .desktop file.
-# We also need to let intltool merge the translated fields, so we add an
-# additional level of indirection: a <name>.desktop.in.in file.
-#
-desktop_in_in_files = mailwatch.desktop.in.in
-desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
-
-desktopdir = $(datadir)/xfce4/panel-plugins
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+# Desktop file
+#
+desktopdir = $(datadir)/xfce4/panel/plugins
+desktop_DATA = mailwatch.desktop
@INTLTOOL_DESKTOP_RULE@
-# get full path into .desktop file
-%.desktop.in: %.desktop.in.in
- sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \
- $< > $@
-
-EXTRA_DIST = $(desktop_in_in_files)
+EXTRA_DIST = \
+ mailwatch.desktop.in
DISTCLEANFILES = \
- $(desktop_DATA) $(desktop_in_files)
+ $(desktop_DATA)
diff --git a/panel-plugin/mailwatch-plugin.c b/panel-plugin/mailwatch-plugin.c
index f79b737..137b45e 100644
--- a/panel-plugin/mailwatch-plugin.c
+++ b/panel-plugin/mailwatch-plugin.c
@@ -1131,5 +1131,4 @@ mailwatch_construct(XfcePanelPlugin *plugin)
xfce_mailwatch_force_update(mwp->mailwatch);
}
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(mailwatch_construct);
-
+XFCE_PANEL_PLUGIN_REGISTER(mailwatch_construct);
diff --git a/panel-plugin/mailwatch.desktop.in.in b/panel-plugin/mailwatch.desktop.in
similarity index 71%
rename from panel-plugin/mailwatch.desktop.in.in
rename to panel-plugin/mailwatch.desktop.in
index 9e106b7..e92b5e5 100644
--- a/panel-plugin/mailwatch.desktop.in.in
+++ b/panel-plugin/mailwatch.desktop.in
@@ -4,4 +4,5 @@ Encoding=UTF-8
_Name=Mail Watcher
_Comment=Check mail from multiple mailboxes
Icon=xfce-mail
-X-XFCE-Exec=@PLUGIN_PATH@/xfce4-mailwatch-plugin
+X-XFCE-Module=mailwatch-plugin
+X-XFCE-Internal=false
More information about the Xfce4-commits
mailing list