implement hiding of channel list if grid is clicked
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
5135603dcc
commit
e7e7eef7b9
|
@ -23,6 +23,7 @@ struct _Channel
|
|||
Evas_Object *o_frame;
|
||||
Evas_Object *o_spacer;
|
||||
Evas_Object *o_list;
|
||||
Evas_Object *o_dismiss;
|
||||
Eina_Bool visible : 1;
|
||||
} userlist;
|
||||
|
||||
|
@ -173,6 +174,21 @@ _cb_userlist_compare(const void *data1, const void *data2)
|
|||
return strcasecmp(label1, label2);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_userlist_dismiss_mouse_down(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
|
||||
{
|
||||
_cb_userlist_go(data, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_userlist_done(void *data, Evas_Object *obj EINA_UNUSED, const char *sig EINA_UNUSED, const char *source EINA_UNUSED)
|
||||
{
|
||||
Channel *chl;
|
||||
|
||||
chl = data;
|
||||
chl->userlist.o_dismiss = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_cb_options_done(void *data)
|
||||
{
|
||||
|
@ -259,6 +275,20 @@ _channel_userlist_create(Channel *chl)
|
|||
chl->userlist.o_spacer = o;
|
||||
edje_object_part_swallow(chl->o_bg, "userlist.control", o);
|
||||
}
|
||||
|
||||
if (!chl->userlist.o_dismiss)
|
||||
{
|
||||
chl->userlist.o_dismiss =
|
||||
evas_object_rectangle_add(evas_object_evas_get(chl->o_base));
|
||||
evas_object_color_set(chl->userlist.o_dismiss, 0, 0, 0, 0);
|
||||
evas_object_event_callback_add(chl->userlist.o_dismiss,
|
||||
EVAS_CALLBACK_MOUSE_DOWN,
|
||||
_cb_userlist_dismiss_mouse_down, chl);
|
||||
edje_object_signal_callback_add(chl->o_base, "userlist,hide,done",
|
||||
PACKAGE_NAME, _cb_userlist_done, chl);
|
||||
edje_object_part_swallow(chl->o_base, "userlist.dismiss",
|
||||
chl->userlist.o_dismiss);
|
||||
}
|
||||
}
|
||||
|
||||
/* external functions */
|
||||
|
|
Loading…
Reference in New Issue