static char *_text_get(void *data, Evas_Object *obj, const char *part)
{
- /* It will be implemented later. */
+ app_media *am;
- return NULL;
+ if (!data) {
+ _ERR("Data is NULL.");
+ return NULL;
+ }
+ am = data;
+
+ return strdup(get_media_name(am));
}
static Evas_Object *_content_get(void *data, Evas_Object *obj, const char *part)
{
- /* It will be implemented later. */
+ app_media *am;
+ Evas_Object *icon, *img;
+ char *thumbnail;
- return NULL;
+ if (!data || !obj) {
+ _ERR("Invalid argument.");
+ return NULL;
+ }
+ am = data;
+
+ thumbnail = get_media_thumbnail(am);
+
+ if (!thumbnail) {
+ icon = elm_icon_add(obj);
+ if (!icon) {
+ _ERR("elm_icon_add failed.");
+ return NULL;
+ }
+
+ elm_icon_thumb_set(icon, get_media_path(am), NULL);
+ elm_image_aspect_fixed_set(icon, EINA_FALSE);
+
+ return icon;
+ }
+
+ img = elm_image_add(obj);
+ if (!img) {
+ _ERR("elm_image_add failed.");
+ return NULL;
+ }
+
+ elm_image_file_set(img, thumbnail, NULL);
+ elm_image_aspect_fixed_set(img, EINA_FALSE);
+ evas_object_show(img);
+
+ return img;
}
static struct grid_class _gclass = {
static Eina_List *_create_item_list(void)
{
- /* It will be implemented later. */
+ return get_media_favorite_list(CONTENTS_MOVIE);
return NULL;
}