hook into entry changed signal so we can start work on nickname

completion

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-02-11 15:55:47 -05:00
parent b21034e3e6
commit 4ca49cebcd
1 changed files with 16 additions and 1 deletions

View File

@ -29,6 +29,7 @@ struct _Channel
Evas_Object *o_list;
Evas_Object *o_dismiss;
Eina_Bool visible : 1;
Eina_List *users;
} userlist;
struct
@ -221,6 +222,14 @@ _cb_options(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
_window_options_toggle(chl->o_grid, _cb_options_done, chl);
}
static void
_cb_entry_changed(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
Channel *chl;
chl = data;
}
static void
_cb_entry_go(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
@ -758,7 +767,10 @@ _channel_window_set(Channel *chl, Evas_Object *win)
ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO);
elm_entry_prediction_allow_set(chl->o_entry, EINA_TRUE);
evas_object_smart_callback_add(chl->o_entry, "activated", _cb_entry_go, chl);
evas_object_smart_callback_add(chl->o_entry, "changed,user",
_cb_entry_changed, chl);
evas_object_smart_callback_add(chl->o_entry, "activated",
_cb_entry_go, chl);
edje_object_part_swallow(chl->o_base, "channel.entry", chl->o_entry);
elm_entry_entry_set(chl->o_entry, "");
@ -774,6 +786,9 @@ _channel_network_set(Channel *chl, Express_Network *net)
void
_channel_userlist_user_append(Channel *chl, const char *user, Eina_Bool op)
{
/* append to list of users for autocomplete */
chl->userlist.users = eina_list_append(chl->userlist.users, user);
if (!op)
elm_list_item_sorted_insert(chl->userlist.o_list, user, NULL, NULL,
NULL, NULL, _cb_userlist_compare);