delete default picture image of video item 23/53723/1
authorJehun Lim <jehun.lim@samsung.com>
Wed, 9 Dec 2015 02:33:27 +0000 (11:33 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Wed, 9 Dec 2015 02:35:32 +0000 (11:35 +0900)
Change-Id: I13d8a6f752038dc50ee74562b31b9ede6feec6be
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
include/define.h
include/view/base.h
res/edc/widgets/gengrid.edc
res/images/ic_thumbnail_picture.png [moved from res/edc/images/ic_thumbnail_picture.png with 100% similarity]
src/grid/grid_gallery.c
src/view/action_menu.c
src/view/detail.c

index 453835e..59c5923 100644 (file)
@@ -73,6 +73,7 @@
 #define PART_ELM_TEXT_PLAYTIME "elm.text.playtime"
 #define PART_ELM_TEXT_COUNT "elm.text.count"
 #define PART_ELM_SWALLOW_THUMBNAIL "elm.swallow.thumbnail"
+#define PART_ELM_SWALLOW_PICTURE "elm.swallow.picture"
 #define PART_ELM_SWALLOW_VIDEO "elm.swallow.video"
 #define PART_ELM_SWALLOW_FAVORITE "elm.swallow.favorite"
 #define PART_ELM_SWALLOW_BG "elm.swallow.bg"
index 06b5959..d658f72 100644 (file)
@@ -37,7 +37,7 @@
 
 /* images */
 #define IMAGE_PREVIEW_PLAY "ic_preview_play.png"
-#define IMAGE_THUMBNAIL_PICTURE "ic_thumbnail_picture.png"
+#define IMAGE_THUMBNAIL_PICTURE IMAGEDIR"/ic_thumbnail_picture.png"
 #define IMAGE_THUMBNAIL_SONG "ic_thumbnail_song.png"
 #define IMAGE_THUMBNAIL_PLAY IMAGEDIR"/ic_thumbnail_play.png"
 #define IMAGE_THUMBNAIL_FAVORITE IMAGEDIR"/ic_thumbnail_favorite.png"
index 72eee93..16cac88 100644 (file)
@@ -496,11 +496,8 @@ group {
        name: "elm/gengrid/item/gallery_item/default";
        data.item: "selectraise" "on";
        data.item: "texts" "elm.text.playtime";
-       data.item: "contents" "elm.swallow.thumbnail elm.swallow.video elm.swallow.favorite";
+       data.item: "contents" "elm.swallow.thumbnail elm.swallow.picture elm.swallow.video elm.swallow.favorite";
        data.item: "focus_highlight" "on";
-       images {
-               image: IMAGE_THUMBNAIL_PICTURE COMP;
-       }
        parts {
                part {
                        name: "elm.padding.bottom_right";
@@ -544,9 +541,9 @@ group {
                        }
                }
                part {
-                       name: "default_image";
+                       name: PART_ELM_SWALLOW_PICTURE;
                        scale: 1;
-                       type: IMAGE;
+                       type: SWALLOW;
                        description {
                                state: "default" 0.0;
                                rel1 {
@@ -557,7 +554,6 @@ group {
                                        to: "defaultbg";
                                        relative: 0.5 0.5;
                                }
-                               image.normal: IMAGE_THUMBNAIL_PICTURE;
                                min: 80 80;
                                fixed: 1 1;
                        }
@@ -831,8 +827,8 @@ group {
                        name: "focus,in,anim";
                        action: STATE_SET "selected" 0.0;
                        target: "defaultbg";
-                       target: "default_image";
                        target: PART_ELM_SWALLOW_THUMBNAIL;
+                       target: PART_ELM_SWALLOW_PICTURE;
                        target: PART_ELM_SWALLOW_VIDEO;
                        target: PART_ELM_SWALLOW_FAVORITE;
                        target: "part_focus1";
@@ -858,10 +854,10 @@ group {
                        name: "focus,out,anim";
                        action: STATE_SET "default" 0.0;
                        target: PART_ELM_SWALLOW_THUMBNAIL;
+                       target: PART_ELM_SWALLOW_PICTURE;
                        target: PART_ELM_SWALLOW_VIDEO;
                        target: PART_ELM_SWALLOW_FAVORITE;
                        target: "defaultbg";
-                       target: "default_image";
                        target: "part_focus1";
                        target: "part_focus2";
                        target: "part_focus3";
index e9de31e..d579042 100644 (file)
@@ -115,6 +115,18 @@ static Evas_Object *_media_content_get(void *data,
                        _ERR("failed to create image object");
                        return NULL;
                }
+       } else if (!strcmp(part, PART_ELM_SWALLOW_PICTURE)) {
+               if (info->media_type != MEDIA_CONTENT_TYPE_IMAGE)
+                       return NULL;
+
+               if (info->thumbnail_path)
+                       return NULL;
+
+               eo = util_add_image(obj, IMAGE_THUMBNAIL_PICTURE);
+               if (!eo) {
+                       _ERR("failed to create image object");
+                       return NULL;
+               }
        } else if (!strcmp(part, PART_ELM_SWALLOW_VIDEO)) {
                if (info->media_type != MEDIA_CONTENT_TYPE_VIDEO)
                        return NULL;
index 210d4f6..dbed15a 100644 (file)
@@ -463,8 +463,16 @@ static Evas_Object *_grid_content_get(void *data,
                content = util_add_image(obj, info->thumbnail_path);
                if (!content)
                        goto err;
+       } else if (!strcmp(part, PART_ELM_SWALLOW_PICTURE)) {
+               if (info->media_type != MEDIA_CONTENT_TYPE_IMAGE)
+                       return NULL;
 
-               evas_object_show(content);
+               if (info->thumbnail_path)
+                       return NULL;
+
+               content = util_add_image(obj, IMAGE_THUMBNAIL_PICTURE);
+               if (!content)
+                       goto err;
        } else if (!strcmp(part, PART_ELM_SWALLOW_VIDEO)) {
                if (info->media_type != MEDIA_CONTENT_TYPE_VIDEO)
                        return NULL;
@@ -472,8 +480,6 @@ static Evas_Object *_grid_content_get(void *data,
                content = util_add_image(obj, IMAGE_THUMBNAIL_PLAY);
                if (!content)
                        goto err;
-
-               evas_object_show(content);
        } else if (!strcmp(part, PART_ELM_SWALLOW_TEXTBG)) {
                content = evas_object_rectangle_add(obj);
                if (!content)
@@ -481,9 +487,10 @@ static Evas_Object *_grid_content_get(void *data,
 
                app_contents_get_color(info->title, NULL, &bg);
                evas_object_color_set(content, bg.r, bg.g, bg.b, bg.a);
+       }
 
+       if (content)
                evas_object_show(content);
-       }
 
        return content;
 
index 851450f..05a0326 100644 (file)
@@ -465,6 +465,18 @@ static Evas_Object *_grid_content_get(void *data, Evas_Object *obj,
 
                app_contents_get_color(mi->title, NULL, &bg);
                evas_object_color_set(eo, bg.r, bg.g, bg.b, bg.a);
+       } else if (!strcmp(part, PART_ELM_SWALLOW_PICTURE)) {
+               if (mi->media_type != MEDIA_CONTENT_TYPE_IMAGE)
+                       return NULL;
+
+               if (mi->thumbnail_path)
+                       return NULL;
+
+               eo = util_add_image(obj, IMAGE_THUMBNAIL_PICTURE);
+               if (!eo) {
+                       _ERR("failed to create image object");
+                       return NULL;
+               }
        } else if (!strcmp(part, PART_ELM_SWALLOW_VIDEO)) {
                if (mi->media_type != MEDIA_CONTENT_TYPE_VIDEO)
                        return NULL;