summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-03-22 16:45:44 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-10-05 12:56:26 +0200
commit18dbbbc3add0e977407ced86e360b161459702a2 (patch)
tree09436536ed4181140362aa9e31b01d6e628c52f0
parentd560ede3f14fa84855887ca0cbaf256ba109dd4d (diff)
settingspanel: those things are called in both cases
so they can be called once before the if
-rw-r--r--src/lib/elc_settingspane.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/elc_settingspane.c b/src/lib/elc_settingspane.c
index 4874aef0a..d729eb7ed 100644
--- a/src/lib/elc_settingspane.c
+++ b/src/lib/elc_settingspane.c
@@ -1209,8 +1209,15 @@ _elm_settingspane_item_realize(Eo *obj, Elm_Settingspane_Item_Data *pd)
1209{ 1209{
1210 C_DATA(pd->sw); 1210 C_DATA(pd->sw);
1211 DBG("realize %p", obj); 1211 DBG("realize %p", obj);
1212
1213 if (wd->panel_visible)
1214 eo_do(wd->panel_visible, elm_obj_settingspane_item_unrealize());
1215
1212 if (pd->event.content_get) //this is a panel 1216 if (pd->event.content_get) //this is a panel
1213 { 1217 {
1218 if (wd->panel_visible == obj)
1219 return;
1220
1214 if (!pd->panel) 1221 if (!pd->panel)
1215 { 1222 {
1216 Panel *p; 1223 Panel *p;
@@ -1224,9 +1231,6 @@ _elm_settingspane_item_realize(Eo *obj, Elm_Settingspane_Item_Data *pd)
1224 eo_do(pd->par, elm_obj_settingspane_item_realize()); 1231 eo_do(pd->par, elm_obj_settingspane_item_realize());
1225 /* show this panel */ 1232 /* show this panel */
1226 _item_panel_show(obj, pd); 1233 _item_panel_show(obj, pd);
1227 /* if another one is open close it */
1228 if (wd->panel_visible)
1229 eo_do(wd->panel_visible, elm_obj_settingspane_item_unrealize());
1230 /* set us as visible */ 1234 /* set us as visible */
1231 wd->panel_visible = obj; 1235 wd->panel_visible = obj;
1232 } 1236 }
@@ -1235,9 +1239,6 @@ _elm_settingspane_item_realize(Eo *obj, Elm_Settingspane_Item_Data *pd)
1235 /* dont do the work if this is the current menu */ 1239 /* dont do the work if this is the current menu */
1236 if (wd->menu_visible == obj) 1240 if (wd->menu_visible == obj)
1237 return; 1241 return;
1238 /* if we are realizing a menu and a panel is open, close it*/
1239 if (wd->panel_visible)
1240 eo_do(wd->panel_visible, elm_obj_settingspane_item_unrealize());
1241 /* if this is the hidden object */ 1242 /* if this is the hidden object */
1242 if (wd->menu_hidden == obj) 1243 if (wd->menu_hidden == obj)
1243 { 1244 {