Evas_Object *btn = NULL;
Evas_Object *ly = NULL;
char buf[100];
+ int ug_type;
if (!strcmp(part, "elm.swallow.icon.0")) {
- ly = elm_layout_add(obj);
- elm_layout_file_set(ly, CUSTOM_EDITFIELD_PATH,
- "eap_dropdown_button");
- btn = elm_button_add(obj);
-
- if (eap_data->cert_alias == NULL) {
- g_snprintf(buf, sizeof(buf), "<align=left>%s</align>",
- sc(eap_data->str_pkg_name, I18N_TYPE_None));
- } else {
- g_snprintf(buf, sizeof(buf), "<align=left>%s</align>",
- eap_data->cert_alias);
+ ug_type = common_util_get_ug_type();
+ if (ug_type != UG_VIEW_OOBE) {
+ ly = elm_layout_add(obj);
+ elm_layout_file_set(ly, CUSTOM_EDITFIELD_PATH,
+ "eap_dropdown_button");
}
+ btn = elm_button_add(obj);
+ g_snprintf(buf, sizeof(buf), "%s",
+ eap_data->cert_alias ? eap_data->cert_alias
+ : sc(eap_data->str_pkg_name, I18N_TYPE_None));
+
elm_object_domain_translatable_text_set(btn, PACKAGE, buf);
- elm_object_style_set(btn, "dropdown/label");
+ elm_object_style_set(btn, ug_type == UG_VIEW_OOBE ? "cancel" : "dropdown/label");
evas_object_propagate_events_set(btn, EINA_FALSE);
evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_smart_callback_add(btn, "clicked",
_gl_eap_cert_list_btn_cb, eap_data);
- elm_layout_content_set(ly, "btn", btn);
- return ly;
+ if (ug_type != UG_VIEW_OOBE) {
+ elm_layout_content_set(ly, "btn", btn);
+ return ly;
+ }
}
return NULL;
}
Evas_Object *btn = NULL;
Evas_Object *ly = NULL;
char buf[100];
+ int ug_type;
if (!strcmp(part, "elm.swallow.icon.0")) {
- ly = elm_layout_add(obj);
- elm_layout_file_set(ly, CUSTOM_EDITFIELD_PATH,
- "eap_dropdown_button");
+ ug_type = common_util_get_ug_type();
+ if (ug_type != UG_VIEW_OOBE) {
+ ly = elm_layout_add(obj);
+ elm_layout_file_set(ly, CUSTOM_EDITFIELD_PATH,
+ "eap_dropdown_button");
+ }
btn = elm_button_add(obj);
-
- g_snprintf(buf, sizeof(buf), "<align=left>%s</align>",
+ g_snprintf(buf, sizeof(buf), "%s",
list_eap_type[sel_sub_item_id].name);
elm_object_text_set(btn, buf);
- elm_object_style_set(btn, "dropdown/label");
+ elm_object_style_set(btn, ug_type == UG_VIEW_OOBE ?
+ "cancel" : "dropdown/label");
evas_object_propagate_events_set(btn, EINA_FALSE);
evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_smart_callback_add(btn, "clicked",
_gl_eap_type_btn_cb, eap_data);
- elm_layout_content_set(ly, "btn", btn);
- return ly;
+ if (ug_type != UG_VIEW_OOBE) {
+ elm_layout_content_set(ly, "btn", btn);
+ return ly;
+ }
+ return btn;
}
return NULL;
}
Evas_Object *btn = NULL;
Evas_Object *ly = NULL;
char buf[100];
+ int ug_type;
if (!strcmp(part, "elm.swallow.icon.0")) {
- ly = elm_layout_add(obj);
- elm_layout_file_set(ly, CUSTOM_EDITFIELD_PATH, "eap_dropdown_button");
- btn = elm_button_add(obj);
+ ug_type = common_util_get_ug_type();
+ if (ug_type != UG_VIEW_OOBE) {
+ ly = elm_layout_add(obj);
+ elm_layout_file_set(ly, CUSTOM_EDITFIELD_PATH, "eap_dropdown_button");
+ }
+ btn = elm_button_add(obj);
if (sel_sub_item_id == EAP_SEC_AUTH_NONE) {
- g_snprintf(buf, sizeof(buf), "<align=left>%s</align>",
+ g_snprintf(buf, sizeof(buf), "%s",
sc(PACKAGE, I18N_TYPE_None));
} else {
- g_snprintf(buf, sizeof(buf), "<align=left>%s</align>",
+ g_snprintf(buf, sizeof(buf), "%s",
list_eap_auth[sel_sub_item_id].name);
}
elm_object_domain_translatable_text_set(btn, PACKAGE, buf);
- elm_object_style_set(btn, "dropdown/label");
+ elm_object_style_set(btn, ug_type == UG_VIEW_OOBE ? "cancel" : "dropdown/label");
evas_object_propagate_events_set(btn, EINA_FALSE);
evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_smart_callback_add(btn, "clicked",
_gl_eap_auth_btn_cb, eap_data);
- elm_layout_content_set(ly, "btn", btn);
- return ly;
+ if (ug_type != UG_VIEW_OOBE) {
+ elm_layout_content_set(ly, "btn", btn);
+ return ly;
+ }
+ return btn;
}
return NULL;
}
if (!strcmp("elm.swallow.icon", part)) {
check = elm_check_add(obj);
- evas_object_propagate_events_set(check, EINA_FALSE);
+ if (common_util_get_ug_type() == UG_VIEW_OOBE)
+ elm_object_style_set(check, "oobe-casual");
+ evas_object_propagate_events_set(check, EINA_FALSE);
evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_smart_callback_add(check, "changed",
memset(&popup_btn_data, 0, sizeof(popup_btn_data));
popup_btn_data.title_txt = device_info->ssid;
+ popup_btn_data.sub_title_txt = common_utils_get_ap_security_type_info_txt(PACKAGE,
+ device_info, false);
popup_btn_data.btn1_cb = __common_eap_connect_destroy_cb;
popup_btn_data.btn1_data = eap_data;
popup_btn_data.btn1_txt = "IDS_WIFI_SK_CANCEL";
} tizen_model_t;
static tizen_model_t emulator = TIZEN_MODEL_UNKNOWN;
+static UG_TYPE g_ug_type = UG_VIEW_DEFAULT;
typedef struct {
char *title_str;
Evas_Object *popup = elm_popup_add(parent);
char *txt = NULL;
+ double vertical = g_ug_type == UG_VIEW_OOBE ? 0.5 : 1.0;
if (!popup) {
ERROR_LOG(UG_NAME_ERR, "Could not add popup");
return NULL;
}
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
+ elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, vertical);
evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
if (popup_data->title_txt) {
+ char *full_txt = NULL;
txt = evas_textblock_text_utf8_to_markup(NULL, popup_data->title_txt);
+ if (g_ug_type == UG_VIEW_OOBE)
+ full_txt = g_strdup_printf("<align=left>%s: <b>%s</b></align>",
+ sc(PACKAGE, I18N_TYPE_Ssid), txt);
elm_object_domain_translatable_part_text_set(popup,
- "title,text", PACKAGE, txt);
+ "title,text", PACKAGE, g_ug_type == UG_VIEW_OOBE ? full_txt : txt);
g_free(txt);
+ g_free(full_txt);
+ txt = NULL;
+ }
+
+ if (g_ug_type == UG_VIEW_OOBE && popup_data->sub_title_txt) {
+ txt = g_strdup_printf("<align=left>%s: <b>%s</b></align>",
+ sc(PACKAGE, I18N_TYPE_Security),
+ popup_data->sub_title_txt);
+ elm_object_part_text_set(popup, "subtitle,text", txt);
+ g_free(txt);
+ txt = NULL;
}
if (popup_data->info_txt) {
if (popup_data->btn1_txt) {
Evas_Object *btn_1 = elm_button_add(popup);
- elm_object_style_set(btn_1, "popup");
- elm_object_domain_translatable_text_set(btn_1, PACKAGE ,
+
+ if (g_ug_type== UG_VIEW_OOBE)
+ elm_object_style_set(btn_1, "cancel");
+ else
+ elm_object_style_set(btn_1, "popup");
+
+ elm_object_domain_translatable_text_set(btn_1, PACKAGE,
popup_data->btn1_txt);
elm_object_part_content_set(popup, "button1", btn_1);
if (popup_data->btn1_cb) {
if (popup_data->btn2_txt) {
Evas_Object *btn_2 = elm_button_add(popup);
- elm_object_style_set(btn_2, "popup");
+
+ if (g_ug_type == UG_VIEW_OOBE)
+ elm_object_style_set(btn_2, "connect");
+ else
+ elm_object_style_set(btn_2, "popup");
+
/* This button reference used in case of hidden AP case */
popup_data->btn = btn_2;
elm_object_domain_translatable_text_set(btn_2, PACKAGE,
return EINA_FALSE;
}
}
+
+void common_util_set_ug_type(UG_TYPE type)
+{
+ g_ug_type = type;
+}
+
+UG_TYPE common_util_get_ug_type(void)
+{
+ return g_ug_type;
+}