[Glade-devel] Property Binding: Fixing the big blocker
Denis Washington
denisw at online.de
Sun Dec 11 04:15:44 EST 2011
Am 22.11.2011 07:18, schrieb Denis Washington:
>> The other detail about the 'clear property' or 'invalidate property' semantics
>> is not entirely clear to me, I suppose one approach would be to fire a signal
>> on a GladeProperty when it is supposed to be cleared.
>>
>> For instance...
>>
>> o the activatable editor goes ahead and clears
>> a property which is actually a binding source (somewhere inside
>> the command group which it declares)... possibly by calling
>> glade_property_clear (property, use_command = TRUE);
>>
>> o Then the "clear" or "invalidate" signal is fired on the said GladeProperty
>> with a 'use-command' parameter as TRUE
>>
>> o GladeProperty code would implicitly connect to the "invalidate" signal
>> on it's set 'source property', when the property is cleared then the source
>> property attribute can be unset undoably
>>
>> o Some specific GladeWidgets will be allowed to connect to an "invalidate"
>> signal on a property of another GladeWidget, if ever more code is developed
>> which needs to do an action at property invalidation time, this can be done
>> by listening to this signal and without adding custom code to
>> glade-command.c
>
> This sounds like a sensible approach (although I would really call it
> glade_property_invalidate(), as this makes the intention and the
> difference to "resetting" a property clearer). I could go ahead and
> implement this and see how it works out.
Hi, I wanted to say that I just pulled
glade_command_set_property_sensitive() out of the branch and just left
GladeWidgetAdaptor::evaluate_property_sensitivity() there. Consequently,
the branch is now named "evaluate-sensitivity".
I added a call to evaluate_property_sensitivity() to
glade_property_set_value_impl(), and for the case that I ported so far
(GtkEntry), this works perfectly.
As there is no need for it outside of the gbinding branch, I'll add
glade_property_invalidate() to that branch directly. I guess I'll also
rebase gbinding to the evaluate-property branch to make testing easier.
Regards,
Denis
More information about the Glade-devel
mailing list