add function so we can append users to the channel's user list
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
f71bd48114
commit
f07b950679
|
@ -217,11 +217,6 @@ _channel_userlist_create(Channel *chl)
|
|||
ALIGN_SET(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
|
||||
chl->userlist.o_list = o;
|
||||
|
||||
/* Test Code */
|
||||
elm_list_item_append(o, "Test User", NULL, NULL, NULL, NULL);
|
||||
elm_list_go(o);
|
||||
|
||||
elm_object_content_set(chl->userlist.o_frame, o);
|
||||
}
|
||||
|
||||
|
@ -646,3 +641,33 @@ _channel_network_set(Channel *chl, Express_Network *net)
|
|||
{
|
||||
chl->net = net;
|
||||
}
|
||||
|
||||
void
|
||||
_channel_userlist_user_append(Channel *chl, const char *user, Eina_Bool op)
|
||||
{
|
||||
if (!op)
|
||||
elm_list_item_append(chl->userlist.o_list, user, NULL, NULL, NULL, NULL);
|
||||
else
|
||||
{
|
||||
Evas_Object *icon;
|
||||
char buff[PATH_MAX];
|
||||
|
||||
icon = elm_icon_add(chl->o_bg);
|
||||
elm_image_resizable_set(icon, EINA_TRUE, EINA_TRUE);
|
||||
WEIGHT_SET(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
ALIGN_SET(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
|
||||
snprintf(buff, sizeof(buff), "%s/images/operator.png",
|
||||
elm_app_data_dir_get());
|
||||
elm_image_file_set(icon, buff, NULL);
|
||||
evas_object_show(icon);
|
||||
|
||||
elm_list_item_append(chl->userlist.o_list, user, icon, NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_channel_userlist_go(Channel *chl)
|
||||
{
|
||||
elm_list_go(chl->userlist.o_list);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue