[Goodies-commits] r7561 - in xfce4-notes-plugin/trunk: . panel-plugin
Mike Massonnet
mmassonnet at xfce.org
Sun Jun 14 05:47:27 CEST 2009
Author: mmassonnet
Date: 2009-06-14 03:47:27 +0000 (Sun, 14 Jun 2009)
New Revision: 7561
Modified:
xfce4-notes-plugin/trunk/ChangeLog
xfce4-notes-plugin/trunk/panel-plugin/main.vala
Log:
Fix compilation for libxfce4panel < 4.7
Modified: xfce4-notes-plugin/trunk/ChangeLog
===================================================================
--- xfce4-notes-plugin/trunk/ChangeLog 2009-06-13 22:02:12 UTC (rev 7560)
+++ xfce4-notes-plugin/trunk/ChangeLog 2009-06-14 03:47:27 UTC (rev 7561)
@@ -1,5 +1,12 @@
2009-06-09 Mike Massonnet <mmassonnet at xfce.org>
+Fix compilation for libxfce4panel < 4.7
+
+It still doesn't compile, and frankly I have not the slightest bit why this is
+so. The resulting C code from main.vala does not include libxfce4panel.h.
+
+2009-06-09 Mike Massonnet <mmassonnet at xfce.org>
+
Support for libxfce4panel >= 4.7
2009-06-09 Mike Massonnet <mmassonnet at xfce.org>
Modified: xfce4-notes-plugin/trunk/panel-plugin/main.vala
===================================================================
--- xfce4-notes-plugin/trunk/panel-plugin/main.vala 2009-06-13 22:02:12 UTC (rev 7560)
+++ xfce4-notes-plugin/trunk/panel-plugin/main.vala 2009-06-14 03:47:27 UTC (rev 7561)
@@ -25,7 +25,7 @@
#if HAVE_LIBXFCE4PANEL47
public class NotesPlugin : Xfce.PanelPlugin {
#else
-public class NotesPlugin : Object {
+public class NotesPlugin : GLib.Object {
#endif
private Gtk.Invisible invisible;
@@ -40,8 +40,10 @@
}
public override void @construct () {
+ panel_plugin = this;
#else
public NotesPlugin (Xfce.PanelPlugin panel_plugin) {
+ this.panel_plugin = panel_plugin;
#endif
Xfce.textdomain (Config.GETTEXT_PACKAGE, Config.PACKAGE_LOCALE_DIR);
try {
@@ -51,13 +53,11 @@
warning ("%s", e.message);
}
- application = new Xnp.Application (save_location (true));
+ application = new Xnp.Application (panel_plugin.save_location (true));
#if HAVE_LIBXFCE4PANEL47
- panel_plugin = this;
button = (Gtk.Button)Xfce.panel_create_button ();
#else
- this.panel_plugin = panel_plugin;
button = Xfce.create_panel_button ();
#endif
image = new Gtk.Image ();
@@ -112,6 +112,16 @@
return true;
}
+#if !HAVE_LIBXFCE4PANEL47
+ static NotesPlugin plugin;
+ public static void panel_plugin_register (Xfce.PanelPlugin panel_plugin) {
+ plugin = new NotesPlugin (panel_plugin);
+ }
+
+ public static int main (string[] args) {
+ return Xfce.PanelPluginRegisterExternal (ref args, panel_plugin_register);
+ }
+#endif
}
#if HAVE_LIBXFCE4PANEL47
@@ -119,13 +129,4 @@
public Type __xpp_init (TypeModule module) {
return typeof (NotesPlugin);
}
-#else
-static NotesPlugin plugin;
-public static void register (Xfce.PanelPlugin panel_plugin) {
- plugin = new NotesPlugin (panel_plugin);
-}
-
-public static int main (string[] args) {
- return Xfce.PanelPluginRegisterExternal (ref args, register);
-}
#endif
More information about the Goodies-commits
mailing list