On Fri, Mar 4, 2011 at 21:38, Andrew Steele <[email protected]> wrote:
> You can still specify arguments at construction time, e.g. sizegroup =
> Gtk.SizeGroup(mode=Gtk.SizeGroupMode.BOTH). The important thing to remember
> is to 'name' the argument with 'mode='.
>
> As for you're other questions, I'd be interested to know myself whether
> arguments will be optional at some point in the future.

It's a desired feature. It has been proposed storing in the typelib
the serialized variant of the default value. Once that is done,
PyGObject can add support for optional arguments.

Regards,

Tomeu

> On 4 March 2011 20:32, Tom Cato Amundsen <[email protected]> wrote:
>>
>> It is explained somewhere how the API will change from pygtk to
>> gtk+pygobject? I'm trying to port GNU Solfege using python-gobject
>> 2.27.91 and gobject-introspection 0.10.3 in ubuntu natty.
>>
>> With pygtk I would do this:
>>       sizegroup = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
>>
>> With gtk + pygobject it requires two lines:
>>       sizegroup = Gtk.SizeGroup()
>>       sizegroup.set_mode(Gtk.SizeGroupMode.HORIZONTAL)
>>
>> I have had the impression that using python and pygobject would make
>> the python api closer to C. On
>> http://library.gnome.org/devel/gtk/stable/GtkSizeGroup.html I can see
>> that gtk_size_group_new take one argument, the GtkSizeGroupMode, so I
>> would expect I could set the direction (horizontal/vertical) in the
>> constructor. But I can't.
>>
>> Is the gtk+pygobject pretty stable now? Will it become closer to the
>> pygtk api, or should I just port to what we have now? There are other
>> changes too, like Box.pack_start that don't have optional arguments
>> any more. Is this what it will be when it is final, or can I expect
>> optional arguments in methods like in pygtk?
>>
>> --
>> Tom Cato Amundsen <[email protected]>                 http://www.solfege.org/
>> GNU Solfege - free ear training    http://www.gnu.org/software/solfege/
>> _______________________________________________
>> pygtk mailing list   [email protected]
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>
>
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to