After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619671 - Remove GtkArg deprecated code
Remove GtkArg deprecated code
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.90.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
deprecations
Depends on: 629955
Blocks: 597756 615666
 
 
Reported: 2010-05-25 21:12 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-01-05 00:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove GtkArg and use GParameter in GtkCallbackMarshal (2.53 KB, patch)
2010-05-28 13:46 UTC, Christian Dywan
none Details | Review

Description Javier Jardón (IRC: jjardon) 2010-05-25 21:12:53 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
Comment 1 Christian Dywan 2010-05-28 13:46:35 UTC
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.
Comment 2 Murray Cumming 2010-06-08 15:54:21 UTC
Why can't gtk_quit_add_full() (and all the other *_add_full() function) just use GCallback?
Comment 3 Javier Jardón (IRC: jjardon) 2010-06-09 00:29:21 UTC
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?
Comment 4 Havoc Pennington 2010-09-17 19:16:37 UTC
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?
Comment 5 Matthias Clasen 2010-09-20 13:25:57 UTC
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...)
Comment 6 Javier Jardón (IRC: jjardon) 2011-01-05 00:49:17 UTC
GtkArg, GtkCallbackMarshal and GtkFunction were removed in GTK+3

See commit 1283368b1bc93f6190d9aca92c433def60e73c55