change the default lockscreen type index
authorMyoungJune Park <mj2004.park@samsung.com>
Sat, 20 Apr 2013 11:19:36 +0000 (20:19 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Sat, 20 Apr 2013 12:01:42 +0000 (21:01 +0900)
- motion -> other
- modify the lock app list by pkg names

packaging/org.tizen.setting.spec
setting-security/include/setting-security.h
setting-security/src/setting-security-locktype.c

index 14e6df7..a26f394 100755 (executable)
@@ -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"
index f2e59f8..7a36989 100755 (executable)
@@ -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;
index b53a1ce..9a7b6c4 100755 (executable)
@@ -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