jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=664200b7b0596ffaee93f4b2aac5b972ad0c9676

commit 664200b7b0596ffaee93f4b2aac5b972ad0c9676
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Sun Nov 8 15:40:54 2015 +0200

    Memento: rename confusing type
---
 src/bin/gui/editor.c | 22 +++++++++++-----------
 src/lib/undoredo.c   | 10 +++++-----
 src/lib/undoredo.h   |  2 +-
 src/lib/updater.c    |  2 +-
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/bin/gui/editor.c b/src/bin/gui/editor.c
index 2698ac1..d72c78b 100644
--- a/src/bin/gui/editor.c
+++ b/src/bin/gui/editor.c
@@ -1774,7 +1774,7 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
         _new_container = obj_container_copy(_old_container);
 
         memento_command_add(wdg_eid_get(drop_target_wdg),
-              MEMENTO_OBJ_CONTAINER_ITEM,
+              MEMENTO_OBJ_CONTAINER,
               _old_container, _new_container);
         /* Current memento is a memento created, during _factory 
_widget_create earlier in this func. */
         wdg_obj_container_unset(drop_target_wdg);
@@ -1798,7 +1798,7 @@ _drop_target_drop(Gui_Widget *drop_target_wdg, Eo 
*canvas_drop_target, const cha
         _new_container = obj_container_copy(_old_container);
 
         memento_command_add(wdg_eid_get(drop_target_wdg),
-              MEMENTO_OBJ_CONTAINER_ITEM,
+              MEMENTO_OBJ_CONTAINER,
               _old_container, _new_container);
         /* Current memento is a memento created, during _factory 
_widget_create earlier in this func. */
 
@@ -2288,7 +2288,7 @@ _drag_start_post(const Gui_Widget *wdg, const Eo *_wdg_eo)
         _old_prev_container = (Object_Container *) 
wdg_obj_container_get((Gui_Widget *) wdg_container);
         _new_prev_container = obj_container_copy(_old_prev_container);
         memento_command_add(wdg_eid_get(wdg_container),
-                            MEMENTO_OBJ_CONTAINER_ITEM,
+                            MEMENTO_OBJ_CONTAINER,
                             _old_prev_container, _new_prev_container);
 
         wdg_obj_container_unset((Gui_Widget *) wdg_container);
@@ -2345,7 +2345,7 @@ _dragdone_post_cb(Eina_Bool accept, const Eo *wdg_eo, 
const Gui_Widget *drag_sta
              Gui_Widget *wdg = wdg_get(eid);
              switch (type)
                {
-                case MEMENTO_OBJ_CONTAINER_ITEM:
+                case MEMENTO_OBJ_CONTAINER:
                      {
                         Object_Container *old_container = 
memento_command_old_pointer_get(cmd);
 
@@ -2732,7 +2732,7 @@ __undo_no_update(const Gui_Context *ctx)
                      propview_item_selected_set(op_desc);
                    break;
                 }
-           case MEMENTO_OBJ_CONTAINER_ITEM:
+           case MEMENTO_OBJ_CONTAINER:
                 {
                    Object_Container *old_container;
 
@@ -2866,7 +2866,7 @@ _editor_undo_redo_post(const Memento *memento)
                 {
                    break;
                 }
-           case MEMENTO_OBJ_CONTAINER_ITEM:
+           case MEMENTO_OBJ_CONTAINER:
            case MEMENTO_ITEM_CONTAINER_ITEM:
                 {
                    proplayout_view_switch(CONTENT_TYPE);
@@ -3026,7 +3026,7 @@ _editor_redo(const Gui_Context *ctx)
                    _editor_wdg_selected_set(wdg);
                    break;
                 }
-           case MEMENTO_OBJ_CONTAINER_ITEM:
+           case MEMENTO_OBJ_CONTAINER:
                 {
                    Object_Container *new_container;
 
@@ -3824,7 +3824,7 @@ _content_del_from_propview(void *data, Eo *obj 
EINA_UNUSED, const Eo_Event_Descr
    _old_container = (Object_Container *) wdg_obj_container_get((Gui_Widget *) 
wdg);
    _new_container = obj_container_copy(_old_container);
 
-   memento_command_add(wdg_eid_get(wdg), MEMENTO_OBJ_CONTAINER_ITEM, 
_old_container, _new_container);
+   memento_command_add(wdg_eid_get(wdg), MEMENTO_OBJ_CONTAINER, 
_old_container, _new_container);
 
    wdg_obj_container_unset((Gui_Widget *) wdg);
    wdg_obj_container_set((Gui_Widget *) wdg, _new_container);
@@ -3864,7 +3864,7 @@ _content_reorder_from_propview(void *data, Eo *obj 
EINA_UNUSED, const Eo_Event_D
         /* If anything was reordered, need to reload content. */
         if (wdg_obj_container_content_reorder(wdg, idx, button_dir))
           {
-             memento_command_add(wdg_eid_get(wdg), MEMENTO_OBJ_CONTAINER_ITEM, 
_old_container, _new_container);
+             memento_command_add(wdg_eid_get(wdg), MEMENTO_OBJ_CONTAINER, 
_old_container, _new_container);
 
              /* Update propview. */
              _editor_wdg_selected_set(wdg);
@@ -3936,7 +3936,7 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo 
*obj, const Eo_Event_De
    _old_container = (Object_Container *) wdg_obj_container_get((Gui_Widget *) 
wdg);
    _new_container = obj_container_copy(_old_container);
 
-   memento_command_add(wdg_eid_get(wdg), MEMENTO_OBJ_CONTAINER_ITEM, 
_old_container, _new_container);
+   memento_command_add(wdg_eid_get(wdg), MEMENTO_OBJ_CONTAINER, 
_old_container, _new_container);
 
    wdg_obj_container_unset((Gui_Widget *) wdg);
    wdg_obj_container_set((Gui_Widget *) wdg, _new_container);
@@ -4061,7 +4061,7 @@ _content_change_from_propview(void *data EINA_UNUSED, Eo 
*obj, const Eo_Event_De
                   _new_prev_container = 
obj_container_copy(_old_prev_container);
 
                   memento_command_add(wdg_eid_get(prev_wdg_container),
-                                                              
MEMENTO_OBJ_CONTAINER_ITEM,
+                                                              
MEMENTO_OBJ_CONTAINER,
                                                               
_old_prev_container, _new_prev_container);
                   wdg_obj_container_unset((Gui_Widget *) prev_wdg_container);
                   wdg_obj_container_set((Gui_Widget *) prev_wdg_container, 
_new_prev_container);
diff --git a/src/lib/undoredo.c b/src/lib/undoredo.c
index c3f36b6..d6715c0 100644
--- a/src/lib/undoredo.c
+++ b/src/lib/undoredo.c
@@ -122,7 +122,7 @@ memento_command_add(Eid *eid, Memento_Type type, void 
*old_pointer, void *new_po
               cmd->new_cb_container = new_pointer;
               break;
            }
-      case MEMENTO_OBJ_CONTAINER_ITEM:
+      case MEMENTO_OBJ_CONTAINER:
            {
               cmd->old_obj_container = old_pointer;
               if (cmd->old_obj_container)
@@ -213,7 +213,7 @@ _cmd_del(Memento_Command *cmd)
                  cb_container_unref((Callback_Container *) 
cmd->new_cb_container);
               break;
            }
-      case MEMENTO_OBJ_CONTAINER_ITEM:
+      case MEMENTO_OBJ_CONTAINER:
            {
               if (cmd->old_obj_container)
                  obj_container_unref((Object_Container *) 
cmd->old_obj_container);
@@ -310,7 +310,7 @@ memento_finalize(Memento *memento)
                   cmd_del = EINA_TRUE;
                   break;
                }
-             if (cmd->type == MEMENTO_OBJ_CONTAINER_ITEM)
+             if (cmd->type == MEMENTO_OBJ_CONTAINER)
                {
                   Eid *eid = memento_command_wdg_get(cmd);
                   if (strcmp(wdg_class_name_get(wdg_get(eid)), 
DB_DEF_BOX_CLASS)) continue;
@@ -410,7 +410,7 @@ memento_command_old_pointer_get(const Memento_Command *cmd)
            {
               return (void *) cmd->old_cb_container;
            }
-      case MEMENTO_OBJ_CONTAINER_ITEM:
+      case MEMENTO_OBJ_CONTAINER:
            {
               return (void *) cmd->old_obj_container;
            }
@@ -467,7 +467,7 @@ memento_command_new_pointer_get(const Memento_Command *cmd)
            {
               return (void *) cmd->new_cb_container;
            }
-      case MEMENTO_OBJ_CONTAINER_ITEM:
+      case MEMENTO_OBJ_CONTAINER:
            {
               return (void *) cmd->new_obj_container;
            }
diff --git a/src/lib/undoredo.h b/src/lib/undoredo.h
index 07beb4f..bdffcfb 100644
--- a/src/lib/undoredo.h
+++ b/src/lib/undoredo.h
@@ -8,7 +8,7 @@ typedef enum
    MEMENTO_ACTION,
    MEMENTO_CALLBACK,
    MEMENTO_CALLBACK_ADD_DEL,
-   MEMENTO_OBJ_CONTAINER_ITEM,
+   MEMENTO_OBJ_CONTAINER,
    MEMENTO_ITEM_CONTAINER_ITEM,
    MEMENTO_WIDGET,
    MEMENTO_WIDGET_PARENT,
diff --git a/src/lib/updater.c b/src/lib/updater.c
index 2a594fb..b629b0c 100644
--- a/src/lib/updater.c
+++ b/src/lib/updater.c
@@ -139,7 +139,7 @@ _update_check(void *data EINA_UNUSED)
                                }
                              break;
                           }
-                     case MEMENTO_OBJ_CONTAINER_ITEM:
+                     case MEMENTO_OBJ_CONTAINER:
                           {
                              Gui_Session *session = (Gui_Session *) 
gui_context_editor_session_get(ctx);
                              manager_widget_content_unset_all(session, wdg, 
wdg_obj_container_class_name_get(wdg), NULL);

-- 


Reply via email to