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 577898 - Port ExoBinding to Evolution
Port ExoBinding to Evolution
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.24.x (obsolete)
Other Linux
: Normal enhancement
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
evolution[kill-bonobo]
Depends on:
Blocks: 516933
 
 
Reported: 2009-04-04 03:25 UTC by Matthew Barnes
Modified: 2009-04-23 20:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (20.07 KB, patch)
2009-04-04 03:26 UTC, Matthew Barnes
committed Details | Review

Description Matthew Barnes 2009-04-04 03:25:38 UTC
Trying to merge some pieces of the kill-bonobo branch early.

This patch is basically a direct port of Xfce's ExoBinding API [1].  This has also been proposed for GObject itself [2], but I'm not willing to wait.  What this does is allow you to bind two GObject properties together such that their values are automatically kept in sync.  The API also supports transformation functions, such as boolean inversion.

Property bindings allow you to express relationships between objects very cleanly.  The classic example is a preferences dialog where some section is enabled or disabled by a check button.  Without bindings you have to listen for a "toggled" signal from the check button and then write a callback function to manually set the sensitivity of the container widget for the section based on the check button state.  With bindings, you can configure the same behavior with one call:

    e_binding_new (
            G_OBJECT (check_button), "active",
            G_OBJECT (vbox), "sensitive);

I use properties bindings all over the place in the kill-bonobo branch -- including the attachment UI rewrite (bug #516933) -- and have come to regard this API as essential for writing GObject code.

The patch adds two files:

    e-util/e-binding.h
    e-util/e-binding.c

The proposed API for GObject is nearly identical to ours (both are carbon copies of ExoBinding), and if accepted the porting effort on our end would literally take about 10 minutes.


[1] http://www.xfce.org/documentation/4.2/api/libexo/exo-Binding-Properties-Functions.html
[2] http://bugzilla.gnome.org/show_bug.cgi?id=348080
Comment 1 Matthew Barnes 2009-04-04 03:26:43 UTC
Created attachment 132056 [details] [review]
Proposed patch

Already using this in kill-bonobo, and it works fine.
Comment 2 Srinivasa Ragavan 2009-04-16 20:00:11 UTC
Sure. Take it. Lets merge KB in bits :-)
Comment 3 Matthew Barnes 2009-04-23 20:54:38 UTC
Committed to master branch.

http://git.gnome.org/cgit/evolution/commit/?id=0006bfb58ac91bac0768590827bd3dabba72c638