diff options
author | Minkyu Kang <mk7.kang@samsung.com> | 2015-12-31 13:25:22 +0900 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2015-12-31 16:46:28 +0900 |
commit | 1fe07c40daaf201bea2fc0c00ac9b3f22229be77 (patch) | |
tree | 95bd8a497e988894876b9eceaff1d63b7582a2cb | |
parent | 0cf2fd45b12f3f79a84b12512ab76debd1c6fc2e (diff) | |
download | air_mediahub-1fe07c40daaf201bea2fc0c00ac9b3f22229be77.tar.gz air_mediahub-1fe07c40daaf201bea2fc0c00ac9b3f22229be77.tar.bz2 air_mediahub-1fe07c40daaf201bea2fc0c00ac9b3f22229be77.zip |
viewer: add rotate button
Change-Id: I3e5a552441005f1207b53805b50b4b78d8771d1a
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r-- | src/view/viewer.c | 18 |
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); |