On Jun 14, 2013, at 10:46 PM, Richard Procter <richard.n.proc...@gmail.com> 
wrote:

> 
> On 15/06/2013, at 12:53 PM, John Ralls wrote:
>>> 
>>> So my guess is that this delegate isn't registered until 
>>> gtkosx_application_ready() 
>>> is called. However, checking this by the code I get muddled, as this object 
>>> is only created 
>>> in static void gtkosx_application_init, which is never called in the file 
>>> in which it is defined
>>> (gtk-mac-integration-2.0.1/src/gtkosxapplication_quartz.c), as far as I can 
>>> tell. 
>>> 
>> 
>> Back to GObject school with you!
> 
> :) 
> 
>> GObject uses two-stage construction, just like Python, and for 
>> GtkosxApplication, gtkosx_application_init() is the second-stage 
>> constructor. It's called automatically by the object system after the user 
>> program calls g_object_new() on GtkosxApplication.
> 
> Ah, I see, the reference to gtkosx_application_init() is hidden by 
> G_DEFINE_TYPE. I'm used to the explicit formulation. So the delegate should 
> be registered once the GtkosxApplication is instantiated and my guess is 
> wrong. 
> 
> I can see you're doing things the canonical way, John, and I have no beef 
> with your code, but this sort of thing reinforces my opinion that, 
> paraphrasing Dijkstra, 'gobject, "the fatal disease", belongs more to the 
> problem set than to the solution set.' 

No argument there, and the solution is obvious: Migrate your apps to another 
toolkit. ;-) 

But for those who choose not to do so and haven't yet adopted Gtk3 and 
GtkApplication, GtkosxApplication aims to improve the Mac experience. It would 
be silly for it not to follow the Gtk style.

Regards,
John Ralls

_______________________________________________
Gtk-osx-users-list mailing list
Gtk-osx-users-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list

Reply via email to