From b6bec2b8eef3239156a9f8a2a7ac5bef2f8bc993 Mon Sep 17 00:00:00 2001 From: Hyejin Kim Date: Wed, 17 Oct 2012 14:18:02 +0900 Subject: [PATCH] fix to work touch sounds well Change-Id: I00f30f5c3fe13034aca0e767642d28246b526a1b --- packaging/org.tizen.setting.spec | 2 +- setting-profile/include/setting-profile-sound-main.h | 2 -- setting-profile/src/setting-profile-sound-main.c | 17 ++++++++++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/packaging/org.tizen.setting.spec b/packaging/org.tizen.setting.spec index dbcd483..b93375a 100755 --- a/packaging/org.tizen.setting.spec +++ b/packaging/org.tizen.setting.spec @@ -149,7 +149,7 @@ GOPTION="-g 6514" vconftool $GOPTION set -t string db/setting/sound/noti/email_ringtone_path "${DEFAULT_NOTI_TONE}" vconftool $GOPTION set -t int db/setting/sound/noti/email_alert_rep_type "0" - + vconftool $GOPTION set -t bool db/setting/sound/touch_sounds "1" vconftool $GOPTION set -t bool db/setting/sound/sound_lock "1" #resetWallpaper diff --git a/setting-profile/include/setting-profile-sound-main.h b/setting-profile/include/setting-profile-sound-main.h index d008314..e90d241 100755 --- a/setting-profile/include/setting-profile-sound-main.h +++ b/setting-profile/include/setting-profile-sound-main.h @@ -23,8 +23,6 @@ #include -// Test comment by rndclub(jungbae.lee@samsung.com) 2012.06 - #define SETTING_SOUND_VIB_TYPE_LEN 5 #define SETTING_SOUND_REPEAT_TYPE_LEN 4 #define SETTING_SOUND_VOLUME_TIMER_INTERVAL 0.2 diff --git a/setting-profile/src/setting-profile-sound-main.c b/setting-profile/src/setting-profile-sound-main.c index 8dd3cbc..37c3a58 100755 --- a/setting-profile/src/setting-profile-sound-main.c +++ b/setting-profile/src/setting-profile-sound-main.c @@ -532,6 +532,9 @@ static Evas_Object *__get_main_list(void *data) ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); /* Touch sounds */ + if (vconf_get_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &vconf_value) < 0) + vconf_value = TRUE; /* default value of touch sounds : on */ + ad->data_touch_sounds = setting_create_Gendial_field_def(genlist, &(ad->itc_1text_1icon), setting_profile_sound_main_mouse_up_Gendial_list_cb, @@ -1132,6 +1135,12 @@ setting_profile_sound_main_Gendial_chk_cb(void *data, Evas_Object *obj, elm_check_state_set(list_item->eo_check, !state); } } + else if (!safeStrCmp("IDS_ST_BODY_TOUCH_SOUNDS", list_item->keyStr)) { + if (vconf_set_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, list_item->chk_status) < 0) { + list_item->chk_status = !state; + elm_check_state_set(list_item->eo_check, !state); + } + } /* end */ @@ -1186,9 +1195,11 @@ setting_profile_sound_main_mouse_up_Gendial_list_cb(void *data, else if (!safeStrCmp("IDS_ST_BODY_TOUCH_SOUNDS", list_item->keyStr)) { int old_status = elm_check_state_get(list_item->eo_check); /* To do : set vconfkey for touch sounds */ - - list_item->chk_status = !old_status; - elm_check_state_set(list_item->eo_check, list_item->chk_status); + if (vconf_set_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, !old_status) == 0) { + /* new status */ + list_item->chk_status = !old_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + } } /* end */ else if (ad->data_msg_alert_repeat == list_item -- 2.7.4