yakov pushed a commit to branch master.

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

commit de834041dc376b4036a03a278ed76929ac6f5ae7
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Mon Dec 7 14:35:00 2015 +0200

    Refactoring
    
    Move call of context_memento_finalize() into proper scope
---
 src/bin/gui/cbview.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/bin/gui/cbview.c b/src/bin/gui/cbview.c
index d37c2ba..e5961b5 100644
--- a/src/bin/gui/cbview.c
+++ b/src/bin/gui/cbview.c
@@ -128,11 +128,11 @@ _action_wdg_selected(void *data, Eo *obj EINA_UNUSED, 
void *event_info)
 
         if (act_type == CREATION_ACTION) action_creation_set(new_action, 
wdg_id, NULL);
         if (act_type == MODIF_ACTION) action_modif_set(new_action, wdg_id, 
NULL);
+        context_memento_finalize(ctx);
      }
 
    cbview_build(it_data->wdg);
    cbview_item_selected_set(cb_eid_get(cb));
-   context_memento_finalize(ctx);
 }
 
 static Eina_Bool
@@ -155,11 +155,11 @@ _action_parent_selected(void *data, Eo *obj EINA_UNUSED, 
const Eo_Event_Descript
         const char *parent_name = elm_object_item_part_text_get(event_info, 
NULL);
         Eid *parent_id = gui_context_eid_get_by_name(ctx, parent_name);
         action_creation_set(new_action, action_widget_id_get(new_action), 
parent_id);
+        context_memento_finalize(ctx);
      }
 
    cbview_build(it_data->wdg);
    cbview_item_selected_set(cb_eid_get(cb));
-   context_memento_finalize(ctx);
    return EO_CALLBACK_CONTINUE;
 }
 
@@ -183,11 +183,11 @@ _action_user_cb_selected(void *data, Eo *obj EINA_UNUSED, 
const Eo_Event_Descrip
         const char *cb_name = elm_object_item_part_text_get(event_info, NULL);
         Eid *cb_id = gui_context_eid_get_by_name(ctx, cb_name);
         action_user_set(new_action, cb_id, NULL);
+        context_memento_finalize(ctx);
      }
 
    cbview_build(it_data->wdg);
    cbview_item_selected_set(cb_eid_get(cb));
-   context_memento_finalize(ctx);
    return EO_CALLBACK_CONTINUE;
 }
 
@@ -239,8 +239,8 @@ _action_prop_selected(void *data, Eo *obj EINA_UNUSED, 
const Eo_Event_Descriptio
 
         cbview_build(it_data->wdg);
         cbview_item_selected_set(cb_eid_get(cb));
+        context_memento_finalize(_active_context_get());
      }
-   context_memento_finalize(_active_context_get());
    return EO_CALLBACK_CONTINUE;
 }
 
@@ -722,6 +722,7 @@ _selected_callback_move(int dir)
 
                   cbview_build(wdg);
                   cbview_item_selected_set(cb_eid_get(cb));
+                  context_memento_finalize(_active_context_get());
                }
              /* If nothing wasn't move, delete Callback_Container */
              else
@@ -732,7 +733,6 @@ _selected_callback_move(int dir)
                }
           }
      }
-   context_memento_finalize(_active_context_get());
 }
 
 Eina_Bool

-- 


Reply via email to