GNOME Bugzilla – Bug 648425
GDesktopAppInfo: Add "filename" property for bindings
Last modified: 2011-04-26 19:09:55 UTC
GDesktopAppInfo violates the GObject rule that your C constructors should just be thin wrappers around g_object_new(). While GKeyFile isn't introspctable, this patch allows from JavaScript: var app = new Gio.DesktopAppInfo({ filename: '/path/to/foo.desktop' });
Created attachment 186454 [details] [review] GDesktopAppInfo: Add "filename" property for bindings
Review of attachment 186454 [details] [review]: ::: gio/gdesktopappinfo.c @@ +430,3 @@ + g_object_unref (info); + return NULL; + } Hmm it may be a small step in the right direction, but this still isn't the trivial g_object_new wrapper that binders long for...
(In reply to comment #2) > Review of attachment 186454 [details] [review]: > > ::: gio/gdesktopappinfo.c > @@ +430,3 @@ > + g_object_unref (info); > + return NULL; > + } > > Hmm > > it may be a small step in the right direction, but this still isn't the trivial > g_object_new wrapper that binders long for... Well I can't change the semantics of g_desktop_app_info_new_from_filename(). But bindings don't actually call that function (at least not when using the sample code).
Attachment 186454 [details] pushed as 2a3f7f4 - GDesktopAppInfo: Add "filename" property for bindings