Merge "packaging: spec cleanup" into tizen
[apps/core/preloaded/settings.git] / setting-reset / src / setting-reset-settings.c
index f79c4bd..31ac049 100755 (executable)
@@ -1,22 +1,18 @@
 /*
  * setting
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
  *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
- *
- * Contact: MyoungJune Park <mj2004.park@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * Licensed under the Flora License, Version 1.1 (the License);
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *     http://floralicense.org/license/
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
+ * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- *
  */
 #include <setting-cfg.h>
 #include <setting-reset-settings.h>
@@ -74,8 +70,9 @@ static char *__result_gl_text_get(void *data, Evas_Object *obj,
                }
                if (item_data->sub_desc)
                {
-                       safeStrNCat(label, ": ",HELP_MSG_BUFF_SIZE);
-                       const char *sub_desc = setting_customize_text(_(item_data->sub_desc), RESULT_FONT_SIZE, NULL, NULL);
+                       char desc[SETTING_STR_SLP_LEN + 1] = { 0, };
+                       snprintf(desc, SETTING_STR_SLP_LEN, ": %s", _(item_data->sub_desc));
+                       const char *sub_desc = setting_customize_text(desc, RESULT_FONT_SIZE, NULL, NULL);
                        safeStrNCat(label, sub_desc,HELP_MSG_BUFF_SIZE);
                        FREE(sub_desc);
                }
@@ -305,6 +302,8 @@ static int setting_reset_settings_create(void *cb)
                                        continue; /* hide Network in Emulator*/
                                } else if (!safeStrCmp(KeyStr_Bluetooth, item_name)) {
                                        continue; /* hide Bluetooth in Emulator*/
+                               } else if (!safeStrCmp(KeyStr_DateTime, item_name)) {
+                                       continue; /* hide Date&Time in Emulator*/
                                } else if (!safeStrCmp(KeyStr_Security, item_name)) {
                                        continue; /* hide Security in Emulator*/
                                } else if (!safeStrCmp(KeyStr_Memory, item_name)) {
@@ -391,6 +390,8 @@ static int setting_reset_settings_destroy(void *cb)
                ad->reset_all_idler = NULL;
        }
 
+       ad->pop_btn = NULL;
+
        elm_naviframe_item_pop(ad->navi_bar);
        setting_view_reset_settings.is_create = 0;
 
@@ -501,6 +502,9 @@ static void __reset_an_item(Setting_Done_List_Data *list_data,
                                                         (char *)item_name,
                                                         (char *)result_str, NULL);
                        ecore_idler_add((Ecore_Task_Cb) __delay_reset_location, item_data);
+
+                       service_destroy(svc);
+                       FREE(path);
                        return;
                }
 
@@ -551,11 +555,11 @@ static Eina_Bool __reset_animator_cb(void *data)
                        evas_object_del(ad->pop_progress);
                        ad->pop_progress = NULL;
                }
-               Evas_Object *btn = elm_object_part_content_get(ad->notify, "button1");
-               if (btn)
+               //Evas_Object *btn = elm_object_part_content_get(ad->notify, "button1");
+               if (ad->pop_btn)
                {
-                       setting_enable_evas_object(btn);
-                       setting_undo_dim_evas_object(btn, TRUE);
+                       setting_enable_evas_object(ad->pop_btn);
+                       setting_undo_dim_evas_object(ad->pop_btn, TRUE);
                }
 
                Evas_Object *genlist = elm_object_content_get(ad->notify);
@@ -613,6 +617,7 @@ static void setting_reset_settings_check_state(Setting_Done_List_Data *list_data
        elm_object_style_set(btn, "popup_button/default");
        setting_disable_evas_object(btn);
        setting_dim_evas_object(btn, TRUE);
+       ad->pop_btn = btn;
 
        Evas_Object *genlist = elm_genlist_add(ad->notify);
        elm_object_style_set(genlist, "dialogue");
@@ -700,7 +705,7 @@ setting_reset_settings_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode,
        case UG_MODE_FULLVIEW:
                evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND,
                                                 EVAS_HINT_EXPAND);
-               elm_win_resize_object_add(ad->win_get, base);
+               //elm_win_resize_object_add(ad->win_get, base);
                evas_object_show(base);
                break;
        default: