Workaround the visibility name in a simpler way
This commit is contained in:
parent
6422f5a149
commit
31320ca2e8
|
@ -135,12 +135,10 @@ def _widget_generate(self, name, parent_name=None):
|
||||||
if 'Properties' in w_data:
|
if 'Properties' in w_data:
|
||||||
for eo_name, p_vals in w_data['Properties'].items():
|
for eo_name, p_vals in w_data['Properties'].items():
|
||||||
p_name = eo_name.split('.')[-1]
|
p_name = eo_name.split('.')[-1]
|
||||||
if p_name == 'visibility': # TODO implement this property in Evas.Object
|
if p_name == 'visibility': # TODO remove this hack when Eo will be fixed
|
||||||
if p_vals[0] is True:
|
p_name = 'visible'
|
||||||
w.show()
|
|
||||||
elif p_name == 'constructor':
|
if p_name != 'constructor':
|
||||||
pass
|
|
||||||
else:
|
|
||||||
self._print('property %s => %s' % (p_name, p_vals))
|
self._print('property %s => %s' % (p_name, p_vals))
|
||||||
p_vals = _params_list_parse(mod, p_vals)
|
p_vals = _params_list_parse(mod, p_vals)
|
||||||
if p_name == 'file':
|
if p_name == 'file':
|
||||||
|
@ -231,13 +229,13 @@ def _param_parse(mod, p_value):
|
||||||
|
|
||||||
def _property_modify_cb(obj, self, widget_name, prop_name, values):
|
def _property_modify_cb(obj, self, widget_name, prop_name, values):
|
||||||
w = self._widgets[widget_name]
|
w = self._widgets[widget_name]
|
||||||
if prop_name == 'visibility': # TODO implement this property in Evas.Object
|
if prop_name == 'visibility': # TODO remove this hack when Eo will be fixed
|
||||||
w.show() if values[0] is True else w.hide()
|
prop_name = 'visible'
|
||||||
else:
|
|
||||||
if prop_name == 'file':
|
if prop_name == 'file':
|
||||||
values = _resource_find(self, values)
|
values = _resource_find(self, values)
|
||||||
values = (values[0]) # ARGHHHHHHHHHHH TODO FIX THE FILE PROP
|
values = (values[0]) # ARGHHHHHHHHHHH TODO FIX THE FILE PROP
|
||||||
setattr(w, prop_name, values[0] if len(values) == 1 else values)
|
setattr(w, prop_name, values[0] if len(values) == 1 else values)
|
||||||
|
|
||||||
|
|
||||||
def _widget_create_cb(obj, self, widget_name, parent_name):
|
def _widget_create_cb(obj, self, widget_name, parent_name):
|
||||||
|
|
Loading…
Reference in New Issue