}
}
+static void __setting_powersaving_main_popup_rsp_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ SETTING_TRACE_BEGIN;
+ setting_retm_if(data == NULL, "Data parameter is NULL");
+ SettingPowersavingUG *ad = (SettingPowersavingUG *) data;
+
+ if (obj) {
+ evas_object_del(obj);
+ obj = NULL;
+ }
+ ad->popup = NULL;
+
+ int ret = vconf_set_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, 0);
+ setting_retm_if(0 != ret, "Failed to set vconf value");
+}
+
static void
setting_powersaving_main_click_softkey_back_cb(void *data, Evas_Object *obj,
void *event_info)
{
SETTING_TRACE_BEGIN;
/* error check */
- setting_retm_if(data == NULL,
- "[Setting > Powersaving] Data parameter is NULL");
-
+ setting_retm_if(data == NULL, "[Setting > Powersaving] Data parameter is NULL");
SettingPowersavingUG *ad = (SettingPowersavingUG *) data;
- /* Send destroy request */
- ug_destroy_me(ad->ug);
- SETTING_TRACE_END;
+ int ret = 0;
+ int value = 0;
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_SYSMODE_STATUS, &value);
+ setting_retm_if(0 != ret, "Failed to get vconf value");
+
+ if (value) {
+ int sub_item_value = 0;
+
+ /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU */
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_CPU, &sub_item_value);
+ setting_retm_if(0 != ret, "Failed to get vconf value");
+ if (sub_item_value) {
+ ug_destroy_me(ad->ug);
+ return;
+ }
+
+ /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY */
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_DISPLAY, &sub_item_value);
+ setting_retm_if(0 != ret, "Failed to get vconf value");
+ if (sub_item_value) {
+ ug_destroy_me(ad->ug);
+ return;
+ }
+
+ /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR */
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_BG_COLOR, &sub_item_value);
+ setting_retm_if(0 != ret, "Failed to get vconf value");
+ if (sub_item_value) {
+ ug_destroy_me(ad->ug);
+ return;
+ }
+
+ /* check VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB */
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_PWRSV_CUSTMODE_SCREEN_VIB, &sub_item_value);
+ setting_retm_if(0 != ret, "Failed to get vconf value");
+ if (sub_item_value) {
+ ug_destroy_me(ad->ug);
+ return;
+ }
+ if (ad->popup) {
+ evas_object_del(ad->popup);
+ ad->popup = NULL;
+ }
+ ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(SETTING_POWERSAVING_ALL_SUB_ITEMS_OFF),
+ __setting_powersaving_main_popup_rsp_cb, POPUP_INTERVAL, TRUE, TRUE);
+ } else {
+ /* Send destroy request */
+ ug_destroy_me(ad->ug);
+ }
}
static void