summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_edit.c
diff options
context:
space:
mode:
authorm.biliavskyi <m.biliavskyi@samsung.com>2013-11-02 21:26:18 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-11-02 21:26:18 +0900
commita3ce7c9b287e7ce643131207a31740f87e452ecc (patch)
tree02f42f234d8bb934e4fe7e25471bbf55bae4cba8 /src/lib/edje/edje_edit.c
parentf982f6f0a5b9264d06c6e96a04139debe8f726c4 (diff)
Make setter functions "edje_edit_script..." return Eina_Bool.
Summary: Make the following function return Eina_Bool so the caller can detect errors : List of updated functions: edje_edit_script_set edje_edit_script_program_set Reviewers: cedric, seoz, raster Reviewed By: raster CC: reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D307
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_edit.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 038414d9d2..be6972d43f 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -5746,10 +5746,10 @@ edje_edit_script_get(Evas_Object *obj)
5746 return strdup(eed->embryo_source); 5746 return strdup(eed->embryo_source);
5747} 5747}
5748 5748
5749EAPI void 5749EAPI Eina_Bool
5750edje_edit_script_set(Evas_Object *obj, const char *code) 5750edje_edit_script_set(Evas_Object *obj, const char *code)
5751{ 5751{
5752 GET_EED_OR_RETURN(); 5752 GET_EED_OR_RETURN(EINA_FALSE);
5753 5753
5754 free(eed->embryo_source); 5754 free(eed->embryo_source);
5755 free(eed->embryo_processed); 5755 free(eed->embryo_processed);
@@ -5763,6 +5763,7 @@ edje_edit_script_set(Evas_Object *obj, const char *code)
5763 eed->embryo_source_dirty = EINA_TRUE; 5763 eed->embryo_source_dirty = EINA_TRUE;
5764 5764
5765 _edje_edit_flag_script_dirty(eed, EINA_FALSE); 5765 _edje_edit_flag_script_dirty(eed, EINA_FALSE);
5766 return EINA_TRUE;
5766} 5767}
5767 5768
5768EAPI char * 5769EAPI char *
@@ -5776,27 +5777,27 @@ edje_edit_script_program_get(Evas_Object *obj, const char *prog)
5776 if (epr->action != EDJE_ACTION_TYPE_SCRIPT) 5777 if (epr->action != EDJE_ACTION_TYPE_SCRIPT)
5777 return NULL; 5778 return NULL;
5778 5779
5779 ps = eina_hash_find(eed->program_scripts, prog); 5780 ps = eina_hash_find(eed->program_scripts, &epr->id);
5780 if (!ps) /* mmm? it should be there, even if empty */ 5781 if (!ps) /* mmm? it should be there, even if empty */
5781 return NULL; 5782 return NULL;
5782 5783
5783 return ps->code ? strdup(ps->code) : NULL; 5784 return ps->code ? strdup(ps->code) : NULL;
5784} 5785}
5785 5786
5786EAPI void 5787EAPI Eina_Bool
5787edje_edit_script_program_set(Evas_Object *obj, const char *prog, const char *code) 5788edje_edit_script_program_set(Evas_Object *obj, const char *prog, const char *code)
5788{ 5789{
5789 Program_Script *ps; 5790 Program_Script *ps;
5790 5791
5791 GET_EED_OR_RETURN(); 5792 GET_EED_OR_RETURN(EINA_FALSE);
5792 GET_EPR_OR_RETURN(); 5793 GET_EPR_OR_RETURN(EINA_FALSE);
5793 5794
5794 if (epr->action != EDJE_ACTION_TYPE_SCRIPT) 5795 if (epr->action != EDJE_ACTION_TYPE_SCRIPT)
5795 return; 5796 return EINA_FALSE;
5796 5797
5797 ps = eina_hash_find(eed->program_scripts, prog); 5798 ps = eina_hash_find(eed->program_scripts, &epr->id);
5798 if (!ps) /* ???? how so? */ 5799 if (!ps) /* ???? how so? */
5799 return; 5800 return EINA_FALSE;
5800 5801
5801 free(ps->code); 5802 free(ps->code);
5802 free(ps->processed); 5803 free(ps->processed);
@@ -5809,6 +5810,7 @@ edje_edit_script_program_set(Evas_Object *obj, const char *prog, const char *cod
5809 ps->dirty = EINA_TRUE; 5810 ps->dirty = EINA_TRUE;
5810 5811
5811 _edje_edit_flag_script_dirty(eed, EINA_FALSE); 5812 _edje_edit_flag_script_dirty(eed, EINA_FALSE);
5813 return EINA_TRUE;
5812} 5814}
5813 5815
5814static int 5816static int