static void _create_content_manual(struct _priv *priv)
{
+ Evas_Object *btn_cancel, *btn_done;
struct _content_manual *content;
if (!priv) {
elm_object_disabled_set(priv->content_manual->address_gateway, EINA_TRUE);
elm_object_disabled_set(priv->content_manual->address_dns, EINA_TRUE);
+ /* Done and cancel button*/
+ btn_cancel = elm_button_add(content->layout_content_ip);
+ if (!btn_cancel) {
+ _ERR("Add button failed.");
+ _remove_content_manual(content, priv);
+ evas_object_del(priv->new_network_popup);
+ return;
+ }
+ elm_object_text_set(btn_cancel, "CANCEL");
+ elm_object_part_content_set(content->layout_content_ip, "part.cancel.btn", btn_cancel);
+
+
+ btn_done = elm_button_add(content->layout_content_dns);
+ if (!btn_done) {
+ _ERR("Add button failed.");
+ _remove_content_manual(content, priv);
+ evas_object_del(priv->new_network_popup);
+ return;
+ }
+ elm_object_text_set(btn_done, "DONE");
+ elm_object_part_content_set(content->layout_content_dns, "part.done.btn", btn_done);
+
+ priv->btn_cancel = btn_cancel;
+ priv->btn_done = btn_done;
+
+ evas_object_smart_callback_add(btn_cancel, "focused", _focused_cb, priv);
+ evas_object_smart_callback_add(btn_cancel, "unfocused", _unfocused_cb, priv);
+ evas_object_smart_callback_add(btn_done, "focused", _focused_cb, priv);
+ evas_object_smart_callback_add(btn_done, "unfocused", _unfocused_cb, priv);
+
+ inputmgr_add_callback(btn_cancel, EO_BTN_CANCEL, &_menu_btn_input_handler, priv);
+ inputmgr_add_callback(btn_done, EO_BTN_DONE, &_menu_btn_input_handler, priv);
+
+ elm_object_focus_next_object_set(btn_cancel, btn_cancel, ELM_FOCUS_LEFT);
+ elm_object_focus_next_object_set(btn_cancel, btn_cancel, ELM_FOCUS_DOWN);
+ elm_object_focus_next_object_set(btn_done, btn_done, ELM_FOCUS_RIGHT);
+ elm_object_focus_next_object_set(btn_done, btn_done, ELM_FOCUS_DOWN);
_draw_config_buttons(priv);
struct _priv *priv;
Evas_Object *base;
Evas_Object *popup;
- Evas_Object *btn_cancel, *btn_done;
layoutmgr *lmgr;
if (!win) {
return NULL;
}
- popup = utils_add_popup(win, STYLE_POPUP, STR_NEW_NETWORK, NULL);
+ popup = utils_add_popup(win, NULL, STR_NEW_NETWORK, NULL);
base = utils_add_layout(popup, GRP_VIEW_NEW_NETWORK, EINA_FALSE);
if (!base) {
return NULL;
}
- btn_cancel = elm_button_add(popup);
- if (!btn_cancel) {
- _ERR("Add button failed.");
- evas_object_del(popup);
- free(priv);
- return NULL;
- }
- elm_object_text_set(btn_cancel, "CANCEL");
- elm_object_part_content_set(popup, "button1", btn_cancel);
-
- btn_done = elm_button_add(popup);
- if (!btn_done) {
- _ERR("Add button failed.");
- evas_object_del(popup);
- free(priv);
- return NULL;
- }
- elm_object_text_set(btn_done, "DONE");
- elm_object_part_content_set(popup, "button2", btn_done);
-
elm_object_content_set(popup, base);
- priv->btn_cancel = btn_cancel;
- priv->btn_done = btn_done;
-
- evas_object_smart_callback_add(btn_cancel, "focused", _focused_cb, priv);
- evas_object_smart_callback_add(btn_cancel, "unfocused", _unfocused_cb, priv);
- evas_object_smart_callback_add(btn_done, "focused", _focused_cb, priv);
- evas_object_smart_callback_add(btn_done, "unfocused", _unfocused_cb, priv);
-
- inputmgr_add_callback(btn_cancel, EO_BTN_CANCEL, &_menu_btn_input_handler, priv);
- inputmgr_add_callback(btn_done, EO_BTN_DONE, &_menu_btn_input_handler, priv);
-
- elm_object_focus_next_object_set(btn_cancel, btn_cancel, ELM_FOCUS_LEFT);
- elm_object_focus_next_object_set(btn_cancel, btn_cancel, ELM_FOCUS_DOWN);
- elm_object_focus_next_object_set(btn_done, btn_done, ELM_FOCUS_RIGHT);
- elm_object_focus_next_object_set(btn_done, btn_done, ELM_FOCUS_DOWN);
-
lmgr = layoutmgr_create(base);
if (!lmgr) {
_ERR("Create layoutmgr failed.");