Hello, 2010/6/28, Andrew <[email protected]>: > Just two more questions: > > 1) I have to use the code below to do what I want it to, can I put this > in the init of the class cuz it doesn't appear to work > > def create_indicator() > var ind = new wAppIndicator("wasiliana-wapp", "indicator-messages", > Category.APPLICATION_STATUS) > ind.set_status(Status.ACTIVE) > ind.set_attention_icon("indicator-messages-new") > > var menu = new Menu() > > for i:int = 1 to 3 > var buf = "Test-undermenu" > var menu_items = new MenuItem.with_label(buf) > menu.append(menu_items) > menu_items.show() > > ind.set_menu(menu) > Gtk.main()
Gtk.main() should be in your "main" function (the init block of the program), other than that you can do as you like (on a side note, if you don't put any code in the subclass, why subclassing in the first place). > 2) Perhaps related, in the main.gs file, I have: > > init > Gtk.init(ref args) > create_indicator() > Gtk.main() > > However, if I don;t put the Gtk.main() in the function above (rather > than the init), it doesn't work. Why is this/is this on purpose? I don't understand this sentence, and what you mean by doesn't work. But Gtk.main() should definietely be in the main init block. I'm not sure of what you want, and I don't know how is the library supposed to work : do you need to call some method to make the indicator appear? etc. Looks like this is no longer a vala issue. Regards, Abderrahim _______________________________________________ vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
