summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyojung Jo <hj903.jo@samsung.com>2015-07-14 19:30:18 +0900
committerHyojung Jo <hj903.jo@samsung.com>2015-07-14 19:30:18 +0900
commit48f21e454b4fc7b8542818f7dd1bcb38a20d735e (patch)
tree6f8e3284738edd3c895019bb1d2d5eac69d255ad
parentd1438fd1de56d5382bd9b3134e6433385e60dd3e (diff)
downloadair_favorite-48f21e454b4fc7b8542818f7dd1bcb38a20d735e.tar.gz
air_favorite-48f21e454b4fc7b8542818f7dd1bcb38a20d735e.tar.bz2
air_favorite-48f21e454b4fc7b8542818f7dd1bcb38a20d735e.zip
Grid: Added the text_get, content_get cb of movie grid
Change-Id: I855c8faf8ca31324e7e843861239d5807d7fe7a8 Signed-off-by: Hyojung Jo <hj903.jo@samsung.com>
-rw-r--r--src/grid/grid_movie.c49
1 files changed, 44 insertions, 5 deletions
diff --git a/src/grid/grid_movie.c b/src/grid/grid_movie.c
index 91c2d19..83b5551 100644
--- a/src/grid/grid_movie.c
+++ b/src/grid/grid_movie.c
@@ -29,16 +29,55 @@
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 = {
@@ -51,7 +90,7 @@ 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;
}