yakov pushed a commit to branch master. http://git.enlightenment.org/tools/erigo.git/commit/?id=913208d4749bf0b2e297c3028cfe50e83e33f866
commit 913208d4749bf0b2e297c3028cfe50e83e33f866 Author: Yakov Goldberg <yako...@samsung.com> Date: Tue Nov 24 11:44:49 2015 +0200 Convert memento_type_get_as_string() to public API --- src/lib/undoredo.c | 14 +++++++------- src/lib/undoredo.h | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/lib/undoredo.c b/src/lib/undoredo.c index 22bddf2..7fe9686 100644 --- a/src/lib/undoredo.c +++ b/src/lib/undoredo.c @@ -79,8 +79,8 @@ struct _Memento Eina_Bool finalized : 1; }; -static const char * -_memento_type_get_as_string(Memento_Type type) +const char * +memento_type_get_as_string(Memento_Type type) { switch(type) { @@ -321,7 +321,7 @@ memento_finalize(Memento *memento) cmd->new_ptr == cmd_next->old_ptr) { undo_debug("Merging %s on %s: %p -> %p -> %p", - _memento_type_get_as_string(cmd->type), + memento_type_get_as_string(cmd->type), eid_name_get_internal(cmd->eid), cmd->old_ptr, cmd->new_ptr, cmd_next->new_ptr); /* Swap pointers in order to properly unref data. */ @@ -338,7 +338,7 @@ memento_finalize(Memento *memento) if (cmd->old_ptr == cmd->new_ptr) { undo_debug("Deleting %s on %s: %p -> %p", - _memento_type_get_as_string(cmd->type), + memento_type_get_as_string(cmd->type), eid_name_get_internal(cmd->eid), cmd->old_ptr, cmd->new_ptr); cmd_del = EINA_TRUE; break; @@ -367,7 +367,7 @@ memento_finalize(Memento *memento) if (cmd_del) { undo_debug("Deleting %s on %s: %p -> %p", - _memento_type_get_as_string(cmd->type), + memento_type_get_as_string(cmd->type), eid_name_get_internal(cmd->eid), cmd->old_ptr, cmd->new_ptr); break; } @@ -388,7 +388,7 @@ memento_finalize(Memento *memento) wdg_prop_add(wdg, cmd->old_ptr); cmd_del = EINA_TRUE; undo_debug("Deleting %s on %p: %p -> %p", - _memento_type_get_as_string(cmd->type), + memento_type_get_as_string(cmd->type), cmd->eid, cmd->old_ptr, cmd->new_ptr); break; } @@ -584,7 +584,7 @@ context_undo_redo_apply(const Gui_Context *ctx, Eina_Bool memento_redo) } undo_debug("%s : %s on %s: %p -> %p", memento_redo ? "Redo" : "Undo", - _memento_type_get_as_string(cmd->type), + memento_type_get_as_string(cmd->type), eid_name_get_internal(cmd->eid), from, to); switch (type) diff --git a/src/lib/undoredo.h b/src/lib/undoredo.h index 71036eb..7316a55 100644 --- a/src/lib/undoredo.h +++ b/src/lib/undoredo.h @@ -64,4 +64,7 @@ memento_command_new_pointer_get(const Memento_Command *cmd); Eina_Bool context_undo_redo_apply(const Gui_Context *ctx, Eina_Bool memento_redo); +const char * +memento_type_get_as_string(Memento_Type type); + #endif --