rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=95db71491655d4e88f264153690fd1a22dd9a194

commit 95db71491655d4e88f264153690fd1a22dd9a194
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Thu Jun 16 09:04:50 2016 +0300

    editor: add new API editor_group_reset
    
    Change-Id: Ie3bf3001f8d61229c5c7be1f615695e49d88432c
---
 src/bin/editor/default.h      |  3 +++
 src/bin/editor/editor_group.c | 29 +++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/src/bin/editor/default.h b/src/bin/editor/default.h
index 94eea39..4dba3e2 100644
--- a/src/bin/editor/default.h
+++ b/src/bin/editor/default.h
@@ -23,6 +23,9 @@
 #include "eflete.h"
 
 Eina_Bool
+editor_group_reset(Evas_Object *obj, Change *change, Eina_Bool apply);
+
+Eina_Bool
 editor_state_reset(Evas_Object *edit_object, Change *change, Eina_Bool apple,
       const char *part_name, const char *state_name, double state_val);
 Eina_Bool
diff --git a/src/bin/editor/editor_group.c b/src/bin/editor/editor_group.c
index 6078abc..5062239 100644
--- a/src/bin/editor/editor_group.c
+++ b/src/bin/editor/editor_group.c
@@ -22,7 +22,10 @@
 #include "diff.h"
 #include "change.h"
 
+#include "editor_private.h"
+
 extern int _editor_signals_blocked;
+
 Eina_Bool
 editor_group_add(Evas_Object *obj, const char *name)
 {
@@ -81,6 +84,32 @@ editor_group_del(Evas_Object *obj, const char *name)
    return true;
 }
 
+Eina_Bool
+editor_group_reset(Evas_Object *obj, Change *change, Eina_Bool apply)
+{
+   Eina_List *programs, *parts, *l;
+   Eina_Stringshare *data;
+
+   assert(obj != NULL);
+
+   programs = edje_edit_programs_list_get(obj);
+   parts = edje_edit_parts_list_get(obj);
+
+   EINA_LIST_FOREACH(programs, l, data)
+      CRIT_ON_FAIL(editor_program_reset(obj, change, apply, data));
+   EINA_LIST_FOREACH(parts, l, data)
+      CRIT_ON_FAIL(editor_part_reset(obj, change, apply, data));
+   EINA_LIST_FOREACH(programs, l, data)
+      CRIT_ON_FAIL(_editor_program_del(obj, change, false, apply, false, 
data));
+   EINA_LIST_FOREACH(parts, l, data)
+      CRIT_ON_FAIL(_editor_part_del(obj, change, false, apply, false, data));
+
+   edje_edit_string_list_free(programs);
+   edje_edit_string_list_free(parts);
+
+   return true;
+}
+
 #define MAX_SET(VAL, VAL_CAPS) \
 Eina_Bool \
 editor_group_max_## VAL ##_set(Evas_Object *obj, Change *change, Eina_Bool 
merge, Eina_Bool apply, \

-- 


Reply via email to