Re: [Vala] Signal connect syntax

2009-04-17 Thread Thijs Vermeir
On Wed, Apr 15, 2009 at 4:22 PM, pancake panc...@youterm.com wrote: lambdas can be used with .connect() ? Just place the full lamba expression in the brackets. var button = new Button.with_label (Click me!); button.clicked += (source) = { source.label = Thank you; };

Re: [Vala] Gtk.TreeSelection bindings

2009-04-17 Thread Ali Sabil
Hi, Thanks for your patch, I just committed it to both the vala master and the 0.6 branch. -- Ali On Fri, Apr 17, 2009 at 2:51 AM, Jim Nelson j...@yorba.org wrote: I'm having some problems with the set_select_function method and its delegate, Gtk.TreeSelectionFunc.  A user data void * is

[Vala] Gtk.SourceLanguageManager bindings

2009-04-17 Thread Andrew O'Mahony
I had some issues with Gtk.SourceLanguageManager; the get_language_ids and get_search_path functions are meant to return pointers to arrays (string []), but instead just return plain strings. I've modified the .vapi file to have them return unowned string [] types, plus I added in a method that

Re: [Vala] What is correct solution to warning: 'null' incompatible with 'SomeType'?

2009-04-17 Thread Levi Bard
   Shell.vala:112.13-112.24: warning: `null' incompatible with return type    `Guitcore.Task`            return null;             Try making the return type of the method Guitcore.Task? (the ? signifies that the type is nullable).

[Vala] How to initialize a Glib.Pid?

2009-04-17 Thread Jan Hudec
Hello Folks, I have a switch, that will actually always initialize a variable of type Glib.Pid, but valac wouldn't trust me and say it might be uninitialized. Now there are two things: * The variable is actually initialized in the resulting C code, by means of [CCode (default_value = 0)]

Re: [Vala] What is correct solution to warning: 'null ' incompatible with 'SomeType'?

2009-04-17 Thread Jan Hudec
Levi Bard taktaktaktaktaktaktaktaktak...@... writes:    Shell.vala:112.13-112.24: warning: `null' incompatible with return type    `Guitcore.Task`            return null;             Try making the return type of the method Guitcore.Task? (the ? signifies that the type is

Re: [Vala] How to initialize a Glib.Pid?

2009-04-17 Thread Levi Bard
 * The variable is actually initialized in the resulting C code, by means of   [CCode (default_value = 0)] attribute applied to Glib.Pid type in vapi.   However, valac insists that I have to initialize it nevertheless. I think this is related to http://bugzilla.gnome.org/show_bug.cgi?id=578968

[Vala] NativeVolumeMonitor binding

2009-04-17 Thread Jim Nelson
Hello, I believe I've found two problems, one with gio/gnativevolumemonitor.h and the other with the gio vapi. I'll explain them both, although only the second is a Vala problem. First, gnativevolumemonitor.h doesn't #define G_NATIVE_VOLUME_MONITOR_GET_CLASS, which causes problems for the code

Re: [Vala] How to initialize a Glib.Pid?

2009-04-17 Thread Hans Baier
2009/4/18 Jan Hudec b...@ucw.cz: Hello Folks, I have a switch, that will actually always initialize a variable of type Glib.Pid, but valac wouldn't trust me and say it might be uninitialized. Using a cast GLib.Pid pid = (GLib.Pid)0; works for me.