summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-01-24 12:58:01 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-10-05 12:54:39 +0200
commitd91b820a9497326ad5aa91bd980a82303d223a25 (patch)
treeb1edcf8a14ec7324071067d0c23dce0a3c9673fc
parente60d888dc5ffaff3eaae470fb723ff868e2e769c (diff)
settingswidget: Remove invalid eo objects from menu item.
-rw-r--r--src/lib/elc_settingspane.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/elc_settingspane.c b/src/lib/elc_settingspane.c
index cfa85b37f..9340316e9 100644
--- a/src/lib/elc_settingspane.c
+++ b/src/lib/elc_settingspane.c
@@ -525,6 +525,26 @@ _menu_layout_show(Evas_Object *w, Elm_Settingspane_Item *item, Elm_Settingspane_
525 evas_object_data_set(w, DK_MAIN_MENU_HIDDEN, shown); 525 evas_object_data_set(w, DK_MAIN_MENU_HIDDEN, shown);
526 evas_object_data_set(w, DK_MAIN_MENU_BEHIND, hidden); 526 evas_object_data_set(w, DK_MAIN_MENU_BEHIND, hidden);
527} 527}
528
529static void
530_menu_layout_del_ref(Evas_Object *w, Elm_Settingspane_Item *it_ref)
531{
532 Elm_Settingspane_Item *it;
533 Evas_Object *layouts[3];
534 int i = 0;
535
536 layouts[0] = evas_object_data_get(w, DK_MAIN_MENU_SHOWED);
537 layouts[1] = evas_object_data_get(w, DK_MAIN_MENU_HIDDEN);
538 layouts[2] = evas_object_data_get(w, DK_MAIN_MENU_BEHIND);
539
540 for (i = 0; i< 3; i++)
541 {
542 it = evas_object_data_get(layouts[i], DK_MENU_ITEM_SHOWN);
543 if (it == it_ref)
544 evas_object_data_del(layouts[i], DK_MENU_ITEM_SHOWN);
545 }
546}
547
528static void 548static void
529_menu_layout_refresh(Evas_Object *w) 549_menu_layout_refresh(Evas_Object *w)
530{ 550{
@@ -893,6 +913,8 @@ _item_del(Elm_Settingspane_Item *del, Eina_Bool full)
893 id_par->childs = eina_list_remove(id_par->childs, del); 913 id_par->childs = eina_list_remove(id_par->childs, del);
894 } 914 }
895 if (!full) 915 if (!full)
916 _menu_layout_del_ref(id->sw, del);
917 if (!full)
896 _menu_layout_refresh(id->sw); 918 _menu_layout_refresh(id->sw);
897 //if we have the item somewhere in the stack, remove it! 919 //if we have the item somewhere in the stack, remove it!
898 _history_stack_remove(id->sw, del); 920 _history_stack_remove(id->sw, del);