[Vala] Problem compiling some example of - gnome panel applet...



Hello,
*I am trying to compile this code example :*

using Panel;

public class MainApplet : GLib.Object {

    public static bool panel_factory (Applet applet, string iid) {
        var button = new Gtk.Button.with_label ("Vala Panel");
        applet.add (button);
        applet.show_all ();
        return false;
    }

    public static int main (string[] args) {
        var program = Gnome.Program.init ("Vala_Applet", "0",
Gnome.libgnomeui_module,
                                          args, "sm-connect", false);
        return Applet.factory_main ("OAFIID:Vala_Applet_Factory",
                                    typeof (Panel.Applet),
                                    MainApplet.panel_factory);
    }
}

*It compiles with no errors but when I try to run it, I get:*

*Process return 256  execution time: 0.09651 s*


I am using Gnome 2.28.

*Maybe some could help me with this ?*

Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]