/* view layout */
Evas_Object *view_layout = elm_layout_add(ad->win_main_layout);
- elm_layout_theme_set(view_layout, "layout", "tabbar", "default");
+ elm_layout_theme_set(view_layout, "layout", "application", "default");
evas_object_show(view_layout);
ad->view_layout = view_layout;
elm_object_style_set(ug_back_btn, NAVI_BACK_BUTTON_STYLE);
evas_object_smart_callback_add(ug_back_btn, "clicked", setting_profile_sound_main_click_softkey_cancel_cb, ad);
- Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->navi_bar, NULL, ug_back_btn, NULL, ad->view_layout, "tabbar");
- elm_naviframe_item_title_visible_set(navi_it, EINA_FALSE);
+ Elm_Object_Item *navi_it = elm_naviframe_item_push(ad->navi_bar, _(KeyStr_Sounds), ug_back_btn, NULL, ad->view_layout, "tabbar");
+ elm_object_item_part_content_set(navi_it, "tabbar", tabbar);
+ //elm_naviframe_item_title_visible_set(navi_it, EINA_FALSE);
setting_view_profile_sound_main.is_create = TRUE;
static int setting_profile_sound_main_update(void *cb)
{
+ SETTING_TRACE_BEGIN;
/* error check */
retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
evas_object_show(ad->ly_main);
}
+ int volume = 0;
+
+ sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume);
+ SETTING_TRACE_DEBUG("ringtone volume is %d", volume);
+ if(ad->data_call_volume && ad->data_call_volume->eo_check)
+ elm_slider_value_set(ad->data_call_volume->eo_check, (double)volume);
+
return SETTING_RETURN_SUCCESS;
}
void __sound_volume_changed_cb(sound_type_e type, unsigned int volume, void *user_data)
{
+ SETTING_TRACE_BEGIN;
ret_if(!user_data);
SettingProfileUG *ad = user_data;
+ Setting_GenGroupItem_Data *item_data = NULL;
Evas_Object *slider = NULL;
switch (type)
{
case SOUND_TYPE_SYSTEM:
+ SETTING_TRACE_DEBUG("system");
if (ad->data_touch_volume)
- slider = ad->data_touch_volume->eo_check;
+ item_data = ad->data_touch_volume;
+ //slider = ad->data_touch_volume->eo_check;
break;
case SOUND_TYPE_NOTIFICATION:
+ SETTING_TRACE_DEBUG("notification");
if (ad->data_noti_volume)
- slider = ad->data_noti_volume->eo_check;
+ item_data = ad->data_noti_volume;
+ //slider = ad->data_noti_volume->eo_check;
break;
case SOUND_TYPE_RINGTONE:
+ SETTING_TRACE_DEBUG("ringtone");
if (ad->data_call_volume)
- slider = ad->data_call_volume->eo_check;
+ item_data = ad->data_call_volume;
+ //slider = ad->data_call_volume->eo_check;
break;
case SOUND_TYPE_MEDIA:
+ SETTING_TRACE_DEBUG("media");
if (ad->data_media_volume)
- slider = ad->data_media_volume->eo_check;
+ item_data = ad->data_media_volume;
+ //slider = ad->data_media_volume->eo_check;
break;
//At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA
- case SOUND_TYPE_CALL:
- case SOUND_TYPE_ALARM:
default:
SETTING_TRACE_ERROR("Invalid sound type:%d", type);
return;
}
- if (slider)
+ if (item_data && item_data->eo_check)
{
+ SETTING_TRACE_DEBUG("update slider value");
int volume = 0;
double old_volume = 0;
sound_manager_get_volume(type, &volume); /* system */
+ SETTING_TRACE_DEBUG("get_volume is %d", volume);
- old_volume = elm_slider_value_get(slider);
+ old_volume = elm_slider_value_get(item_data->eo_check);
+ SETTING_TRACE_DEBUG("slider volume is %d", old_volume);
if ((int)volume != (int)(old_volume + 0.5)) { /* reset again */
- elm_slider_value_set(slider, volume);
+ elm_slider_value_set(item_data->eo_check, (double)volume);
+ SETTING_TRACE_DEBUG("update to new value %d", volume);
+ item_data->chk_status = volume;
+ elm_genlist_item_update(item_data->item);
}
}
}
/* update path of tones */
char *pa_tone_path = NULL;
+ if(profileUG->data_call_volume)
+ {
+ int volume;
+ SETTING_TRACE_DEBUG("ringtone volume %x", profileUG->data_call_volume);
+ sound_manager_get_volume(SOUND_TYPE_RINGTONE, &volume); /* system */
+ SETTING_TRACE_DEBUG("get_volume is %d", volume);
+ elm_slider_value_set(profileUG->data_call_volume->eo_check, (double)volume);
+ SETTING_TRACE_DEBUG("update to new value %d", volume);
+ }
+ if(profileUG->data_noti_volume)
+ {
+ int volume;
+ SETTING_TRACE_DEBUG("noti volume %x", profileUG->data_noti_volume);
+ sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &volume); /* system */
+ SETTING_TRACE_DEBUG("get_volume is %d", volume);
+ elm_slider_value_set(profileUG->data_noti_volume->eo_check, (double)volume);
+ SETTING_TRACE_DEBUG("update to new value %d", volume);
+ }
+ if(profileUG->data_media_volume)
+ {
+ int volume;
+ SETTING_TRACE_DEBUG("media volume %x", profileUG->data_media_volume);
+ sound_manager_get_volume(SOUND_TYPE_MEDIA, &volume); /* system */
+ SETTING_TRACE_DEBUG("get_volume is %d", volume);
+ elm_slider_value_set(profileUG->data_media_volume->eo_check, (double)volume);
+ SETTING_TRACE_DEBUG("update to new value %d", volume);
+ }
+ if(profileUG->data_touch_volume)
+ {
+ int volume;
+ SETTING_TRACE_DEBUG("system volume %x", profileUG->data_touch_volume);
+ sound_manager_get_volume(SOUND_TYPE_SYSTEM, &volume); /* system */
+ SETTING_TRACE_DEBUG("get_volume is %d", volume);
+ elm_slider_value_set(profileUG->data_touch_volume->eo_check, (double)volume);
+ SETTING_TRACE_DEBUG("update to new value %d", volume);
+ }
+
/* 1. incoming call ringtone */
if(profileUG->data_call_alert_tone)
{