summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-12-09 02:33:27 (GMT)
committerJehun Lim <jehun.lim@samsung.com>2015-12-09 02:35:32 (GMT)
commitaebde7d87ba0fca4b24c775cc49b79b1b42c95e5 (patch)
tree7f24240d65ae43db92c4d1cfd1bddff395150bc0
parent833c2d4d5711a90bae23d4a9b4c7344bbe5119a8 (diff)
downloadair_mediahub-aebde7d87ba0fca4b24c775cc49b79b1b42c95e5.zip
air_mediahub-aebde7d87ba0fca4b24c775cc49b79b1b42c95e5.tar.gz
air_mediahub-aebde7d87ba0fca4b24c775cc49b79b1b42c95e5.tar.bz2
delete default picture image of video itemrefs/changes/23/53723/1
Change-Id: I13d8a6f752038dc50ee74562b31b9ede6feec6be Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
-rw-r--r--include/define.h1
-rw-r--r--include/view/base.h2
-rw-r--r--res/edc/widgets/gengrid.edc14
-rw-r--r--res/images/ic_thumbnail_picture.png (renamed from res/edc/images/ic_thumbnail_picture.png)bin713 -> 713 bytes
-rw-r--r--src/grid/grid_gallery.c12
-rw-r--r--src/view/action_menu.c15
-rw-r--r--src/view/detail.c12
7 files changed, 42 insertions, 14 deletions
diff --git a/include/define.h b/include/define.h
index 453835e..59c5923 100644
--- a/include/define.h
+++ b/include/define.h
@@ -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"
diff --git a/include/view/base.h b/include/view/base.h
index 06b5959..d658f72 100644
--- a/include/view/base.h
+++ b/include/view/base.h
@@ -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"
diff --git a/res/edc/widgets/gengrid.edc b/res/edc/widgets/gengrid.edc
index 72eee93..16cac88 100644
--- a/res/edc/widgets/gengrid.edc
+++ b/res/edc/widgets/gengrid.edc
@@ -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";
diff --git a/res/edc/images/ic_thumbnail_picture.png b/res/images/ic_thumbnail_picture.png
index 0a70910..0a70910 100644
--- a/res/edc/images/ic_thumbnail_picture.png
+++ b/res/images/ic_thumbnail_picture.png
Binary files differ
diff --git a/src/grid/grid_gallery.c b/src/grid/grid_gallery.c
index e9de31e..d579042 100644
--- a/src/grid/grid_gallery.c
+++ b/src/grid/grid_gallery.c
@@ -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;
diff --git a/src/view/action_menu.c b/src/view/action_menu.c
index 210d4f6..dbed15a 100644
--- a/src/view/action_menu.c
+++ b/src/view/action_menu.c
@@ -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;
diff --git a/src/view/detail.c b/src/view/detail.c
index 851450f..05a0326 100644
--- a/src/view/detail.c
+++ b/src/view/detail.c
@@ -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;