[Glade-devel] Property Binding: Fixing the big blocker
Tristan Van Berkom
tristan.van.berkom at gmail.com
Tue Nov 15 14:59:01 EST 2011
On Tue, Nov 15, 2011 at 12:45 PM, Denis Washington <denisw at online.de> wrote:
> Hi,
>
> After an unfortunate longer period of inactivity, I am happy to tell you
> that I started to work on bringing GObject property binding support to
> Glade again where I left off last summer after GSoC [1]. (By the way, I
> passed final evaluation! Thanks to everyone involved! Thank for
> mentoring me, Juan! :) This message is intended as a quick update what I
> am doing now.
>
> In my last message to this list [2], I mentioned that the current Glade
> codebase doesn't record changes to the sensitivity of properties (such
> as, e.g., making the "label" property of a GtkButton insensitive when
> that button is set to have a custom content widget) in its command
> (undo/redo) system, and that this makes it impossible to cleanly
> auto-remove property bindings that become invalid this way. Tristan
> identified this problem as a blocker to the adoption of the property
> binding branch [3] into master, so this is what I'm starting to tackle now.
>
> For this purpose, I created a new branch named "command-set-sensitive"
> to convert all relevant property sensitivity changes to undoable
> commands. (I am not doing this in the "gbinding" branch directly to
> allow for easier isolated reviewing and testing.) The branch introduces
> the following (as loosely discussed with Tristan):
>
> - A new command function, named glade_command_set_property_sensitive(),
> which sets the sensitivity of a single property undoably. Being more of
> a side effect, this command is always group with other commands (such as
> switching the content type of a GtkButton) and should never stand on its
> own.
>
> - A new virtual function of GladeWidgetAdaptor,
> glade_widget_adaptor_adjust_property_flags(), which can be overridden
> for each type of widget to provide a property sensitivity policy. It
> accepts a "use_command" boolean parameter which tells the function
> whether to use the command system for sensititivity changes or call
> glade_widget_property_set_sensitive() directly. (The latter is required
> when the widget is first created, or when it is loaded from a file.)
>
> - A port of a small portion of the GTK+ plugin to the new functions as
> an example. (Currently, only the GtkEntry-related port is ported.)
>
> I hope that this work enables me to fix the last remaining big blocker
> bug before the property binding branch is ready for prime time. Any
> feedback is very welcome! (@Tristan: Please review when you find the time!)
Denis,
Thanks for taking time to send this mail, it's good that we archive
this plan which we drafted in our irc session for future reference.
Because this GBinding thing is turning out to be complex, what I really
want (and I think you might have missed that, sorry if I wasn't clear) is
an explanation of how recording sensitivity in the undo/redo stack
solves the GBinding branch problems.
In a nutshell, can you give us a status of the GBinding integration ?
I just want to have an idea of if this is really the last blocker, why is
it the last blocker and if not, what remains to be done.
Cheers,
-Tristan
>
> Regards,
> Denis
>
> [1] https://live.gnome.org/DenisWashington_GtkBuilder
> [2] http://lists.ximian.com/pipermail/glade-devel/2011-September/001902.html
> [3] http://git.gnome.org/browse/glade/log/?h=gbinding
> _______________________________________________
> Glade-devel maillist - Glade-devel at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-devel
>
More information about the Glade-devel
mailing list