GNOME Bugzilla – Bug 619671
Remove GtkArg deprecated code
Last modified: 2011-01-05 00:49:17 UTC
<mclasen> We still have GtkArg in the headers, with gtk_main_add_quit_func_full (or similar) being the only user <mclasen> we could consider replacing that with GParameter, which has the same purpose
Created attachment 162219 [details] [review] Remove GtkArg and use GParameter in GtkCallbackMarshal This patch removes GtkArg and replaces the single use in GtkCallbackMarshal with GParameter. The obvious problem is that neither GtkCallbackMarshal nor gtk_quit_add_full is not currently deprecated. Should we deprecate gtk_quit_add_full? I'm not sure what to name a replacement, though.
Why can't gtk_quit_add_full() (and all the other *_add_full() function) just use GCallback?
As discussed in the GTK+ meeting GtkCallbackMarshal should be deprecated. gtk_quit_add_full() should be modified to not use GtkCallbackMarshal() Also, maybe GtkFunction() should be deprecated too?
I think the normal thing is one of: * take a GClosure * take GCallback/data/GDestroyNotify and people can use those to wrap a closure if they need a marshaler Not sure which one is most encouraged these days. I guess most APIs are the triplet of args?
Yeah, mostly cb/data/destroy. Explicit closure is rare, because handling closures yourself is exceedingly icky. (look at e.g the closure-taking functions in GBinding or GDBus...)
GtkArg, GtkCallbackMarshal and GtkFunction were removed in GTK+3 See commit 1283368b1bc93f6190d9aca92c433def60e73c55