fix to work touch sounds well
authorHyejin Kim <hyejin0906.kim@samsung.com>
Wed, 17 Oct 2012 05:18:02 +0000 (14:18 +0900)
committerHyejin Kim <hyejin0906.kim@samsung.com>
Fri, 19 Oct 2012 06:03:03 +0000 (15:03 +0900)
Change-Id: I00f30f5c3fe13034aca0e767642d28246b526a1b

packaging/org.tizen.setting.spec
setting-profile/include/setting-profile-sound-main.h
setting-profile/src/setting-profile-sound-main.c

index dbcd483..b93375a 100755 (executable)
@@ -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
index d008314..e90d241 100755 (executable)
@@ -23,8 +23,6 @@
 
 #include <setting-profile.h>
 
-// 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
index 8dd3cbc..37c3a58 100755 (executable)
@@ -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