[Gazpacho] Re: [Gazpacho-commits] r2376 - in gazpacho/trunk: .
gazpacho gazpacho/widgets/base tests tests/glade
Johan Dahlin
johan at gnome.org
Wed May 31 12:01:47 CEST 2006
Lorenzo Gil Sanchez skrev:
>> Modified: gazpacho/trunk/gazpacho/commandmanager.py
>> ===================================================================
>> --- gazpacho/trunk/gazpacho/commandmanager.py 2006-05-30 20:16:15 UTC (rev 2375)
>> +++ gazpacho/trunk/gazpacho/commandmanager.py 2006-05-30 21:30:22 UTC (rev 2376)
>> @@ -130,6 +130,9 @@
>> if not palette.persistent_mode:
>> palette.unselect_widget()
>>
>> + if not isinstance(gadget.widget, gtk.Window):
>> + gadget.get_prop('visible').value = True
>> +
>> return gadget
>>
>> def delete_placeholder(self, placeholder):
>>
>>
> Why can't this be done in the Visible property adaptor?
>
> Same question, what's special about that prop? Isn't InvisibleProp
> created for these situations?
>
> At least I really think there should be a comment explaining why are we
> doing this in the 'create' command.
It should only be done when creating widgets interactivly. It's not a
very good solution to unconditionally set it to true for all non-window
subclasses.
It is like setting a default value, but only in the interactive case.
We can always add an extra method or two if it turns out that we need to
add more property or adapter specific logic there.
A comment is definitely justified though.
Johan
More information about the Gazpacho
mailing list