jaehwan pushed a commit to branch master.

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

commit fccc08adeacc84748c72ca72ff4661a71c9ae75e
Author: Jaehwan Kim <[email protected]>
Date:   Mon Jan 9 17:41:30 2017 +0900

    resource manager: hide the preview after deleting item.
---
 src/bin/ui/colorclass_manager.c | 3 ++-
 src/bin/ui/style_manager.c      | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bin/ui/colorclass_manager.c b/src/bin/ui/colorclass_manager.c
index 2cdf7d1..7328198 100644
--- a/src/bin/ui/colorclass_manager.c
+++ b/src/bin/ui/colorclass_manager.c
@@ -152,6 +152,7 @@ _colorclass_del_cb(void *data __UNUSED__,
    Elm_Object_Item *it = elm_genlist_selected_item_get(mng.genlist);
    Elm_Object_Item *next = elm_genlist_item_next_get(it);
    Colorclass_Item *ccl = elm_object_item_data_get(it);
+   if (!next) next = elm_genlist_item_prev_get(it);
 
    CRIT_ON_FAIL(editor_color_class_del(ap.project->global_object, ccl->name, 
true));
    elm_object_item_del(it);
@@ -184,13 +185,13 @@ _colorclass_del_cb(void *data __UNUSED__,
      }
 #endif
 
-   if (!next) next = elm_genlist_item_prev_get(it);
    if (next)
       elm_genlist_item_selected_set(next, EINA_TRUE);
    else
      {
         mng.current_ccl = NULL;
         elm_object_disabled_set(mng.del_button, EINA_TRUE);
+        elm_object_signal_emit(mng.preview_layout, "entry,hide", "eflete");
         evas_object_smart_callback_call(ap.win, SIGNAL_COLOR_SELECTED, NULL);
      }
 }
diff --git a/src/bin/ui/style_manager.c b/src/bin/ui/style_manager.c
index d52d6d6..4501d04 100644
--- a/src/bin/ui/style_manager.c
+++ b/src/bin/ui/style_manager.c
@@ -348,6 +348,7 @@ _btn_del_cb(void *data __UNUSED__,
         style_name = elm_object_item_data_get(glit);
         CRIT_ON_FAIL(editor_style_del(edje_edit_obj, style_name, true));
         evas_object_smart_callback_call(ap.win, 
SIGNAL_EDITOR_ATTRIBUTE_CHANGED, &attribute);
+        elm_object_signal_emit(mng.entry_prev, "entry,hide", "eflete");
      }
    else
      {

-- 


Reply via email to