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 709440 - Fix overloading of "source" and "target" terminology in GBinding
Fix overloading of "source" and "target" terminology in GBinding
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-10-04 17:07 UTC by Dan Winship
Modified: 2013-10-06 18:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix overloading of "source" and "target" terminology in GBinding (8.46 KB, patch)
2013-10-04 17:07 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2013-10-04 17:07:20 UTC
GBindingTransformFunc called its arguments "source_value" and
"target_value", but in the transform_from function of a bidirectional
binding, "source_value" comes from the target object, and
"target_value" comes from the source object, which quickly gets
confusing if you need to use g_binding_get_source(), etc, in the
function.

Of course developers can call their transform function arguments
whatever they want, but many will copy from the headers/docs to start
out, so make use less confusing names here ("from_value" and
"to_value").

Also, fix the documentation to describe the bidirectional case
correctly.
Comment 1 Dan Winship 2013-10-04 17:07:22 UTC
Created attachment 256489 [details] [review]
Fix overloading of "source" and "target" terminology in GBinding
Comment 2 Matthias Clasen 2013-10-05 21:43:22 UTC
Review of attachment 256489 [details] [review]:

Thats a lot clearer, thanks.
Comment 3 Dan Winship 2013-10-06 18:25:54 UTC
Attachment 256489 [details] pushed as 8e17040 - Fix overloading of "source" and "target" terminology in GBinding