summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Vorobiov <vi.vorobiov@samsung.com>2015-06-04 16:18:35 +0300
committerVyacheslav Reutskiy <v.reutskiy@samsung.com>2015-06-11 08:18:33 +0300
commit8ed470c7ddccdf263b34bc39b261561692c304a6 (patch)
tree4493c93e6b559bb2120b919f6286e11bc2030af9
parent642e0a5f85b5250bed295c71b88215c3a8b0d935 (diff)
Live View Property: cleaning source code from dead Item/Layout code
Now there are no more Items/Layouts in live view property box, there are checks
-rw-r--r--src/bin/ui/live_view/live_view_prop.c30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/bin/ui/live_view/live_view_prop.c b/src/bin/ui/live_view/live_view_prop.c
index 1ffab1c9..1a6d5b3a 100644
--- a/src/bin/ui/live_view/live_view_prop.c
+++ b/src/bin/ui/live_view/live_view_prop.c
@@ -81,16 +81,15 @@ _on_all_swallow_check(void *data,
81 Evas_Object *obj, 81 Evas_Object *obj,
82 void *ei __UNUSED__) 82 void *ei __UNUSED__)
83{ 83{
84 Evas_Object *check = NULL, *item = NULL; 84 Evas_Object *check = NULL;
85 Eina_List *part_list = NULL, *part = NULL; 85 Eina_List *part_list = NULL, *part = NULL;
86 86
87 Prop_Data *pd = (Prop_Data *)data; 87 Prop_Data *pd = (Prop_Data *)data;
88 part_list = elm_box_children_get(pd->prop_swallow.swallows); 88 part_list = elm_box_children_get(pd->prop_swallow.swallows);
89 if (!part_list) return; 89 if (!part_list) return;
90 90
91 EINA_LIST_FOREACH(part_list, part, item) 91 EINA_LIST_FOREACH(part_list, part, check)
92 { 92 {
93 check = elm_object_part_content_get(item, "info");
94 if (!elm_object_disabled_get(check)) 93 if (!elm_object_disabled_get(check))
95 { 94 {
96 elm_check_state_set(check, elm_check_state_get(obj)); 95 elm_check_state_set(check, elm_check_state_get(obj));
@@ -106,7 +105,7 @@ _on_all_text_check(void *data,
106 Evas_Object *obj, 105 Evas_Object *obj,
107 void *ei __UNUSED__) 106 void *ei __UNUSED__)
108{ 107{
109 Evas_Object *check = NULL, *item = NULL; 108 Evas_Object *check = NULL;
110 Eina_List *part_list = NULL, *part = NULL; 109 Eina_List *part_list = NULL, *part = NULL;
111 Eina_Bool is_checked; 110 Eina_Bool is_checked;
112 111
@@ -115,9 +114,8 @@ _on_all_text_check(void *data,
115 if (!part_list) return; 114 if (!part_list) return;
116 115
117 is_checked = elm_check_state_get(obj); 116 is_checked = elm_check_state_get(obj);
118 EINA_LIST_FOREACH(part_list, part, item) 117 EINA_LIST_FOREACH(part_list, part, check)
119 { 118 {
120 check = elm_object_part_content_get(item, "info");
121 if (elm_check_state_get(check) != is_checked) 119 if (elm_check_state_get(check) != is_checked)
122 { 120 {
123 elm_check_state_set(check, is_checked); 121 elm_check_state_set(check, is_checked);
@@ -431,7 +429,7 @@ live_view_property_free(Evas_Object *property)
431Eina_Bool 429Eina_Bool
432live_view_property_style_unset(Evas_Object *property) 430live_view_property_style_unset(Evas_Object *property)
433{ 431{
434 Evas_Object *prop_box, *data, *check, *button; 432 Evas_Object *prop_box, *check, *button, *data;
435 Eina_List *items_list = NULL, *l; 433 Eina_List *items_list = NULL, *l;
436 Edje_Part_Type part_type; 434 Edje_Part_Type part_type;
437 Eina_Stringshare *part_name, *string; 435 Eina_Stringshare *part_name, *string;
@@ -456,10 +454,9 @@ live_view_property_style_unset(Evas_Object *property)
456 elm_check_state_set(check, false); 454 elm_check_state_set(check, false);
457 } 455 }
458 456
459 EINA_LIST_FOREACH(items_list, l, data) 457 EINA_LIST_FOREACH(items_list, l, check)
460 { 458 {
461 check = elm_object_part_content_unset(data, "info"); 459 part_name = elm_object_part_text_get(check, NULL);
462 part_name = evas_object_data_get(check, PART_NAME);
463 part_type = edje_edit_part_type_get(pd->style->obj, part_name); 460 part_type = edje_edit_part_type_get(pd->style->obj, part_name);
464 evas_object_smart_callback_del_full(check, "changed", 461 evas_object_smart_callback_del_full(check, "changed",
465 evas_object_data_get(pd->live_object, SWALLOW_FUNC), 462 evas_object_data_get(pd->live_object, SWALLOW_FUNC),
@@ -472,11 +469,7 @@ live_view_property_style_unset(Evas_Object *property)
472 if (clean) clean(part_name, pd->live_object); 469 if (clean) clean(part_name, pd->live_object);
473 } 470 }
474 471
475 eina_stringshare_del(part_name);
476 evas_object_data_del(check, PART_NAME);
477
478 evas_object_del(check); 472 evas_object_del(check);
479 evas_object_del(data);
480 } 473 }
481 items_list = eina_list_free(items_list); 474 items_list = eina_list_free(items_list);
482 475
@@ -488,19 +481,12 @@ live_view_property_style_unset(Evas_Object *property)
488 elm_check_state_set(check, false); 481 elm_check_state_set(check, false);
489 } 482 }
490 483
491 EINA_LIST_FOREACH(items_list, l, data) 484 EINA_LIST_FOREACH(items_list, l, check)
492 { 485 {
493 check = elm_object_part_content_unset(data, "info");
494 evas_object_smart_callback_del_full(check, "changed", 486 evas_object_smart_callback_del_full(check, "changed",
495 evas_object_data_get(pd->live_object, TEXT_FUNC), 487 evas_object_data_get(pd->live_object, TEXT_FUNC),
496 pd->live_object); 488 pd->live_object);
497
498 string = evas_object_data_get(check, PART_NAME);
499 eina_stringshare_del(string);
500 evas_object_data_del(check, PART_NAME);
501
502 evas_object_del(check); 489 evas_object_del(check);
503 evas_object_del(data);
504 } 490 }
505 items_list = eina_list_free(items_list); 491 items_list = eina_list_free(items_list);
506 492