rimmed pushed a commit to branch master.

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

commit 7f5ccc9693b5acbfa864296ff97b6be2a06f80d2
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Thu Jul 23 12:36:02 2015 +0300

    Live View Property: change base API
    
    Connector and other stuff doesn't and shouldn't know anything about
    live view property. Only live view can deal with it's property
---
 src/bin/ui/connector.c                | 10 +++++-----
 src/bin/ui/dialogs/part_dialog.c      |  2 +-
 src/bin/ui/live_view/live_view.c      | 33 +++++++++++++++++++++++----------
 src/bin/ui/live_view/live_view.h      | 10 +++++-----
 src/bin/ui/live_view/live_view_prop.c | 10 +++++-----
 src/bin/ui/live_view/live_view_prop.h | 10 +++++-----
 src/bin/ui/shortcuts/shortcuts.c      |  2 +-
 7 files changed, 45 insertions(+), 32 deletions(-)

diff --git a/src/bin/ui/connector.c b/src/bin/ui/connector.c
index 95e569b..d8821ec 100644
--- a/src/bin/ui/connector.c
+++ b/src/bin/ui/connector.c
@@ -97,7 +97,7 @@ _del_part(void *data,
    history_diff_add(style->obj, PART_TARGET, DEL, part_name);
    if (workspace_edit_object_part_del(ap->workspace, part->name))
      {
-        live_view_part_del(ap->live_view->property, part);
+        live_view_part_del(ap->live_view, part);
         ui_widget_list_selected_part_del(ui_block_widget_list_get(ap), style);
      }
 
@@ -167,7 +167,7 @@ _above_part(void *data,
      }
    tmp_list = eina_inlist_find(style->parts, EINA_INLIST_GET(part));
    Part *rel = EINA_INLIST_CONTAINER_GET(tmp_list->next, Part);
-   live_view_part_restack_above(ap->live_view->property, part, rel);
+   live_view_part_restack_above(ap->live_view, part, rel);
    project_changed(true);
 }
 
@@ -192,7 +192,7 @@ _below_part(void *data,
 
    tmp_list = eina_inlist_find(style->parts, EINA_INLIST_GET(part));
    Part *rel = EINA_INLIST_CONTAINER_GET(tmp_list->prev, Part);
-   live_view_part_restack_below(ap->live_view->property, part, rel);
+   live_view_part_restack_below(ap->live_view, part, rel);
    project_changed(true);
 }
 
@@ -210,7 +210,7 @@ _restack_part_above(void *data,
    if ((!part) || (!style)) return;
    history_diff_add(style->obj, PART_TARGET, RESTACK, part->name);
    workspace_edit_object_part_restack(ap->workspace, part->name, rel->name, 
false);
-   live_view_part_restack_above(ap->live_view->property, part, rel);
+   live_view_part_restack_above(ap->live_view, part, rel);
 
    tmp_list = eina_inlist_find(style->parts, EINA_INLIST_GET(part));
    tmp_prev = eina_inlist_find(style->parts, EINA_INLIST_GET(rel));
@@ -235,7 +235,7 @@ _restack_part_below(void *data,
    if ((!part) || (!style)) return;
    history_diff_add(style->obj, PART_TARGET, RESTACK, part->name);
    workspace_edit_object_part_restack(ap->workspace, part->name, rel->name, 
true);
-   live_view_part_restack_below(ap->live_view->property, part, rel);
+   live_view_part_restack_below(ap->live_view, part, rel);
 
    tmp_list = eina_inlist_find(style->parts, EINA_INLIST_GET(part));
    tmp_prev = eina_inlist_find(style->parts, EINA_INLIST_GET(rel));
diff --git a/src/bin/ui/dialogs/part_dialog.c b/src/bin/ui/dialogs/part_dialog.c
index 44dddd4..fc34e60 100644
--- a/src/bin/ui/dialogs/part_dialog.c
+++ b/src/bin/ui/dialogs/part_dialog.c
@@ -78,7 +78,7 @@ _cancel_clicked(void *data,
    history_diff_add(style->obj, PART_TARGET, ADD, name); \
    ap->popup = NULL; \
    ui_menu_items_list_disable_set(ap->menu, MENU_ITEMS_LIST_MAIN, false); \
-   live_view_part_add(ap->live_view->property, 
ui_widget_list_selected_part_get(widget_list)); \
+   live_view_part_add(ap->live_view, 
ui_widget_list_selected_part_get(widget_list)); \
    project_changed(true);
 
 static void
diff --git a/src/bin/ui/live_view/live_view.c b/src/bin/ui/live_view/live_view.c
index 0ac8900..a44a9e2 100644
--- a/src/bin/ui/live_view/live_view.c
+++ b/src/bin/ui/live_view/live_view.c
@@ -263,31 +263,44 @@ live_view_free(Live_View *live)
 
 TODO("We need implementation here!~~ ")
 Eina_Bool
-live_view_part_add(Evas_Object *parent, Part *part)
+live_view_part_add(Live_View *live, Part *part)
 {
-   return live_view_property_part_add(parent, part);
+   assert(live != NULL);
+   assert(part != NULL);
+   return live_view_property_part_add(live->property, part);
 }
 
 Eina_Bool
-live_view_part_del(Evas_Object *parent, Part *part)
+live_view_part_del(Live_View *live, Part *part)
 {
-   return live_view_property_part_del(parent, part);
+   assert(live != NULL);
+   assert(part != NULL);
+   return live_view_property_part_del(live->property, part);
 }
 
 Eina_Bool
-live_view_part_rename(Evas_Object *parent, Part *part, Eina_Stringshare 
*new_name)
+live_view_part_rename(Live_View *live, Part *part, Eina_Stringshare *new_name)
 {
-   return live_view_property_part_rename(parent, part, new_name);
+   assert(live != NULL);
+   assert(part != NULL);
+   assert(new_name != NULL);
+   return live_view_property_part_rename(live->property, part, new_name);
 }
 
 Eina_Bool
-live_view_part_restack_above(Evas_Object *parent, Part *part_move, Part 
*part_above)
+live_view_part_restack_above(Live_View *live, Part *part_move, Part 
*part_above)
 {
-   return live_view_property_part_restack_above(parent, part_move, part_above);
+   assert(live != NULL);
+   assert(part_move != NULL);
+   assert(part_above != NULL);
+   return live_view_property_part_restack_above(live->property, part_move, 
part_above);
 }
 
 Eina_Bool
-live_view_part_restack_below(Evas_Object *parent, Part *part_move, Part 
*part_below)
+live_view_part_restack_below(Live_View *live, Part *part_move, Part 
*part_below)
 {
-   return live_view_property_part_restack_below(parent, part_move, part_below);
+   assert(live != NULL);
+   assert(part_move != NULL);
+   assert(part_below != NULL);
+   return live_view_property_part_restack_below(live->property, part_move, 
part_below);
 }
diff --git a/src/bin/ui/live_view/live_view.h b/src/bin/ui/live_view/live_view.h
index d7c9d9a..c0d40ef 100644
--- a/src/bin/ui/live_view/live_view.h
+++ b/src/bin/ui/live_view/live_view.h
@@ -135,18 +135,18 @@ live_view_free(Live_View *live);
 /****** FUNCTIONS FOR CONNECTOR ***********/
 TODO("We need documentation here! ")
 Eina_Bool
-live_view_part_add(Evas_Object *parent, Part *part);
+live_view_part_add(Live_View *live, Part *part);
 
 Eina_Bool
-live_view_part_del(Evas_Object *parent, Part *part);
+live_view_part_del(Live_View *live, Part *part);
 
 Eina_Bool
-live_view_part_rename(Evas_Object *parent, Part *part, Eina_Stringshare 
*new_name);
+live_view_part_rename(Live_View *live, Part *part, Eina_Stringshare *new_name);
 
 Eina_Bool
-live_view_part_restack_above(Evas_Object *parent, Part *part_move, Part 
*part_above);
+live_view_part_restack_above(Live_View *live, Part *part_move, Part 
*part_above);
 
 Eina_Bool
-live_view_part_restack_below(Evas_Object *parent, Part *part_move, Part 
*part_below);
+live_view_part_restack_below(Live_View *live, Part *part_move, Part 
*part_below);
 
 #endif /* UI_LIVEVIEW_HEADER_H */
diff --git a/src/bin/ui/live_view/live_view_prop.c 
b/src/bin/ui/live_view/live_view_prop.c
index ad85231..ab2f76e 100644
--- a/src/bin/ui/live_view/live_view_prop.c
+++ b/src/bin/ui/live_view/live_view_prop.c
@@ -409,35 +409,35 @@ live_view_property_style_set(Evas_Object *property,
 
 TODO("We need implementation here!~~ ")
 Eina_Bool
-live_view_property_part_add(Evas_Object *parent __UNUSED__, Part *part 
__UNUSED__)
+live_view_property_part_add(Evas_Object *property __UNUSED__, Part *part 
__UNUSED__)
 {
    printf("Signal: add part name [%s] \n", part->name);
    return true;
 }
 
 Eina_Bool
-live_view_property_part_del(Evas_Object *parent __UNUSED__, Part *part 
__UNUSED__)
+live_view_property_part_del(Evas_Object *property __UNUSED__, Part *part 
__UNUSED__)
 {
    printf("Signal: del part name [%s] \n", part->name);
    return true;
 }
 
 Eina_Bool
-live_view_property_part_rename(Evas_Object *parent __UNUSED__, Part *part 
__UNUSED__, Eina_Stringshare *new_name __UNUSED__)
+live_view_property_part_rename(Evas_Object *property __UNUSED__, Part *part 
__UNUSED__, Eina_Stringshare *new_name __UNUSED__)
 {
    printf("Signal: rename part name from [%s] to [%s] \n", part->name, 
new_name);
    return true;
 }
 
 Eina_Bool
-live_view_property_part_restack_above(Evas_Object *parent __UNUSED__, Part 
*part_move __UNUSED__, Part *part_above __UNUSED__)
+live_view_property_part_restack_above(Evas_Object *property __UNUSED__, Part 
*part_move __UNUSED__, Part *part_above __UNUSED__)
 {
    printf("Signal: moving part [%s] above [%s] \n", part_move->name, 
part_above->name);
    return true;
 }
 
 Eina_Bool
-live_view_property_part_restack_below(Evas_Object *parent __UNUSED__, Part 
*part_move, Part *part_below __UNUSED__)
+live_view_property_part_restack_below(Evas_Object *property __UNUSED__, Part 
*part_move, Part *part_below __UNUSED__)
 {
    printf("Signal: moving part [%s] below [%s] \n", part_move->name, 
part_below->name);
    return true;
diff --git a/src/bin/ui/live_view/live_view_prop.h 
b/src/bin/ui/live_view/live_view_prop.h
index 2f53ce0..217a3a9 100644
--- a/src/bin/ui/live_view/live_view_prop.h
+++ b/src/bin/ui/live_view/live_view_prop.h
@@ -117,18 +117,18 @@ live_view_property_style_unset(Evas_Object *property);
 /****** FUNCTIONS FOR CONNECTOR ***********/
 TODO("We need documentation here! ")
 Eina_Bool
-live_view_property_part_add(Evas_Object *parent, Part *part);
+live_view_property_part_add(Evas_Object *property, Part *part);
 
 Eina_Bool
-live_view_property_part_del(Evas_Object *parent, Part *part);
+live_view_property_part_del(Evas_Object *property, Part *part);
 
 Eina_Bool
-live_view_property_part_rename(Evas_Object *parent, Part *part, 
Eina_Stringshare *new_name);
+live_view_property_part_rename(Evas_Object *property, Part *part, 
Eina_Stringshare *new_name);
 
 Eina_Bool
-live_view_property_part_restack_above(Evas_Object *parent, Part *part_move, 
Part *part_above);
+live_view_property_part_restack_above(Evas_Object *property, Part *part_move, 
Part *part_above);
 
 Eina_Bool
-live_view_property_part_restack_below(Evas_Object *parent, Part *part_move, 
Part *part_below);
+live_view_property_part_restack_below(Evas_Object *property, Part *part_move, 
Part *part_below);
 
 #endif /* UI_LIVEVIEWPROP_HEADER_H */
diff --git a/src/bin/ui/shortcuts/shortcuts.c b/src/bin/ui/shortcuts/shortcuts.c
index 2b7d418..d50894a 100644
--- a/src/bin/ui/shortcuts/shortcuts.c
+++ b/src/bin/ui/shortcuts/shortcuts.c
@@ -147,7 +147,7 @@ _random_name_generate(char *part_name, unsigned int length)
    if (workspace_edit_object_part_add(workspace, name, TYPE, DATA)) \
      ui_widget_list_part_add(widget_list, style, name); \
    history_diff_add(style->obj, PART_TARGET, ADD, name); \
-   live_view_part_add(app->live_view->property, 
ui_widget_list_selected_part_get(widget_list)); \
+   live_view_part_add(app->live_view, 
ui_widget_list_selected_part_get(widget_list)); \
    project_changed(true);
 
 #define PART_ADD(TYPE, FUNC) \

-- 


Reply via email to