forked from enlightenment/efl
edje: Return "" as state for invalid parts
Instead of "default". This is consistent with legacy, and allows for some kind of error checking. Not returning NULL helps avoiding crashes.
This commit is contained in:
parent
4d32334f21
commit
8abf43b373
|
@ -27,7 +27,7 @@ _edje_part_invalid_call(Eo *proxy, const char *function)
|
|||
EOLIAN static void
|
||||
_efl_canvas_layout_part_invalid_efl_canvas_layout_part_state_get(Eo *proxy, void *_pd EINA_UNUSED, const char **state, double *val)
|
||||
{
|
||||
if (state) *state = "default";
|
||||
if (state) *state = "";
|
||||
if (val) *val = 0.0;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,13 @@ class Efl.Canvas.Layout.Part (Efl.Object, Efl.Gfx, Efl.Ui.Drag)
|
|||
|
||||
This is the state name as it appears in EDC description blocks. A
|
||||
state has both a name and a value (double). The default state is
|
||||
"default" 0.0.
|
||||
"default" 0.0, but this function will return "" if the part is
|
||||
invalid.
|
||||
]]
|
||||
get {}
|
||||
values {
|
||||
state: string("default"); [[The name of the state.]]
|
||||
val: double; [[The value of the state.]]
|
||||
state: string(""); [[The name of the state.]]
|
||||
val: double(0.0); [[The value of the state.]]
|
||||
}
|
||||
}
|
||||
@property part_type {
|
||||
|
|
Loading…
Reference in New Issue