diff options
-rwxr-xr-x | src/ui.c | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -628,6 +628,12 @@ static void _destroy_previous_ugs(void *data) ad->language_ug = NULL; } break; + case _UI_CONNECTION: + if (ad->date_ug) { + ug_destroy(ad->date_ug); + ad->date_ug = NULL; + } + break; default: if (ad->date_ug) { ug_destroy(ad->date_ug); @@ -646,12 +652,13 @@ static void _destroy_previous_ugs(void *data) _DBG("%s,%d", __func__, __LINE__); - /* when last UG or SIM changed with fisrt UG, destroy the view */ + /* when last UG or SIM changed with fisrt UG, destroy the view if (((ad->sim_changed == 1) && (ad->ui_type == _UI_LANG)) || (ad->ui_type == _UI_TIME)) { _DBG("%s,%d", __func__, __LINE__); pwlock_destroy(ad); } + */ } static Evas_Object *_create_conformant(Evas_Object * parent) @@ -1236,9 +1243,9 @@ static void _ug_destroy_cb(ui_gadget_h ug, void *priv) ad->kill_ug = 0; return; } else { - ad->state = _ST_CONNECTION; + do_state_directly(_ST_CONNECTION, ad); + return; } - do_state(ad); } break; default: @@ -1282,6 +1289,7 @@ static void _ug_destroy_cb(ui_gadget_h ug, void *priv) } } } else { + _DBG("destroy ug in _ug_destroy_cb \n"); ug_destroy(ug); ug = NULL; } @@ -1554,10 +1562,12 @@ int show_connection(struct appdata *ad) { ad->state = _ST_TIME; else ad->state = _ST_FINISH; + do_state(ad); return 0; } ad->current_ug = ad->connection_ug; evas_object_show(ad->win); + _destroy_previous_ugs(ad); return 1; } @@ -1633,6 +1643,7 @@ int show_lang(struct appdata *ad) if (!ad->language_ug) { _DBG("Get phone ug failed."); ad->state = _ST_GREETING; + do_state(ad); return 0; } ad->current_ug = ad->language_ug; @@ -1666,10 +1677,10 @@ int show_nosim(struct appdata *ad) elm_toolbar_shrink_mode_set(controlbar, ELM_TOOLBAR_SHRINK_EXPAND); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); - elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL); + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL), EINA_TRUE); + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL), EINA_TRUE); + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL), EINA_TRUE); + elm_object_item_disabled_set(elm_toolbar_item_append(controlbar, NULL, NULL, NULL, NULL), EINA_TRUE); elm_toolbar_item_append(controlbar, IMAGEDIR"/A01-9_controlbar_icon_Skip.png", pwlock_get_string(IDS_IDLE_SK_SKIP), @@ -1727,6 +1738,7 @@ int show_time(struct appdata *ad) ad->state = _ST_GREETING; else ad->state = _ST_CONNECTION; + do_state(ad); return 0; } ad->current_ug = ad->date_ug; |