summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinkyu Kang <mk7.kang@samsung.com>2015-12-31 08:05:23 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2015-12-31 08:05:23 (GMT)
commit7aeb282445b6cfad793c75bfd4ad0d7c5f003085 (patch)
treea48683613d268610e8ae9475d128c98adf8a917c
parent8ad3971c5fcf7ad843ab9c60e66c88b1061e158c (diff)
parent1fe07c40daaf201bea2fc0c00ac9b3f22229be77 (diff)
downloadair_mediahub-7aeb282445b6cfad793c75bfd4ad0d7c5f003085.zip
air_mediahub-7aeb282445b6cfad793c75bfd4ad0d7c5f003085.tar.gz
air_mediahub-7aeb282445b6cfad793c75bfd4ad0d7c5f003085.tar.bz2
Merge "viewer: add rotate button" into tizensubmit/tizen/20151231.080616accepted/tizen/tv/20160103.230426
-rw-r--r--src/view/viewer.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/view/viewer.c b/src/view/viewer.c
index bc0bf03..c6e439e 100644
--- a/src/view/viewer.c
+++ b/src/view/viewer.c
@@ -50,8 +50,7 @@
#define BTN_LOC_FF 3
#define BTN_LOC_NEXT 4
#define BTN_LOC_ROTATE 5
-#define BTN_LOC_ZOOM 5
-/*#define BTN_LOC_ZOOM 6*/
+#define BTN_LOC_ZOOM 6
#define BTN_LOC_SLIDE 8
enum {
@@ -138,12 +137,10 @@ static struct _btn_info btn_photo[] = {
.name = SRC_BTN_GALLERY_NEXT,
.loc = BTN_LOC_NEXT,
},
- /*
{
.name = SRC_BTN_ROTATE,
.loc = BTN_LOC_ROTATE,
},
- */
{
.name = SRC_BTN_ZOOM,
.loc = BTN_LOC_ZOOM,
@@ -209,7 +206,7 @@ static struct _viewer_info viewer_info[] = {
},
{
.btns = btn_photo,
- .btn_count = 4,
+ .btn_count = 5,
.focus_loc = BTN_LOC_NEXT,
.callback = _callback_photo,
},
@@ -239,13 +236,11 @@ static void _set_bg_color(struct _priv *priv, int r, int g, int b, int a)
static void _image_unload(struct _priv *priv)
{
if (priv->photo_pre) {
- elm_photocam_file_set(priv->photo_pre, NULL);
evas_object_del(priv->photo_pre);
priv->photo_pre = NULL;
}
if (priv->photo) {
- elm_photocam_file_set(priv->photo, NULL);
evas_object_del(priv->photo);
priv->photo = NULL;
}
@@ -265,10 +260,8 @@ static void _image_loaded(void *data, Evas_Object *obj, void *ev)
priv = data;
if (priv->photo != priv->photo_pre) {
- if (priv->photo) {
- elm_photocam_file_set(priv->photo, NULL);
+ if (priv->photo)
evas_object_del(priv->photo);
- }
priv->photo = obj;
}
@@ -286,7 +279,6 @@ static void _image_loaded_detail(void *data, Evas_Object *obj, void *ev)
priv = data;
priv->photo_pre = NULL;
- elm_photocam_file_set(obj, NULL);
util_add_to_recent(priv->playlist.list, priv->playlist.cur);
}
@@ -535,6 +527,7 @@ static void _set_image_orientation(struct _priv *priv)
switch (mi->image->orientation) {
case MEDIA_CONTENT_ORIENTATION_NORMAL:
+ case MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE:
orient = MEDIA_CONTENT_ORIENTATION_ROT_270;
break;
case MEDIA_CONTENT_ORIENTATION_ROT_90:
@@ -547,7 +540,8 @@ static void _set_image_orientation(struct _priv *priv)
orient = MEDIA_CONTENT_ORIENTATION_ROT_180;
break;
default:
- return;
+ orient = MEDIA_CONTENT_ORIENTATION_NORMAL;
+ break;
}
r = image_meta_set_orientation(image, orient);