rotate to 0 when rotation is locked
authorJisung Ahn <jcastle.ahn@samsung.com>
Thu, 17 Jan 2013 11:40:25 +0000 (20:40 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Thu, 17 Jan 2013 11:56:31 +0000 (20:56 +0900)
Change-Id: I4c6d9ece18e9d52e1df648e12b95c57efdd28eef

common/include/ivug-config.h
common/src/ivug-config.c
main/src/ug-image-viewer.cpp

index c6f237b..299b1f0 100755 (executable)
@@ -53,6 +53,8 @@ void ivug_config_get_slideshow_setting(slide_show_mode * /* OUT */ mode,
                                                        double * /* OUT */ interval_time,
                                                        ivug_effect_type * /* OUT */ effect_type);
 
+bool ivug_config_get_can_rotate(void);
+
 #ifdef __cplusplus
 }
 #endif
index f96b488..af0ab48 100755 (executable)
@@ -235,3 +235,26 @@ ivug_config_get_slideshow_setting(slide_show_mode *mode,
        }
 }
 
+bool ivug_config_get_can_rotate(void)
+{
+       int state = STATE_FALSE;
+       /*if(vconf_get_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, &state) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as default: false");
+               return false;
+       }
+
+       MSG_IMAGEVIEW_HIGH("rotate state is: %d", state);
+       return (state == STATE_TRUE ? true : false);*/
+
+       if(vconf_get_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &state) < 0)
+       {
+               MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as default: false");
+               return false;
+       }
+
+       MSG_IMAGEVIEW_HIGH("rotate state is: %d", state);
+       return (state == STATE_TRUE ? false : true);
+}
+
+
index aba3d8d..0eec0d2 100755 (executable)
@@ -353,6 +353,12 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, voi
 
        Evas_Object *win = (Evas_Object *)ug_get_window();
 
+       // it is for camera, camera can rotate even rotation is locked
+       if(ivug_config_get_can_rotate() == false)
+       {
+               elm_win_rotation_with_resize_set(win, 0);
+       }
+
        int wx, wy, ww, wh;
        int ret = -1;