yakov pushed a commit to branch master.

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

commit c66c7642c4a69aafecb0b271e8d5809d31873adc
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Tue Oct 20 18:02:47 2015 +0300

    Move memento_new_cb() into context_memento_finalize()
    
    This callback is used to enable Undo and disable Redo buttons.
    It looks more logical to call this callback form finalize func.
---
 src/lib/gui_widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/gui_widget.c b/src/lib/gui_widget.c
index 0facc1d..3c62c8c 100644
--- a/src/lib/gui_widget.c
+++ b/src/lib/gui_widget.c
@@ -3865,7 +3865,6 @@ _context_memento_add(Gui_Context *ctx, const Memento 
*memento)
    context_memento_discard(ctx);
    ctx->memento_list = eina_list_append(ctx->memento_list, memento);
    ctx->current_memento = eina_list_last(ctx->memento_list);
-   if (_new_memento_cb) _new_memento_cb(_new_memento_data);
 }
 
 #if 0
@@ -3914,6 +3913,7 @@ context_memento_finalize(Gui_Context *ctx)
 {
    const Memento *mem = context_current_memento_get(ctx);
    if (mem) memento_finalize((Memento *)mem);
+   if (_new_memento_cb) _new_memento_cb(_new_memento_data);
    // add changes on ctx HERE
 }
 

-- 


Reply via email to