int value = 0;
vconf_get_bool
(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &value);
+ // true : auto rotation OFF
+ // false : auto rotation ON
value = !value;
ad->data_rotationMode =
#endif
}
+/**
+ * @see [caller] setting_main_list_mouse_up_cb
+ * @see [caller] setting_main_sel_list_mouse_up_cb
+ */
+static void __rotate_lock_handler(int chk_status, setting_main_appdata *ad )
+{
+ SETTING_TRACE_BEGIN;
+ if( chk_status == 1)
+ {
+ // toggle : 0 --> 1
+ int angle = elm_win_rotation_get(ad->win_main);
+ elm_win_rotation_with_resize_set(ad->win_main, angle);
+ } else {
+ elm_win_rotation_with_resize_set(ad->win_main, 0);
+ }
+ vconf_set_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, !chk_status);
+}
+
+/**
+ * toggle cb
+ */
void setting_main_list_mouse_up_cb(void *data, Evas_Object *eo,
void *event_info)
{
}
} else if (!safeStrCmp(KeyStr_Landscape, list_item->keyStr)) {
- vconf_set_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, ! list_item->chk_status);
+ __rotate_lock_handler(list_item->chk_status, ad);
}
return;
}
+/**
+ * genlist touch cb
+ */
void setting_main_sel_list_mouse_up_cb(void *data, Evas_Object *eo,
void *event_info)
{
(Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
list_item->chk_status = elm_check_state_get(list_item->eo_check);
+
/* new status */
+ list_item->chk_status = !list_item->chk_status;
+ elm_check_state_set(list_item->eo_check, list_item->chk_status);
- /*setting_main_appdata *ad = (setting_main_appdata *) data;*/
+ setting_main_appdata *ad = (setting_main_appdata *) data;
if (!safeStrCmp(KeyStr_UsePacketData, list_item->keyStr)) {
/* setting_reset_slp_key_by_status(eo, BOOL_SLP_SETTING_USE_PACKET_DATA); */
list_item->chk_status, &err);
} else if (!safeStrCmp(KeyStr_Landscape, list_item->keyStr)) {
- vconf_set_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, (list_item->chk_status));
+ __rotate_lock_handler(list_item->chk_status, ad);
}
return;