summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2018-01-18 13:54:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2018-01-18 13:57:31 +0900
commit8abf43b3730da81a6b67bae6f2cecc43b50371a4 (patch)
tree5d4f39f6861d9245f28d8e374c9bbcc93123b2c4
parent4d32334f210dff40a03845bec9cb6d431fb526f5 (diff)
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.
-rw-r--r--src/lib/edje/edje_part_invalid.c2
-rw-r--r--src/lib/edje/efl_canvas_layout_part.eo7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/edje/edje_part_invalid.c b/src/lib/edje/edje_part_invalid.c
index 057a54a91a..7e59bbb976 100644
--- a/src/lib/edje/edje_part_invalid.c
+++ b/src/lib/edje/edje_part_invalid.c
@@ -27,7 +27,7 @@ _edje_part_invalid_call(Eo *proxy, const char *function)
27EOLIAN static void 27EOLIAN static void
28_efl_canvas_layout_part_invalid_efl_canvas_layout_part_state_get(Eo *proxy, void *_pd EINA_UNUSED, const char **state, double *val) 28_efl_canvas_layout_part_invalid_efl_canvas_layout_part_state_get(Eo *proxy, void *_pd EINA_UNUSED, const char **state, double *val)
29{ 29{
30 if (state) *state = "default"; 30 if (state) *state = "";
31 if (val) *val = 0.0; 31 if (val) *val = 0.0;
32} 32}
33 33
diff --git a/src/lib/edje/efl_canvas_layout_part.eo b/src/lib/edje/efl_canvas_layout_part.eo
index 37e5ae5f9f..cf62cf1352 100644
--- a/src/lib/edje/efl_canvas_layout_part.eo
+++ b/src/lib/edje/efl_canvas_layout_part.eo
@@ -17,12 +17,13 @@ class Efl.Canvas.Layout.Part (Efl.Object, Efl.Gfx, Efl.Ui.Drag)
17 17
18 This is the state name as it appears in EDC description blocks. A 18 This is the state name as it appears in EDC description blocks. A
19 state has both a name and a value (double). The default state is 19 state has both a name and a value (double). The default state is
20 "default" 0.0. 20 "default" 0.0, but this function will return "" if the part is
21 invalid.
21 ]] 22 ]]
22 get {} 23 get {}
23 values { 24 values {
24 state: string("default"); [[The name of the state.]] 25 state: string(""); [[The name of the state.]]
25 val: double; [[The value of the state.]] 26 val: double(0.0); [[The value of the state.]]
26 } 27 }
27 } 28 }
28 @property part_type { 29 @property part_type {