[Xfce4-commits] <xfce4-vala:master> Update panel-plugin example

Mike Massonnet noreply at xfce.org
Tue Oct 23 02:56:02 CEST 2012


Updating branch refs/heads/master
         to 70f6e227b23714c3bf95682e3aa6accd499cde67 (commit)
       from 3a9d4e3cdf5719258372d5e9b0f318a69ce4140d (commit)

commit 70f6e227b23714c3bf95682e3aa6accd499cde67
Author: Mike Massonnet <mmassonnet at gmail.com>
Date:   Tue Oct 23 02:53:25 2012 +0200

    Update panel-plugin example

 examples/panel-plugin/Makefile.am    |    4 ++--
 examples/panel-plugin/build.sh       |    7 +++++++
 examples/panel-plugin/button.desktop |    2 +-
 examples/panel-plugin/button.vala    |   14 +++-----------
 examples/panel-plugin/configure.ac   |    2 +-
 5 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/examples/panel-plugin/Makefile.am b/examples/panel-plugin/Makefile.am
index 0b5125e..3886a16 100644
--- a/examples/panel-plugin/Makefile.am
+++ b/examples/panel-plugin/Makefile.am
@@ -1,12 +1,12 @@
 VALAFLAGS = --pkg=gtk+-2.0 --pkg=libxfce4panel-1.0
 
-plugindir = $(libdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 plugin_LTLIBRARIES = libbutton.la
 
 libbutton_la_SOURCES = button.vala
 libbutton_la_CFLAGS = @LIBXFCE4PANEL_CFLAGS@
 libbutton_la_LIBADD = @LIBXFCE4PANEL_LIBS@
 
-desktopdir = $(datadir)/xfce4/panel-plugins
+desktopdir = $(datadir)/xfce4/panel/plugins
 desktop_DATA = button.desktop
 
diff --git a/examples/panel-plugin/build.sh b/examples/panel-plugin/build.sh
new file mode 100755
index 0000000..d0ae458
--- /dev/null
+++ b/examples/panel-plugin/build.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+touch NEWS README AUTHORS ChangeLog
+xdt-autogen
+make
+echo
+echo You can now type make install.
+echo
diff --git a/examples/panel-plugin/button.desktop b/examples/panel-plugin/button.desktop
index 8cf0b7d..aba324d 100644
--- a/examples/panel-plugin/button.desktop
+++ b/examples/panel-plugin/button.desktop
@@ -2,7 +2,7 @@
 Type=X-XFCE-PanelPlugin
 Encoding=UTF-8
 Name=Button
-Comment=Test plugin for the Xfce 4.7 Panel
+Comment=Test plugin for the Xfce 4.10 Panel
 X-XFCE-Unique=true
 X-XFCE-Module=button
 X-XFCE-Internal=FALSE
diff --git a/examples/panel-plugin/button.vala b/examples/panel-plugin/button.vala
index e951d63..ccdbbaa 100644
--- a/examples/panel-plugin/button.vala
+++ b/examples/panel-plugin/button.vala
@@ -3,14 +3,6 @@ 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 ();
-	}
-
 	public override void @construct () {
 		button = new Gtk.Button.with_label ("Hello World!");
 		add (button);
@@ -18,9 +10,9 @@ public class ButtonPlugin : Xfce.PanelPlugin {
 
 		add_action_widget (button);
 
-		save.connect (() => { debug ("save yourself"); });
-		free_data.connect (() => { debug ("free yourself"); });
-		size_changed.connect (() => { debug ("panel size changed"); });
+		save.connect (() => { message ("save yourself"); });
+		free_data.connect (() => { message ("free yourself"); });
+		size_changed.connect (() => { message ("panel size changed"); return false; });
 
 		menu_show_about ();
 		about.connect (() => {
diff --git a/examples/panel-plugin/configure.ac b/examples/panel-plugin/configure.ac
index 8845bae..3d2ab88 100644
--- a/examples/panel-plugin/configure.ac
+++ b/examples/panel-plugin/configure.ac
@@ -9,7 +9,7 @@ AC_PROG_INSTALL()
 AC_PROG_LIBTOOL()
 
 dnl Check for required packages
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.7.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0])
 
 dnl Check for Vala
 AM_PROG_VALAC()


More information about the Xfce4-commits mailing list