[Xfce4-commits] <xfce4-vala:master> Update panel plugin example
Mike Massonnet
noreply at xfce.org
Tue Dec 22 15:34:01 CET 2009
Updating branch refs/heads/master
to 1d9ddee37a6da07f2ae05d7bbce82a800db6583a (commit)
from a502e7780b6af35ebe5bc1c8db14cb1d83b2878b (commit)
commit 1d9ddee37a6da07f2ae05d7bbce82a800db6583a
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Tue Dec 22 15:29:21 2009 +0100
Update panel plugin example
No need to pull a directory inside the desktop file (bug #5455) and also
put an explanation about the plugin constructor.
examples/panel-plugin/Makefile.am | 4 ----
.../{button.desktop.in => button.desktop} | 1 -
examples/panel-plugin/button.vala | 5 ++++-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/examples/panel-plugin/Makefile.am b/examples/panel-plugin/Makefile.am
index 3302b4c..0b5125e 100644
--- a/examples/panel-plugin/Makefile.am
+++ b/examples/panel-plugin/Makefile.am
@@ -7,10 +7,6 @@ libbutton_la_SOURCES = button.vala
libbutton_la_CFLAGS = @LIBXFCE4PANEL_CFLAGS@
libbutton_la_LIBADD = @LIBXFCE4PANEL_LIBS@
-button.desktop: button.desktop.in
- $(AM_V_GEN)sed -e "s^@EXTERNAL_PLUGIN_PATH@^$(plugindir)^" $< > $@
desktopdir = $(datadir)/xfce4/panel-plugins
desktop_DATA = button.desktop
-EXTRA_DIST = button.desktop.in
-DISTCLEANFILES = button.desktop
diff --git a/examples/panel-plugin/button.desktop.in b/examples/panel-plugin/button.desktop
similarity index 80%
rename from examples/panel-plugin/button.desktop.in
rename to examples/panel-plugin/button.desktop
index 0b63bc7..8cf0b7d 100644
--- a/examples/panel-plugin/button.desktop.in
+++ b/examples/panel-plugin/button.desktop
@@ -5,5 +5,4 @@ Name=Button
Comment=Test plugin for the Xfce 4.7 Panel
X-XFCE-Unique=true
X-XFCE-Module=button
-X-XFCE-Module-Path=@EXTERNAL_PLUGIN_PATH@
X-XFCE-Internal=FALSE
diff --git a/examples/panel-plugin/button.vala b/examples/panel-plugin/button.vala
index 787783c..a7d19b4 100644
--- a/examples/panel-plugin/button.vala
+++ b/examples/panel-plugin/button.vala
@@ -3,9 +3,12 @@ using Xfce;
public class ButtonPlugin : Xfce.PanelPlugin {
private Gtk.Button button;
+ /* The constructor is never called, but since Vala 0.7.8 prints a warning if the sub-classed
+ * class doesn't provide a public constructor and tries to chain up to it, it is possible to
+ * chain directly to Object. This only avoids the warning to be printed.
+ */
public ButtonPlugin () {
GLib.Object ();
- debug ("constructor");
}
public override void @construct () {
More information about the Xfce4-commits
mailing list