rimmed pushed a commit to branch master.

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

commit b50918e3129ebf5b726647a6fa612c50eb8670ca
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Wed Nov 25 13:34:49 2015 +0200

    workspace: delete the API for add/del part item
    
    Instead these API use workspace_edit_object_recalc.
    
    Change-Id: I3138085b1b739e8822ac37d526a5e629aa640095
---
 src/bin/ui/dialogs/item_dialog.c | 16 +++-------------
 src/bin/ui/workspace/groupedit.c | 29 -----------------------------
 src/bin/ui/workspace/groupedit.h | 32 --------------------------------
 src/bin/ui/workspace/workspace.c | 25 -------------------------
 src/bin/ui/workspace/workspace.h | 31 -------------------------------
 5 files changed, 3 insertions(+), 130 deletions(-)

diff --git a/src/bin/ui/dialogs/item_dialog.c b/src/bin/ui/dialogs/item_dialog.c
index 19b65a2..dff8853 100644
--- a/src/bin/ui/dialogs/item_dialog.c
+++ b/src/bin/ui/dialogs/item_dialog.c
@@ -58,7 +58,6 @@ _on_button_add_clicked(void *data __UNUSED__,
    assert(combobox != NULL);
    assert(part != NULL);
 
-   const char *name = elm_entry_entry_get(entry);
    Ewe_Combobox_Item *item = NULL;
 
    if (elm_entry_is_empty(entry))
@@ -75,18 +74,9 @@ _on_button_add_clicked(void *data __UNUSED__,
         return;
      }
 
-   if (workspace_edit_object_part_item_add(ap.workspace, part->name, name, 
item->title))
-     {
-       edje_edit_string_list_free(part->items);
-       part->items = 
edje_edit_part_items_list_get(ap.project->current_style->obj, part->name);
-       ui_widget_list_part_items_refresh(ui_block_widget_list_get(), part, 
true);
-     }
-   else
-     {
-        NOTIFY_ERROR(_("Item with typed name is already exist. <br>"
-                       "Please type different name for this item."))
-        return;
-     }
+   edje_edit_string_list_free(part->items);
+   part->items = edje_edit_part_items_list_get(ap.project->current_style->obj, 
part->name);
+   ui_widget_list_part_items_refresh(ui_block_widget_list_get(), part, true);
 
    workspace_edit_object_recalc(ap.workspace);
    //project_changed(false);
diff --git a/src/bin/ui/workspace/groupedit.c b/src/bin/ui/workspace/groupedit.c
index ba3dd75..562efcc 100644
--- a/src/bin/ui/workspace/groupedit.c
+++ b/src/bin/ui/workspace/groupedit.c
@@ -337,35 +337,6 @@ groupedit_edit_object_part_del(Evas_Object *obj, Part_ 
*part)
 }
 
 Eina_Bool
-groupedit_edit_object_part_item_add(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item, Eina_Stringshare 
*source)
-{
-   WS_GROUPEDIT_DATA_GET(obj, sd);
-
-   assert(part != NULL);
-   assert(item != NULL);
-   assert(source != NULL);
-
-   /* return _edit_object_part_item_add(sd, part, item, source); */
-   TODO("delete this func, instead use _recalc")
-   return false;
-}
-
-Eina_Bool
-groupedit_edit_object_part_item_del(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item)
-{
-   WS_GROUPEDIT_DATA_GET(obj, sd);
-
-   assert(part != NULL);
-   assert(item != NULL);
-
-   /* return _edit_object_part_item_del(sd, part, item); */
-   TODO("delete this func, instead use _recalc")
-   return false;
-}
-
-Eina_Bool
 groupedit_edit_object_part_above(Evas_Object *obj, const char *part)
 {
    WS_GROUPEDIT_DATA_GET(obj, sd);
diff --git a/src/bin/ui/workspace/groupedit.h b/src/bin/ui/workspace/groupedit.h
index 1e266f7..a90692b 100644
--- a/src/bin/ui/workspace/groupedit.h
+++ b/src/bin/ui/workspace/groupedit.h
@@ -406,36 +406,4 @@ groupedit_edit_object_part_item_selected_set(Evas_Object 
*obj,
                                              Eina_Stringshare *item_name,
                                              Eina_Bool selected);
 
-/**
- * Add new item into container part.
- *
- * @param obj The groupedit object.
- * @param part The name of the part, that will contain new item.
- * @param item The name of new item.
- * @param source The name of the group, that will used as source for item.
- *
- * @return EINA_FALSE on failure, EINA_TRUE on success.
- *
- * @ingroup Groupedit
- */
-Eina_Bool
-groupedit_edit_object_part_item_add(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item,
-                                    Eina_Stringshare *source);
-
-/**
- * Delete item from container part.
- *
- * @param obj The groupedit object.
- * @param part The name of the part, that contain item.
- * @param item The name of deleting item.
- *
- * @return EINA_FALSE on failure, EINA_TRUE on success.
- *
- * @ingroup Groupedit
- */
-Eina_Bool
-groupedit_edit_object_part_item_del(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item);
-
 #endif /* GROUPEDIT_H */
diff --git a/src/bin/ui/workspace/workspace.c b/src/bin/ui/workspace/workspace.c
index 0ea14bb..08e9a89 100644
--- a/src/bin/ui/workspace/workspace.c
+++ b/src/bin/ui/workspace/workspace.c
@@ -1882,28 +1882,3 @@ workspace_edit_object_part_item_selected_set(Evas_Object 
*obj,
    return groupedit_edit_object_part_item_selected_set(sd->groupedit, 
item_name,
                                                        selected);
 }
-
-Eina_Bool
-workspace_edit_object_part_item_add(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item,
-                                    Eina_Stringshare *source)
-{
-   WS_DATA_GET(obj, sd);
-   assert(part != NULL);
-   assert(item != NULL);
-   assert(source != NULL);
-
-   return groupedit_edit_object_part_item_add(sd->groupedit, part, item, 
source);
-}
-
-Eina_Bool
-workspace_edit_object_part_item_del(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item)
-{
-   WS_DATA_GET(obj, sd);
-   assert(part != NULL);
-   assert(item != NULL);
-
-   return groupedit_edit_object_part_item_del(sd->groupedit, part, item);
-}
-
diff --git a/src/bin/ui/workspace/workspace.h b/src/bin/ui/workspace/workspace.h
index 8cda075..5e10802 100644
--- a/src/bin/ui/workspace/workspace.h
+++ b/src/bin/ui/workspace/workspace.h
@@ -355,35 +355,4 @@ workspace_edit_object_part_item_selected_set(Evas_Object 
*obj,
                                              Eina_Stringshare *item_name,
                                              Eina_Bool selected);
 
-/**
- * Add new item into container part.
- *
- * @param obj The workspace object.
- * @param part The name of the part, that will contain new item.
- * @param item The name of new item.
- * @param source The name of the group, that will used as source for item.
- *
- * @return EINA_FALSE on failure, EINA_TRUE on success.
- *
- * @ingroup Workspace
- */
-Eina_Bool
-workspace_edit_object_part_item_add(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item,
-                                    Eina_Stringshare *source);
-/**
- * Delete item from container part.
- *
- * @param obj The workspace object.
- * @param part The name of the part, that contain item.
- * @param item The name of deleting item.
- *
- * @return EINA_FALSE on failure, EINA_TRUE on success.
- *
- * @ingroup Workspace
- */
-Eina_Bool
-workspace_edit_object_part_item_del(Evas_Object *obj, Eina_Stringshare *part,
-                                    Eina_Stringshare *item);
-
 #endif /* UI_WORKSPACE_H */

-- 


Reply via email to