static void _back_cb(void *data, Evas_Object *obj, void *event_info);
static void _check1_clicked_cb(void *data, Evas_Object *obj, void *event_info);
static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+static void _check1_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info);
+static void _check2_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info);
static Eina_Bool _after_validation_cb(void *data);
static void _popup_ok_cb(void *data, Evas_Object *obj, void *event_info);
Evas_Object *manual_btn;
Evas_Object *icon;
Evas_Object *show_passwd_check;
+ Evas_Object *default_account_check;
Evas_Object *clicked_object;
evas_object_show(p->l_button);
if (vd->ugd->account_info == OTHERS) {
- /*elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_SK_NEXT"));*/
- elm_object_text_set(p->l_button, _("IDS_EMAIL_OPT_LOG_IN"));
+ elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_BUTTON_LOGIN"));
evas_object_smart_callback_add(p->l_button, "clicked", _next_cb, vd);
} else {
- /*elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_SK_SAVE"));*/
- elm_object_text_set(p->l_button, _("IDS_EMAIL_OPT_LOG_IN"));
+ elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_BUTTON_LOGIN"));
evas_object_smart_callback_add(p->l_button, "clicked", _save_cb, vd);
}
elm_object_style_set(p->r_button2, "naviframe/back_btn/default");
evas_object_show(p->r_button2);
+
+ Evas_Object *title_ic = elm_icon_add(vd->ugd->navi_bar);
+ evas_object_size_hint_aspect_set(title_ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+ elm_icon_resizable_set(title_ic, EINA_TRUE, EINA_TRUE);
+
Elm_Object_Item *navi_it = NULL;
char title_str[50] = { 0, };
- if (vd->ugd->account_info == GMAIL)
+ if (vd->ugd->account_info == GMAIL) {
snprintf(title_str, sizeof(title_str), "%s", dgettext("sys_string", "IDS_COM_BODY_GOOGLE"));
- else if (vd->ugd->account_info == HOTMAIL)
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_GMAIL, NULL);
+ } else if (vd->ugd->account_info == HOTMAIL) {
snprintf(title_str, sizeof(title_str), "%s", _("IDS_EMAIL_BODY_WINDOWS_LIVE_HOTMAIL"));
- else if (vd->ugd->account_info == YAHOOMAIL)
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_HOTMAIL, NULL);
+ } else if (vd->ugd->account_info == YAHOOMAIL) {
snprintf(title_str, sizeof(title_str), "%s", _("IDS_EMAIL_BODY_YAHOO_E_MAIL"));
- else if (vd->ugd->account_info == AOL)
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_YAHOO, NULL);
+ } else if (vd->ugd->account_info == AOL) {
snprintf(title_str, sizeof(title_str), "%s", _("IDS_EMAIL_BODY_AOL"));
- else
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_AOL, NULL);
+ } else
snprintf(title_str, sizeof(title_str), "%s", dgettext("sys_string", "IDS_COM_BODY_OTHERS"));
+
navi_it = elm_naviframe_item_push(vd->ugd->navi_bar, title_str, p->r_button2, NULL, p->layout, NULL);
+ elm_object_item_part_content_set(navi_it, "icon", title_ic);
elm_object_item_part_content_set(navi_it, "title_left_btn", p->l_button);
elm_object_item_part_content_set(navi_it, "title_right_btn", p->r_button);
evas_object_show(vd->ugd->navi_bar);
evas_object_smart_callback_add(check1, "changed", _check1_clicked_cb, (void *)vd);
elm_object_part_content_set(checkbox_set, "checkbox.1", check1);
elm_object_focus_allow_set(check1, EINA_FALSE);
+ p->default_account_check = check1;
Evas_Object *check2 = elm_check_add(checkbox_set);
elm_check_state_set(check2, EINA_FALSE);
Evas_Object *label1 = elm_label_add(checkbox_set);
char *text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>",
desc, "</align></font_size></color>", NULL);
-
+ evas_object_event_callback_add(label1, EVAS_CALLBACK_MOUSE_UP, _check1_clicked_cb2, (void *)vd);
elm_object_text_set(label1, text);
evas_object_show(label1);
g_free(desc);
Evas_Object *label2 = elm_label_add(checkbox_set);
text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>",
desc, "</align></font_size></color>", NULL);
-
+ evas_object_event_callback_add(label2, EVAS_CALLBACK_MOUSE_UP, _check2_clicked_cb2, (void *)vd);
elm_object_text_set(label2, text);
evas_object_show(label2);
g_free(desc);
evas_object_show(btn);
p->manual_btn = btn;
elm_object_part_content_set(button_set, "btn", btn);
- /*elm_object_disabled_set(btn, EINA_TRUE);*/
+ elm_object_disabled_set(p->manual_btn, EINA_TRUE);
elm_object_part_content_set(sub_ly, "button_set", button_set);
if (p->entry_password) {
buf = (char *)elm_entry_markup_to_utf8(elm_entry_entry_get(p->entry_password));
- debug_log("password : %s ", buf);
- if (buf)
- account->incoming_server_password = g_strdup(buf);
+ debug_log("password : %s", buf);
+ if (buf) {
+ account->incoming_server_password = g_strdup(buf);
+ g_free(buf);
+ }
}
}
free(buf);
return;
}
+
g_free(buf);
setting_change_view(VIEW_MANUAL_SETUP, ugd);
struct viewdata *vd = (struct viewdata *)data;
struct priv_data *p = vd->priv;
- Ecore_IMF_Context *imf_context = NULL;
- imf_context = elm_entry_imf_context_get(p->clicked_object);
- ecore_imf_context_input_panel_hide(imf_context);
if (vd->ugd->atomic_pop) {
debug_log("During atomic poping");
return;
}
+ if (p->entry_account_name) {
+ elm_object_focus_allow_set(p->entry_account_name, EINA_FALSE);
+ }
+
+ if (p->entry_email_address) {
+ elm_object_focus_allow_set(p->entry_email_address, EINA_FALSE);
+ }
+
+ if (p->entry_password) {
+ elm_object_focus_allow_set(p->entry_password, EINA_FALSE);
+ }
+
+ Ecore_IMF_Context *imf_context = NULL;
+ imf_context = elm_entry_imf_context_get(p->clicked_object);
+ ecore_imf_context_input_panel_hide(imf_context);
+
elm_object_disabled_set(p->l_button, EINA_TRUE);
elm_object_disabled_set(p->r_button, EINA_TRUE);
elm_object_disabled_set(p->r_button2, EINA_TRUE);
p->set_default_account = 0;
}
+static void _check1_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info)
+{
+ debug_log("");
+ struct viewdata *vd = (struct viewdata *)data;
+
+ if (vd == NULL) {
+ debug_log("vd is NULL");
+ return;
+ }
+
+ struct priv_data *p = vd->priv;
+ Eina_Bool state = elm_check_state_get(p->default_account_check);
+
+ if (state) {
+ elm_check_state_set(p->default_account_check, EINA_FALSE);
+ p->set_default_account = 0;
+ } else {
+ elm_check_state_set(p->default_account_check, EINA_TRUE);
+ p->set_default_account = 1;
+ }
+}
+
static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info)
{
debug_log("");
elm_entry_password_set(p->entry_password, EINA_TRUE);
}
+static void _check2_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info)
+{
+ debug_log("");
+ struct viewdata *vd = (struct viewdata *)data;
+
+ if (vd == NULL) {
+ debug_log("vd is NULL");
+ return;
+ }
+
+ struct priv_data *p = vd->priv;
+ Eina_Bool state = elm_check_state_get(p->show_passwd_check);
+
+ if (state) {
+ elm_check_state_set(p->show_passwd_check, EINA_FALSE);
+ elm_entry_password_set(p->entry_password, EINA_TRUE);
+ } else {
+ elm_check_state_set(p->show_passwd_check, EINA_TRUE);
+ elm_entry_password_set(p->entry_password, EINA_FALSE);
+ }
+}
+
static Eina_Bool _after_validation_cb(void *data)
{
debug_log("");
ugd->popup_validate = NULL;
}
- elm_object_disabled_set(p->l_button, EINA_FALSE);
elm_object_disabled_set(p->r_button, EINA_FALSE);
elm_object_disabled_set(p->r_button2, EINA_FALSE);
- elm_object_disabled_set(p->manual_btn, EINA_FALSE);
}
static void _popup_cancel_validation_cb(void *data, Evas_Object *obj, void *event_info)
if (ugd->account_info == OTHERS) {
if (p->str_account_name == NULL) {
elm_object_disabled_set(p->l_button, EINA_TRUE);
+ elm_object_disabled_set(p->manual_btn, EINA_TRUE);
return;
}
if (g_strcmp0(p->str_account_name, "") == 0) {
elm_object_disabled_set(p->l_button, EINA_TRUE);
+ elm_object_disabled_set(p->manual_btn, EINA_TRUE);
return;
}
}
if (p->str_email_address == NULL || p->str_password == NULL) {
elm_object_disabled_set(p->l_button, EINA_TRUE);
+ elm_object_disabled_set(p->manual_btn, EINA_TRUE);
return;
}
if (g_strcmp0(p->str_email_address, "") == 0 || g_strcmp0(p->str_password, "") == 0) {
elm_object_disabled_set(p->l_button, EINA_TRUE);
+ elm_object_disabled_set(p->manual_btn, EINA_TRUE);
} else {
elm_object_disabled_set(p->l_button, EINA_FALSE);
+ elm_object_disabled_set(p->manual_btn, EINA_FALSE);
}
}
if (p->str_account_name)
elm_entry_entry_set(p->entry_account_name, p->str_account_name);
- if (ugd->account_info == OTHERS && p->icon_get_cnt1 == 2) {
+ if (ugd->account_info == OTHERS && p->icon_get_cnt1 == 2 &&
+ strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) != 0) {
+ p->clicked_object = p->entry_account_name;
+ evas_object_show(p->entry_account_name);
+ elm_object_focus_set(p->entry_account_name, EINA_TRUE);
+ }
+
+ if (ugd->account_info == OTHERS && p->icon_get_cnt1 == 3 &&
+ strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) == 0) {
p->clicked_object = p->entry_account_name;
evas_object_show(p->entry_account_name);
elm_object_focus_set(p->entry_account_name, EINA_TRUE);