static bool _create(void *user_data)
{
struct _appdata *ad;
- Evas_Object *win;
if (!user_data) {
_ERR("Invalid argument");
elm_theme_overlay_add(NULL, THEMEFILE);
elm_config_focus_move_policy_set(ELM_FOCUS_MOVE_POLICY_CLICK);
- win = _add_win(ad->name);
- if (!win) {
+ ad->win = _add_win(ad->name);
+ if (!ad->win) {
_ERR("failed to create window");
return false;
}
- if (!viewmgr_create(win)) {
+ if (!viewmgr_create(ad->win)) {
_ERR("failed to create viewmgr");
- evas_object_del(win);
+ evas_object_del(ad->win);
return false;
}
viewmgr_add_view(view_recent_get_vclass(), NULL);
viewmgr_add_view(view_user_get_vclass(), NULL);
- ad->win = win;
-
return true;
}
ad = user_data;
- viewmgr_remove_view(VIEW_HOME);
- viewmgr_destroy();
-
- if (ad->win)
+ if (ad->win) {
+ viewmgr_destroy();
evas_object_del(ad->win);
+ }
}
static void _pause(void *user_data)