transition, TRANSITION_DECEL;
target, "clip";
target, PART_HOME_MENU_BAR;
- after, "sig,show,done";
- }
- program {
- name, "sig,show,done";
- action, SIGNAL_EMIT SIG_SHOW_DONE SRC_EDJE;
}
program {
name, "sig,hide";
target, "clip";
target, PART_USER_BAR;
target, "text";
- after, "sig,show,done";
- }
- program {
- name, "sig,show,done";
- action, SIGNAL_EMIT SIG_SHOW_DONE SRC_EDJE;
}
program {
name, "sig,hide";
}
elm_object_content_set(scr, box);
elm_object_part_content_set(base, PART_HOME_MENU_BAR, scr);
- priv->scr = scr;
list = datamgr_get_items(priv->dm);
if (!list) {
priv->list = eina_list_append(priv->list, bi);
}
+ if (!priv->list) {
+ _ERR("failed to pack item");
+ return false;
+ }
+
+ priv->scr = scr;
+
return true;
}
datamgr_select_item(priv->dm, priv->foc->di);
}
-static void _show_done(void *data, Evas_Object *obj, const char *emission,
- const char *source)
-{
- struct _priv *priv = data;
-
- if (!priv->foc)
- priv->foc = eina_list_data_get(priv->list);
-
- elm_object_focus_set(priv->foc->eo, EINA_TRUE);
-}
-
static Evas_Object *_create(Evas_Object *win, void *data)
{
struct _priv *priv;
viewmgr_set_view_data(VIEW_HOME, priv);
elm_object_signal_callback_add(base, SIG_HIDE_DONE, SRC_EDJE,
_hide_done, priv);
- elm_object_signal_callback_add(base, SIG_SHOW_DONE, SRC_EDJE,
- _show_done, priv);
return base;
}
priv = data;
- _add_home_menu(priv, priv->base);
+ if (!_add_home_menu(priv, priv->base)) {
+ _ERR("failed to add home");
+ return;
+ }
evas_object_show(priv->base);
elm_object_signal_emit(priv->base, SIG_SHOW_NAVIGATION, SRC_PROG);
elm_object_signal_emit(priv->base, SIG_SHOW, SRC_PROG);
+
+ if (!priv->foc)
+ priv->foc = eina_list_data_get(priv->list);
+
+ elm_object_focus_set(priv->foc->eo, EINA_TRUE);
}
static void _unload_home(struct _priv *priv)
}
evas_object_del(priv->scr);
+ priv->scr = NULL;
priv->foc = NULL;
priv->list = NULL;
}
viewmgr_pop_view();
}
-static void _show_done(void *data, Evas_Object *obj, const char *emission,
- const char *source)
-{
- struct _priv *priv = data;
-
- if (!priv->foc)
- priv->foc = eina_list_data_get(priv->list);
-
- elm_object_focus_set(priv->foc->eo, EINA_TRUE);
-}
-
static Evas_Object *_create(Evas_Object *win, void *data)
{
struct _priv *priv;
inputmgr_add_callback(base, INPUT_HANDLER_TYPE_BASE, &handler, priv);
elm_object_signal_callback_add(base, SIG_HIDE_DONE, SRC_EDJE,
_hide_done, NULL);
- elm_object_signal_callback_add(base, SIG_SHOW_DONE, SRC_EDJE,
- _show_done, priv);
+
return base;
}
return NULL;
}
-static void _add_user(struct _priv *priv)
+static bool _add_user(struct _priv *priv)
{
Eina_List *list, *l;
Evas_Object *scr, *box;
scr = utils_add_scroller(priv->base);
if (!scr) {
_ERR("failed to add scroller");
- return;
+ return false;
}
box = utils_add_box(scr, true);
if (!box) {
_ERR("failed to add box");
evas_object_del(scr);
- return;
+ return false;
}
elm_object_content_set(scr, box);
elm_object_part_content_set(priv->base, PART_USER_BAR, scr);
if (!list) {
_ERR("failed to load list");
evas_object_del(scr);
- return;
+ return false;
}
i = 0;
priv->list = eina_list_append(priv->list, bi);
}
+ if (!priv->list) {
+ _ERR("failed to pack item");
+ return false;
+ }
+
priv->scr = scr;
priv->box = box;
+
+ return true;
}
static void _show(void *data)
evas_object_show(priv->base);
elm_object_signal_emit(priv->base, SIG_SHOW, SRC_PROG);
- _add_user(priv);
+ if (!_add_user(priv)) {
+ _ERR("failed to add user");
+ return;
+ }
+
+ if (!priv->foc)
+ priv->foc = eina_list_data_get(priv->list);
+
+ elm_object_focus_set(priv->foc->eo, EINA_TRUE);
}
static void _unload_user(struct _priv *priv)