From 0cd56d9f1c64cea9631651291b74db8af2956947 Mon Sep 17 00:00:00 2001 From: MyoungJune Park Date: Sat, 20 Apr 2013 20:19:36 +0900 Subject: [PATCH] change the default lockscreen type index - motion -> other - modify the lock app list by pkg names --- packaging/org.tizen.setting.spec | 2 +- setting-security/include/setting-security.h | 2 ++ setting-security/src/setting-security-locktype.c | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packaging/org.tizen.setting.spec b/packaging/org.tizen.setting.spec index 14e6df7..a26f394 100755 --- a/packaging/org.tizen.setting.spec +++ b/packaging/org.tizen.setting.spec @@ -251,7 +251,7 @@ GOPTION="-g 6514" #resetSecurity rm -rf /opt/data/setting/set_info #vconftool $GOPTION set -t string db/setting/privacy_passwd "" - vconftool $GOPTION set -t int db/setting/screen_lock_type "1" -f + vconftool $GOPTION set -t int db/setting/screen_lock_type "5" -f vconftool $GOPTION set -t string db/setting/3rd_lock_pkg_name "org.tizen.lockscreen" # NOT USED NOW. #vconftool $GOPTION set -t bool db/setting/rcs "0" diff --git a/setting-security/include/setting-security.h b/setting-security/include/setting-security.h index f2e59f8..7a36989 100755 --- a/setting-security/include/setting-security.h +++ b/setting-security/include/setting-security.h @@ -93,7 +93,9 @@ struct _SettingSecurityUG { Setting_GenGroupItem_Data *data_change_pin1; Setting_GenGroupItem_Data *data_change_pin2; Setting_GenGroupItem_Data *data_screen_lock_type; +#if 0 Setting_GenGroupItem_Data *data_locktype_swipe; +#endif Setting_GenGroupItem_Data *data_locktype_3rd[128]; Evas_Object *sl_scroller; Evas_Object *lock_type_rd; diff --git a/setting-security/src/setting-security-locktype.c b/setting-security/src/setting-security-locktype.c index b53a1ce..9a7b6c4 100755 --- a/setting-security/src/setting-security-locktype.c +++ b/setting-security/src/setting-security-locktype.c @@ -280,6 +280,7 @@ void __add_locktype_items(void *data) //evas_object_smart_callback_add(ad->sl_scroller, "realized", __gl_realized_cb, NULL); +#if 0 // [FLOW] add default lock type /* to do : radio menu */ /* 1) swipe */ @@ -298,6 +299,7 @@ void __add_locktype_items(void *data) } else { SETTING_TRACE_ERROR("item_data is NULL"); } +#endif /* [FLOW] Add 3rd party lock apps in list. */ index = __add_3rd_party_lock(ad); @@ -427,8 +429,24 @@ setting_security_locktype_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, int index = -1; char *pkg_name = NULL; + + index = __get_lockapp_index_from_appname(list_item->keyStr); + + SETTING_TRACE(" lock type : %d ---%d --- %d ", lock_type, SETTING_SCREEN_LOCK_TYPE_OTHER, index); + + pkg_name = __get_lockapp_pkgname_from_appname(list_item->keyStr); + SETTING_TRACE_DEBUG("3rd lock selected. index[%d] pkg_name[%s]", index, pkg_name); + vconf_set_str(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, pkg_name); + vconf_set_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, lock_type - index); + /* set radio */ +// elm_radio_value_set(list_item->eo_check, lock_type + index); + elm_radio_value_set(list_item->eo_check, index); + ug_destroy_me(ad->ug); + +#if 0 switch(lock_type) { + #if 0 case SETTING_SCREEN_LOCK_TYPE_SWIPE: if(vconf_set_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, lock_type) == 0) { @@ -438,6 +456,7 @@ setting_security_locktype_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, ug_destroy_me(ad->ug); break; case SETTING_SCREEN_LOCK_TYPE_OTHER: + #endif index = __get_lockapp_index_from_appname(list_item->keyStr); pkg_name = __get_lockapp_pkgname_from_appname(list_item->keyStr); SETTING_TRACE_DEBUG("3rd lock selected. index[%d] pkg_name[%s]", index, pkg_name); @@ -450,6 +469,7 @@ setting_security_locktype_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj, default: break; } +#endif } static void -- 2.7.4