summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2014-12-06 01:01:23 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2014-12-06 01:01:23 +0100
commit9168596d6d692fe6116f89ea6617f49ba9d78bd6 (patch)
tree185c1694f7e71a34c08f0dbee04fe9949479fc47
parentda6f2e50bc10f9d77e34c54c1d53ba4ed8691ff9 (diff)
Bring back unpopabled changed panels!
-rw-r--r--src/elm_settingspane.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/elm_settingspane.c b/src/elm_settingspane.c
index 5781b2b..3aa9dec 100644
--- a/src/elm_settingspane.c
+++ b/src/elm_settingspane.c
@@ -63,7 +63,7 @@ typedef struct _Stack_Item
63} Stack_Item; 63} Stack_Item;
64 64
65static void _item_sel_cb(void *data, Evas_Object *obj, void *event_info); 65static void _item_sel_cb(void *data, Evas_Object *obj, void *event_info);
66static void _item_stack_pop(Elm_Settingspane *pane); 66static Eina_Bool _item_stack_pop(Elm_Settingspane *pane);
67static void _item_stack_remove(Elm_Settingspane_Item *del); 67static void _item_stack_remove(Elm_Settingspane_Item *del);
68 68
69#define HAS_PANEL(id) (id->panel.content_get) 69#define HAS_PANEL(id) (id->panel.content_get)
@@ -798,7 +798,7 @@ _item_stack_push(Evas_Object *obj, Elm_Settingspane_Item *item)
798 _title_bar_refresh(id->sw); 798 _title_bar_refresh(id->sw);
799} 799}
800 800
801static void 801static Eina_Bool
802_item_stack_pop(Evas_Object *obj) 802_item_stack_pop(Evas_Object *obj)
803{ 803{
804 Elm_Settingspane_Item *it, *it_o; 804 Elm_Settingspane_Item *it, *it_o;
@@ -807,6 +807,15 @@ _item_stack_pop(Evas_Object *obj)
807 807
808 it_o = _stack_item_current_get(obj); 808 it_o = _stack_item_current_get(obj);
809 809
810 id = eo_data_scope_get(it_o, ELM_SETTINGSPANE_ITEM_CLASS);
811
812 if (id->changed)
813 {
814 Evas_Object *l = evas_object_data_get(obj, DK_MAIN_PANEL_SHOWED);
815 _item_highlight(l);
816 return EINA_FALSE;
817 }
818
810 if (_stack_item_pop_end(obj)) 819 if (_stack_item_pop_end(obj))
811 { 820 {
812 _stack_item_remove(obj); 821 _stack_item_remove(obj);
@@ -841,6 +850,7 @@ _item_stack_pop(Evas_Object *obj)
841 elm_widget_signal_emit(obj, EMIT_BACK_DISABLE); 850 elm_widget_signal_emit(obj, EMIT_BACK_DISABLE);
842 851
843 _title_bar_refresh(obj); 852 _title_bar_refresh(obj);
853 return EINA_TRUE;
844} 854}
845 855
846static void 856static void
@@ -873,7 +883,6 @@ _item_del(Elm_Settingspane_Item *del, Eina_Bool full)
873{ 883{
874 Elm_Settingspane_Item_Data *id = eo_data_scope_get(del, ELM_SETTINGSPANE_ITEM_CLASS); 884 Elm_Settingspane_Item_Data *id = eo_data_scope_get(del, ELM_SETTINGSPANE_ITEM_CLASS);
875 Elm_Settingspane_Item_Data *id_par = NULL; 885 Elm_Settingspane_Item_Data *id_par = NULL;
876 Elm_Settingspane_Data *wd = eo_data_scope_get(id->sw, ELM_SETTINGSPANE_CLASS);
877 Eina_List *node, *nnode; 886 Eina_List *node, *nnode;
878 Elm_Settingspane_Item *ci; 887 Elm_Settingspane_Item *ci;
879 888
@@ -883,7 +892,7 @@ _item_del(Elm_Settingspane_Item *del, Eina_Bool full)
883 } 892 }
884 if (!full) 893 if (!full)
885 { 894 {
886 Elm_Settingspane_Item *top = eina_list_data_get(eina_list_last(wd->stack)); 895 Elm_Settingspane_Item *top = _stack_item_current_get(id->sw);
887 if (top == del) 896 if (top == del)
888 { 897 {
889 _item_stack_pop(id->sw); 898 _item_stack_pop(id->sw);
@@ -921,7 +930,8 @@ _item_sel_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNU
921 return; 930 return;
922 931
923 if (_item_has_panel(curr)) 932 if (_item_has_panel(curr))
924 _item_stack_pop(id->sw); 933 if (!_item_stack_pop(id->sw))
934 return;
925 _item_stack_push_to_item(id->sw, selected); 935 _item_stack_push_to_item(id->sw, selected);
926} 936}
927 937