e4b86ba6651b1db49fe927bd6d9007fee0ed2faa
[apps/core/preloaded/settings.git] / setting-about / src / setting-about-main.c
1 /*
2  * setting
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
5  *
6  * Contact: MyoungJune Park <mj2004.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21 #include <setting-cfg.h>
22 #include <setting-about-main.h>
23 #include <aul.h>
24 #include <sys/types.h>
25 #include <sys/stat.h>
26 #include <fcntl.h>
27 //#include <bluetooth-api.h>
28
29 #include <bluetooth.h>
30
31
32 #include <app_manager.h>
33 #include <system_info.h>
34
35 #define DEVNAME_BLOCK_SPACE     0
36 // #define SUPPORT_DIAG_USAGE
37
38 /** @todo : need to handle unicode encoded input characters */
39
40 #define MAX_DEVICE_NAME_LEN                     24
41 #define EMPTY_LIMITATION_STR            "IDS_ST_BODY_THE_NAME_FIELD_CANNOT_BE_EMPTY"
42 #define DIAGNOSTICS_USAGE_STR       "Diagnostics and Usage"
43 #define SOFTWARE_UPDATE_STR                     "IDS_ST_MBODY_SOFTWARE_UPDATE"
44
45
46 static int setting_about_main_create(void *cb);
47 static int setting_about_main_destroy(void *cb);
48 static int setting_about_main_update(void *cb);
49 static int setting_about_main_cleanup(void *cb);
50
51 setting_view setting_view_about_main = {
52         .create = setting_about_main_create,
53         .destroy = setting_about_main_destroy,
54         .update = setting_about_main_update,
55         .cleanup = setting_about_main_cleanup,
56 };
57 /**
58 * Do process when clicking '<-' button
59 *
60 * @param data
61 * @param obj
62 * @param event_info
63 */
64 static void setting_about_main_click_softkey_back_cb(void *data,
65                                                      Evas_Object *obj,
66                                                      void *event_info);
67
68 /**
69 * Do process when clicking on some genlist item
70 *
71 * @param data
72 * @param obj
73 * @param event_info
74 */
75 static void setting_about_main_mouse_up_Gendial_list_cb(void *data,
76                                                         Evas_Object *obj,
77                                                         void *event_info);
78
79 static void __setting_about_main_certificates_clicked(void *data);
80 static void __setting_about_main_device_name_clicked(void *data, Evas_Object *obj);
81 static void __setting_about_main_diagnostics_usage_clicked(void *data, Evas_Object *obj);
82 /* ***************************************************
83  *
84  *basic func
85  *
86  ***************************************************/
87 static void __about_popup_rsp_cb(void *data, Evas_Object *obj, void *event_info)
88 {
89         SettingAboutUG *ad = data;
90         if (obj) {
91                 evas_object_del(obj);
92                 obj = NULL;
93         }
94         ad->popup = NULL;
95 }
96 static void __device_name_changed_cb(void *data, Evas_Object *obj)
97 {
98         retm_if(!data || !obj, "Data parameter is NULL");
99         //return if entry is not focused too
100
101         Setting_GenGroupItem_Data *list_item =
102             (Setting_GenGroupItem_Data *) data;
103         SettingAboutUG *ad = list_item->userdata;
104         retm_if(ad == NULL, "Data parameter is NULL");
105
106         const char *entry_str = elm_entry_entry_get(obj);
107         int entry_len = safeStrLen(entry_str);
108         SETTING_TRACE("entry_str:[%s], lenght:%d", entry_str, entry_len);
109
110 #if DEVNAME_BLOCK_SPACE
111         //block 'Space' key
112         if (entry_len > 0 && NULL != strstr(entry_str, " ")) {//cancel the effect of input 'space character'
113                 SETTING_TRACE("Cannot input the 'space' key or 'enter' key");
114
115                 int i = 0;
116                 int j = 0;
117                 char *tmp = (char *)g_strdup(entry_str);
118                 for (; tmp[i];) {
119                         if (tmp[i] == ' ') {
120                                 for (j = i; tmp[j]; j++) {
121                                         tmp[j] = tmp[j + 1];
122                                 }
123                         } else {
124                                 i++;
125                         }
126                 }
127                 G_FREE(list_item->sub_desc);
128                 list_item->sub_desc = (char *)g_strdup(tmp);
129                 G_FREE(tmp);
130                 SETTING_TRACE("sub_desc:[%s]", list_item->sub_desc);
131
132                 elm_entry_entry_set(obj, list_item->sub_desc);
133                 elm_entry_cursor_end_set(obj);
134         }
135 #endif
136         //for genlist update
137         G_FREE(list_item->sub_desc);//release first
138         list_item->sub_desc = (char *)g_strdup(entry_str);
139
140         if (NULL == entry_str || 0 == entry_len) {
141                 if (!ad->empty_flag)
142                 {
143                         ad->empty_flag = TRUE;
144                         //elm_entry_context_menu_disabled_set(obj, TRUE); //disable the copy&paste&search popup
145                         //elm_entry_magnifier_disabled_set(obj, TRUE);
146                         Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar);
147                         if (navi_it)
148                         {
149                                 Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn");
150                                 setting_disable_evas_object(back_btn);
151                                 setting_dim_evas_object(back_btn, TRUE);
152
153                                 Evas_Object *top_r_btn = elm_object_item_part_content_get(navi_it, "title_right_btn");
154                                 if(top_r_btn)
155                                 {
156                                         setting_disable_evas_object(top_r_btn);
157                                         setting_dim_evas_object(top_r_btn, TRUE);
158                                 }
159                         }
160                 }
161         } else {
162                 if (ad->empty_flag)
163                 {
164                         ad->empty_flag = FALSE;
165                         //elm_entry_context_menu_disabled_set(obj, FALSE); //enable the copy&paste&search popup
166                         //elm_entry_magnifier_disabled_set(obj, FALSE);
167                         Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar);
168                         if (navi_it)
169                         {
170                                 Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn");
171                                 setting_enable_evas_object(back_btn);
172                                 setting_undo_dim_evas_object(back_btn, TRUE);
173
174                                 Evas_Object *top_r_btn = elm_object_item_part_content_get(navi_it, "title_right_btn");
175                                 if(top_r_btn)
176                                 {
177                                         setting_enable_evas_object(top_r_btn);
178                                         setting_undo_dim_evas_object(top_r_btn, TRUE);
179                                 }
180                         }
181                 }
182         }
183
184 }
185
186 static void
187 __setting_about_device_name_changed_cb(void *data, Evas_Object *obj,
188                                        void *event_info)
189 {
190         __device_name_changed_cb(data, obj);
191 }
192
193
194 /**
195  *      Model Name:
196  *              - No ini: Unavailable
197  *              - I9500 @ target: GT-I9500
198  *              - I9500 @ emul: SDK
199  *              - SLP   @ target: GT-SLP
200  *              - SLP   @ emul: SDK
201  */
202 void setting_about_main_get_phone_model_name(char* szStr, int nSize)
203 {
204         retm_if(szStr == NULL, "szStr parameter is NULL");
205
206         char *value = NULL;
207         int ret = system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &value);
208         SETTING_TRACE("value : %s", value);
209         if (ret != SYSTEM_INFO_ERROR_NONE) {
210                 SETTING_TRACE_ERROR("fail to call system_info_get_value_string");
211                 FREE(value);
212                 snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
213                 return;
214         }
215
216         if (value) {
217                 snprintf(szStr, nSize, "%s", value);
218         } else {
219                 snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
220         }
221
222         FREE(value);
223 }
224
225 void setting_about_main_get_sw_version(char* szStr, int nSize)
226 {
227         retm_if(szStr == NULL, "szStr parameter is NULL");
228
229         // ex) TIZEN
230         char *platform = NULL;
231         int ret = system_info_get_value_string(SYSTEM_INFO_KEY_PLATFORM_NAME, &platform);
232         if (ret != SYSTEM_INFO_ERROR_NONE) {
233                 SETTING_TRACE_ERROR("fail to call system_info_get_value_string");
234                 FREE(platform);
235                 snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
236                 return;
237         }
238
239         // ex) 2.0.0b
240         char *version = NULL;
241         ret = system_info_get_value_string(SYSTEM_INFO_KEY_TIZEN_VERSION, &version);
242         if (ret != SYSTEM_INFO_ERROR_NONE) {
243                 SETTING_TRACE_ERROR("fail to call system_info_get_value_string");
244
245                 FREE(platform);
246                 FREE(version);
247
248                 snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
249                 return;
250         }
251         snprintf(szStr, nSize, "%s %s", platform, version);
252
253         FREE(platform);
254         FREE(version);
255 }
256
257 void setting_about_main_get_wifi_mac_address_string(char *str, int size)
258 {
259         setting_retm_if(str == NULL, "str parameter is NULL");
260         setting_retm_if(size < SETTING_ABOUT_WIFI_MAC_STR_LEN+1, "size parameter is wrong");
261
262         FILE *p = fopen(SETTING_ABOUT_MACINFO_PATH, "r");
263
264         if (p) {
265                 int size = fread(str, sizeof(char), SETTING_ABOUT_WIFI_MAC_STR_LEN, p);
266                 if (size != SETTING_ABOUT_WIFI_MAC_STR_LEN) {
267                         SETTING_TRACE_ERROR("fail to call fread");
268                 }
269                 fclose(p);
270                 p = NULL;
271         } else {
272                 perror("open failed!");
273         }
274
275         SETTING_TRACE_DEBUG("get_wifi_mac_address : %s", str);
276
277         int wifi_state = VCONFKEY_WIFI_OFF;
278         vconf_get_int(VCONFKEY_WIFI_STATE, &wifi_state);
279
280         if((safeStrLen(str) == 0) || (wifi_state == VCONFKEY_WIFI_OFF))
281                 snprintf(str, size, "%s  (%s)", _("IDS_ST_HEADER_UNAVAILABLE"), _(SETTING_ABOUT_NEVER_TURN_WIFI_ON_STR));
282 }
283
284 void setting_about_main_get_battery_string(char *str, int size)
285 {
286         setting_retm_if(str == NULL, "str parameter is NULL");
287
288         int val = -1;
289         char file[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, };
290         snprintf(file, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO,
291                  "%s/%s/%s", SETTING_ABOUT_POWER_SUPPLY_PATH, "battery", "capacity");
292
293         char buf[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, };
294         int fd = 0;
295         int r = 0;
296
297         fd = open(file, O_RDONLY);
298         if (fd != -1) {
299                 r = read(fd, buf, MAX_DISPLAY_STR_LEN_ON_PHONE_INFO);
300                 if ((r >= 0) && (r < MAX_DISPLAY_STR_LEN_ON_PHONE_INFO)) {
301                         buf[r] = '\0';
302                         val = atoi(buf);
303                         snprintf(str, size, "%d%s", val, "\%");
304                 } else {
305                         SETTING_TRACE_ERROR("read file fail");
306                         snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
307                 }
308
309                 close(fd);
310         } else {
311                 SETTING_TRACE_ERROR("open file fail");
312                 snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
313         }
314 }
315
316 void setting_about_main_get_bluetooth_address_string(char *str, int size)
317 {
318         setting_retm_if(str == NULL, "str parameter is NULL");
319
320         //bluetooth_device_address_t local_address;
321         //memset(&local_address, 0x0, sizeof(local_address));
322         int ret = 0;
323
324         /* for fixing BS of dbus signal */
325         //bluetooth_register_callback(NULL, NULL);
326         //ret = bluetooth_get_local_address(&local_address);
327         char local_address[1024];
328         memset(local_address, 0x0, 1024);
329         ret = bt_adapter_get_address(&local_address);
330
331         /* for fixing BS of dbus signal */
332         bluetooth_unregister_callback();
333
334         if (ret < 0) {
335                 snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
336                 SETTING_TRACE_DEBUG("bt address : %s", str);
337         } else {
338                 /*
339                 snprintf(str, size, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
340                         local_address.addr[0], local_address.addr[1], local_address.addr[2],
341                         local_address.addr[3], local_address.addr[4], local_address.addr[5]);
342                 */
343                 SETTING_TRACE_DEBUG("bt address : %s", local_address);
344                 snprintf(str, size, "%s", local_address);
345         }
346 }
347
348 int __stat_get_cpuinfo(float *usr_pct, float *sys_pct)
349 {
350         setting_retvm_if(usr_pct == NULL, -ENOENT, "param usr_pct is null");
351         setting_retvm_if(sys_pct == NULL, -ENOENT, "param sys_pct is null");
352
353         /*  default value */
354         *usr_pct = 0.0;
355         *sys_pct = 0.0;
356         static unsigned long long usr_time = 0, nice_time = 0, sys_time = 0;
357         static unsigned long long old_usr = 0, old_nice = 0, old_sys = 0;
358         static struct timeval old_tv, cur_tv;
359         unsigned long long elapsed_tick;
360         long tick_per_sec;
361         long cpu_num;
362         FILE *fp = NULL;
363         int ret = 0;
364
365         tick_per_sec = sysconf(_SC_CLK_TCK);
366         cpu_num = sysconf(_SC_NPROCESSORS_ONLN);
367
368         if (cpu_num < 1)
369                 cpu_num = 1;
370
371         gettimeofday(&cur_tv, NULL);
372         fp = fopen(SETTING_ABOUT_STAT_PATH, "r");
373         if (fp == NULL) {
374                 SETTING_TRACE_ERROR("fp == NULL");
375                 return -ENOENT;
376         }
377
378         char cpu_info[MAX_COMMON_BUFFER_LEN] = {0,};
379         char *cpu_info_p = fgets(cpu_info, MAX_COMMON_BUFFER_LEN, fp);
380
381                 if(cpu_info_p == NULL) {
382                         SETTING_TRACE_ERROR("fgets failed");
383                         fclose(fp);   // free - code
384                         return -ENOENT;
385                 }
386
387         char *substr = NULL;
388         unsigned long long tmp_long = 0;
389         int i = 0;
390         /* split cpu_info, get 3 numbers headmost*/
391         while ((substr = strsep(&cpu_info_p, " \t")) != NULL) {
392                 char* endptr = NULL;
393                 tmp_long = strtoull(substr, &endptr, 10);
394                 if (tmp_long != 0 && tmp_long != ULLONG_MAX) {
395                         switch (i) {
396                         case 0:
397                                 usr_time = tmp_long;
398                                 break;
399                         case 1:
400                                 nice_time = tmp_long;
401                                 break;
402                         case 2:
403                                 sys_time = tmp_long;
404                                 break;
405                         default:
406                                 break;
407                         }
408                         i++;
409                 }
410                 if (i >= 3) {
411                         break;
412                 }
413         }
414
415         fclose(fp);
416         fp = NULL;
417         if (old_usr == 0) {
418                 ret = -EAGAIN;
419                 SETTING_TRACE_ERROR("old_usr == 0");
420                 goto out;
421         }
422
423         elapsed_tick = (cur_tv.tv_sec - old_tv.tv_sec) * tick_per_sec +
424             ((cur_tv.tv_usec - old_tv.tv_usec) * tick_per_sec) / 1000000;
425
426         /* REMOVE BS */
427         if (elapsed_tick != 0)
428                 *usr_pct =
429                     ((float)(usr_time - old_usr) * 100 / elapsed_tick) /
430                     cpu_num;
431         else
432                 *usr_pct = 0;
433         /* REMOVE BS */
434         if (elapsed_tick != 0)
435                 *sys_pct =
436                     ((float)(sys_time - old_sys) * 100 / elapsed_tick) /
437                     cpu_num;
438         else
439                 *sys_pct = 0;
440
441  out:
442         old_usr = usr_time;
443         old_nice = nice_time;
444         old_sys = sys_time;
445         old_tv = cur_tv;
446
447         return ret;
448 }
449
450 static Eina_Bool __timer_update_cb(const void *data)
451 {
452         retv_if(data == NULL, TRUE);
453         SettingAboutUG *ad = (SettingAboutUG *) data;
454
455         char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, };
456         if (ad->item_data_cpu) {
457                 float usr, sys;
458                 int ret = __stat_get_cpuinfo(&usr, &sys);
459                 if (ret == -ENOENT) {
460                         SETTING_TRACE_ERROR("call __stat_get_cpuinfo fail");
461                         snprintf(str, sizeof(str), "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
462                 } else {
463                         snprintf(str, sizeof(str), "%.0f%s", usr + sys, "\%");
464                 }
465
466                 ad->item_data_cpu->sub_desc = (char *)g_strdup(str);
467                 elm_object_item_data_set(ad->item_data_cpu->item, ad->item_data_cpu);
468                 elm_genlist_item_update(ad->item_data_cpu->item);
469         }
470
471         if (ad->item_data_battery) {
472                 setting_about_main_get_battery_string(str, sizeof(str));
473                 /*SETTING_TRACE("str:%s", str);*/
474                 ad->item_data_battery->sub_desc = (char *)g_strdup(str);
475                 elm_object_item_data_set(ad->item_data_battery->item, ad->item_data_battery);
476                 elm_genlist_item_update(ad->item_data_battery->item);
477         }
478         return TRUE;
479 }
480
481 static void
482 __about_main_gl_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event)
483 {
484         ret_if(!data);
485         SettingAboutUG *ad = (SettingAboutUG *) data;
486         retm_if(event == NULL, "Invalid argument: event info is NULL");
487         Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *)event;
488
489         if (ad->item_dev_name) {
490                 Elm_Object_Item *selected_item = elm_genlist_at_xy_item_get(ad->genlsit, ev->output.x, ev->output.y, NULL);
491                 if (ad->item_dev_name->item == selected_item)//do nothing..
492                         return;
493
494                 elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE);//to make inputing words input
495         }
496 }
497
498 static void __entry_unfocus_cb(void *data, Evas_Object *obj, void *event_info)
499 {
500         SETTING_TRACE_BEGIN;
501         retm_if(!data || !obj, "Data parameter is NULL");
502
503         Evas_Object *entry_container = elm_object_parent_widget_get(obj);
504         if (entry_container) {
505                 //whe entry unfocused, its guidetext will becomes "Input here"
506                 elm_object_part_text_set(entry_container, "elm.guidetext", _("IDS_ST_BODY_TAP_TO_INSERT"));
507                 if (elm_entry_is_empty(obj))
508                         elm_object_signal_emit(entry_container, "elm,state,guidetext,show", "elm");
509                 elm_object_signal_emit(entry_container, "elm,state,eraser,hide", "elm");
510         }
511
512         //Setting_GenGroupItem_Data *list_item = data;
513         const char *entry_str = elm_entry_entry_get(obj);
514         char *entry_str_utf8 = NULL;
515         entry_str_utf8 = elm_entry_markup_to_utf8(entry_str);
516         //int len = safeStrLen(entry_str_utf8);
517         SETTING_TRACE("To store \"%s\" into vconf[%s]", entry_str_utf8, VCONFKEY_SETAPPL_DEVICE_NAME_STR);
518
519         //ecore_idler_add(__check_on_idler, ad);
520         Setting_GenGroupItem_Data *item_dev_name = data;
521         SettingAboutUG *ad = item_dev_name->userdata;
522         __device_name_changed_cb(item_dev_name, item_dev_name->eo_check);
523 #if 0
524         //after unfocus,need updating..
525         elm_object_item_data_set(item_dev_name->item, item_dev_name);
526         elm_genlist_item_update(item_dev_name->item);
527 #endif
528
529         if(ad->navi_item
530            && elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) {
531                 Evas_Object *btn = elm_object_item_part_content_unset(ad->navi_item, "title_right_btn");
532                 evas_object_del(btn);
533         }
534         setting_hide_input_pannel_cb(item_dev_name->eo_check);
535         if (item_dev_name) {
536                 if (ad->empty_flag) {
537                         if (ad->popup) {
538                                 evas_object_del(ad->popup);
539                                 ad->popup = NULL;
540                         }
541                         ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR),
542                                              __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE);
543                         return;
544                 } else {
545                 }
546         }
547
548
549         if (0 != vconf_set_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR, entry_str_utf8)) {
550                 SETTING_TRACE_ERROR("Set vconf[%s] failed",
551                                     VCONFKEY_SETAPPL_DEVICE_NAME_STR);
552         }
553
554         FREE(entry_str_utf8);
555
556 }
557
558 static void __entry_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
559 {
560         ret_if(data == NULL);
561         SettingAboutUG *ad = (SettingAboutUG*)data;
562         Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event_info;
563         SETTING_TRACE_DEBUG("ev->key : %s", ev->key);
564         if(safeStrCmp(ev->key, "Return") == 0)
565         {
566                 // if entry has 1 char at list, hide ime.
567                 if(safeStrLen(elm_entry_entry_get(obj)) == 0)
568                 {
569                         if (ad->popup) {
570                                 evas_object_del(ad->popup);
571                                 ad->popup = NULL;
572                         }
573                         ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR),
574                                              __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE);
575                 }
576         }
577 }
578
579 int setting_about_generate_genlist(void *data)
580 {
581         SETTING_TRACE_BEGIN;
582         /* error check */
583         retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
584
585         SettingAboutUG *ad = (SettingAboutUG *) data;
586         bool is_emul_bin = isEmulBin();
587
588         Evas_Object *scroller = ad->genlsit;
589         Elm_Object_Item *item = NULL;
590         Setting_GenGroupItem_Data *item_data = NULL;
591         char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, };
592         (void)setting_create_Gendial_field_titleItem(scroller,
593                                                      &(ad->itc_group_item),
594                                                      SETTING_ABOUT_DEVICE_INFO_STR, NULL);
595         /* Device name */
596         char *name_value = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
597         char *pa_sub_desc = elm_entry_utf8_to_markup(name_value);
598         FREE(name_value);
599
600         ad->empty_flag = FALSE;
601         if (NULL == pa_sub_desc || '\0' == pa_sub_desc[0])
602         {
603                 ad->empty_flag = TRUE;
604                 Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar);
605                 if (navi_it)
606                 {
607                         Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn");
608                         setting_disable_evas_object(back_btn);
609                         setting_dim_evas_object(back_btn, TRUE);
610                 }
611         }
612
613
614         // [UI] Device name
615         char *app_name = NULL;
616         int ret_get_app_name = app_manager_get_app_name("com.samsung.oma-dm-ui", &app_name);
617         if (ret_get_app_name == APP_MANAGER_ERROR_INVALID_PACKAGE )
618         {
619                 SETTING_TRACE(">>>>>>>>>>>>>>>>>> UNINSTALLED PACKAGE");
620                 ad->item_dev_name = NULL;
621         } else {
622
623                 ad->item_dev_name =
624                         setting_create_Gendial_field_def(scroller, &(ad->itc_1icon),
625                                                                  setting_about_main_mouse_up_Gendial_list_cb,
626                                                          ad, SWALLOW_Type_LAYOUT_ENTRY,
627                                                          NULL, NULL, 0, SETTING_ABOUT_DEVICE_NAME_STR, pa_sub_desc,
628                                                          __setting_about_device_name_changed_cb);
629                 if (ad->item_dev_name) {
630                         ad->item_dev_name->userdata = ad;
631                         ad->item_dev_name->isSinglelineFlag = 0;
632                         ad->item_dev_name->start_change_cb = (setting_call_back_func)__entry_key_down_cb;
633                         ad->item_dev_name->stop_change_cb = __entry_unfocus_cb;
634                         ad->item_dev_name->limit_filter_data = calloc(1, sizeof(Elm_Entry_Filter_Accept_Set));
635
636                         if (ad->item_dev_name->limit_filter_data) {
637                                 //max byte len is 31 not 31+1
638                                 //ad->item_dev_name->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN + OFFESET_ENTRY_FILTER;
639                                 ad->item_dev_name->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN;
640                                 ad->item_dev_name->win_main = ad->win_get;
641                         }
642                         //ad->item_dev_name->input_type = ELM_INPUT_PANEL_LAYOUT_NUMBER;
643                         ad->item_dev_name->input_panel_disable_flag = EINA_TRUE;
644                 } else {
645                                 SETTING_TRACE_ERROR("ad->item_dev_name is NULL");
646                 }
647                 FREE(pa_sub_desc);
648         }
649
650         // [UI] My number
651         int err;
652         char sel_num[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1] = { 0, };
653         setting_get_string_slp_key(STR_SLP_SETTING_SELECT_NUM, sel_num, &err);
654
655         if (ad->my_numbers.count == 1) {
656                 item_data =
657                         setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
658                                              NULL,
659                                              ad, SWALLOW_Type_INVALID, NULL,
660                                              NULL, 0, SETTING_ABOUT_MY_NUMBER_STR,
661                                              sel_num, NULL);
662                 if (item_data) {
663                         elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
664                 } else {
665                         SETTING_TRACE_ERROR("item_data is NULL");
666                 }
667         } else if (ad->my_numbers.count > 1){
668                 setting_enable_expandable_genlist(scroller, ad,
669                                           setting_about_main_exp_cb, NULL);
670                 item_data = setting_create_Gendial_exp_parent_field(scroller,
671                                                     &(ad->itc_2text_3_parent),
672                                                     NULL, NULL,
673                                                     SWALLOW_Type_INVALID,
674                                                     SETTING_ABOUT_MY_NUMBER_STR,
675                                                     sel_num);
676                 if (item_data) {
677                         item_data->int_slp_setting_binded = STR_SLP_SETTING_SELECT_NUM;
678                 } else {
679                         SETTING_TRACE_ERROR("ad->data_wap is NULL");
680                 }
681
682         } else {
683                 SETTING_TRACE_ERROR("don't have my number");
684         }
685
686         // [UI] Phone model
687         memset(str, 0x00, sizeof(str));
688         setting_about_main_get_phone_model_name(str, sizeof(str));
689         item_data =
690             setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL,
691                                              NULL, SWALLOW_Type_INVALID, NULL,
692                                              NULL, 0, SETTING_ABOUT_MODEL_STR, str, NULL);
693         if (item_data) {
694                 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
695         } else {
696                 SETTING_TRACE_ERROR("item_data is NULL");
697         }
698
699         // [UI] SW version
700         memset(str, 0x00, sizeof(str));
701         setting_about_main_get_sw_version(str, sizeof(str));
702         item_data =
703             setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL,
704                                              NULL, SWALLOW_Type_INVALID, NULL,
705                                              NULL, 0, SETTING_ABOUT_VERSION_STR, str, NULL);
706         if (item_data) {
707                 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
708         } else {
709                 SETTING_TRACE_ERROR("item_data is NULL");
710         }
711
712         // [UI] Bluetooth address
713         if ( ! is_emul_bin) { // requested by DI Kim due to BT BS on 11/26
714                 memset(str, 0x00, sizeof(str));
715                 setting_about_main_get_bluetooth_address_string(str, sizeof(str));
716                 ad->item_data_bt =
717                         setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL,
718                                                          NULL, SWALLOW_Type_INVALID, NULL,
719                                                          NULL, 0, SETTING_ABOUT_BLUETOOTH_STR, str, NULL);
720                 if (ad->item_data_bt) {
721                         elm_genlist_item_select_mode_set(ad->item_data_bt->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
722                 } else {
723                                 SETTING_TRACE_ERROR("item_data is NULL");
724                 }
725         }
726
727         // [UI] MAC address
728         memset(str, 0x00, sizeof(str));
729         setting_about_main_get_wifi_mac_address_string(str, sizeof(str));
730
731         SETTING_TRACE_DEBUG("[about main] get_wifi_mac_address : %s", str);
732
733         ad->item_data_wifi =
734             setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL,
735                                              NULL, SWALLOW_Type_INVALID, NULL,
736                                              NULL, 0, SETTING_ABOUT_WIFI_STR, str, NULL);
737         if (ad->item_data_wifi) {
738                 elm_genlist_item_select_mode_set(ad->item_data_wifi->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
739         } else {
740                 SETTING_TRACE_ERROR("item_data is NULL");
741         }
742
743         // [UI] Battery
744         memset(str, 0x00, sizeof(str));
745         setting_about_main_get_battery_string(str, sizeof(str));
746         item_data =
747             setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL,
748                                              NULL, SWALLOW_Type_INVALID, NULL,
749                                              NULL, 0, SETTING_ABOUT_BATTERY_STR, str, NULL);
750         if (item_data) {
751                 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
752                 ad->item_data_battery = item_data;
753         } else {
754                 SETTING_TRACE_ERROR("item_data is NULL");
755         }
756
757         // [UI] CPU Info
758         memset(str, 0x00, sizeof(str));
759         float usr, sys;
760         int ret = __stat_get_cpuinfo(&usr, &sys);
761         if (ret == -ENOENT) {
762                 SETTING_TRACE_ERROR("call __stat_get_cpuinfo fail");
763                 snprintf(str, sizeof(str), "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
764         } else {
765                 snprintf(str, sizeof(str), "%.0f%s", usr + sys, "\%");
766         }
767
768         ad->item_data_cpu = item_data =
769             setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2), NULL,
770                                              NULL, SWALLOW_Type_INVALID, NULL,
771                                              NULL, 0, SETTING_ABOUT_CPU_USAGE_STR, str, NULL);
772         if (item_data) {
773                 elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
774         } else {
775                 SETTING_TRACE_ERROR("item_data is NULL");
776         }
777
778         // [UI] separator
779         item =
780             elm_genlist_item_append(scroller, &(ad->itc_seperator), NULL, NULL,
781                                     ELM_GENLIST_ITEM_NONE, NULL, NULL);
782         elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
783
784 #ifdef SUPPORT_DIAG_USAGE
785         // [UI] Diagnostics and Usage
786         if (!is_emul_bin) {
787                 setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
788                                          setting_about_main_mouse_up_Gendial_list_cb,
789                                          ad, SWALLOW_Type_INVALID, NULL, NULL,
790                                          0, DIAGNOSTICS_USAGE_STR,
791                                          NULL, NULL);
792         }
793 #endif
794
795         // [UI] Certificates
796         // implementation is in progress.
797         if (is_ug_installed_by_ug_args("setting-manage-applications-efl"))
798         {
799                 setting_create_Gendial_field_def(scroller, &(ad->itc_1text),
800                                                  setting_about_main_mouse_up_Gendial_list_cb,
801                                                  ad, SWALLOW_Type_INVALID, NULL, NULL,
802                                                  0, "IDS_COM_BODY_CERTIFICATES", NULL, NULL);
803
804                 item = elm_genlist_item_append(scroller, &itc_bottom_seperator, NULL, NULL,
805                                                 ELM_GENLIST_ITEM_NONE, NULL, NULL);
806                 elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
807         }
808
809
810         ad->update_timer =
811             ecore_timer_add(2, (Ecore_Task_Cb) __timer_update_cb, ad);
812
813         return SETTING_RETURN_SUCCESS;
814 }
815
816 static int setting_about_main_create(void *cb)
817 {
818         SETTING_TRACE_BEGIN;
819         /* error check */
820         retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
821
822         SettingAboutUG *ad = (SettingAboutUG *) cb;
823
824         Evas_Object *scroller = elm_genlist_add(ad->win_main_layout);
825         retvm_if(scroller == NULL, SETTING_DRAW_ERR_FAIL_SCROLLER,
826                  "Cannot set scroller object  as contento of layout");
827         elm_object_style_set(scroller, "dialogue");
828         elm_genlist_clear(scroller);    /* first to clear list */
829
830         /*  Enabling illume notification property for window */
831         elm_win_conformant_set(ad->win_main_layout, 1);
832         Evas_Object *conformant = elm_conformant_add(ad->win_main_layout);
833         elm_object_style_set(conformant, "internal_layout");    /*  By Kollus. 2011-01-04 */
834         evas_object_show(conformant);
835         elm_object_content_set(conformant, scroller);
836         ad->genlsit = scroller;
837
838         ad->ly_main =
839             setting_create_layout_navi_bar(ad->win_main_layout, ad->win_get,
840                                            _(KeyStr_AboutPhone),
841                                            _("IDS_COM_BODY_BACK"), NULL, NULL,
842                                            setting_about_main_click_softkey_back_cb,
843                                            NULL, NULL, ad, conformant,
844                                            &ad->navi_bar, NULL);
845
846         evas_object_event_callback_add(scroller, EVAS_CALLBACK_MOUSE_UP,
847                                        __about_main_gl_mouse_up, ad);
848
849         ad->navi_item = elm_naviframe_top_item_get(ad->navi_bar);
850
851         setting_about_generate_genlist((void *)ad);
852
853         setting_view_about_main.is_create = 1;
854         SETTING_TRACE_END;
855         return SETTING_RETURN_SUCCESS;
856 }
857
858 static int setting_about_main_destroy(void *cb)
859 {
860         SETTING_TRACE_BEGIN;
861         /* error check */
862         retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
863
864         SettingAboutUG *ad = (SettingAboutUG *) cb;
865
866         if (ad->update_timer) {
867                 ecore_timer_del(ad->update_timer);
868                 ad->update_timer = NULL;
869         }
870         if (ad->popup) {
871                 evas_object_del(ad->popup);
872                 ad->popup = NULL;
873         }
874
875         if (ad->ly_main != NULL) {
876                 evas_object_del(ad->ly_main);
877                 ad->ly_main = NULL;
878         }
879
880         setting_view_about_main.is_create = 0;
881         return SETTING_RETURN_SUCCESS;
882 }
883
884 static int setting_about_main_update(void *cb)
885 {
886         SETTING_TRACE_BEGIN;
887         /* error check */
888         retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
889
890         SettingAboutUG *ad = (SettingAboutUG *) cb;
891
892         if (ad->ly_main != NULL) {
893                 evas_object_show(ad->ly_main);
894         }
895
896         return SETTING_RETURN_SUCCESS;
897 }
898
899 static int setting_about_main_cleanup(void *cb)
900 {
901         SETTING_TRACE_BEGIN;
902         /* error check */
903         retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
904
905         SettingAboutUG *ad = (SettingAboutUG *) cb;
906
907         if (ad->ly_main != NULL) {
908                 /*  evas_object_hide(ad->ly_main); */
909         }
910
911         return SETTING_RETURN_SUCCESS;
912 }
913
914 /* ***************************************************
915  *
916  *general func
917  *
918  ***************************************************/
919
920 /* ***************************************************
921  *
922  *call back func
923  *
924  ***************************************************/
925
926 static void
927 setting_about_main_click_softkey_back_cb(void *data, Evas_Object *obj,
928                                          void *event_info)
929 {
930         SETTING_TRACE_BEGIN;
931         /* error check */
932         setting_retm_if(data == NULL, "Data parameter is NULL");
933
934         SettingAboutUG *ad = (SettingAboutUG *) data;
935         if (ad->empty_flag) {
936                 if (ad->popup) {
937                         evas_object_del(ad->popup);
938                         ad->popup = NULL;
939                 }
940                 ad->popup = setting_create_popup_without_btn(ad, ad->win_get, NULL, _(EMPTY_LIMITATION_STR),
941                                      __about_popup_rsp_cb, POPUP_INTERVAL, FALSE, FALSE);
942                 if (ad->item_dev_name) {
943                         elm_object_focus_set(ad->item_dev_name->eo_check, EINA_TRUE);
944                 }
945                 return;
946         }
947
948         /* Send destroy request */
949         ug_destroy_me(ad->ug);
950         //imf must be hided before view is destroyed.
951         //Following code is just to improve the hiding speed. If not add these code,
952         //the input pannel will also be hided with the view destroyed,but it works too slow.
953         if (ad->item_dev_name) {
954                 elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE);
955                 setting_hide_input_pannel_cb(ad->item_dev_name->eo_check);
956         }
957
958         SETTING_TRACE_END;
959 }
960
961 /**
962 * @brief
963 *
964 * @param data
965 * @param obj
966 * @param event_info
967 */
968 static void
969 setting_about_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj,
970                                             void *event_info)
971 {
972         SETTING_TRACE_BEGIN;
973         /* error check */
974         setting_retm_if(data == NULL, "Data parameter is NULL");
975
976         retm_if(event_info == NULL, "Invalid argument: event info is NULL");
977         Elm_Object_Item *item = (Elm_Object_Item *) event_info;
978         elm_genlist_item_selected_set(item, 0);
979         Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
980
981         /* SettingAboutUG *ad = (SettingAboutUG *) data; */
982
983         SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
984         if (!safeStrCmp("IDS_ST_BODY_OPEN_SOURCE_LICENCES", list_item->keyStr)) {
985
986                 //setting_view_change(&setting_view_about_main, &setting_view_about_licences, data);
987
988         } else if (!safeStrCmp("IDS_COM_BODY_CERTIFICATES", list_item->keyStr)) {
989                 __setting_about_main_certificates_clicked(data);
990         } else if (!safeStrCmp(SETTING_ABOUT_DEVICE_NAME_STR, list_item->keyStr)) {
991                 __setting_about_main_device_name_clicked(data, list_item->eo_check);
992         } else if (!safeStrCmp(DIAGNOSTICS_USAGE_STR, list_item->keyStr)) {
993                 __setting_about_main_diagnostics_usage_clicked(data, list_item->eo_check);
994         }
995 }
996
997 static void __destroy_certificates_ug_cb(ui_gadget_h ug, void *priv)
998 {
999         SETTING_TRACE_BEGIN;
1000
1001         /* restore the '<-' button on the navigate bar */
1002         ret_if(!priv);
1003         SettingAboutUG *ad = (SettingAboutUG *) priv;   /* ad is point to priv */
1004
1005         if (ug) {
1006                 ug_destroy(ug);
1007                 ad->ug_loading = NULL;
1008         }
1009
1010 }
1011
1012 static void __setting_about_main_certificates_clicked(void *data)
1013 {
1014         SETTING_TRACE_BEGIN;
1015         retm_if(data == NULL, "Data parameter is NULL");
1016         SettingAboutUG *ad = (SettingAboutUG *)data;
1017
1018         struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
1019         if (!cbs) {
1020                 return;
1021         }
1022
1023         cbs->layout_cb = setting_about_layout_ug_cb;
1024         cbs->result_cb = NULL;
1025         cbs->destroy_cb = __destroy_certificates_ug_cb;
1026         cbs->priv = (void *)ad;
1027
1028         ad->ug_loading =
1029             ug_create(ad->ug, "setting-manage-certificates-efl", UG_MODE_FULLVIEW, NULL, cbs);
1030
1031         if (NULL == ad->ug_loading) {   /* error handling */
1032                 SETTING_TRACE_ERROR("NULL == ad->ug_loading");
1033         }
1034         FREE(cbs);
1035 }
1036
1037 static void __top_back_cb(void *data, Evas_Object *obj,
1038                                          void *event_info)
1039 {
1040         SETTING_TRACE_BEGIN;
1041         /* error check */
1042         setting_retm_if(data == NULL, "Data parameter is NULL");
1043
1044         SettingAboutUG *ad = (SettingAboutUG *) data;
1045
1046         if (ad->item_dev_name)
1047                 setting_hide_input_pannel_cb(ad->item_dev_name->eo_check);
1048
1049         SETTING_TRACE_END;
1050 }
1051
1052 static void _input_panel_event_cb(void *data, Ecore_IMF_Context *ctx, int value)
1053 {
1054         SETTING_TRACE_BEGIN;
1055         retm_if(data == NULL, "Data parameter is NULL");
1056         retm_if(ctx == NULL, "obj parameter is NULL");
1057
1058         SettingAboutUG *ad = (SettingAboutUG *)data;
1059
1060         if(value == ECORE_IMF_INPUT_PANEL_STATE_SHOW)
1061         {
1062                 SETTING_TRACE("value == ECORE_IMF_INPUT_PANEL_STATE_SHOW");
1063                 if(ad->navi_item && !elm_object_item_part_content_get(ad->navi_item, "title_right_btn"))
1064                 {
1065                         Evas_Object *r_button = setting_create_button(ad->navi_bar,
1066                                                                         dgettext("sys_string", "IDS_COM_BODY_BACK"),
1067                                                                         NAVI_BACK_BUTTON_STYLE,
1068                                                                         __top_back_cb,
1069                                                                         ad);
1070                         elm_object_item_part_content_set(ad->navi_item, "title_right_btn", r_button);
1071                 }
1072         }
1073         else if(value == ECORE_IMF_INPUT_PANEL_STATE_HIDE)
1074         {
1075                 SETTING_TRACE("value == ECORE_IMF_INPUT_PANEL_STATE_HIDE");
1076                 if(ad->navi_item && elm_object_item_part_content_get(ad->navi_item, "title_right_btn")) {
1077                         Evas_Object *btn = elm_object_item_part_content_unset(ad->navi_item, "title_right_btn");
1078                         evas_object_del(btn);
1079                 }
1080
1081                 if (ad->item_dev_name) {
1082                         elm_object_focus_set(ad->item_dev_name->eo_check, EINA_FALSE);
1083                 }
1084         }
1085 }
1086
1087 static void __setting_about_main_device_name_clicked(void *data, Evas_Object *obj)
1088 {
1089         SETTING_TRACE_BEGIN;
1090         retm_if(data == NULL, "Data parameter is NULL");
1091         retm_if(obj == NULL, "obj parameter is NULL");
1092         SettingAboutUG *ad = (SettingAboutUG *)data;
1093
1094         if (!elm_object_focus_get(obj)) {
1095                 elm_object_focus_set(obj, EINA_TRUE);
1096         }
1097
1098         Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(obj);
1099         setting_retm_if(imf_context == NULL, "imf_context is NULL");
1100         ecore_imf_context_input_panel_event_callback_add(imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_event_cb, ad);
1101         ecore_imf_context_input_panel_show(imf_context);
1102 }
1103
1104
1105 static void __destroy_diagnostics_usage_ug_cb(ui_gadget_h ug, void *priv)
1106 {
1107         SETTING_TRACE_BEGIN;
1108
1109         /* restore the '<-' button on the navigate bar */
1110         ret_if(!priv);
1111         SettingAboutUG *ad = (SettingAboutUG *) priv;   /* ad is point to priv */
1112
1113         if (ug) {
1114                 ug_destroy(ug);
1115                 ad->ug_loading = NULL;
1116         }
1117
1118         Elm_Object_Item *navi_it = elm_naviframe_top_item_get(ad->navi_bar);
1119         ret_if(!navi_it);
1120         Evas_Object *back_btn = elm_object_item_part_content_get(navi_it, "prev_btn");
1121
1122         if (back_btn != NULL) {
1123                 elm_object_style_set(back_btn, NAVI_BACK_BUTTON_STYLE); /* take into effect */
1124         }
1125 }
1126
1127 static void __setting_about_main_diagnostics_usage_clicked(void *data, Evas_Object *obj)
1128 {
1129         SETTING_TRACE_BEGIN;
1130         retm_if(data == NULL, "Data parameter is NULL");
1131         SettingAboutUG *ad = (SettingAboutUG *)data;
1132
1133         // create UG
1134         if (!ad)
1135                 return;         /*  do nothing if ad is NULL */
1136
1137         struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
1138         if (!cbs) {
1139                 return;
1140         }
1141
1142         cbs->layout_cb = setting_about_layout_ug_cb;
1143         cbs->result_cb = NULL;
1144         cbs->destroy_cb = __destroy_diagnostics_usage_ug_cb;
1145         cbs->priv = (void *)ad;
1146
1147         ad->ug_loading =
1148             ug_create(ad->ug, "setting-crash-efl", UG_MODE_FULLVIEW, NULL, cbs);
1149
1150         if (NULL == ad->ug_loading) {   /* error handling */
1151                 SETTING_TRACE_ERROR("NULL == ad->ug_loading");
1152                 setting_create_simple_popup(ad, ad->win_get, NULL, _(UNSUPPORTED_FUNCTION));
1153         }
1154         FREE(cbs);
1155 }