summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-10-05 15:12:51 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-10-05 15:12:51 +0200
commit31531e4d383684e086e624cdac39d8766768f29e (patch)
tree8620e5fc9647cbe96d7c1e69b6609ab7ba90ae2a
parente14cc95e76bd0158cb295897b39ea6209dc21a4d (diff)
settingspane: remove delete function
-rw-r--r--src/bin/test_settingspane.c2
-rw-r--r--src/lib/elc_settingspane.c33
-rw-r--r--src/lib/elm_settingspane_item.eo12
3 files changed, 8 insertions, 39 deletions
diff --git a/src/bin/test_settingspane.c b/src/bin/test_settingspane.c
index 973b90690..6f6e8010f 100644
--- a/src/bin/test_settingspane.c
+++ b/src/bin/test_settingspane.c
@@ -201,7 +201,7 @@ del_focused_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_U
201 201
202 item = elm_settingspane_focused_get(data); 202 item = elm_settingspane_focused_get(data);
203 203
204 elm_settingspane_item_delete(item); 204 eo_del(item);
205} 205}
206 206
207void 207void
diff --git a/src/lib/elc_settingspane.c b/src/lib/elc_settingspane.c
index 291ef3ca4..01861cbb6 100644
--- a/src/lib/elc_settingspane.c
+++ b/src/lib/elc_settingspane.c
@@ -1310,11 +1310,6 @@ _elm_settingspane_item_unrealize(Eo *obj, Elm_Settingspane_Item_Data *pd)
1310 } 1310 }
1311} 1311}
1312 1312
1313EOLIAN static void
1314_elm_settingspane_item_delete(Eo *obj, Elm_Settingspane_Item_Data *pd EINA_UNUSED)
1315{
1316 eo_del(obj);
1317}
1318 1313
1319EOLIAN static void 1314EOLIAN static void
1320_elm_settingspane_item_changed_set(Eo *obj, Elm_Settingspane_Item_Data *pd, Eina_Bool changed) 1315_elm_settingspane_item_changed_set(Eo *obj, Elm_Settingspane_Item_Data *pd, Eina_Bool changed)
@@ -1371,42 +1366,28 @@ _elm_settingspane_item_eo_base_destructor(Eo *obj EINA_UNUSED, Elm_Settingspane_
1371{ 1366{
1372 Elm_Settingspane_Item_Data *id_par; 1367 Elm_Settingspane_Item_Data *id_par;
1373 Elm_Settingspane_Item *top; 1368 Elm_Settingspane_Item *top;
1374 C_DATA(pd->sw); 1369 id_par = IC_DATA_L(_parent(obj));
1375 1370
1376 eo_do_super(obj, ELM_SETTINGSPANE_ITEM_CLASS, eo_destructor()); 1371 eo_do_super(obj, ELM_SETTINGSPANE_ITEM_CLASS, eo_destructor());
1377 1372
1378 eo_do(obj, elm_obj_settingspane_item_unrealize()); 1373 eo_do(obj, elm_obj_settingspane_item_unrealize());
1379 1374
1380 wd->unsaved_changes = eina_list_remove(wd->unsaved_changes, obj);
1381
1382 if (pd->changed)
1383 {
1384 ERR("This page has unsaved changes, you have lost all the data!");
1385 }
1386
1387 top = _history_stack_current(pd->sw); 1375 top = _history_stack_current(pd->sw);
1388 1376
1389 if (top == obj) 1377 if (top == obj)
1390 { 1378 {
1391 _history_stack_pop(pd->sw); 1379 _history_stack_pop(pd->sw);
1392 } 1380 }
1393 {
1394 Eina_List *node, *nnode;
1395 Elm_Settingspane_Item *ci;
1396 1381
1397 EINA_LIST_FOREACH_SAFE(pd->childs, node, nnode, ci) 1382 //if we have the item somewhere in the stack, remove it!
1398 { 1383 _history_stack_remove(pd->sw, obj);
1399 eo_del(ci);
1400 }
1401 }
1402 1384
1403 if (_parent(obj)) 1385 if (_parent(obj))
1404 _item_menu_refresh(_parent(obj), id_par); 1386 id_par->childs = eina_list_remove(id_par->childs, obj);
1405 1387
1406 //if we have the item somewhere in the stack, remove it! 1388 _item_menu_refresh(obj, pd);
1407 _history_stack_remove(pd->sw, obj); 1389
1408 //unref the content, if there is one 1390 //TODO refresh parent if visualizied
1409 eo_del(obj);
1410} 1391}
1411 1392
1412EOLIAN static void 1393EOLIAN static void
diff --git a/src/lib/elm_settingspane_item.eo b/src/lib/elm_settingspane_item.eo
index 5defc2e74..bdef40f71 100644
--- a/src/lib/elm_settingspane_item.eo
+++ b/src/lib/elm_settingspane_item.eo
@@ -148,18 +148,6 @@ class Elm.Settingspane.Item(Eo.Base){
148 or the attached panel will be shown, this item will be the highest on the stack. 148 or the attached panel will be shown, this item will be the highest on the stack.
149 ]] 149 ]]
150 } 150 }
151 delete {
152 [[
153 Delete this item
154
155 This will delete this item from the widget.
156
157 If there are children they will also be deleted.
158 If the parent of this item is just diplayed it will be refreshed and show
159 the state after this item is deleted.
160 If this item is the current focused item the stack will go back to a not deleted item.
161 ]]
162 }
163 } 151 }
164 implements { 152 implements {
165 Eo.Base.destructor; 153 Eo.Base.destructor;