diff options
author | MyoungJune Park <mj2004.park@samsung.com> | 2017-09-26 10:46:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2017-09-26 10:46:04 +0000 |
commit | 3fb1d0092f877377ce6d5a278f2da2c30a732424 (patch) | |
tree | 830369934771e13511f58f5170ee0ed37a8dfb02 | |
parent | 71554c143e78cdf8221ee51cbfa89b8b5cd5dfc9 (diff) | |
parent | 5687931fd9c7cc7f7fd7a53d46565104c5e2d845 (diff) | |
download | watch-setting-3fb1d0092f877377ce6d5a278f2da2c30a732424.tar.gz watch-setting-3fb1d0092f877377ce6d5a278f2da2c30a732424.tar.bz2 watch-setting-3fb1d0092f877377ce6d5a278f2da2c30a732424.zip |
Merge "Fix Watch always on bug." into tizensubmit/tizen_4.0/20170926.105200submit/tizen/20170926.104950accepted/tizen/unified/20170927.063305
-rw-r--r-- | include/setting-motion.h | 2 | ||||
-rw-r--r-- | include/setting-notification.h | 2 | ||||
-rw-r--r-- | include/setting-safety.h | 2 | ||||
-rw-r--r-- | src/setting-battery.c | 6 | ||||
-rw-r--r-- | src/setting-clock.c | 89 | ||||
-rw-r--r-- | src/setting-connection.c | 14 | ||||
-rw-r--r-- | src/setting-device.c | 20 | ||||
-rw-r--r-- | src/setting-display.c | 30 | ||||
-rw-r--r-- | src/setting-homescreen.c | 50 | ||||
-rw-r--r-- | src/setting-info.c | 14 | ||||
-rw-r--r-- | src/setting-motion.c | 15 | ||||
-rw-r--r-- | src/setting-notification.c | 4 | ||||
-rw-r--r-- | src/setting-safety.c | 14 | ||||
-rw-r--r-- | src/setting-sound.c | 60 | ||||
-rw-r--r-- | src/setting-vibration.c | 16 |
15 files changed, 169 insertions, 169 deletions
diff --git a/include/setting-motion.h b/include/setting-motion.h index 5aa59f9..8093d08 100644 --- a/include/setting-motion.h +++ b/include/setting-motion.h @@ -51,8 +51,6 @@ typedef struct _motion_data { int is_enable_wake_up_gesture; int wake_up_gesture_type; - appdata *temp_ad; - Evas_Object *g_motion_genlist; } Motion_Data; diff --git a/include/setting-notification.h b/include/setting-notification.h index 6c7ef98..9590da6 100644 --- a/include/setting-notification.h +++ b/include/setting-notification.h @@ -34,7 +34,7 @@ typedef struct Noti_Item_Data { typedef struct _noti_data { int is_enable_noti; - appdata *temp_ad; + appdata *app_context; Evas_Object *g_noti_genlist; diff --git a/include/setting-safety.h b/include/setting-safety.h index 8367bbf..4d0a95d 100644 --- a/include/setting-safety.h +++ b/include/setting-safety.h @@ -53,7 +53,7 @@ typedef struct _safety_data { int interval_trauma; int interval_no_activity; - appdata *temp_ad; + appdata *app_context; Evas_Object *g_safety_genlist; Evas_Object *g_interval_genlist; diff --git a/src/setting-battery.c b/src/setting-battery.c index 5e9f582..c12ddf2 100644 --- a/src/setting-battery.c +++ b/src/setting-battery.c @@ -73,7 +73,7 @@ static char *power_saving_str[] = { "IDS_EMAIL_BODY_ENABLED_M_STATUS" }; -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; static Ecore_Timer *pws_timer = NULL; static Evas_Object *g_pws_check = NULL; static Elm_Object_Item *pws_it = NULL; @@ -84,7 +84,7 @@ static Eina_Bool _delete_timer(void *data) { DBG("_delete_timer"); pws_timer = NULL; - _power_saving_terminate_app(temp_ad); + _power_saving_terminate_app(g_app_context); return ECORE_CALLBACK_CANCEL; } @@ -591,7 +591,7 @@ Evas_Object *_create_battery_list(void *data) struct _battery_menu_item *menu_list = NULL; int idx = 0; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = NULL; diff --git a/src/setting-clock.c b/src/setting-clock.c index e221ead..9ffe46d 100644 --- a/src/setting-clock.c +++ b/src/setting-clock.c @@ -194,7 +194,7 @@ static i18n_ucollator_h coll = NULL; static int clock_idx = 0; static int is_alert_mode_type = 0; -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; int is_running_clock; static Evas_Object *g_noti_check = NULL; @@ -569,7 +569,7 @@ void _clear_clock_cb(void *data , Evas *e, Evas_Object *obj, void *event_info) g_clock_box = NULL; g_clock_scroller = NULL; - temp_ad = NULL; + g_app_context = NULL; is_alert_mode_type = 0; #if 0 @@ -656,15 +656,15 @@ static void _mouse_up_cb(void *data, Evas *evas, Evas_Object *obj, void *event_i /* set gb vconf */ if (_set_clock_type(appid)) { - if (temp_ad != NULL) { - elm_naviframe_item_pop(temp_ad->nf); + if (g_app_context != NULL) { + elm_naviframe_item_pop(g_app_context->nf); back_button_cb_pop(); } /* automatic freed!! */ - struct _toast_data *toast = _create_toast(temp_ad, _("IDS_ST_TPOP_CLOCK_CHANGED")); + struct _toast_data *toast = _create_toast(g_app_context, _("IDS_ST_TPOP_CLOCK_CHANGED")); if (toast) { - _show_toast(temp_ad, toast); + _show_toast(g_app_context, toast); } if (g_clock_genlist) { @@ -709,8 +709,8 @@ static Evas_Object *_create_index(Evas_Object *parent, void *data) { Evas_Object *layout, *scroller, *box, *page_layout; - temp_ad = (appdata *)data; - if (temp_ad == NULL) + g_app_context = (appdata *)data; + if (g_app_context == NULL) return NULL; if (parent == NULL) @@ -746,7 +746,7 @@ static Evas_Object *_create_index(Evas_Object *parent, void *data) g_clock_scroller = scroller; Evas_Object *circle_scroller = NULL; - circle_scroller = eext_circle_object_scroller_add(scroller, temp_ad->circle_surface); + circle_scroller = eext_circle_object_scroller_add(scroller, g_app_context->circle_surface); if (circle_scroller == NULL) return NULL; eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); @@ -880,8 +880,8 @@ static void _bg_mouse_up_cb(void *data, Evas *evas, Evas_Object *obj, void *even vconf_set_str(VCONFKEY_BGSET, img_path); /* set gb vconf */ - if (temp_ad != NULL) { - elm_naviframe_item_pop(temp_ad->nf); + if (g_app_context != NULL) { + elm_naviframe_item_pop(g_app_context->nf); back_button_cb_pop(); } } @@ -936,8 +936,8 @@ static Evas_Object *_create_background_index(Evas_Object *parent, void *data) { Evas_Object *layout, *scroller, *box, *page_layout; - temp_ad = (appdata *)data; - if (temp_ad == NULL) + g_app_context = (appdata *)data; + if (g_app_context == NULL) return NULL; if (parent == NULL) @@ -967,7 +967,7 @@ static Evas_Object *_create_background_index(Evas_Object *parent, void *data) evas_object_show(scroller); Evas_Object *circle_scroller = NULL; - circle_scroller = eext_circle_object_scroller_add(scroller, temp_ad->circle_surface); + circle_scroller = eext_circle_object_scroller_add(scroller, g_app_context->circle_surface); if (circle_scroller == NULL) return NULL; eext_circle_object_scroller_policy_set(circle_scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF); @@ -1174,7 +1174,7 @@ Evas_Object *_clock_type_cb(void *data) if (ad == NULL) return NULL; - temp_ad = ad; + g_app_context = ad; layout_inner = _create_index(ad->nf, ad); @@ -1414,6 +1414,9 @@ Evas_Object *_create_clock_list(void *data) DBG("%s", "_create_clock_list - appdata is null"); return NULL; } + + g_app_context = ad; + Evas_Object *genlist = NULL; struct _clock_menu_item *menu_its = NULL; int idx = 0; @@ -2022,10 +2025,10 @@ char *_get_time_str() // // is_alert_mode_type = (uintptr_t)data; // -// elm_naviframe_item_pop(temp_ad->nf); -// if (!temp_ad->alert_rdg) { -// evas_object_del(temp_ad->alert_rdg); -// temp_ad->alert_rdg = NULL; +// elm_naviframe_item_pop(g_app_context->nf); +// if (!g_app_context->alert_rdg) { +// evas_object_del(g_app_context->alert_rdg); +// g_app_context->alert_rdg = NULL; // } // //#if 0 @@ -2036,7 +2039,7 @@ char *_get_time_str() // elm_genlist_realized_items_update(g_clock_genlist); // } // -// temp_ad = NULL; +// g_app_context = NULL; //} // //void _show_hourly_alert_list(void *data) @@ -2049,7 +2052,7 @@ char *_get_time_str() // Evas_Object *genlist = NULL; // Elm_Object_Item *nf_it = NULL; // -// temp_ad = ad; +// g_app_context = ad; // // Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); // itc->item_style = "1text.1icon.1"; @@ -2229,7 +2232,7 @@ static void _clock_bg_cb(void *data, Evas_Object *obj, void *event_info) return; } - temp_ad = ad; + g_app_context = ad; layout = _create_background_index(ad->nf, ad); if (layout == NULL) { DBG("%s", "clock cb - layout is null"); @@ -2400,7 +2403,7 @@ static void _show_noti_indicator_list(void *data) Elm_Object_Item *nf_it = NULL; int idx; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc[2]; itc[0] = elm_genlist_item_class_new(); itc[0]->item_style = "1text.1icon.1"; @@ -2485,12 +2488,10 @@ static Evas_Object *_gl_clock_watch_always_check_get(void *data, Evas_Object *ob if (!strcmp(part, "elm.icon")) { check = elm_check_add(obj); - int timeout = -1; - vconf_get_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, &timeout); - if (timeout) - vconf_set_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_BACKUP_FOR_WATCH_ALWAYS_ON, timeout); + int var = -1; + vconf_get_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL, &var); - elm_check_state_set(check, (timeout == 0) ? EINA_TRUE : EINA_FALSE); + elm_check_state_set(check, (var == 1) ? EINA_TRUE : EINA_FALSE); elm_object_style_set(check, "on&off"); /* evas_object_smart_callback_add(check, "changed", _clock_watch_always_check_cb, (void *)check); */ @@ -2515,7 +2516,7 @@ static Evas_Object *_gl_clock_watch_always_check_get(void *data, Evas_Object *ob static void _set_watch_always_on_cancel_cb(void *data, Evas_Object *obj, void *event_info) { int val = 0; - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; vconf_set_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL, val); @@ -2533,7 +2534,7 @@ static void _set_watch_always_on_cancel_cb(void *data, Evas_Object *obj, void *e static void _set_watch_always_on_ok_clicked_cb(void *data, Evas_Object *obj, void *event_info) { int val = 1; - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; vconf_set_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL, val); @@ -2549,7 +2550,7 @@ static void _set_watch_always_on_ok_clicked_cb(void *data, Evas_Object *obj, voi void back_key_watch_always_popup_cb(void *data, Evas_Object *obj, void *event_info) { - appdata *ad = (appdata *)temp_ad; + appdata *ad = (appdata *)g_app_context; if (ad && ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; @@ -2559,7 +2560,7 @@ void back_key_watch_always_popup_cb(void *data, Evas_Object *obj, void *event_in static void _clock_watch_always_check_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; int ambient_mode = 0; @@ -2922,7 +2923,7 @@ static void _font_style_gl_cb(void *data, Evas_Object *obj, void *event_info) elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE); Font_Style_Item_Data *id = (Font_Style_Item_Data *)data; - /*elm_radio_value_set(temp_ad->font_style_rdg, id->index); */ + /*elm_radio_value_set(g_app_context->font_style_rdg, id->index); */ if (id->font_name) { @@ -2936,9 +2937,9 @@ static void _font_style_gl_cb(void *data, Evas_Object *obj, void *event_info) elm_genlist_item_update(font_style_item); } - if (!temp_ad->font_style_rdg) { - evas_object_del(temp_ad->font_style_rdg); - temp_ad->font_style_rdg = NULL; + if (!g_app_context->font_style_rdg) { + evas_object_del(g_app_context->font_style_rdg); + g_app_context->font_style_rdg = NULL; } if (font_name) { @@ -2949,7 +2950,7 @@ static void _font_style_gl_cb(void *data, Evas_Object *obj, void *event_info) } g_font_style_genlist = NULL; - back_key_generic_cb(temp_ad, obj, event_info); + back_key_generic_cb(g_app_context, obj, event_info); } static void _font_size_gl_cb(void *data, Evas_Object *obj, void *event_info) @@ -2972,9 +2973,9 @@ static void _font_size_gl_cb(void *data, Evas_Object *obj, void *event_info) /*elm_genlist_realized_items_update(g_font_size_genlist); */ - if (!temp_ad->font_size_rdg) { - evas_object_del(temp_ad->font_size_rdg); - temp_ad->font_size_rdg = NULL; + if (!g_app_context->font_size_rdg) { + evas_object_del(g_app_context->font_size_rdg); + g_app_context->font_size_rdg = NULL; } if (old_font_size != font_size_index) { @@ -2986,7 +2987,7 @@ static void _font_size_gl_cb(void *data, Evas_Object *obj, void *event_info) } } - back_key_generic_cb(temp_ad, obj, event_info); + back_key_generic_cb(g_app_context, obj, event_info); } void _show_font_list(void *data) @@ -3001,7 +3002,7 @@ void _show_font_list(void *data) Elm_Object_Item *nf_it = NULL; int idx; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "2text"; @@ -3225,7 +3226,7 @@ int _show_font_style_list(void *data) int idx = 0, matched_idx = 0; int ret = 0; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text.1icon.1"; @@ -3464,7 +3465,7 @@ void _show_font_size_list(void *data) Elm_Object_Item *nf_it = NULL; int idx; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text.1icon.1"; diff --git a/src/setting-connection.c b/src/setting-connection.c index 049f36f..96c2108 100644 --- a/src/setting-connection.c +++ b/src/setting-connection.c @@ -59,7 +59,7 @@ static int CONNECT_TOP_MENU_SIZE = sizeof(connection_menu_its) / sizeof(connection_menu_its[0]); -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; static bool running_connection = false; static Ecore_Timer *running_timer = NULL; @@ -91,7 +91,7 @@ void _clear_connection_resource() g_WIFI_item = NULL; g_NFC_item = NULL; - temp_ad = NULL; + g_app_context = NULL; unregister_vconf_changing(VCONFKEY_BT_STATUS, bt_status_vconf_changed_cb); unregister_vconf_changing(VCONFKEY_WIFI_STATE, wifi_status_vconf_changed_cb); @@ -111,7 +111,7 @@ void _bt_alerts_chk_changed_cb(void *data, Evas *e, Evas_Object *obj, void *even static void _set_flight_mode_cancel_cb(void *data, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; int is_flight_mode = 0; @@ -128,7 +128,7 @@ static void _set_flight_mode_cancel_cb(void *data, Evas_Object *obj, void *event static void _set_flight_mode_ok_clicked_cb(void *data, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; int is_flight_mode = 1; @@ -149,7 +149,7 @@ void back_key_flight_mode_popup_cb(void *data, Evas_Object *obj, void *event_inf vconf_set_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, is_flight_mode); elm_check_state_set(check, EINA_FALSE); - appdata *ad = (appdata *)temp_ad; + appdata *ad = (appdata *)g_app_context; if (ad && ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; @@ -159,7 +159,7 @@ void back_key_flight_mode_popup_cb(void *data, Evas_Object *obj, void *event_inf static void _flight_mode_check_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; int is_flight_mode = 0; @@ -475,7 +475,7 @@ Evas_Object *_create_connection_list(void *data) return NULL; } - temp_ad = ad; + g_app_context = ad; Evas_Object *genlist = NULL; struct _connection_menu_item *menu_its = NULL; diff --git a/src/setting-device.c b/src/setting-device.c index d57f75a..e1538a6 100644 --- a/src/setting-device.c +++ b/src/setting-device.c @@ -65,7 +65,7 @@ Evas_Object *g_device_action_genlist = NULL; Evas_Object *g_double_press_home_key_genlist = NULL; static Elm_Object_Item *lang_item = NULL; -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; static int device_action_type = 0; /* device_action type */ @@ -130,7 +130,7 @@ static int _get_selected_app() static void _set_auto_open_apps_cancel_cb(void *data, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; bool is_auto_open = 0; vconf_set_bool(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, is_auto_open); @@ -146,7 +146,7 @@ static void _set_auto_open_apps_cancel_cb(void *data, Evas_Object *obj, void *ev static void _set_auto_open_apps_ok_clicked_cb(void *data, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; bool is_auto_open = 1; vconf_set_bool(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, is_auto_open); @@ -167,7 +167,7 @@ void back_key_auto_open_app_popup_cb(void *data, Evas_Object *obj, void *event_i vconf_set_bool(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, is_auto_open); elm_check_state_set(check, EINA_FALSE); - appdata *ad = (appdata *)temp_ad; + appdata *ad = (appdata *)g_app_context; if (ad && ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; @@ -177,7 +177,7 @@ void back_key_auto_open_app_popup_cb(void *data, Evas_Object *obj, void *event_i static void _auto_open_apps_check_changed_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; if (ad == NULL) { @@ -265,7 +265,7 @@ void _clear_device_action_resource() _haptic_close(); - temp_ad = NULL; + g_app_context = NULL; device_action_type = 0; unregister_vconf_changing(VCONFKEY_WMS_WMANAGER_CONNECTED, change_language_enabling); @@ -470,7 +470,7 @@ Evas_Object *_create_device_action_list(void *data) return NULL; } - temp_ad = ad; + g_app_context = ad; Evas_Object *genlist = NULL; @@ -578,7 +578,7 @@ static void _double_press_home_key_set_radio_cb(void *data, Evas_Object *obj, vo int val = 0; - appdata *ad = temp_ad; + appdata *ad = g_app_context; int index = (uintptr_t)data; if (!ad) { @@ -828,8 +828,8 @@ void _update_menu_text_when_device_lang_changed() elm_genlist_realized_items_update(g_device_action_genlist); } - if (temp_ad && temp_ad->main_genlist) { - elm_genlist_realized_items_update(temp_ad->main_genlist); + if (g_app_context && g_app_context->main_genlist) { + elm_genlist_realized_items_update(g_app_context->main_genlist); } } diff --git a/src/setting-display.c b/src/setting-display.c index d099f21..56f78b1 100644 --- a/src/setting-display.c +++ b/src/setting-display.c @@ -76,7 +76,7 @@ static char *rotate_screen_str[] = { "IDS_COM_BODY_DEFAULT", "IDS_COM_OPT_ROTATE_CW", "IDS_COM_OPT_ROTATE_CCW", "IDS_ST_SBODY_180_DEGREE" }; -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; static Evas_Object *g_display_genlist = NULL; static Evas_Object *g_screen_time_genlist = NULL; static Evas_Object *g_rotate_screen_genlist = NULL; @@ -184,14 +184,14 @@ void _update_menu_text_when_lang_changed() elm_genlist_realized_items_update(g_display_genlist); } - if (temp_ad && temp_ad->main_genlist) { - elm_genlist_realized_items_update(temp_ad->main_genlist); + if (g_app_context && g_app_context->main_genlist) { + elm_genlist_realized_items_update(g_app_context->main_genlist); } } void _clear_display_cb(void *data, Evas *e, Elm_Object_Item *it, void *event_info) { - temp_ad = NULL; + g_app_context = NULL; g_screen_time_genlist = NULL; g_rotate_screen_genlist = NULL; g_screen_time_item = NULL; @@ -385,7 +385,7 @@ Evas_Object *_create_display_list(void *data) struct _display_menu_item *menu_its = NULL; int idx = 0; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text"; @@ -526,11 +526,11 @@ static void _screen_timeout_gl_cb(void *data, Evas_Object *obj, void *event_info elm_genlist_realized_items_update(g_screen_time_genlist); - elm_naviframe_item_pop(temp_ad->nf); + elm_naviframe_item_pop(g_app_context->nf); back_button_cb_pop(); - if (!temp_ad->screen_timeout_rdg) { - evas_object_del(temp_ad->screen_timeout_rdg); - temp_ad->screen_timeout_rdg = NULL; + if (!g_app_context->screen_timeout_rdg) { + evas_object_del(g_app_context->screen_timeout_rdg); + g_app_context->screen_timeout_rdg = NULL; } } @@ -589,7 +589,7 @@ void _show_screen_timeout_list(void *data) Elm_Object_Item *nf_it = NULL; int idx; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text.1icon.1"; @@ -746,10 +746,10 @@ static void _rotate_screen_gl_cb(void *data, Evas_Object *obj, void *event_info) elm_genlist_realized_items_update(g_rotate_screen_genlist); - elm_naviframe_item_pop(temp_ad->nf); - if (!temp_ad->rotate_screen_rdg) { - evas_object_del(temp_ad->rotate_screen_rdg); - temp_ad->rotate_screen_rdg = NULL; + elm_naviframe_item_pop(g_app_context->nf); + if (!g_app_context->rotate_screen_rdg) { + evas_object_del(g_app_context->rotate_screen_rdg); + g_app_context->rotate_screen_rdg = NULL; } } @@ -764,7 +764,7 @@ void _show_rotate_screen_list(void *data) Elm_Object_Item *nf_it = NULL; int idx; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text.1icon.1"; diff --git a/src/setting-homescreen.c b/src/setting-homescreen.c index bc371de..686450a 100644 --- a/src/setting-homescreen.c +++ b/src/setting-homescreen.c @@ -80,7 +80,7 @@ static void _show_edit_apps(void *data); static void _wallpaper_vconf_color_changed_cb(keynode_t *node, void *data); static void _wallpaper_vconf_wallpaper_changed_cb(keynode_t *node, void *data); -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; static Evas_Object *g_home_bg_genlist = NULL; static int touch_mode = NONE; static int gallery_img_cnt = 0; @@ -173,13 +173,13 @@ void _clear_homescreen_cb(void *data , Evas *e, Evas_Object *obj, void *event_in if (is_prev_update) { Evas_Object *layout = NULL; Elm_Object_Item *nf_it = NULL; - layout = create_wallpaper_list(temp_ad); - elm_naviframe_item_pop(temp_ad->nf); - nf_it = elm_naviframe_item_push(temp_ad->nf, NULL, NULL, NULL, layout, NULL); + layout = create_wallpaper_list(g_app_context); + elm_naviframe_item_pop(g_app_context->nf); + nf_it = elm_naviframe_item_push(g_app_context->nf, NULL, NULL, NULL, layout, NULL); elm_naviframe_item_title_enabled_set(nf_it, EINA_FALSE, EINA_FALSE); is_prev_update = 0; } else { - temp_ad = NULL; + g_app_context = NULL; touch_mode = NONE; } int ret; @@ -279,7 +279,7 @@ Evas_Object *_create_homescreen_list(void *data) struct _homescreen_menu_item *menu_its = NULL; int idx = 0; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text"; @@ -380,10 +380,10 @@ static void _viewtype_gl_cb(void *data, Evas_Object *obj, void *event_info) vconf_set_int(VCONFKEY_SETAPPL_HOMESCREEN_TYPE_INT, idx); /*elm_genlist_realized_items_update(g_screen_time_genlist); */ - elm_naviframe_item_pop(temp_ad->nf); - if (!temp_ad->homescreen_rdg) { - evas_object_del(temp_ad->homescreen_rdg); - temp_ad->homescreen_rdg = NULL; + elm_naviframe_item_pop(g_app_context->nf); + if (!g_app_context->homescreen_rdg) { + evas_object_del(g_app_context->homescreen_rdg); + g_app_context->homescreen_rdg = NULL; } } @@ -400,7 +400,7 @@ void _show_viewtype_list(void *data) int idx; int value = 0; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text.1icon.1"; @@ -471,7 +471,7 @@ static void _show_homebg_list(void *data) struct _homebg_menu_item *menu_its = NULL; int idx; - temp_ad = ad; + g_app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text"; @@ -599,14 +599,14 @@ static void _mouse_up_cb(void *data, Evas *evas, Evas_Object *obj, void *event_i feedback_play(FEEDBACK_PATTERN_TAP); /* set gb vconf */ if (_set_bg_color_type(type)) { - if (temp_ad != NULL) { - elm_naviframe_item_pop(temp_ad->nf); + if (g_app_context != NULL) { + elm_naviframe_item_pop(g_app_context->nf); } /* automatic freed!! */ - struct _toast_data *toast = _create_toast(temp_ad, REPL(_("IDS_GALLERY_TPOP_HOME_BACKGROUND_SET"), "\n", "<br>")); + struct _toast_data *toast = _create_toast(g_app_context, REPL(_("IDS_GALLERY_TPOP_HOME_BACKGROUND_SET"), "\n", "<br>")); if (toast) { - _show_toast(temp_ad, toast); + _show_toast(g_app_context, toast); } } else { DBG("Setting - BG type is wrong!!"); @@ -650,11 +650,11 @@ static void _mouse_up_wallpaper_cb(void *data, Evas *evas, Evas_Object *obj, voi /* set gb vconf */ if (idx == 0) { feedback_play(FEEDBACK_PATTERN_TAP); - _show_bg_slide_cb(temp_ad, obj, event_info); + _show_bg_slide_cb(g_app_context, obj, event_info); return; } else if (idx == 1) { feedback_play(FEEDBACK_PATTERN_TAP); - _gallery_gl_cb(temp_ad, obj, event_info); + _gallery_gl_cb(g_app_context, obj, event_info); running_gallery = true; elm_object_scroll_freeze_push(obj); return; @@ -663,14 +663,14 @@ static void _mouse_up_wallpaper_cb(void *data, Evas *evas, Evas_Object *obj, voi if (_set_wallpaper_path(idx)) { feedback_play(FEEDBACK_PATTERN_TAP); wallpaper_touched = true; - if (temp_ad != NULL) { - elm_naviframe_item_pop(temp_ad->nf); + if (g_app_context != NULL) { + elm_naviframe_item_pop(g_app_context->nf); } /* automatic freed!! */ - struct _toast_data *toast = _create_toast(temp_ad, REPL(_("IDS_GALLERY_TPOP_HOME_BACKGROUND_SET"), "\n", "<br>")); + struct _toast_data *toast = _create_toast(g_app_context, REPL(_("IDS_GALLERY_TPOP_HOME_BACKGROUND_SET"), "\n", "<br>")); if (toast) { - _show_toast(temp_ad, toast); + _show_toast(g_app_context, toast); } } else { @@ -1225,7 +1225,7 @@ void _wallpaper_gl_cb(void *data, Evas_Object *obj, void *event_info) if (ad == NULL) return; - temp_ad = ad; + g_app_context = ad; layout_inner = _create_wallpaper_thumbnail(ad->nf); it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, layout_inner, NULL); @@ -1242,7 +1242,7 @@ Evas_Object *create_wallpaper_list(void *data) if (ad == NULL) return NULL; - temp_ad = ad; + g_app_context = ad; int ret; ret = feedback_initialize(); @@ -1313,7 +1313,7 @@ void _show_bg_slide_cb(void *data, Evas_Object *obj, void *event_info) if (ad == NULL) return; - temp_ad = ad; + g_app_context = ad; layout_inner = _create_index(ad->nf); it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, layout_inner, NULL); diff --git a/src/setting-info.c b/src/setting-info.c index da21f2d..d89ad62 100644 --- a/src/setting-info.c +++ b/src/setting-info.c @@ -64,7 +64,7 @@ static Evas_Object *g_about_genlist = NULL; static Evas_Object *g_developer_option_genlist = NULL; static int is_enable_usb_debug = 0; static int kor = 0; -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; enum { GEAR_INFO_TITLE_GEAR_INFO, @@ -233,7 +233,7 @@ void back_key_usb_debug_popup_cb(void *data, Evas_Object *obj, void *event_info) set_enable_USB_debugging(0); elm_check_state_set(check, EINA_FALSE); - appdata *ad = (appdata *)temp_ad; + appdata *ad = (appdata *)g_app_context; if (ad && ad->popup) { evas_object_del(ad->popup); ad->popup = NULL; @@ -243,7 +243,7 @@ void back_key_usb_debug_popup_cb(void *data, Evas_Object *obj, void *event_info) void _usb_debug_chk_changed_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; if (ad == NULL) { @@ -371,7 +371,7 @@ Evas_Object *_create_info_list(void *data) return NULL; } - temp_ad = ad; + g_app_context = ad; Evas_Object *genlist = NULL; struct _info_menu_item *menu_its = NULL; @@ -792,7 +792,7 @@ void _gl_info_cb(void *data, Evas_Object *obj, void *event_info) static void _usb_debug_cancel_cb(void *data, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; set_enable_USB_debugging(0); @@ -807,7 +807,7 @@ static void _usb_debug_cancel_cb(void *data, Evas_Object *obj, void *event_info) static void _usb_debug_ok_cb(void *data, Evas_Object *obj, void *event_info) { - appdata *ad = temp_ad; + appdata *ad = g_app_context; Evas_Object *check = (Evas_Object *)data; set_enable_USB_debugging(1); @@ -945,7 +945,7 @@ Evas_Object *_create_developer_option_list(void *data) struct _info_menu_item *menu_its = NULL; int idx = 0; - temp_ad = ad; + g_app_context = ad; elm_theme_extension_add(NULL, EDJE_PATH); Elm_Genlist_Item_Class *itc_OPR = elm_genlist_item_class_new(); diff --git a/src/setting-motion.c b/src/setting-motion.c index c39adf0..52d6065 100644 --- a/src/setting-motion.c +++ b/src/setting-motion.c @@ -18,6 +18,7 @@ /*#include <capability_manager.h> */ #include "setting-motion.h" +static appdata *g_app_context = NULL; static struct _motion_menu_item motion_menu_its[] = { { "IDS_WMGR_MBODY_SMART_RELAY", 0, _motion_gl_smart_relay_cb }, @@ -41,7 +42,7 @@ static void init_motion_value() motion_data.is_enable_wake_up_gesture = 0; motion_data.wake_up_gesture_type = SETTING_WAKE_UP_GESTURE_LAST_VIEWED_SCREEN; - motion_data.temp_ad = NULL; + g_app_context = NULL; motion_data.g_motion_genlist = NULL; is_called_myself = 0; } @@ -77,7 +78,7 @@ void motion_vconf_changed_cb(keynode_t *key, void *data) if (motion_data.g_motion_genlist) { /*elm_genlist_realized_items_update(motion_data.g_motion_genlist); */ - elm_radio_value_set(motion_data.temp_ad->wake_up_guesture_rdg, motion_data.wake_up_gesture_type); + elm_radio_value_set(g_app_context->wake_up_guesture_rdg, motion_data.wake_up_gesture_type); } } @@ -125,10 +126,10 @@ void _motion_gl_wake_up_guesture_radio_cb(void *data, Evas_Object *obj, void *ev elm_genlist_item_update(it); - elm_naviframe_item_pop(motion_data.temp_ad->nf); - if (motion_data.temp_ad && motion_data.temp_ad->wake_up_guesture_rdg) { - evas_object_del(motion_data.temp_ad->wake_up_guesture_rdg); - motion_data.temp_ad->wake_up_guesture_rdg = NULL; + elm_naviframe_item_pop(g_app_context->nf); + if (g_app_context && g_app_context->wake_up_guesture_rdg) { + evas_object_del(g_app_context->wake_up_guesture_rdg); + g_app_context->wake_up_guesture_rdg = NULL; } if (motion_data.g_motion_genlist) { @@ -240,7 +241,7 @@ void _show_wake_up_guesture_list(void *data) elm_genlist_item_class_free(itc); - motion_data.temp_ad = ad; + g_app_context = ad; elm_object_part_content_set(layout, "elm.genlist", genlist); diff --git a/src/setting-notification.c b/src/setting-notification.c index ce388a1..353b772 100644 --- a/src/setting-notification.c +++ b/src/setting-notification.c @@ -23,7 +23,7 @@ void _initialize_noti() g_noti_data.g_noti_genlist = NULL; g_noti_data.is_enable_noti = 0; - g_noti_data.temp_ad = NULL; + g_noti_data.app_context = NULL; register_vconf_changing(VCONF_WMS_NOTIFICATION_KEY, noti_enabling_vconf_changed_cb, NULL); } @@ -61,7 +61,7 @@ Eina_Bool _clear_noti_cb(void *data, Elm_Object_Item *it) g_noti_data.g_noti_genlist = NULL; g_noti_data.is_enable_noti = 0; - g_noti_data.temp_ad = NULL; + g_noti_data.app_context = NULL; unregister_vconf_changing(VCONF_WMS_NOTIFICATION_KEY, noti_enabling_vconf_changed_cb); diff --git a/src/setting-safety.c b/src/setting-safety.c index 0bb9510..1f1df26 100644 --- a/src/setting-safety.c +++ b/src/setting-safety.c @@ -77,7 +77,7 @@ void initialize_safety() DBG("initialize safety"); safety_data.g_safety_genlist = NULL; - safety_data.temp_ad = NULL; + safety_data.app_context = NULL; safety_data.interval_no_activity = 0; safety_data.interval_trauma = 0; @@ -495,8 +495,8 @@ static void _trauma_interval_radio_cb(void *data, Evas_Object *obj, void *event_ DBG("selected trauma interval : %d", (int *)data); - if (safety_data.temp_ad) { - elm_naviframe_item_pop(safety_data.temp_ad->nf); + if (safety_data.app_context) { + elm_naviframe_item_pop(safety_data.app_context->nf); } } @@ -513,7 +513,7 @@ static void _show_interval_trauma_list(void *data) Elm_Object_Item *nf_it = NULL; int idx; - safety_data.temp_ad = ad; + safety_data.app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text.1icon.1"; @@ -591,8 +591,8 @@ static void _no_activity_interval_radio_cb(void *data, Evas_Object *obj, void *e DBG("selected no activity interval : %d", (int *)data); - if (safety_data.temp_ad) { - elm_naviframe_item_pop(safety_data.temp_ad->nf); + if (safety_data.app_context) { + elm_naviframe_item_pop(safety_data.app_context->nf); } } @@ -609,7 +609,7 @@ static void _show_interval_no_activity_list(void *data) Elm_Object_Item *nf_it = NULL; int idx; - safety_data.temp_ad = ad; + safety_data.app_context = ad; Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); itc->item_style = "1text.1icon.1"; diff --git a/src/setting-sound.c b/src/setting-sound.c index e0695b9..567d930 100644 --- a/src/setting-sound.c +++ b/src/setting-sound.c @@ -57,7 +57,7 @@ static char ringtone_name_arr[RINGTONE_MAX_COUNT][1025]; static char notification_arr[RINGTONE_MAX_COUNT][1025]; static char notification_name_arr[RINGTONE_MAX_COUNT][1025]; -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; static Evas_Object *g_sound_genlist = NULL; static Evas_Object *g_sound_mode_genlist = NULL; static Evas_Object *g_ringtone_type_genlist = NULL; @@ -159,7 +159,7 @@ void _clear_sound_resource() _haptic_close(); - temp_ad = NULL; + g_app_context = NULL; g_sound_genlist = NULL; g_sound_mode_genlist = NULL; g_ringtone_type_genlist = NULL; @@ -497,7 +497,7 @@ void _sound_chk_changed_cb(void *data, Evas_Object *obj, void *event_info) { DBG("Setting - _sound_chk_changed_cb() is called!!"); - appdata *ad = temp_ad; + appdata *ad = g_app_context; if (ad == NULL) { DBG("%s", "_create_sound_list - appdata is null"); return; @@ -525,7 +525,7 @@ Evas_Object *_gl_sound_check_get(void *data, Evas_Object *obj, const char *part) Sound_Item_Data *id = data; int index = id->index; - appdata *ad = temp_ad; + appdata *ad = g_app_context; if (ad == NULL) { DBG("%s", "_create_sound_list - appdata is null"); return NULL; @@ -564,7 +564,7 @@ Evas_Object *_create_sound_list(void *data) return NULL; } - temp_ad = ad; + g_app_context = ad; Evas_Object *genlist = NULL; struct _sound_menu_item *menu_its = NULL; @@ -786,10 +786,10 @@ static void _sound_mode_gl_cb(void *data, Evas_Object *obj, void *event_info) break; } - back_key_generic_cb(temp_ad, obj, event_info); - if (!temp_ad->sound_mode_rdg) { - evas_object_del(temp_ad->sound_mode_rdg); - temp_ad->sound_mode_rdg = NULL; + back_key_generic_cb(g_app_context, obj, event_info); + if (!g_app_context->sound_mode_rdg) { + evas_object_del(g_app_context->sound_mode_rdg); + g_app_context->sound_mode_rdg = NULL; } if (g_sound_genlist) { @@ -943,12 +943,12 @@ static void _response_ringtone_ok_cb(void *data, Evas_Object *obj, void *event_i g_ringtone_type_genlist = NULL; } - if (temp_ad->ringtone_type_rdg != NULL) { - evas_object_del(temp_ad->ringtone_type_rdg); - temp_ad->ringtone_type_rdg = NULL; + if (g_app_context->ringtone_type_rdg != NULL) { + evas_object_del(g_app_context->ringtone_type_rdg); + g_app_context->ringtone_type_rdg = NULL; } - back_key_generic_cb(temp_ad, obj, event_info); + back_key_generic_cb(g_app_context, obj, event_info); if (g_sound_genlist != NULL) { elm_genlist_realized_items_update(g_sound_genlist); @@ -1178,9 +1178,9 @@ static void _response_notification_ok_cb(void *data, Evas_Object *obj, void *eve g_notification_type_genlist = NULL; } - if (temp_ad->notification_rdg != NULL) { - evas_object_del(temp_ad->notification_rdg); - temp_ad->notification_rdg = NULL; + if (g_app_context->notification_rdg != NULL) { + evas_object_del(g_app_context->notification_rdg); + g_app_context->notification_rdg = NULL; } confirmed_Notification_type = notification_type; @@ -1270,10 +1270,10 @@ static void _notification_gl_cb(void *data, Evas_Object *obj, void *event_info) sound_manager_get_volume(SOUND_TYPE_NOTIFICATION, &volume); if (volume == 0 || get_sound_mode() != SOUND_MODE_SOUND) { - if (temp_ad) { - struct _toast_data *toast = _create_toast(temp_ad, _("IDS_ST_TPOP_VOLUME_CURRENTLY_SET_TO_0")); + if (g_app_context) { + struct _toast_data *toast = _create_toast(g_app_context, _("IDS_ST_TPOP_VOLUME_CURRENTLY_SET_TO_0")); if (toast) { - _show_toast(temp_ad, toast); + _show_toast(g_app_context, toast); } } } else { @@ -1417,9 +1417,9 @@ static void _response_vibration_ok_cb(void *data, Evas_Object *obj, void *event_ g_vibration_type_genlist = NULL; } - if (temp_ad->vibration_rdg != NULL) { - evas_object_del(temp_ad->vibration_rdg); - temp_ad->vibration_rdg = NULL; + if (g_app_context->vibration_rdg != NULL) { + evas_object_del(g_app_context->vibration_rdg); + g_app_context->vibration_rdg = NULL; } appdata *ad = (appdata *)data; @@ -1696,11 +1696,11 @@ static void _pref_arm_gl_cb(void *data, Evas_Object *obj, void *event_info) elm_genlist_realized_items_update(g_pref_arm_type_genlist); - if (temp_ad) { - elm_naviframe_item_pop(temp_ad->nf); - if (!temp_ad->pref_arm_rdg) { - evas_object_del(temp_ad->pref_arm_rdg); - temp_ad->pref_arm_rdg = NULL; + if (g_app_context) { + elm_naviframe_item_pop(g_app_context->nf); + if (!g_app_context->pref_arm_rdg) { + evas_object_del(g_app_context->pref_arm_rdg); + g_app_context->pref_arm_rdg = NULL; } } /* save a perfered arm type */ @@ -1711,10 +1711,10 @@ static void _pref_arm_gl_cb(void *data, Evas_Object *obj, void *event_info) } /* show toast message */ - if (temp_ad) { - struct _toast_data *toast = _create_toast(temp_ad, _(pref_arm_toast_msg[pref_arm_type % 2])); + if (g_app_context) { + struct _toast_data *toast = _create_toast(g_app_context, _(pref_arm_toast_msg[pref_arm_type % 2])); if (toast) { - _show_toast(temp_ad, toast); + _show_toast(g_app_context, toast); } } } diff --git a/src/setting-vibration.c b/src/setting-vibration.c index bc8ca4f..e9776b5 100644 --- a/src/setting-vibration.c +++ b/src/setting-vibration.c @@ -48,7 +48,7 @@ char *vibration_power_str[] = { "IDS_ST_OPT_WEAK_M_INTENSITY", }; -static appdata *temp_ad = NULL; +static appdata *g_app_context = NULL; static Evas_Object *g_vibration_genlist = NULL; static Evas_Object *g_vibration_type_genlist = NULL; static Elm_Object_Item *g_vib_item = NULL; @@ -94,10 +94,10 @@ void _clear_vibration_resource(void *data, Evas_Object *obj, void *event_info) _haptic_close(); - back_key_generic_cb(temp_ad, obj, event_info); + back_key_generic_cb(g_app_context, obj, event_info); - temp_ad = NULL; + g_app_context = NULL; g_vibration_genlist = NULL; g_vibration_type_genlist = NULL; g_vib_item = NULL; @@ -224,7 +224,7 @@ Evas_Object *_create_vibration_list(void *data) return NULL; } - temp_ad = ad; + g_app_context = ad; Evas_Object *genlist = NULL; struct _sound_menu_item *menu_its = NULL; @@ -398,12 +398,12 @@ static void _vibration_gl_cb(void *data, Evas_Object *obj, void *event_info) g_vibration_type_genlist = NULL; } - if (temp_ad->vibration_rdg != NULL) { - evas_object_del(temp_ad->vibration_rdg); - temp_ad->vibration_rdg = NULL; + if (g_app_context->vibration_rdg != NULL) { + evas_object_del(g_app_context->vibration_rdg); + g_app_context->vibration_rdg = NULL; } - back_key_generic_cb(temp_ad, obj, event_info); + back_key_generic_cb(g_app_context, obj, event_info); if (g_vib_item != NULL) { elm_genlist_item_update(g_vib_item); |