static void _mouse_down(int id, void *data, Evas *e, Evas_Object *obj,
Evas_Event_Mouse_Down *ev)
{
- struct _priv *priv;
-
if (!data) {
_ERR("Invalid argument");
return;
}
switch (id) {
- case INPUT_HANDLER_TYPE_BASE:
- priv = data;
- if (priv->foc->di->action == ITEM_SELECT_ACTION_POP) {
- elm_object_signal_emit(priv->base, SIG_HIDE,
- SRC_PROG);
- return;
- }
-
- if ((priv->foc->di->action == ITEM_SELECT_ACTION_PUSH)
- && (eina_list_count(priv->list)
- >= MAX_USER_COUNT)) {
- _add_popup(priv);
- return;
- }
-
- viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT,
- NULL);
- datamgr_select_item(priv->dm, priv->foc->di);
- break;
case INPUT_HANDLER_TYPE_BUTTON:
inputmgr_remove_callback(obj, &handler);
evas_object_del(data);
return base;
}
+static void _arrow_clicked(void *data, Evas_Object *obj, const char *emission,
+ const char *source)
+{
+ struct _priv *priv = data;
+
+ if (priv->foc->di->action == ITEM_SELECT_ACTION_PUSH)
+ return;
+
+ viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, priv->foc->di);
+ viewmgr_push_view(VIEW_USER_EDIT);
+}
+
+static void _item_clicked(void *data, Evas_Object *obj, const char *emission,
+ const char *source)
+{
+ struct _priv *priv = data;
+
+ if (priv->foc->di->action == ITEM_SELECT_ACTION_POP) {
+ elm_object_signal_emit(priv->base, SIG_HIDE, SRC_PROG);
+ return;
+ }
+
+ if ((priv->foc->di->action == ITEM_SELECT_ACTION_PUSH)
+ && (eina_list_count(priv->list) >= MAX_USER_COUNT)) {
+ _add_popup(priv);
+ return;
+ }
+
+ viewmgr_update_view(VIEW_USER_EDIT, UPDATE_TYPE_EDIT, NULL);
+ datamgr_select_item(priv->dm, priv->foc->di);
+}
+
static struct _bar_item *_pack_bar_item(struct _priv *priv, Evas_Object *box,
struct datamgr_item *di)
{
PART_BAR_ITEM_TITLE_FOCUS);
if (!focus_lbl)
goto err;
+
+ elm_object_signal_callback_add(eo, SIG_CLICK_ARROW, SRC_EDJE, _arrow_clicked, priv);
} else {
eo = utils_add_layout(box, GRP_BAR_ITEM, true, NULL);
if (!eo) {
evas_object_size_hint_align_set(eo, 0.5, 0.0);
inputmgr_add_callback(eo, INPUT_HANDLER_TYPE_EO, &handler, bi);
+ elm_object_signal_callback_add(eo, SIG_CLICK_ITEM, SRC_EDJE, _item_clicked, priv);
elm_box_pack_end(box, eo);
evas_object_show(eo);