rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=0ad691f35d5aa6c10e9e5c7ee8394927c75a2509

commit 0ad691f35d5aa6c10e9e5c7ee8394927c75a2509
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Mon Feb 8 15:56:10 2016 +0200

    editor: add missing saves
---
 src/bin/editor/editor_macro.h  |  3 ++-
 src/bin/editor/editor_states.c | 12 ++++++------
 src/bin/editor/editor_text.c   |  6 +++---
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/bin/editor/editor_macro.h b/src/bin/editor/editor_macro.h
index 3bec3ab..819779a 100644
--- a/src/bin/editor/editor_macro.h
+++ b/src/bin/editor/editor_macro.h
@@ -93,7 +93,7 @@ editor_state_## FUNC ##_set(Evas_Object *edit_object, Change 
*change, Eina_Bool
    return true; \
 }
 
-#define EDITOR_STATE_STRING(FUNC, ATTRIBUTE) \
+#define EDITOR_STATE_STRING(FUNC, ATTRIBUTE, SAVE) \
 Eina_Bool \
 editor_state_## FUNC ##_set(Evas_Object *edit_object, Change *change, 
Eina_Bool merge, \
                             const char *part_name, const char *state_name, 
double state_val, const char *new_val) \
@@ -126,6 +126,7 @@ editor_state_## FUNC ##_set(Evas_Object *edit_object, 
Change *change, Eina_Bool
      } \
    if (!edje_edit_state_## FUNC ##_set(edit_object, part_name, state_name, 
state_val, new_val)) \
      return false; \
+   if (SAVE) editor_save(edit_object); \
    _editor_project_changed(); \
    if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, &attribute); \
    return true; \
diff --git a/src/bin/editor/editor_states.c b/src/bin/editor/editor_states.c
index b20c919..c1f58dc 100644
--- a/src/bin/editor/editor_states.c
+++ b/src/bin/editor/editor_states.c
@@ -161,17 +161,17 @@ EDITOR_STATE_BOOL(visible, ATTRIBUTE_STATE_VISIBLE)
 EDITOR_STATE_BOOL(container_min_h, ATTRIBUTE_STATE_CONTAINER_MIN_H)
 EDITOR_STATE_BOOL(container_min_v, ATTRIBUTE_STATE_CONTAINER_MIN_V)
 
-EDITOR_STATE_STRING(rel1_to_x, ATTRIBUTE_STATE_REL1_TO_X)
-EDITOR_STATE_STRING(rel1_to_y, ATTRIBUTE_STATE_REL1_TO_Y)
-EDITOR_STATE_STRING(rel2_to_x, ATTRIBUTE_STATE_REL2_TO_X)
-EDITOR_STATE_STRING(rel2_to_y, ATTRIBUTE_STATE_REL2_TO_Y)
-EDITOR_STATE_STRING(proxy_source, ATTRIBUTE_STATE_PROXY_SOURCE)
+EDITOR_STATE_STRING(rel1_to_x, ATTRIBUTE_STATE_REL1_TO_X, true)
+EDITOR_STATE_STRING(rel1_to_y, ATTRIBUTE_STATE_REL1_TO_Y, true)
+EDITOR_STATE_STRING(rel2_to_x, ATTRIBUTE_STATE_REL2_TO_X, true)
+EDITOR_STATE_STRING(rel2_to_y, ATTRIBUTE_STATE_REL2_TO_Y, true)
+EDITOR_STATE_STRING(proxy_source, ATTRIBUTE_STATE_PROXY_SOURCE, true)
 
 TODO("Fix edje_edit API")
 //EDITOR_STATE_STRING(box_layout, ATTRIBUTE_STATE_BOX_LAYOUT)
 //EDITOR_STATE_STRING(box_alt_layout, ATTRIBUTE_STATE_BOX_ALT_LAYOUT)
 
-EDITOR_STATE_STRING(color_class, ATTRIBUTE_STATE_COLOR_CLASS)
+EDITOR_STATE_STRING(color_class, ATTRIBUTE_STATE_COLOR_CLASS, true)
 
 TODO("Replace with image stub")
 EDITOR_STATE_STRING_WITH_FALLBACK(image, ATTRIBUTE_STATE_IMAGE, NULL)
diff --git a/src/bin/editor/editor_text.c b/src/bin/editor/editor_text.c
index f149786..35d3ae9 100644
--- a/src/bin/editor/editor_text.c
+++ b/src/bin/editor/editor_text.c
@@ -76,9 +76,9 @@ EDITOR_STATE_BOOL(text_max_y, ATTRIBUTE_STATE_TEXT_MAX_Y)
 EDITOR_STATE_BOOL(text_min_x, ATTRIBUTE_STATE_TEXT_MIN_X)
 EDITOR_STATE_BOOL(text_min_y, ATTRIBUTE_STATE_TEXT_MIN_Y)
 
-EDITOR_STATE_STRING(text_source, ATTRIBUTE_STATE_TEXT_SOURCE)
-EDITOR_STATE_STRING(text_text_source, ATTRIBUTE_STATE_TEXT_TEXT_SOURCE)
-EDITOR_STATE_STRING(text, ATTRIBUTE_STATE_TEXT)
+EDITOR_STATE_STRING(text_source, ATTRIBUTE_STATE_TEXT_SOURCE, true)
+EDITOR_STATE_STRING(text_text_source, ATTRIBUTE_STATE_TEXT_TEXT_SOURCE, true)
+EDITOR_STATE_STRING(text, ATTRIBUTE_STATE_TEXT, true)
 
 EDITOR_STATE_STRING_WITH_FALLBACK(font, ATTRIBUTE_STATE_FONT, NULL)
 TODO("Add style fallback here")

-- 


Reply via email to