- SETTING_TRACE_BEGIN;
-
- /* 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
-
+ 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", "");
+ }
+}