X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fsetting-main.c;h=0dc986931caf65c9f8966e3de7dfc81d69868731;hb=2efbd1d3ac1e522d5435d974e7c94a972dc1ac5c;hp=32b3e17d14ed9a686ed78defc72a2659bda58cdc;hpb=e792ffb351b349cf1004a833d00ecde942733b38;p=apps%2Fcore%2Fpreloaded%2Fsettings.git diff --git a/src/setting-main.c b/src/setting-main.c index 32b3e17..0dc9869 100755 --- a/src/setting-main.c +++ b/src/setting-main.c @@ -1,40 +1,42 @@ /* * setting + * Copyright (c) 2012 Samsung Electronics Co., Ltd. * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. - * - * Contact: MyoungJune Park - * - * Licensed under the Apache License, Version 2.0 (the "License"); + * Licensed under the Flora License, Version 1.0 (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 #include #include #include #include -#include +#include +#include +#include +#include +#include -typedef struct DrawAppInfo DrawAppInfo; -typedef struct DrawAppInfo +#include + +#define PLUGIN_PREFIX "/opt" + +typedef struct _DrawAppInfo { int ncount; //------------------------------------ void (*draw_app)(void* arg, char* name, char* pkgname); void* data; -}; +} DrawAppInfo; static int setting_main_create(void *cb); static int setting_main_destroy(void *cb); @@ -48,6 +50,8 @@ setting_view setting_view_main = { .cleanup = setting_main_cleanup, }; +setting_main_appdata *g_main_ad = NULL; + static void setting_main_tapi_event_cb(TapiHandle *handle, int result, void *data, void *user_data); static int setting_main_refresh(void *data); static void __alternate_flight_mode(Evas_Object *check); @@ -58,7 +62,6 @@ static void __alternate_flight_mode(Evas_Object *check); void setting_main_click_list_item_ug_cb(void *data, Evas_Object *obj, char *ug_to_load, service_h svc, struct ug_cbs *cbs); -setting_main_appdata *g_main_ad; static void __setting_chk_changed(void *data, Evas_Object *obj, void *event_info) { @@ -100,9 +103,10 @@ __setting_chk_changed(void *data, Evas_Object *obj, void *event_info) if (isFoundSelSomeone) { /* SETTING_TRACE("Set it to active"); */ + /* elm_object_item_disabled_set(elm_toolbar_last_item_get (g_main_ad->controllbar_all_check), - EINA_FALSE); + EINA_FALSE);*/ } } @@ -157,9 +161,10 @@ static void __setting_list_changed(void *data, Evas_Object *obj, if (isFoundSelSomeone) { /* SETTING_TRACE("Set it to active"); */ + /* elm_object_item_disabled_set(elm_toolbar_last_item_get (g_main_ad->controllbar_all_check), - EINA_FALSE); + EINA_FALSE);*/ } } @@ -189,9 +194,10 @@ __setting_chk_sel_all_changed(void *data, Evas_Object *obj, void *event_info) check_list = eina_list_next(check_list); } if (is_all_checked) { + /* elm_object_item_disabled_set(elm_toolbar_last_item_get (g_main_ad->controllbar_all_check), - EINA_FALSE); + EINA_FALSE);*/ } } @@ -227,9 +233,10 @@ static void __setting_list_sel_all_changed(void *data, Evas_Object *obj, check_list = eina_list_next(check_list); } if (is_all_checked) { + /* elm_object_item_disabled_set(elm_toolbar_last_item_get (g_main_ad->controllbar_all_check), - EINA_FALSE); + EINA_FALSE);*/ } } @@ -327,13 +334,15 @@ static void __load_check_list(void *data, Evas_Object **genlist, } if (isFoundSelSomeoneItem) { - elm_object_item_disabled_set(elm_toolbar_last_item_get + /* elm_object_item_disabled_set(elm_toolbar_last_item_get (ad->controllbar_all_check), EINA_FALSE); + */ } else { + /* elm_object_item_disabled_set(elm_toolbar_last_item_get (ad->controllbar_all_check), - EINA_TRUE); + EINA_TRUE);*/ } SETTING_TRACE_END; } @@ -368,22 +377,26 @@ static Setting_GenGroupItem_Data * __flightmode_handler(void* data, char* keyStr static Setting_GenGroupItem_Data * __wifi_handler(void* data, char* keyStr, char* icon_path, char* ug_args, Evas_Object *genlist) { setting_main_appdata *ad = (setting_main_appdata *)data; + int value, err; + setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err); - char* pa_wifi = get_pa_Wi_Fi_on_off_str(); + //char* pa_wifi = get_pa_Wi_Fi_on_off_str(); ad->data_wifi = setting_create_Gendial_field_groupitem(genlist, - &(ad->itc[GENDIAL_Type_1icon_2text]), + &(ad->itc[GENDIAL_Type_1text_2icon]), NULL, setting_main_click_list_ex_ug_cb, ug_args, - SWALLOW_Type_INVALID, + SWALLOW_Type_1ICON_1RADIO, icon_path, NULL, - 0, + value, keyStr, - pa_wifi, - NULL); + NULL, + setting_main_click_list_wifi_mode_cb); __BACK_POINTER_SET(ad->data_wifi); - G_FREE(pa_wifi); + if(ad->data_wifi) + ad->data_wifi->userdata = ad; + //G_FREE(pa_wifi); return ad->data_wifi; } @@ -391,21 +404,24 @@ static Setting_GenGroupItem_Data * __wifi_handler(void* data, char* keyStr, char static Setting_GenGroupItem_Data * __bluetooth_handler(void* data, char* keyStr, char* icon_path, char* ug_args, Evas_Object *genlist) { setting_main_appdata *ad = (setting_main_appdata *)data; + int value, err; + setting_get_int_slp_key(INT_SLP_SETTING_BT_STATUS, &value, &err); ad->data_bt = setting_create_Gendial_field_groupitem(genlist, - &(ad->itc[GENDIAL_Type_1icon_2text]), + &(ad->itc[GENDIAL_Type_1text_2icon]), NULL, setting_main_click_list_ex_ug_cb, ug_args, - SWALLOW_Type_INVALID, + SWALLOW_Type_1ICON_1RADIO, icon_path, NULL, - 0, + value, keyStr, - get_BT_on_off_str - (), - NULL); + NULL, + setting_main_click_list_bt_mode_cb); __BACK_POINTER_SET(ad->data_bt); + if(ad->data_bt) + ad->data_bt->userdata = ad; return ad->data_bt; } @@ -432,7 +448,7 @@ static Setting_GenGroupItem_Data * __network_handler(void* data, char* keyStr, c { setting_main_appdata *ad = (setting_main_appdata *)data; - Setting_GenGroupItem_Data * obj = setting_create_Gendial_field_groupitem(genlist, + ad->data_network = setting_create_Gendial_field_groupitem(genlist, &(ad->itc[GENDIAL_Type_1text_1icon_2]), NULL, setting_main_click_list_network_ug_cb, @@ -444,33 +460,39 @@ static Setting_GenGroupItem_Data * __network_handler(void* data, char* keyStr, c NULL, NULL); - return obj; + return ad->data_network; } static Setting_GenGroupItem_Data * __nfc_handler(void* data, char* keyStr, char* icon_path, char* ug_args, Evas_Object *genlist) { setting_main_appdata *ad = (setting_main_appdata *)data; + int value, err; + setting_get_bool_slp_key(BOOL_SLP_SETTING_NFC_STATUS, &value, &err); + ad->data_nfc = setting_create_Gendial_field_groupitem(genlist, - &(ad->itc[GENDIAL_Type_1icon_2text]), + &(ad->itc[GENDIAL_Type_1text_2icon]), NULL, setting_main_click_list_ex_ug_cb, ug_args, - SWALLOW_Type_INVALID, + SWALLOW_Type_1ICON_1RADIO, icon_path, NULL, - 0, + value, keyStr, - get_NFC_on_off_str(), - NULL); + NULL, + setting_main_click_list_nfc_mode_cb); __BACK_POINTER_SET(ad->data_nfc); + if(ad->data_nfc) + ad->data_nfc->userdata = ad; +#if DISABLED_CODE setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL, 0, SETTING_NFC_DESC, NULL, NULL); elm_genlist_item_select_mode_set(elm_genlist_item_append(genlist, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - +#endif return ad->data_nfc; } @@ -489,15 +511,6 @@ static Setting_GenGroupItem_Data * __default_handler(void* data, char* keyStr, c NULL, NULL); - if (!safeStrCmp(KeyStr_WiFiDirect, keyStr)) { - setting_create_Gendial_field_def(genlist, &itc_multiline_text, NULL, - ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, - NULL, NULL, 0, SETTING_WIFI_DIRECT_DESC, NULL, NULL); - elm_genlist_item_select_mode_set(elm_genlist_item_append(genlist, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL), - ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); - } else { - /* do nothing */ - } return obj; } @@ -535,6 +548,35 @@ static mainlist_entry mainlist_table[] = { }; +void __gl_realized(void *data, Evas_Object *obj, void *event_info) +{ + //SETTING_TRACE_BEGIN; + setting_retm_if(data == NULL, "invalid parameter: data is NULL"); + setting_retm_if(event_info == NULL, "invalid parameter: event_info is NULL"); + setting_main_appdata *ad = (setting_main_appdata *)data; + Elm_Object_Item *item = (Elm_Object_Item *)event_info; + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)elm_object_item_data_get(item); + + //setting_retm_if(list_item == NULL, "list_item is NULL"); + + if (list_item) { + if (list_item->group_style == SETTING_GROUP_STYLE_TOP) { + elm_object_item_signal_emit(item, "elm,state,top", ""); + } else if (list_item->group_style == SETTING_GROUP_STYLE_BOTTOM) { + elm_object_item_signal_emit(item, "elm,state,bottom", ""); + } else if (list_item->group_style == SETTING_GROUP_STYLE_CENTER) { + elm_object_item_signal_emit(item, "elm,state,center", ""); + } else if (list_item->group_style == SETTING_GROUP_STYLE_NONE) { + /* do nothing */ + } else { + SETTING_TRACE_ERROR("list_item->group_style is wrong"); + } + } else { + /* item is used for description */ + elm_object_item_signal_emit(item, "elm,state,center", ""); + } +} + // Flight Mode - not UG // All share - not UG // WiFi - added toggle @@ -566,6 +608,9 @@ void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_ bool is_emulator = isEmulBin(); + Setting_GenGroupItem_Data *item_data = NULL; + int index = 0; + for (i = 0; i < setting_cfg_get_category_length(); i++) { if (safeStrCmp (setting_cfg_get_category_name(i), KeyStr_Connectivity)) @@ -590,6 +635,8 @@ void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_ continue; /* hide Network in Emulator*/ } else if (!safeStrCmp(KeyStr_Bluetooth, keyStr)) { continue; /* hide Bluetooth in Emulator*/ + } else if (!safeStrCmp(KeyStr_MobileAP, keyStr)) { + continue; /* hide Tethering in Emulator*/ } else { /* do nothing */ } @@ -612,36 +659,59 @@ void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_ if (!safeStrCmp(KeyStr_FlightMode, keyStr)) { /* load special radio */ // ug == NULL - mainlist_table[MAINLIST_ENTRY_FLIGHT_MODE].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + item_data = mainlist_table[MAINLIST_ENTRY_FLIGHT_MODE].ui_handler(ad, keyStr, icon_path, ug_args, genlist); } else if (!safeStrCmp(KeyStr_AllShare, keyStr)) { /* NOT UG */ - mainlist_table[MAINLIST_ENTRY_ALLSHARE].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + item_data = mainlist_table[MAINLIST_ENTRY_ALLSHARE].ui_handler(ad, keyStr, icon_path, ug_args, genlist); } else if (!safeStrCmp(KeyStr_WiFi, keyStr) && is_ug_installed_by_ug_args(ug_args)) { /* load special icon */ - mainlist_table[MAINLIST_ENTRY_WIFI].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + item_data = mainlist_table[MAINLIST_ENTRY_WIFI].ui_handler(ad, keyStr, icon_path, ug_args, genlist); } else if (!safeStrCmp(KeyStr_Bluetooth, keyStr) && is_ug_installed_by_ug_args(ug_args)) { /* load special icon */ - mainlist_table[MAINLIST_ENTRY_BT].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + item_data = mainlist_table[MAINLIST_ENTRY_BT].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + + } +#if 0 + else if (!safeStrCmp(KeyStr_MobileAP, keyStr) && is_ug_installed_by_ug_args(ug_args)) { /* load special icon */ + + item_data = mainlist_table[MAINLIST_ENTRY_MOBILEAP].ui_handler(ad, keyStr, icon_path, ug_args, genlist); - } else if (!safeStrCmp(KeyStr_Network, keyStr) && is_ug_installed_by_ug_args(ug_args)) { /* load special UG */ + } +#endif + else if (!safeStrCmp(KeyStr_Network, keyStr) && is_ug_installed_by_ug_args(ug_args)) { /* load special UG */ - mainlist_table[MAINLIST_ENTRY_NETWORK].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + item_data = mainlist_table[MAINLIST_ENTRY_NETWORK].ui_handler(ad, keyStr, icon_path, ug_args, genlist); } else if (!safeStrCmp(KeyStr_NFC, keyStr) && is_ug_installed_by_ug_args(ug_args)) { /* load special icon */ int nfc_value = FALSE; //default - vconf_get_bool(VCONFKEY_NFC_FEATURE, &nfc_value); - if (VCONFKEY_NFC_FEATURE_ON == nfc_value) + vconf_get_bool(VCONFKEY_NFC_FEATURE, &nfc_value); + if (VCONFKEY_NFC_FEATURE_ON == nfc_value) { - mainlist_table[MAINLIST_ENTRY_NFC].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + item_data = mainlist_table[MAINLIST_ENTRY_NFC].ui_handler(ad, keyStr, icon_path, ug_args, genlist); } } else { /* load other UGs */ if (is_ug_installed_by_ug_args(ug_args)) { - mainlist_table[MAINLIST_ENTRY_DEFAULT].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + item_data = mainlist_table[MAINLIST_ENTRY_DEFAULT].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + } + } + + if (item_data) { + if (j == 0) { + item_data->group_style = SETTING_GROUP_STYLE_TOP; + } else if (j == setting_cfg_get_menu_length(i) - 1) { + item_data->group_style = SETTING_GROUP_STYLE_BOTTOM; + } else { + item_data->group_style = SETTING_GROUP_STYLE_CENTER; + } + + if (index == 0) { + item_data->group_style = SETTING_GROUP_STYLE_TOP; } + index++; } } } @@ -676,8 +746,23 @@ void __load_connectivity_menu_list(void *data, Cfg_Item_Position inputPos, Evas_ sub_text, NULL); __BACK_POINTER_SET(ad->data_moreConnect); + + /* if has item , change the last item_date to SETTING_GROUP_STYLE_CENTER*/ + if (item_data && index > 1) { + item_data->group_style = SETTING_GROUP_STYLE_CENTER; + } + ad->data_moreConnect->group_style = SETTING_GROUP_STYLE_BOTTOM; + + item_data = ad->data_moreConnect; + index++; } #endif + + if (index == 1) { + item_data->group_style = SETTING_GROUP_STYLE_NONE; + } else if (index == 2) { + item_data->group_style = SETTING_GROUP_STYLE_BOTTOM; + } SETTING_TRACE_END; } @@ -720,6 +805,9 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object bool is_emulator = isEmulBin(); + Setting_GenGroupItem_Data *item_data = NULL; + int index = 0; + //SETTING_TRACE("setting_cfg_get_category_length() :: %d ", setting_cfg_get_category_length()); for (i = 0; i < setting_cfg_get_category_length(); i++) { if (safeStrCmp(setting_cfg_get_category_name(i), KeyStr_System)) @@ -738,14 +826,12 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object if (is_emulator) { if (!safeStrCmp(KeyStr_Security, keyStr)) { continue; /* hide Security in Emulator*/ - } else if (!safeStrCmp(KeyStr_Motions, keyStr)) { - continue; /* hide Motion in Emulator*/ - } else if (!safeStrCmp(KeyStr_Accessibility, keyStr)) { - continue; /* hide Accessibility in Emulator*/ } else if (!safeStrCmp(KeyStr_Memory, keyStr)) { continue; /* hide Memory in Emulator*/ } else if (!safeStrCmp(KeyStr_Powersaving, keyStr)) { continue; /* hide Powersaving in Emulator*/ + } else if (!safeStrCmp(KeyStr_FlightMode, keyStr)) { + continue; /* hide Powersaving in Emulator*/ } else { /* do nothing */ } @@ -769,11 +855,15 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object continue; } - if (!safeStrCmp(KeyStr_Landscape, keyStr)) { /* load special UG */ + if (!safeStrCmp(KeyStr_FlightMode, keyStr)) { /* load special radio */ + // ug == NULL + item_data = mainlist_table[MAINLIST_ENTRY_FLIGHT_MODE].ui_handler(ad, keyStr, icon_path, ug_args, genlist); + + } + else if (!safeStrCmp(KeyStr_Landscape, keyStr)) { /* load special UG */ int value = 0; vconf_get_bool - (VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &value); - value = !value; + (VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, &value); ad->data_rotationMode = setting_create_Gendial_field_groupitem(genlist, @@ -789,6 +879,7 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object NULL, setting_main_list_mouse_up_cb); __BACK_POINTER_SET(ad->data_rotationMode); + item_data = ad->data_rotationMode; } else if (!safeStrCmp(KeyStr_Brightness, keyStr)) { @@ -807,25 +898,37 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object pa_bright, NULL); __BACK_POINTER_SET(ad->data_bright); + item_data = ad->data_bright; ncount++; } else { /* load other UGs */ + item_data = setting_create_Gendial_field_groupitem(genlist, + &(ad->itc[GENDIAL_Type_1text_1icon_2]), + NULL, + setting_main_click_list_ex_ug_cb, + ug_args, + SWALLOW_Type_INVALID, + icon_path, + NULL, 0, + keyStr, + NULL, + NULL); + ncount++; + } - if (is_ug_installed_by_ug_args(ug_args)) - { - setting_create_Gendial_field_groupitem(genlist, - &(ad->itc[GENDIAL_Type_1text_1icon_2]), - NULL, - setting_main_click_list_ex_ug_cb, - ug_args, - SWALLOW_Type_INVALID, - icon_path, - NULL, 0, - keyStr, - NULL, - NULL); - ncount++; + if (item_data) { + if (j == 0) { + item_data->group_style = SETTING_GROUP_STYLE_TOP; + } else if (j == setting_cfg_get_menu_length(i) - 1) { + item_data->group_style = SETTING_GROUP_STYLE_BOTTOM; + } else { + item_data->group_style = SETTING_GROUP_STYLE_CENTER; + } + + if (index == 0) { + item_data->group_style = SETTING_GROUP_STYLE_TOP; } + index++; } } } @@ -859,8 +962,22 @@ void __load_system_menu_list(void *data, Cfg_Item_Position inputPos, Evas_Object sub_text, NULL); __BACK_POINTER_SET(ad->data_moreSystem); + + /* if has item , change the last item_date to SETTING_GROUP_STYLE_CENTER*/ + if (item_data && index > 1) { + item_data->group_style = SETTING_GROUP_STYLE_CENTER; + } + ad->data_moreSystem->group_style = SETTING_GROUP_STYLE_BOTTOM; + + item_data = ad->data_moreSystem; + index++; } #endif + if (index == 1) { + item_data->group_style = SETTING_GROUP_STYLE_NONE; + } else if (index == 2) { + item_data->group_style = SETTING_GROUP_STYLE_BOTTOM; + } } static void __load_system_level0_list(void *data) @@ -897,6 +1014,8 @@ static void __load_applications_menu_list(void *data, Cfg_Item_Position tmpPos = Cfg_Item_Pos_Uninstall; int i, j; + Setting_GenGroupItem_Data *item_data = NULL; + int index = 0; for (i = 0; i < setting_cfg_get_category_length(); i++) { if (safeStrCmp (setting_cfg_get_category_name(i), KeyStr_Applications)) @@ -923,7 +1042,7 @@ static void __load_applications_menu_list(void *data, } } - setting_create_Gendial_field_groupitem(ad->main_genlist, + item_data = setting_create_Gendial_field_groupitem(ad->main_genlist, &(ad->itc[GENDIAL_Type_1text_1icon_2]), NULL, setting_main_click_list_ex_ug_cb, @@ -933,9 +1052,29 @@ static void __load_applications_menu_list(void *data, 0, keyStr, NULL, NULL); + if (item_data) { + if (j == 0) { + item_data->group_style = SETTING_GROUP_STYLE_TOP; + } else if (j == setting_cfg_get_menu_length(i) - 1) { + item_data->group_style = SETTING_GROUP_STYLE_BOTTOM; + } else { + item_data->group_style = SETTING_GROUP_STYLE_CENTER; + } + + if (index == 0) { + item_data->group_style = SETTING_GROUP_STYLE_TOP; + } + index++; + } } } + if (index == 1) { + item_data->group_style = SETTING_GROUP_STYLE_NONE; + } else if (index == 2) { + item_data->group_style = SETTING_GROUP_STYLE_BOTTOM; + } + SETTING_TRACE_END; } @@ -955,10 +1094,10 @@ static void __load_applications_level_all_list(void *data) bool is_3rdapp_installed_setting_cfg(char* pkgname) { SETTING_TRACE_BEGIN; - // /opt/apps/ char path[512]; - if (snprintf(path, 512, "/opt/apps/%s/setting/setting.xml", pkgname) < 0) + SETTING_TRACE("1"); + if (snprintf(path, 512, PLUGIN_PREFIX"/apps/%s/setting/setting.xml", pkgname) < 0) return false; struct stat st; @@ -974,9 +1113,64 @@ bool is_3rdapp_installed_setting_cfg(char* pkgname) return result_opt; } +static int __pkg_list_cb (const pkgmgrinfo_pkginfo_h handle, void *data) +{ + SETTING_TRACE_BEGIN; + + DrawAppInfo* pinfo = (DrawAppInfo*)data; + + int ret = -1; + char *pkgid; + ret = pkgmgr_pkginfo_get_pkgid(handle, &pkgid); + if(ret < 0) { + SETTING_TRACE(">>>>> pkgmgr_pkginfo_get_pkgid() failed\n"); + } + + char *label; + ret = pkgmgr_pkginfo_get_label(handle, &label); + if(ret < 0) { + SETTING_TRACE(">>>>> pkgmgr_pkginfo_get_pkg_name() failed\n"); + } + SETTING_TRACE(" 3rd party - pkg id : ----> %s, pkg name ----> %s ", pkgid, label); + + // appid - 1234567890.AppSetting2 + // pkgid - 1234567890 + char *name = pkgid; + + if (is_3rdapp_installed_setting_cfg(pkgid) == true ) + { + pinfo->ncount++; + // draw code here + if (pinfo->draw_app != NULL) + { + SETTING_TRACE(">>> pkg name --> %s ", pkgid); + pinfo->draw_app(pinfo->data, strdup(label)/* appname*/, strdup(pkgid)/* pkg_name*/); + } + } + + SETTING_TRACE_END; + return 0; + +} + +static void get_3rdapp_installed_setting_list() +{ + SETTING_TRACE_BEGIN; + int val = 1; + + pkgmgrinfo_pkginfo_filter_h handle; + pkgmgrinfo_pkginfo_filter_create(&handle); + pkgmgrinfo_pkginfo_filter_add_bool(handle, PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING, val); + + pkgmgrinfo_pkginfo_filter_foreach_pkginfo(handle, __pkg_list_cb, NULL); +} + + /** * @param data + * ex) name : AppSetting4 + * ex) pkgname : UBKFwQidax.AppSetting4 */ static void draw_3rdapp(void* data, char* name, char* pkgname) { @@ -988,88 +1182,28 @@ static void draw_3rdapp(void* data, char* name, char* pkgname) //3rd cfg char fullpath[512]; - - if (snprintf(fullpath, 512, "/opt/apps/%s/setting/setting.xml", pkgname) < 0) - return false; + if (snprintf(fullpath, 512, PLUGIN_PREFIX"/apps/%s/setting/setting.xml", pkgname) < 0) + return; SETTING_TRACE(" fullpath : %s", fullpath); if (ad) { - setting_create_Gendial_field_groupitem(ad->main_genlist, + char* plugin_path = strdup(fullpath); + Setting_GenGroupItem_Data * plugin_node = setting_create_Gendial_field_groupitem(ad->main_genlist, &(ad->itc[GENDIAL_Type_1text_1icon_2]), NULL, setting_main_click_list_plugin_cb, - strdup(fullpath), + ad, SWALLOW_Type_INVALID, IMG_DefaultIcon, NULL, - 0, name, NULL, + 0, name, plugin_path, // <<-- refactoring NULL); } SETTING_TRACE_END; } /** - * - * ail code here - */ -static ail_cb_ret_e __download_apps_cb(ail_appinfo_h ai, void* data) -{ - DrawAppInfo* pinfo = (DrawAppInfo*)data; - char *id; - - if (AIL_ERROR_OK == ail_appinfo_get_str(ai, AIL_PROP_PACKAGE_STR, &id)) - { - //SETTING_TRACE(" 3rd party - app name : ----> %s ", id); - } - - ail_appinfo_h handle; - - char *name = NULL; - char *icon = NULL; - int installed_time; - bool nodisplay = false; - bool removable = true; - - if (AIL_ERROR_OK == ail_package_get_appinfo(id, &handle)) - { - if (AIL_ERROR_OK != ail_appinfo_get_str(handle, AIL_PROP_NAME_STR, &name)) - SETTING_TRACE("cannot get name"); - - if (AIL_ERROR_OK != ail_appinfo_get_str(handle, AIL_PROP_ICON_STR, &icon)) - SETTING_TRACE("cannot get icon"); - - if (AIL_ERROR_OK != ail_appinfo_get_bool(handle, AIL_PROP_NODISPLAY_BOOL, &nodisplay)) - SETTING_TRACE("cannot get nodisplay"); - - if (AIL_ERROR_OK != ail_appinfo_get_bool(handle, AIL_PROP_X_SLP_REMOVABLE_BOOL, &removable)) - SETTING_TRACE("cannot get removable"); - - if (AIL_ERROR_OK != ail_appinfo_get_int(handle, AIL_PROP_X_SLP_INSTALLEDTIME_INT, &installed_time)) - SETTING_TRACE("cannot get installed_time"); - - //SETTING_TRACE("installed_time = %d ", installed_time); - if (installed_time != 0 && is_3rdapp_installed_setting_cfg(id) == true ) - { - SETTING_TRACE(" 3rd party - app name : ----> id : %s --- name : %s ", id, name); - SETTING_TRACE(" 3rd party - icon : ----> %s ", icon); - SETTING_TRACE(" 3rd party - nodisplay : ----> %d ", nodisplay); - pinfo->ncount++; - - // draw code here - if (pinfo->draw_app != NULL) - { - SETTING_TRACE(">>> pkg name --> %s ", id); - pinfo->draw_app(pinfo->data, strdup(name)/* appname*/, strdup(id)/* pkg_name*/); - } - } - } - SETTING_TRACE_END; - return AIL_CB_RET_CONTINUE; -} - - -/** * get 3rd party applist from AIL & searching dir/file by the defined rule * @param data ad * if data is NULL --> just get how many items are there @@ -1081,34 +1215,36 @@ static int get_downloadapp_list(void* data) setting_main_appdata *ad = data; - int ncount = 0; - ail_filter_h f; - ail_appinfo_h handle; + int val = 1; + pkgmgrinfo_pkginfo_filter_h handle; + pkgmgrinfo_pkginfo_filter_create(&handle); + pkgmgrinfo_pkginfo_filter_add_bool(handle, PMINFO_PKGINFO_PROP_PACKAGE_APPSETTING, val); + + int ncount = 0; DrawAppInfo* pinfo = (DrawAppInfo*)malloc(sizeof(DrawAppInfo)); - pinfo->ncount = 0; - pinfo->draw_app = draw_3rdapp; - pinfo->data = ad; - if (ail_filter_new(&f) == AIL_ERROR_OK) - { - if (ail_filter_add_bool(f, AIL_PROP_NODISPLAY_BOOL, false) != AIL_ERROR_OK) - { - SETTING_TRACE("ail filter error"); - return; - } + if (pinfo) { + pinfo->ncount = 0; + pinfo->draw_app = draw_3rdapp; + pinfo->data = ad; + pkgmgrinfo_pkginfo_filter_foreach_pkginfo(handle, __pkg_list_cb, pinfo); - ail_filter_list_appinfo_foreach(f, __download_apps_cb, pinfo); - //--------------------------------------------------------------- - ail_filter_destroy(f); - } - ncount = pinfo->ncount; + ncount = pinfo->ncount; - if (pinfo) { free(pinfo); pinfo = NULL; } + if (handle) { + if (PMINFO_R_OK == pkgmgrinfo_pkginfo_filter_destroy(handle)) { + SETTING_TRACE("remove pkginfo successfully"); + } else { + SETTING_TRACE("failed removing pkginfo"); + } + handle = NULL; + } + SETTING_TRACE_END; return ncount; } @@ -1142,6 +1278,7 @@ static int __get_downloaded_apps_num(Cfg_Item_Position inputPos) SETTING_TRACE("Exit %s with return[%d]",__FUNCTION__, downloaded_apps_num); #endif + SETTING_TRACE("Exit %s with return[%d]",__FUNCTION__, downloaded_apps_num); return downloaded_apps_num; } @@ -1169,92 +1306,8 @@ static void __load_downloaded_apps_menu_list(void *data, ELM_GENLIST_ITEM_NONE, KeyStr_DownloadedAPPs, NULL); -#if DISABLED_CODE - char *keyStr = NULL; - char *icon_path = NULL; - char *ug_args = NULL; - - Cfg_Item_Position tmpPos = Cfg_Item_Pos_Uninstall; - int i, j; - for (i = 0; i < setting_cfg_get_category_length(); i++) { - if (safeStrCmp - (setting_cfg_get_category_name(i), KeyStr_DownloadedAPPs)) - continue; - - for (j = 0; j < setting_cfg_get_menu_length(i); j++) { - keyStr = setting_cfg_get_keyname_idx(i, j); - tmpPos = - (Cfg_Item_Position) setting_cfg_get_pos_idx(i, j); - icon_path = setting_cfg_get_icon_path_idx(i, j); - ug_args = setting_cfg_get_ug_args_idx(i, j); - - if (Cfg_Item_Pos_Level_All == inputPos) { - } else if (inputPos != tmpPos) { /* not in the inputPos level */ - continue; - } - - setting_create_Gendial_field_groupitem(ad->main_genlist, - &(ad->itc[GENDIAL_Type_1text_1icon_2]), - NULL, - setting_main_click_list_ex_ug_cb, - ug_args, - SWALLOW_Type_INVALID, - icon_path, NULL, - 0, keyStr, NULL, - NULL); - - } - } -#endif - - - //#ifdef PLUGIN - #if 0 - //3rd cfg - DIR *dp = opendir (PLUGIN_CFG_DIR); - if (dp != NULL) - { - struct dirent *ep; - - char fullpath[256]; - - while (ep = readdir (dp)) - { - memset(fullpath, 0x00, 256); - strncpy(fullpath, PLUGIN_CFG_DIR, 256); - strncat(fullpath, "/", 256); - strncat(fullpath, ep->d_name, 256); - - //SETTING_TRACE("ep->d_name:%s", ep->d_name); - if (0 == safeStrCmp(".", ep->d_name) - || 0 == safeStrCmp("..", ep->d_name)) - { - continue; - } - SETTING_TRACE("fullpath: %s", fullpath); - char *p = strrchr(ep->d_name, '.'); - *p = '\0'; - setting_create_Gendial_field_groupitem(ad->main_genlist, - &(ad->itc[GENDIAL_Type_1text_1icon_2]), - NULL, - setting_main_click_list_plugin_cb, - strdup(fullpath), - SWALLOW_Type_INVALID, - IMG_DefaultIcon, NULL, - 0, ep->d_name, NULL, - NULL); - - } - (void) closedir (dp); - } - #else - // TODO: DRAW 3RD PARTY APPS LIST here with EFL code - int downloaded_apps_num = get_downloadapp_list(ad); - - // loop condition : 0 ---> ncount - // - - #endif + get_downloadapp_list(ad); + //SETTING_TRACE("Exit %s with return[%d]",__FUNCTION__, downloaded_apps_num); SETTING_TRACE_END; } @@ -1283,7 +1336,7 @@ static void __check_all_view_clear(void *data) ad->gl_sel_all = NULL; ad->edit_preferred_genlist = NULL; - ad->controllbar_all_check = NULL; + //ad->controllbar_all_check = NULL; ad->check_all_item =NULL; } @@ -1294,13 +1347,7 @@ static void __prefered_buttons_cb(void *data, Evas_Object *obj, void *event_info setting_main_appdata *ad = (setting_main_appdata *) data; const char *key = NULL; - #if SUPPORT_BOTTOM_BTNS - ret_if(!event_info); - Elm_Object_Item *it = event_info; - key = elm_object_item_text_get(it); - #else key = elm_object_text_get(obj); - #endif setting_retm_if(data == NULL || key == NULL, "data == NULL || key == NULL"); @@ -1344,48 +1391,6 @@ static void __prefered_buttons_cb(void *data, Evas_Object *obj, void *event_info } } -static void __setting_contorlbar_clicked(void *data, Evas_Object *obj, - void *event_info) -{ - SETTING_TRACE_BEGIN; - ret_if(data == NULL || obj == NULL); - setting_main_appdata *ad = (setting_main_appdata *) data; - int index = -1; - /* elm_segment_control_selected_segment_get(obj, &index); */ - Elm_Object_Item *sel_item = elm_segment_control_item_selected_get(obj); - ret_if(sel_item == NULL); - index = elm_segment_control_item_index_get(sel_item); - - switch (index) { - case 0: - { - SETTING_TRACE("Preferred"); - ad->profile_type = MAIN_PROFILE_PREFERRED; - ad->load_fns[Func_Type_Connectivity] = __load_connectivity_level0_list; - ad->load_fns[Func_Type_System] = __load_system_level0_list; - ad->load_fns[Func_Type_Apps] = __load_applications_level0_list; - ad->load_fns[Func_Type_DownApp] = __load_downloaded_apps_level0_list; - - break; - } - case 1: - { - SETTING_TRACE("All"); - ad->profile_type = MAIN_PROFILE_ALL; - ad->load_fns[Func_Type_Connectivity] = __load_connectivity_level_all_list; - ad->load_fns[Func_Type_System] = __load_system_level_all_list; - ad->load_fns[Func_Type_Apps] = __load_applications_level_all_list; - ad->load_fns[Func_Type_DownApp] = __load_downloaded_apps_level_all_list; - break; - } - default: - { - return; - } - } - int ret = setting_main_refresh(ad); - ret_if(ret != SETTING_RETURN_SUCCESS); -} static void __btnback_clicked_cb(void *data, Evas_Object *obj, void *event_info) { @@ -1395,129 +1400,114 @@ static void __btnback_clicked_cb(void *data, Evas_Object *obj, void *event_info) elm_win_lower(ad->win_main); } -static void __allFrequent_btn_cb(void *data, Evas_Object *obj, void *event_info) +static Eina_Bool __refresh_on_idle(void *data) { SETTING_TRACE_BEGIN; - ret_if(!data || !obj); - setting_main_appdata *ad = (setting_main_appdata *) data; - Elm_Object_Item *item = elm_toolbar_first_item_get(obj); - ret_if(!item); - + retv_if(!data, FALSE); + setting_main_appdata *ad = data; if (MAIN_PROFILE_ALL == ad->profile_type) { - SETTING_TRACE("Change to Preferred view"); - elm_object_item_text_set(item, _(ALL_STR)); - ad->profile_type = MAIN_PROFILE_PREFERRED; - ad->load_fns[Func_Type_Connectivity] = __load_connectivity_level0_list; - ad->load_fns[Func_Type_System] = __load_system_level0_list; - ad->load_fns[Func_Type_Apps] = __load_applications_level0_list; - ad->load_fns[Func_Type_DownApp] = __load_downloaded_apps_level0_list; - setting_main_refresh(ad); - } - else if (MAIN_PROFILE_PREFERRED == ad->profile_type) - { - SETTING_TRACE("Change to ALL view"); - elm_object_item_text_set(item, _(PREFERRED_STR)); - ad->profile_type = MAIN_PROFILE_ALL; ad->load_fns[Func_Type_Connectivity] = __load_connectivity_level_all_list; ad->load_fns[Func_Type_System] = __load_system_level_all_list; ad->load_fns[Func_Type_Apps] = __load_applications_level_all_list; ad->load_fns[Func_Type_DownApp] = __load_downloaded_apps_level_all_list; setting_main_refresh(ad); } - else + else if (MAIN_PROFILE_PREFERRED == ad->profile_type) { - return; + ad->load_fns[Func_Type_Connectivity] = __load_connectivity_level0_list; + ad->load_fns[Func_Type_System] = __load_system_level0_list; + ad->load_fns[Func_Type_Apps] = __load_applications_level0_list; + ad->load_fns[Func_Type_DownApp] = __load_downloaded_apps_level0_list; + setting_main_refresh(ad); } + ad->refresh_idler = NULL; + return FALSE; } -/** - * creat a layout - */ -Evas_Object *__create_main_view_widgets(Evas_Object *win_main, void *cb, - Evas_Object *content, - char *title_text, - bool isFoundPreferredItem, - Evas_Object **navibar, - Elm_Object_Item **edit_item, - Elm_Object_Item **segment_all, - Elm_Object_Item **segment_preferred) +static void __allFrequent_btn_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; + ret_if(!data || !obj); + setting_main_appdata *ad = (setting_main_appdata *) data; + //if already has the task,cancel the old task with ecore_idler_del,then add new idler task. + if (ad->refresh_idler) { + ecore_idler_del(ad->refresh_idler); + ad->refresh_idler = NULL; + } - /* add layout to win_main */ - Evas_Object *ly = elm_layout_add(win_main); - setting_retvm_if(ly == NULL, FALSE, "layout == NULL"); - elm_layout_theme_set(ly, "layout", "application", "default"); - evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_win_resize_object_add(win_main, ly); - Evas_Object *bg = setting_create_bg(ly, win_main, "group_list"); - elm_object_part_content_set(ly, "elm.swallow.bg", bg); - evas_object_show(ly); - - /* add navi_bar to the layout */ - Evas_Object *navi_bar = elm_naviframe_add(ly); - - elm_object_part_content_set(ly, "elm.swallow.content", navi_bar); - evas_object_show(navi_bar); - *navibar = navi_bar; - - // create 'back' button on navigaiton bar - Evas_Object* btn_back = elm_button_add(navi_bar); - evas_object_smart_callback_add(btn_back, "clicked", __btnback_clicked_cb, g_main_ad); - - Evas_Object *controlbar = elm_toolbar_add(navi_bar); - setting_retvm_if(controlbar == NULL, FALSE, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - //elm_object_style_set(controlbar, NAVI_CONTROLBAR_STYLE); - - /* add segment control */ - Evas_Object *segment = elm_segment_control_add(controlbar); - setting_retvm_if(segment == NULL, FALSE, "segment == NULL"); - - Elm_Object_Item *seg_preferred = NULL, *seg_all = NULL; - *segment_preferred = seg_preferred = elm_segment_control_item_add(segment, NULL, _(PREFERRED_STR)); - *segment_all = seg_all = elm_segment_control_item_add(segment, NULL, _(ALL_STR)); - - evas_object_show(segment); - evas_object_smart_callback_add(segment, "changed", - __setting_contorlbar_clicked, cb); - - #if !SUPPORT_BOTTOM_BTNS - Elm_Object_Item *item = NULL; - Elm_Object_Item *navi_it = elm_naviframe_item_push(navi_bar, title_text, btn_back, NULL, content, NULL); - elm_object_style_set(btn_back, NAVI_BACK_BUTTON_STYLE); - /* add 'Edit preffered' button to controlbar */ - Evas_Object *btn_pref = setting_create_button(controlbar, _(EDIT_PREFERRED_STR), - NAVI_DEF_BUTTON_STYLE, - setting_main_click_edit_preferred_cb,cb); - - *edit_item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(*edit_item, "object", btn_pref); - item = elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_object_item_part_content_set(item, "object", segment); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - - elm_object_item_part_content_set(navi_it, "optionheader", controlbar); - #else - Elm_Object_Item *navi_it = elm_naviframe_item_push(navi_bar, title_text, btn_back, NULL, content, "segment/instant"); - elm_object_style_set(btn_back, NAVI_BACK_BUTTON_STYLE); - - elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, "", NULL, NULL), EINA_TRUE); - *edit_item = elm_toolbar_item_append(controlbar, NULL, _(EDIT_PREFERRED_STR), setting_main_click_edit_preferred_cb, cb); - - elm_object_item_part_content_set(navi_it, "controlbar", controlbar); - elm_object_item_part_content_set(navi_it, "segment", segment); - #endif - - - if (isFoundPreferredItem) { - elm_segment_control_item_selected_set(seg_preferred, EINA_TRUE); - } else { - elm_segment_control_item_selected_set(seg_all, EINA_TRUE); + //Elm_Object_Item *item = elm_toolbar_first_item_get(obj); + //ret_if(!item); + if (MAIN_PROFILE_ALL == ad->profile_type) + { + SETTING_TRACE("Change to Preferred view"); + elm_object_text_set(obj, _(ALL_STR)); + ad->profile_type = MAIN_PROFILE_PREFERRED; } - return ly; + else if (MAIN_PROFILE_PREFERRED == ad->profile_type) + { + SETTING_TRACE("Change to ALL view"); + elm_object_text_set(obj, _(PREFERRED_STR)); + ad->profile_type = MAIN_PROFILE_ALL; + } + else + { + return; + } + ad->refresh_idler = ecore_idler_add((Ecore_Task_Cb) __refresh_on_idle, ad); +} + +static void __setting_show_title_toolbar(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //elm_object_item_signal_emit(data, "elm,state,sip,shown", ""); + setting_main_appdata *ad = (setting_main_appdata *) data; + + Evas_Object *navi_bar = NULL; + + if (ad->isInUGMode && ad->ug) { + Evas_Object *layout = (Evas_Object *)ug_get_layout(ad->ug); + if (layout) + navi_bar = elm_object_part_content_get(layout, "elm.swallow.content"); + } else { + navi_bar = ad->navibar_main; + } + + const char *support = evas_object_data_get(navi_bar, "sip.naviframe.title_obj"); + SETTING_TRACE("support:%s", support); + if (support) + { + Elm_Object_Item *top_item = elm_naviframe_top_item_get(navi_bar); + if (top_item) + elm_object_item_signal_emit(top_item, "elm,state,sip,shown", ""); + } +} + +static void __setting_hide_title_toolbar(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + //elm_object_item_signal_emit(data, "elm,state,sip,hidden", ""); + setting_main_appdata *ad = (setting_main_appdata *) data; + + Evas_Object *navi_bar = NULL; + + if (ad->isInUGMode && ad->ug) { + Evas_Object *layout = (Evas_Object *)ug_get_layout(ad->ug); + if (layout) + navi_bar = elm_object_part_content_get(layout, "elm.swallow.content"); + } else { + navi_bar = ad->navibar_main; + } + + const char *support = evas_object_data_get(navi_bar, "sip.naviframe.title_obj"); + + SETTING_TRACE("support:%s", support); + if (support) + { + Elm_Object_Item *top_item = elm_naviframe_top_item_get(navi_bar); + if (top_item) + elm_object_item_signal_emit(top_item, "elm,state,sip,hidden", ""); + } } static bool __setting_create_main_view(void *data) @@ -1526,28 +1516,38 @@ static bool __setting_create_main_view(void *data) /* error check */ setting_retvm_if(data == NULL, FALSE, "data == NULL"); setting_main_appdata *ad = (setting_main_appdata *) data; -#if SUPPORT_MORE_ITEM_FUNCTION + + Evas_Object *conform = elm_conformant_add(ad->win_main); ad->ly_main = setting_create_win_layout(ad->win_main, ad->win_main); + evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_win_resize_object_add(ad->win_main, conform); + elm_object_content_set(conform, ad->ly_main); + evas_object_show(conform); + + evas_object_smart_callback_add(conform, "virtualkeypad,state,on", __setting_show_title_toolbar, ad); + evas_object_smart_callback_add(conform, "virtualkeypad,state,off", __setting_hide_title_toolbar, ad); + + elm_win_conformant_set(ad->win_main, EINA_TRUE); + + ad->conform = conform; + ad->navibar_main = setting_create_navi_bar(ad->ly_main); - /* add controlbar */ - Evas_Object *controlbar = elm_toolbar_add(ad->navibar_main); - setting_retvm_if(controlbar == NULL, FALSE, "controlbar == NULL"); - elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); ad->main_genlist = elm_genlist_add(ad->navibar_main); elm_object_style_set(ad->main_genlist, "dialogue"); retvm_if(ad->main_genlist == NULL, FALSE, "Cannot set scroller object as contento of layout"); + + //elm_genlist_homogeneous_set(ad->main_genlist, EINA_TRUE); elm_genlist_clear(ad->main_genlist); /* first to clear list */ + evas_object_smart_callback_add(ad->main_genlist, "realized", __gl_realized, ad); setting_create_navi_bar_buttons(_("IDS_COM_BODY_SETTINGS"), - _("IDS_COM_BODY_BACK"), "", _("IDS_ST_OPT_ALL"), + _("IDS_COM_BODY_BACK"), NULL, _("IDS_ST_OPT_ALL"), __btnback_clicked_cb, NULL, __allFrequent_btn_cb, ad, ad->main_genlist, - ad->navibar_main, controlbar); - elm_object_item_disabled_set(elm_toolbar_last_item_get(controlbar), EINA_TRUE); - - ad->controlbar = controlbar; + ad->navibar_main, NULL); ad->profile_type = MAIN_PROFILE_PREFERRED; ad->load_fns[Func_Type_Connectivity] = __load_connectivity_level0_list; @@ -1556,38 +1556,6 @@ static bool __setting_create_main_view(void *data) ad->load_fns[Func_Type_DownApp] = __load_downloaded_apps_level_all_list; setting_main_refresh(ad); return TRUE; -#endif - - ad->main_genlist = elm_genlist_add(ad->win_main); - elm_object_style_set(ad->main_genlist, "dialogue"); - elm_genlist_clear(ad->main_genlist); /* first to clear list */ - int i, j, pos; - int isFoundPreferredItem = FALSE; - for (i = 0; i < setting_cfg_get_category_length(); i++) { - for (j = 0; j < setting_cfg_get_menu_length(i); j++) { - pos = (Cfg_Item_Position) setting_cfg_get_pos_idx(i, j); - if (Cfg_Item_Pos_Level0 == pos) { - isFoundPreferredItem = TRUE; - break; - } - } - if (isFoundPreferredItem) { - break; - } - } - - ad->ly_main = __create_main_view_widgets(ad->win_main, ad, - ad->main_genlist, - _("IDS_COM_BODY_SETTINGS"), - isFoundPreferredItem, - &ad->navibar_main, - &ad->edit_item, - &ad->segment_all, - &ad->segment_preferred); - setting_retvm_if(ad->ly_main == NULL, FALSE, "ad->ly_main == NULL"); - - SETTING_TRACE_END; - return TRUE; } static bool __setting_create_prefered_view(void *data) @@ -1622,7 +1590,7 @@ static bool __setting_create_prefered_view(void *data) _("IDS_COM_SK_DONE"), NULL, __prefered_buttons_cb, __prefered_buttons_cb, NULL, ad, sub_layout, ad->navibar_main, - &(ad->controllbar_all_check)); + NULL); SETTING_TRACE_END; return TRUE; } @@ -1734,6 +1702,10 @@ static void setting_main_tapi_event_cb(TapiHandle *handle, int result, void *dat break; default: /* do nothing */ + SETTING_TRACE_DEBUG("default"); + if(ad->data_flight) + setting_set_bool_slp_key(BOOL_SLP_SETTING_FLIGHT_MODE, + ad->data_flight->chk_status, &err); break; } return; @@ -1745,6 +1717,7 @@ static int setting_main_refresh(void *data) setting_main_appdata *ad = (setting_main_appdata *) data; elm_genlist_clear(ad->main_genlist); /* first to clear list */ +#if 0 if (is_ug_installed_by_ug_args("rcs-config")) { Elm_Object_Item *item = elm_genlist_item_append(ad->main_genlist, &itc_seperator, NULL, NULL, @@ -1760,6 +1733,7 @@ static int setting_main_refresh(void *data) 0, KeyStr_Joyn, NULL, NULL); } +#endif int i; for(i = Func_Type_Connectivity; i < Func_Type_MAX; i++) @@ -1791,6 +1765,8 @@ static int setting_main_create(void *cb) &(ad->itc[GENDIAL_Type_1icon_2text])); setting_create_Gendial_itc("dialogue/1text.1icon.2", &(ad->itc[GENDIAL_Type_1text_2icon_2])); + setting_create_Gendial_itc("dialogue/2text.2icon.3", + &(ad->itc[GENDIAL_Type_2text_2icon_3])); setting_create_Gendial_itc("dialogue/title", &(ad->itc[GENDIAL_Type_group_item])); setting_create_Gendial_itc("select_all", @@ -1799,10 +1775,11 @@ static int setting_main_create(void *cb) setting_create_Gendial_itc("dialogue/2text.3", &(ad->itc[GENDIAL_Type_2text_3])); ad->view_type = SETTING_VIEW_MAIN; - bool ret = __setting_create_main_view(ad); - SETTING_TRACE(" >>>> ret = %d ", ret); + __setting_create_main_view(ad); + setting_view_main.is_create = 1; + setting_drawer_list_init(); return SETTING_RETURN_SUCCESS; } @@ -1819,6 +1796,14 @@ static int setting_main_destroy(void *cb) return SETTING_RETURN_SUCCESS; } + evas_object_smart_callback_del(ad->conform, "virtualkeypad,state,on", __setting_show_title_toolbar); + evas_object_smart_callback_del(ad->conform, "virtualkeypad,state,off", __setting_hide_title_toolbar); + + if (ad->refresh_idler) { + ecore_idler_del(ad->refresh_idler); + ad->refresh_idler = NULL; + } + if (ad->handle) { int tapi_ret = tel_deinit(ad->handle); if (tapi_ret != TAPI_API_SUCCESS) { @@ -1846,6 +1831,12 @@ static int setting_main_destroy(void *cb) evas_object_del(ad->flight_popup); ad->flight_popup = NULL; } + + evas_object_smart_callback_del(ad->main_genlist, "realized", __gl_realized); + + setting_dbus_handler_fini(); + setting_drawer_list_fini(); + setting_view_main.is_create = 0; SETTING_TRACE_END; return SETTING_RETURN_SUCCESS; @@ -1970,11 +1961,10 @@ void setting_main_destroy_ug_cb(ui_gadget_h ug, void *priv) void setting_main_result_ug_cb(ui_gadget_h ug, service_h service, void *priv) { - if (!priv) - return; - SETTING_TRACE_BEGIN; + if (!priv) return; - SETTING_TRACE_END; + // set default local automatically + set_defaultLangICU(); } void setting_main_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, @@ -1995,7 +1985,6 @@ void setting_main_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_main, base); evas_object_show(base); break; default: @@ -2049,6 +2038,8 @@ setting_main_click_list_item_ug_cb(void *data, Evas_Object *obj, ad->ug = ug_create(NULL, ug_to_load, UG_MODE_FULLVIEW, svc, cbs); if (ad->ug) { ad->isInUGMode = TRUE; + memset(ad->cur_loaded_ug, 0x00, MAX_DISPLAY_NAME_LEN_ON_UI); + safeCopyStr(ad->cur_loaded_ug, ug_to_load, MAX_DISPLAY_NAME_LEN_ON_UI); } else { evas_object_show(ad->ly_main); @@ -2068,6 +2059,40 @@ setting_main_click_list_default_ug_cb(void *data, Evas_Object *obj, NO_UG_FOUND_MSG); } +void +setting_main_click_list_usb_cb(void *data, Evas_Object *obj, void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(event_info == NULL, "Invalid argument: event info is NULL"); + + int err; + int value = -1; + char *str_text = USB_NEED_OFF; + + Elm_Object_Item *item = (Elm_Object_Item *) event_info; +#if 0 + setting_get_int_slp_key(INT_SLP_SETTING_MOBILE_AP_STATUS, &value, &err); + if (err != 0) + { + SETTING_TRACE_ERROR("FAIL: VCONFKEY_MOBILE_HOTSPOT_MODE may not exist\n"); + setting_main_click_list_ex_ug_cb(data, obj, item); + return; + } +#endif + /* If mobile hotspot is on, going USB utilties is blocked by a popup*/ + if (value & VCONFKEY_MOBILE_HOTSPOT_MODE_USB) + { + elm_genlist_item_selected_set(item, EINA_FALSE); + setting_create_simple_popup(g_main_ad, g_main_ad->win_main, NULL, (str_text)); + } + else + { + setting_main_click_list_ex_ug_cb(data, obj, item); + } + + SETTING_TRACE_END; +} + void setting_main_click_list_more_cb(void *data, Evas_Object *obj, void *event_info) { SETTING_TRACE_BEGIN; @@ -2166,11 +2191,44 @@ setting_main_click_list_plugin_cb(void *data, Evas_Object *obj, retm_if(event_info == NULL, "Invalid argument: event info is NULL"); Elm_Object_Item *item = (Elm_Object_Item *) event_info; elm_genlist_item_selected_set(item, EINA_FALSE); -#ifdef PLUGIN - setting_plugin_load((const char *)data); -#endif + Setting_GenGroupItem_Data *selected_item = (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); + + setting_main_appdata *ad = data; + + ad->plugin_path = strdup(selected_item->sub_desc); + SETTING_TRACE(" >> SELECTED plugin name : %s \n", ad->plugin_path); + + PluginNode* plugin_node = setting_plugin_create(g_main_ad->navibar_main, g_main_ad->win_main); + plugin_node->plugin_path = strdup(selected_item->sub_desc); + ad->plugin_node = plugin_node; // the selected plugin name + + setting_drawer_list_init(); + setting_dbus_handler_init( ad->plugin_node ); + + setting_plugin_load(plugin_node, (const char *)plugin_node->plugin_path); +} + +/** + * @see [caller] setting_main_list_mouse_up_cb + * @see [caller] setting_main_sel_list_mouse_up_cb + */ +static void __rotate_lock_handler(int chk_status, setting_main_appdata *ad ) +{ + SETTING_TRACE_BEGIN; + if( chk_status == 1) + { + // toggle : 0 --> 1 + int angle = elm_win_rotation_get(ad->win_main); + elm_win_rotation_with_resize_set(ad->win_main, angle); + } else { + elm_win_rotation_with_resize_set(ad->win_main, 0); + } + vconf_set_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, chk_status); } +/** + * toggle cb + */ void setting_main_list_mouse_up_cb(void *data, Evas_Object *eo, void *event_info) { @@ -2183,7 +2241,7 @@ void setting_main_list_mouse_up_cb(void *data, Evas_Object *eo, SETTING_TRACE("change radio[%s], status is:%d", _(list_item->keyStr), list_item->chk_status); - /*setting_main_appdata *ad = g_main_ad;*/ + setting_main_appdata *ad = g_main_ad; if (!safeStrCmp(KeyStr_UsePacketData, list_item->keyStr)) { int err; @@ -2198,12 +2256,15 @@ void setting_main_list_mouse_up_cb(void *data, Evas_Object *eo, } } else if (!safeStrCmp(KeyStr_Landscape, list_item->keyStr)) { - vconf_set_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, ! list_item->chk_status); + __rotate_lock_handler(list_item->chk_status, ad); } return; } +/** + * genlist touch cb + */ void setting_main_sel_list_mouse_up_cb(void *data, Evas_Object *eo, void *event_info) { @@ -2217,10 +2278,12 @@ void setting_main_sel_list_mouse_up_cb(void *data, Evas_Object *eo, (Setting_GenGroupItem_Data *) elm_object_item_data_get(item); list_item->chk_status = elm_check_state_get(list_item->eo_check); - /* new status */ - /*setting_main_appdata *ad = (setting_main_appdata *) data;*/ + /* new status */ + list_item->chk_status = !list_item->chk_status; + elm_check_state_set(list_item->eo_check, list_item->chk_status); + setting_main_appdata *ad = (setting_main_appdata *) data; if (!safeStrCmp(KeyStr_UsePacketData, list_item->keyStr)) { /* setting_reset_slp_key_by_status(eo, BOOL_SLP_SETTING_USE_PACKET_DATA); */ int err; @@ -2228,7 +2291,7 @@ void setting_main_sel_list_mouse_up_cb(void *data, Evas_Object *eo, list_item->chk_status, &err); } else if (!safeStrCmp(KeyStr_Landscape, list_item->keyStr)) { - vconf_set_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, (list_item->chk_status)); + __rotate_lock_handler(list_item->chk_status, ad); } return; @@ -2268,6 +2331,256 @@ void __alternate_flight_mode(Evas_Object *check) SETTING_TRACE_END; } +static void __tethering_disabled_cb(tethering_error_e error, tethering_type_e type, tethering_disabled_cause_e code, void *data) +{ + int ret; + + if (data) { + tethering_h th = (tethering_h)data; + tethering_destroy(th); + } + + ret = wifi_initialize(); + setting_retm_if(ret < 0, "*** [ERR] wifi_initialize() ***"); + + ret = wifi_activate(NULL, NULL); + if (ret < 0) { + wifi_deinitialize(); + } + setting_retm_if(ret < 0, "*** [ERR] wifi_activate() ***"); + + ret = wifi_deinitialize(); + setting_retm_if(ret < 0, "*** [ERR] wifi_deinitialize() ***"); +} + +static void __tethering_turn_off_resp_cb(void *data, Evas_Object *obj, void *event_info) +{ + setting_retm_if(NULL == obj, "NULL == obj"); + int response_type = btn_type(obj); + Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data; + + if (g_main_ad) + { + evas_object_del(g_main_ad->popup); + g_main_ad->popup = NULL; + } + + if (POPUP_RESPONSE_OK == response_type) + { + tethering_h th = NULL; + tethering_error_e ret = TETHERING_ERROR_NONE; + + ret = tethering_create(&th); + if (ret != TETHERING_ERROR_NONE) { + list_item->swallow_type = SWALLOW_Type_1ICON_1RADIO; + list_item->chk_status = EINA_FALSE; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } + + ret = tethering_set_disabled_cb(th, TETHERING_TYPE_WIFI, __tethering_disabled_cb, th); + if (ret != TETHERING_ERROR_NONE) { + list_item->swallow_type = SWALLOW_Type_1ICON_1RADIO; + list_item->chk_status = EINA_FALSE; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + + tethering_destroy(th); + return; + } + + tethering_disable(th, TETHERING_TYPE_WIFI); + } + else if (POPUP_RESPONSE_CANCEL == response_type) + { + list_item->swallow_type = SWALLOW_Type_1ICON_1RADIO; + list_item->chk_status = EINA_FALSE; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } +} + +void __alternate_wifi_mode(Setting_GenGroupItem_Data *list_item, Evas_Object *check) +{ + SETTING_TRACE_BEGIN; + int ret; + Eina_Bool status = elm_check_state_get(check); + SETTING_TRACE("wifi mode status : %d", status); + + int value, err; + + if (tethering_is_enabled(NULL, TETHERING_TYPE_WIFI) == TRUE) { + list_item->swallow_type = SWALLOW_Type_1ICON_1PROCESS; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + + g_main_ad->popup = setting_create_popup_with_btn(list_item, + g_main_ad->win_main, NULL, + _("Connecting Wi-Fi will turn off Mobile hotspot. Continue?"), + __tethering_turn_off_resp_cb, + 0, 2, _("IDS_COM_SK_OK"), _("IDS_COM_SK_CANCEL")); + } else { + ret = wifi_initialize(); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } + setting_retm_if(ret < 0, "*** [ERR] wifi_initialize() ***"); + + if (status) { + ret = wifi_activate(NULL, NULL); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + wifi_deinitialize(); + } + setting_retm_if(ret < 0, "*** [ERR] wifi_activate() ***"); + } else { + ret = wifi_deactivate(NULL, NULL); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + wifi_deinitialize(); + } + setting_retm_if(ret < 0, "*** [ERR] wifi_deactivate() ***"); + } + + ret = wifi_deinitialize(); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_WIFI_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } + setting_retm_if(ret < 0, "*** [ERR] wifi_deinitialize() ***"); + + list_item->swallow_type = SWALLOW_Type_1ICON_1PROCESS; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + + } + SETTING_TRACE_END; +} + +void __alternate_bt_mode(Setting_GenGroupItem_Data *list_item, Evas_Object *check) +{ + SETTING_TRACE_BEGIN; + int ret; + Eina_Bool status = elm_check_state_get(check); + SETTING_TRACE("bt mode status : %d", status); + + int value, err; + + ret = bt_initialize(); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_BT_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } + setting_retm_if(ret < 0, "*** [ERR] bt_initialize() ***"); + + + if (status) { + ret = bt_adapter_enable(); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_BT_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + bt_deinitialize(); + } + setting_retm_if(ret < 0, "*** [ERR] bt_adapter_enable() ***"); + } else { + ret = bt_adapter_disable(); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_BT_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + bt_deinitialize(); + } + setting_retm_if(ret < 0, "*** [ERR] bt_adapter_disable() ***"); + } + + ret = bt_deinitialize(); + if (ret < 0) { + setting_get_int_slp_key(INT_SLP_SETTING_BT_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } + setting_retm_if(ret < 0, "*** [ERR] bt_deinitialize() ***"); + + list_item->swallow_type = SWALLOW_Type_1ICON_1PROCESS; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + + SETTING_TRACE_END; +} + +void __alternate_nfc_mode(Setting_GenGroupItem_Data *list_item, Evas_Object *check) +{ + SETTING_TRACE_BEGIN; + int ret; + Eina_Bool status = elm_check_state_get(check); + SETTING_TRACE("nfc mode status : %d", status); + + int value, err; + + ret = nfc_manager_initialize(NULL, NULL); + if (ret < 0) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NFC_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } + setting_retm_if(ret < 0, "*** [ERR] nfc_manager_initialize() ***"); + + ret = nfc_manager_set_activation(status, NULL, NULL); + if (ret < 0) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NFC_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + nfc_manager_deinitialize(); + } + setting_retm_if(ret < 0, "*** [ERR] nfc_manager_set_activation() ***"); + + ret = nfc_manager_deinitialize(); + if (ret < 0) { + setting_get_bool_slp_key(BOOL_SLP_SETTING_NFC_STATUS, &value, &err); + list_item->chk_status = value; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + } + setting_retm_if(ret < 0, "*** [ERR] nfc_manager_deinitialize() ***"); + + list_item->swallow_type = SWALLOW_Type_1ICON_1PROCESS; + elm_object_item_data_set(list_item->item, list_item); + elm_genlist_item_update(list_item->item); + + SETTING_TRACE_END; +} + +void __alternate_sbeam_mode(Evas_Object *check) +{ + SETTING_TRACE_BEGIN; + int ret; + Eina_Bool status = elm_check_state_get(check); + SETTING_TRACE("wifi mode status : %d", status); + + vconf_set_bool(VCONFKEY_NFC_SBEAM, status); + + SETTING_TRACE_END; +} + void setting_main_click_list_network_ug_cb(void *data, Evas_Object *obj, void *event_info) @@ -2330,6 +2643,9 @@ setting_main_click_list_network_ug_cb(void *data, Evas_Object *obj, } +/** + * genlist touch cb + */ static void setting_main_click_Gendial_list_flight_mode_cb(void *data, Evas_Object *obj, void *event_info) @@ -2351,6 +2667,9 @@ setting_main_click_Gendial_list_flight_mode_cb(void *data, Evas_Object *obj, SETTING_TRACE_END; } +/** + * toggle cb + */ void setting_main_click_list_flight_mode_cb(void *data, Evas_Object *obj, void *event_info) @@ -2367,6 +2686,81 @@ setting_main_click_list_flight_mode_cb(void *data, Evas_Object *obj, SETTING_TRACE_END; } +/** + * toggle cb + */ +void +setting_main_click_list_wifi_mode_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for update new state */ + SETTING_TRACE("process item [%s], status:%d", _(list_item->keyStr), + list_item->chk_status); + + __alternate_wifi_mode(list_item, obj); + SETTING_TRACE_END; +} + +/** + * toggle cb + */ +void +setting_main_click_list_bt_mode_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for update new state */ + SETTING_TRACE("process item [%s], status:%d", _(list_item->keyStr), + list_item->chk_status); + + __alternate_bt_mode(list_item, obj); + SETTING_TRACE_END; +} + +/** + * toggle cb + */ +void +setting_main_click_list_nfc_mode_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for update new state */ + SETTING_TRACE("process item [%s], status:%d", _(list_item->keyStr), + list_item->chk_status); + + __alternate_nfc_mode(list_item, obj); + SETTING_TRACE_END; +} + +/** + * toggle cb + */ +void +setting_main_click_list_sbeam_mode_cb(void *data, Evas_Object *obj, + void *event_info) +{ + SETTING_TRACE_BEGIN; + retm_if(data == NULL, "Data parameter is NULL"); + Setting_GenGroupItem_Data *list_item = + (Setting_GenGroupItem_Data *) data; + list_item->chk_status = elm_check_state_get(obj); /* for update new state */ + SETTING_TRACE("process item [%s], status:%d", _(list_item->keyStr), + list_item->chk_status); + + __alternate_sbeam_mode(obj); + SETTING_TRACE_END; +} /** * store current selection in setting.cfg