Re: [Vala] About gnome applet example....
- From: Andrea Del Signore <sejerpz tin it>
- To: heimdall_spe <heimdall_spe yahoo fr>
- Cc: Vala ML <vala-list gnome org>
- Subject: Re: [Vala] About gnome applet example....
- Date: Sun, 09 Mar 2008 22:55:54 +0100
On Sun, 2008-03-09 at 22:19 +0100, heimdall_spe wrote:
Hi Andrea,
Hi Heimdall,
I try your code, but it doesn't solve the problem.
heimdall lianli:~/Programmation/Vala$ valac --pkg gtk+-2.0 --pkg
libpanelapplet-2.0 -o pannel_applet pannel_applet.vala
pannel_applet.c: In function «main_applet_main":
pannel_applet.c:32: erreur: expected expression before «)" token
pannel_applet.c:32: attention : passing argument 3 of
«panel_applet_factory_main" from incompatible pointer type
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
It solves partially ;)
No more gnome_init error...
That is this "expected expression before «)" token" message which seem
pretty weird... What "expression" gcc need ??
I've tried the example, and I've found a bug in the libpanel-2.0 vapi.
I don't know if this is the correct (definitive) solution, but for now
you have to change this line in the libpanelapplet-2.0.vapi file
(usually is installed in /usr/share/vala/vapi/)
from
public static int factory_main (string iid, GLib.Type applet_type,
AppletFactoryCallback callback);
to
public static int factory_main (string iid, GLib.Type applet_type,
AppletFactoryCallback callback, pointer data);
And then changed your code from
var ret = Panel.Applet.factory_main ("OAFIID:Vala_Applet_Factory",
typeof(Panel.Applet), (Panel.AppletFactoryCallback)
MainApplet.panelFactory);
to
var ret = Panel.Applet.factory_main ("OAFIID:Vala_Applet_Factory",
typeof(Panel.Applet), (Panel.AppletFactoryCallback)
MainApplet.panelFactory, null);
and it should works.
Ciao,
Andrea
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]