rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=1db62476ff1f9038c8c7801474b214b88ab48ce6

commit 1db62476ff1f9038c8c7801474b214b88ab48ce6
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Tue Sep 20 16:14:42 2016 +0300

    editor_part: use different signal for part item deletion before resource 
work
    
    @fix
---
 src/bin/common/signals.h         | 1 +
 src/bin/editor/editor_part.c     | 6 +++++-
 src/bin/ui/tabs.c                | 6 +++---
 src/bin/ui/workspace/workspace.c | 2 ++
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/bin/common/signals.h b/src/bin/common/signals.h
index bba7351..2e448b4 100644
--- a/src/bin/common/signals.h
+++ b/src/bin/common/signals.h
@@ -406,6 +406,7 @@ typedef struct {
  *
  * @ingroup Window
  */
+#define SIGNAL_EDITOR_PART_ITEM_PREDELETED "SIGNAL_EDITOR_PART_ITEM_PREDELETED"
 #define SIGNAL_EDITOR_PART_ITEM_DELETED "SIGNAL_EDITOR_PART_ITEM_DELETED"
 
 /**
diff --git a/src/bin/editor/editor_part.c b/src/bin/editor/editor_part.c
index d0fa7a7..d100863 100644
--- a/src/bin/editor/editor_part.c
+++ b/src/bin/editor/editor_part.c
@@ -730,7 +730,11 @@ editor_part_item_del(Evas_Object *edit_object, Change 
*change, Eina_Bool merge _
 
    event_info.part_name = eina_stringshare_add(part_name);
    event_info.item_name = eina_stringshare_add(item_name);
-   if (!_editor_signals_blocked) evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_PART_ITEM_DELETED, (void *)&event_info);
+   if (!_editor_signals_blocked)
+     {
+        evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_PART_ITEM_PREDELETED, (void *)&event_info);
+        evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_PART_ITEM_DELETED, (void *)&event_info);
+     }
    if (change)
      {
         source_group = edje_edit_part_item_source_get(edit_object, part_name, 
item_name);
diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index e950491..02d2844 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -511,7 +511,7 @@ _editor_part_deleted_cb(void *data __UNUSED__,
                         Evas_Object *obj __UNUSED__,
                         void *event_info)
 {
-   Editor_Part *part = (Editor_Part *)event_info;
+   const Editor_Part *part = (Editor_Part *)event_info;
 
    assert(part != NULL);
    assert(tabs.current_group != NULL);
@@ -539,7 +539,7 @@ _editor_program_deleted_cb(void *data __UNUSED__,
                            Evas_Object *obj __UNUSED__,
                            void *event_info)
 {
-   Editor_Program *program = (Editor_Program *)event_info;
+   const Editor_Program *program = (Editor_Program *)event_info;
 
    assert(program != NULL);
    assert(tabs.current_group != NULL);
@@ -1021,7 +1021,7 @@ tabs_add(void)
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PART_ADDED, 
_editor_part_added_cb, NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PART_PREDELETED, 
_editor_part_deleted_cb, NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PART_ITEM_ADDED, 
_editor_part_item_added_cb, NULL);
-   evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PART_ITEM_DELETED, 
_editor_part_item_deleted_cb, NULL);
+   evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PART_ITEM_PREDELETED, 
_editor_part_item_deleted_cb, NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PART_RESTACKED, 
_editor_part_restacked_cb, NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_PART_ITEM_RESTACKED, 
_editor_part_item_restacked_cb, NULL);
    evas_object_smart_callback_add(ap.win, SIGNAL_EDITOR_STATE_ADDED, 
_editor_state_added_cb, NULL);
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index ada7a48..0c4e804 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -1818,6 +1818,8 @@ workspace_part_item_del(Evas_Object *obj,
    assert(item != NULL);
 
    group_navigator_select(wd->group_navi, (Resource2 *)part);
+   group_navigator_part_item_del(wd->group_navi, item);
+
 }
 
 void

-- 


Reply via email to