summaryrefslogtreecommitdiff
path: root/setting/src
diff options
context:
space:
mode:
authorSeongho Jeong <seongho@linux-ioz5.site>2012-09-28 14:45:50 +0900
committerSeongho Jeong <seongho@linux-ioz5.site>2012-09-28 14:45:50 +0900
commit93025334955ee4844c860a202e3cb4e2355b11c9 (patch)
treeb8ce904f94438fd2605fbb92b7f99c6029702bfd /setting/src
parentff11d4aeead0ecc08c5eac4d351a5cddae7950ec (diff)
downloademail-master.tar.gz
email-master.tar.bz2
email-master.zip
Signed-off-by: Seongho Jeong <seongho@linux-ioz5.site>
Diffstat (limited to 'setting/src')
-rwxr-xr-xsetting/src/email-setting-account-set.c58
-rwxr-xr-xsetting/src/email-setting-utils.c2
-rwxr-xr-xsetting/src/email-view-account-edit.c39
-rwxr-xr-xsetting/src/email-view-account-options.c4
-rwxr-xr-xsetting/src/email-view-account-setup.c67
-rwxr-xr-xsetting/src/email-view-manual-setup.c24
-rwxr-xr-xsetting/src/email-view-sync-schedule.c47
-rwxr-xr-xsetting/src/email-view-sync-setup.c41
8 files changed, 207 insertions, 75 deletions
diff --git a/setting/src/email-setting-account-set.c b/setting/src/email-setting-account-set.c
index c43d84d..78549a4 100755
--- a/setting/src/email-setting-account-set.c
+++ b/setting/src/email-setting-account-set.c
@@ -211,14 +211,14 @@ static void _set_gmail(struct viewdata *vd)
account->user_email_address = g_strdup("<User ID>@gmail.com");
account->incoming_server_password = g_strdup(<User Password>);*/
- vconf_get_int("file/private/com.samsung.email/gmail_receiving_type", (int *)&(account->incoming_server_type));
- vconf_get_int("file/private/com.samsung.email/gmail_receiving_port", &(account->incoming_server_port_number));
- vconf_get_int("file/private/com.samsung.email/gmail_receiving_ssl", &(account->incoming_server_secure_connection));
- account->incoming_server_address = vconf_get_str("file/private/com.samsung.email/gmail_receiving_address");
-
- vconf_get_int("file/private/com.samsung.email/gmail_sending_port", &(account->outgoing_server_port_number));
- vconf_get_int("file/private/com.samsung.email/gmail_sending_ssl", &(account->outgoing_server_secure_connection));
- account->outgoing_server_address = vconf_get_str("file/private/com.samsung.email/gmail_sending_address");
+ vconf_get_int("file/private/org.tizen.email/gmail_receiving_type", (int *)&(account->incoming_server_type));
+ vconf_get_int("file/private/org.tizen.email/gmail_receiving_port", &(account->incoming_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/gmail_receiving_ssl", &(account->incoming_server_secure_connection));
+ account->incoming_server_address = vconf_get_str("file/private/org.tizen.email/gmail_receiving_address");
+
+ vconf_get_int("file/private/org.tizen.email/gmail_sending_port", &(account->outgoing_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/gmail_sending_ssl", &(account->outgoing_server_secure_connection));
+ account->outgoing_server_address = vconf_get_str("file/private/org.tizen.email/gmail_sending_address");
account->outgoing_server_user_name = g_strdup(account->incoming_server_user_name);
account->outgoing_server_password = g_strdup(account->incoming_server_password);
@@ -291,14 +291,14 @@ static void _set_yahoomail(struct viewdata *vd)
account->user_email_address = g_strdup("<User ID>@yahoo.com");
account->incoming_server_password = g_strdup(<User Password>);*/
- vconf_get_int("file/private/com.samsung.email/yahoo_receiving_type", (int *)&(account->incoming_server_type));
- vconf_get_int("file/private/com.samsung.email/yahoo_receiving_port", &(account->incoming_server_port_number));
- vconf_get_int("file/private/com.samsung.email/yahoo_receiving_ssl", &(account->incoming_server_secure_connection));
- account->incoming_server_address = vconf_get_str("file/private/com.samsung.email/yahoo_receiving_address");
+ vconf_get_int("file/private/org.tizen.email/yahoo_receiving_type", (int *)&(account->incoming_server_type));
+ vconf_get_int("file/private/org.tizen.email/yahoo_receiving_port", &(account->incoming_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/yahoo_receiving_ssl", &(account->incoming_server_secure_connection));
+ account->incoming_server_address = vconf_get_str("file/private/org.tizen.email/yahoo_receiving_address");
- account->outgoing_server_address = vconf_get_str("file/private/com.samsung.email/yahoo_sending_address");
- vconf_get_int("file/private/com.samsung.email/yahoo_sending_port", &(account->outgoing_server_port_number));
- vconf_get_int("file/private/com.samsung.email/yahoo_sending_ssl", &(account->outgoing_server_secure_connection));
+ account->outgoing_server_address = vconf_get_str("file/private/org.tizen.email/yahoo_sending_address");
+ vconf_get_int("file/private/org.tizen.email/yahoo_sending_port", &(account->outgoing_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/yahoo_sending_ssl", &(account->outgoing_server_secure_connection));
account->outgoing_server_user_name = g_strdup(account->incoming_server_user_name);
account->outgoing_server_password = g_strdup(account->incoming_server_password);
@@ -372,14 +372,14 @@ static void _set_hotmail(struct viewdata *vd)
account->user_email_address = g_strdup("<User ID>@aol.com");
account->incoming_server_password = g_strdup(<User Password>);*/
- vconf_get_int("file/private/com.samsung.email/hotmail_receiving_type", (int *)&(account->incoming_server_type));
- vconf_get_int("file/private/com.samsung.email/hotmail_receiving_port", &(account->incoming_server_port_number));
- vconf_get_int("file/private/com.samsung.email/hotmail_receiving_ssl", &(account->incoming_server_secure_connection));
- account->incoming_server_address = vconf_get_str("file/private/com.samsung.email/hotmail_receiving_address");
+ vconf_get_int("file/private/org.tizen.email/hotmail_receiving_type", (int *)&(account->incoming_server_type));
+ vconf_get_int("file/private/org.tizen.email/hotmail_receiving_port", &(account->incoming_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/hotmail_receiving_ssl", &(account->incoming_server_secure_connection));
+ account->incoming_server_address = vconf_get_str("file/private/org.tizen.email/hotmail_receiving_address");
- account->outgoing_server_address = vconf_get_str("file/private/com.samsung.email/hotmail_sending_address");
- vconf_get_int("file/private/com.samsung.email/hotmail_sending_port", &(account->outgoing_server_port_number));
- vconf_get_int("file/private/com.samsung.email/hotmail_sending_ssl", &(account->outgoing_server_secure_connection));
+ account->outgoing_server_address = vconf_get_str("file/private/org.tizen.email/hotmail_sending_address");
+ vconf_get_int("file/private/org.tizen.email/hotmail_sending_port", &(account->outgoing_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/hotmail_sending_ssl", &(account->outgoing_server_secure_connection));
account->outgoing_server_user_name = g_strdup(account->incoming_server_user_name);
account->outgoing_server_password = g_strdup(account->incoming_server_password);
@@ -452,14 +452,14 @@ static void _set_aol(struct viewdata *vd)
account->user_email_address = g_strdup("<User ID>@aol.com");
account->incoming_server_password = g_strdup(<User Password>);*/
- vconf_get_int("file/private/com.samsung.email/aol_receiving_type", (int *)&(account->incoming_server_type));
- vconf_get_int("file/private/com.samsung.email/aol_receiving_port", &(account->incoming_server_port_number));
- vconf_get_int("file/private/com.samsung.email/aol_receiving_ssl", &(account->incoming_server_secure_connection));
- account->incoming_server_address = vconf_get_str("file/private/com.samsung.email/aol_receiving_address");
+ vconf_get_int("file/private/org.tizen.email/aol_receiving_type", (int *)&(account->incoming_server_type));
+ vconf_get_int("file/private/org.tizen.email/aol_receiving_port", &(account->incoming_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/aol_receiving_ssl", &(account->incoming_server_secure_connection));
+ account->incoming_server_address = vconf_get_str("file/private/org.tizen.email/aol_receiving_address");
- account->outgoing_server_address = vconf_get_str("file/private/com.samsung.email/aol_sending_address");
- vconf_get_int("file/private/com.samsung.email/aol_sending_port", &(account->outgoing_server_port_number));
- vconf_get_int("file/private/com.samsung.email/aol_sending_ssl", &(account->outgoing_server_secure_connection));
+ account->outgoing_server_address = vconf_get_str("file/private/org.tizen.email/aol_sending_address");
+ vconf_get_int("file/private/org.tizen.email/aol_sending_port", &(account->outgoing_server_port_number));
+ vconf_get_int("file/private/org.tizen.email/aol_sending_ssl", &(account->outgoing_server_secure_connection));
account->outgoing_server_user_name = g_strdup(account->incoming_server_user_name);
account->outgoing_server_password = g_strdup(account->incoming_server_password);
diff --git a/setting/src/email-setting-utils.c b/setting/src/email-setting-utils.c
index e637358..974cb63 100755
--- a/setting/src/email-setting-utils.c
+++ b/setting/src/email-setting-utils.c
@@ -706,7 +706,7 @@ char *setting_get_service_fail_type(int type)
ret = N_("DB operation failed");
return strdup(ret);
} else if (type == EMAIL_ERROR_ALREADY_EXISTS) {
- ret = N_("Already exists");
+ ret = _("IDS_EMAIL_POP_ACCOUNT_ALREADY_EXISTS");
return strdup(ret);
} else if (type == EMAIL_ERROR_TLS_NOT_SUPPORTED) {
ret = N_("Server not support TLS");
diff --git a/setting/src/email-view-account-edit.c b/setting/src/email-view-account-edit.c
index 5308d77..9caf9bd 100755
--- a/setting/src/email-view-account-edit.c
+++ b/setting/src/email-view-account-edit.c
@@ -441,10 +441,27 @@ static void _push_naviframe(struct viewdata *vd)
evas_object_smart_callback_add(p->r_button2, "clicked", _save_cb, vd);
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);
+
+ account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
+
+ if (user_data->is_preset_account == GMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_GMAIL, NULL);
+ } else if (user_data->is_preset_account == HOTMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_HOTMAIL, NULL);
+ } else if (user_data->is_preset_account == YAHOOMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_YAHOO, NULL);
+ } else if (user_data->is_preset_account == AOL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_AOL, NULL);
+ }
+
Elm_Object_Item *navi_it = NULL;
navi_it = elm_naviframe_item_push(vd->ugd->navi_bar, p->str_account_name, p->l_button, NULL, p->layout, NULL);
/*elm_object_item_part_content_set(navi_it, "title_left_btn", p->r_button1);
elm_object_item_part_content_set(navi_it, "title_right_btn", p->r_button2);*/
+ elm_object_item_part_content_set(navi_it, "icon", title_ic);
elm_object_item_part_content_set(navi_it, "controlbar", p->cbar);
evas_object_show(vd->ugd->navi_bar);
}
@@ -962,21 +979,25 @@ static void _onoff_cb(void *data, Evas_Object *obj, void *event_info)
/* user name */
if (p->gl_sending_user_item) {
elm_object_item_disabled_set(p->gl_sending_user_item, EINA_TRUE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_username, EINA_TRUE);
}
/* password */
if (p->gl_sending_pw_item) {
elm_object_item_disabled_set(p->gl_sending_pw_item, EINA_TRUE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_password, EINA_TRUE);
}
} else {
/* user name */
if (p->gl_sending_user_item) {
elm_object_item_disabled_set(p->gl_sending_user_item, EINA_FALSE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_username, EINA_FALSE);
}
/* password */
if (p->gl_sending_pw_item) {
elm_object_item_disabled_set(p->gl_sending_pw_item, EINA_FALSE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_password, EINA_FALSE);
}
}
}
@@ -1247,8 +1268,6 @@ static char *_gl_secure_text_get_cb(void *data, Evas_Object *obj, const char *pa
debug_enter();
int index = (int)data;
- struct viewdata *vd = g_vd;
- struct priv_data *p = vd->priv;
email_account_t *account = account_data;
char buf[MAX_STR_LEN] = { 0, };
@@ -1333,8 +1352,6 @@ static char *_gl_server_type_text_get_cb(void *data, Evas_Object *obj, const cha
{
debug_enter();
- struct viewdata *vd = g_vd;
- struct priv_data *p = vd->priv;
email_account_t *account = account_data;
char buf[MAX_STR_LEN] = { 0, };
@@ -1660,6 +1677,11 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
elm_entry_input_panel_return_key_disabled_set(p->entry_sending_username, EINA_TRUE);
elm_entry_cnp_mode_set(p->entry_sending_username, ELM_CNP_MODE_PLAINTEXT);
elm_entry_input_panel_layout_set(p->entry_sending_username, ELM_INPUT_PANEL_LAYOUT_EMAIL);
+ if (account_data->outgoing_server_use_same_authenticator) {
+ elm_entry_context_menu_disabled_set(p->entry_sending_username, EINA_TRUE);
+ } else {
+ elm_entry_context_menu_disabled_set(p->entry_sending_username, EINA_FALSE);
+ }
evas_object_smart_callback_add(p->entry_sending_username, "changed", _backup_input_cb, p->ef_sending_username);
evas_object_smart_callback_add(p->entry_sending_username, "focused", _entry_focused_cb, p->ef_sending_username);
@@ -1688,6 +1710,11 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
elm_entry_password_set(p->entry_sending_password, 1);
elm_entry_cnp_mode_set(p->entry_sending_password, ELM_CNP_MODE_PLAINTEXT);
elm_entry_input_panel_layout_set(p->entry_sending_password, ELM_INPUT_PANEL_LAYOUT_EMAIL);
+ if (account_data->outgoing_server_use_same_authenticator) {
+ elm_entry_context_menu_disabled_set(p->entry_sending_password, EINA_TRUE);
+ } else {
+ elm_entry_context_menu_disabled_set(p->entry_sending_password, EINA_FALSE);
+ }
evas_object_smart_callback_add(p->entry_sending_password, "changed", _backup_input_cb, p->ef_sending_password);
evas_object_smart_callback_add(p->entry_sending_password, "focused", _entry_focused_cb, p->ef_sending_password);
@@ -1969,21 +1996,25 @@ static void _gl_onoff_sel_cb(void *data, Evas_Object *obj, void *event_info)
/* user name */
if (p->gl_sending_user_item) {
elm_object_item_disabled_set(p->gl_sending_user_item, EINA_TRUE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_username, EINA_TRUE);
}
/* password */
if (p->gl_sending_pw_item) {
elm_object_item_disabled_set(p->gl_sending_pw_item, EINA_TRUE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_password, EINA_TRUE);
}
} else {
/* user name */
if (p->gl_sending_user_item) {
elm_object_item_disabled_set(p->gl_sending_user_item, EINA_FALSE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_username, EINA_FALSE);
}
/* password */
if (p->gl_sending_pw_item) {
elm_object_item_disabled_set(p->gl_sending_pw_item, EINA_FALSE);
+ elm_entry_context_menu_disabled_set(p->entry_sending_password, EINA_FALSE);
}
}
break;
diff --git a/setting/src/email-view-account-options.c b/setting/src/email-view-account-options.c
index 493bdfd..86e2668 100755
--- a/setting/src/email-view-account-options.c
+++ b/setting/src/email-view-account-options.c
@@ -905,7 +905,7 @@ static char *_gl_onoff_text_get_cb(void *data, Evas_Object *obj, const char *par
}
if (index == 6) {
- snprintf(buf, sizeof(buf), "%s", N_("Send read report"));
+ snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_SEND_READ_REPORT"));
}
return g_strdup(buf);
@@ -1317,7 +1317,7 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
p->entry_sig = elm_entry_add(p->genlist);
elm_entry_cnp_mode_set(p->entry_sig, ELM_CNP_MODE_PLAINTEXT);
- elm_entry_input_panel_layout_set(p->entry_sig, ELM_INPUT_PANEL_LAYOUT_EMAIL);
+ elm_entry_input_panel_layout_set(p->entry_sig, ELM_INPUT_PANEL_LAYOUT_NORMAL);
if (account_data->options.add_signature) {
elm_entry_editable_set(p->entry_sig, TRUE);
elm_entry_context_menu_disabled_set(p->entry_sig, EINA_FALSE);
diff --git a/setting/src/email-view-account-setup.c b/setting/src/email-view-account-setup.c
index d7acf20..e1b8664 100755
--- a/setting/src/email-view-account-setup.c
+++ b/setting/src/email-view-account-setup.c
@@ -35,6 +35,8 @@ static int _check_null_field(struct viewdata *vd);
static int _check_preset_null_field(struct viewdata *vd);
static int _check_preset_isp_name(char *addr, int isp_type);
static void _read_all_entries(struct viewdata *vd);
+/*static void _set_help_string(Evas_Object *eo, struct viewdata *vd);*/
+static void _set_domain_string(struct viewdata *vd);
static void _next_cb(void *data, Evas_Object *obj, void *event_info);
static void _save_cb(void *data, Evas_Object *obj, void *event_info);
@@ -42,8 +44,8 @@ static void _manual_cb(void *data, Evas_Object *obj, void *event_info);
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 void _check1_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source);
+static void _check2_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source);
static Eina_Bool _after_validation_cb(void *data);
static void _popup_ok_cb(void *data, Evas_Object *obj, void *event_info);
@@ -224,6 +226,10 @@ static int _create(struct viewdata *vd)
g_vd = vd;
ugd->wds_account_creation = 0;
+ if (vd->ugd->account_info != OTHERS) {
+ _set_domain_string(vd);
+ }
+
_create_view(vd);
vd->refresh = 1;
@@ -405,9 +411,10 @@ static void _create_view(struct viewdata *vd)
char *desc = g_strdup(_("IDS_EMAIL_BODY_SEND_EMAIL_FROM_THIS_ACCOUNT_BY_DEFAULT"));
Evas_Object *label1 = elm_label_add(checkbox_set);
- char *text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>",
+ char *text = g_strconcat("<color=#838B8BFF><font_size=32><align=left>",
desc, "</align></font_size></color>", NULL);
- evas_object_event_callback_add(label1, EVAS_CALLBACK_MOUSE_UP, _check1_clicked_cb2, (void *)vd);
+ edje_object_signal_callback_add(elm_layout_edje_get(checkbox_set),
+ "elm,action,text1_clicked", "elm", _check1_clicked_cb2, (void *)vd);
elm_object_text_set(label1, text);
evas_object_show(label1);
g_free(desc);
@@ -416,9 +423,10 @@ static void _create_view(struct viewdata *vd)
desc = g_strdup(_("IDS_EMAIL_BODY_SHOW_PASSWORD"));
Evas_Object *label2 = elm_label_add(checkbox_set);
- text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>",
+ text = g_strconcat("<color=#838B8BFF><font_size=32><align=left>",
desc, "</align></font_size></color>", NULL);
- evas_object_event_callback_add(label2, EVAS_CALLBACK_MOUSE_UP, _check2_clicked_cb2, (void *)vd);
+ edje_object_signal_callback_add(elm_layout_edje_get(checkbox_set),
+ "elm,action,text2_clicked", "elm", _check2_clicked_cb2, (void *)vd);
elm_object_text_set(label2, text);
evas_object_show(label2);
g_free(desc);
@@ -432,17 +440,6 @@ static void _create_view(struct viewdata *vd)
evas_object_size_hint_weight_set(button_set, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(button_set);
- desc = g_strdup(N_("Setup POP3 or IMAP4?"));
- Evas_Object *label3 = elm_label_add(button_set);
- text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>",
- desc, "</align></font_size></color>", NULL);
-
- elm_object_text_set(label3, text);
- evas_object_show(label3);
- g_free(desc);
- g_free(text);
- elm_object_part_content_set(button_set, "text", label3);
-
Evas_Object *btn = elm_button_add(button_set);
elm_object_text_set(btn, _("IDS_EMAIL_BODY_MANUAL_SETUP"));
evas_object_smart_callback_add(btn, "clicked", _manual_cb, (void *)vd);
@@ -734,6 +731,26 @@ static void _read_all_entries(struct viewdata *vd)
}
}
+static void _set_domain_string(struct viewdata *vd)
+{
+ debug_log("");
+ EmailSettingUGD *ugd = vd->ugd;
+ struct priv_data *p;
+ p = vd->priv;
+
+ if (ugd->account_info == HOTMAIL) {
+ p->str_email_address = g_strdup("@hotmail.com");
+ } else if (ugd->account_info == YAHOOMAIL) {
+ p->str_email_address = g_strdup("@yahoo.com");
+ } else if (ugd->account_info == GMAIL) {
+ p->str_email_address = g_strdup("@gmail.com");
+ } else if (ugd->account_info == AOL) {
+ p->str_email_address = g_strdup("@aol.com");
+ } else {
+ debug_log("Unknown account type");
+ }
+}
+
static void _next_cb(void *data, Evas_Object *obj, void *event_info)
{
debug_log("");
@@ -1047,7 +1064,7 @@ static void _check1_clicked_cb(void *data, Evas_Object *obj, void *event_info)
p->set_default_account = 0;
}
-static void _check1_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info)
+static void _check1_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source)
{
debug_log("");
struct viewdata *vd = (struct viewdata *)data;
@@ -1088,7 +1105,7 @@ static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info)
elm_entry_password_set(p->entry_password, EINA_TRUE);
}
-static void _check2_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info)
+static void _check2_clicked_cb2(void *data, Evas_Object *obj, const char *emission, const char *source)
{
debug_log("");
struct viewdata *vd = (struct viewdata *)data;
@@ -1533,10 +1550,20 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
if (p->str_email_address)
elm_entry_entry_set(p->entry_email_address, p->str_email_address);
- if (ugd->account_info != OTHERS && p->icon_get_cnt2 == 2) {
+ if (ugd->account_info != OTHERS && p->icon_get_cnt2 == 2 &&
+ strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) != 0) {
+ p->clicked_object = p->entry_email_address;
+ evas_object_show(p->entry_email_address);
+ elm_object_focus_set(p->entry_email_address, EINA_TRUE);
+ elm_entry_cursor_begin_set(p->entry_email_address);
+ }
+
+ if (ugd->account_info != OTHERS && p->icon_get_cnt2 == 3 &&
+ strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) == 0) {
p->clicked_object = p->entry_email_address;
evas_object_show(p->entry_email_address);
elm_object_focus_set(p->entry_email_address, EINA_TRUE);
+ elm_entry_cursor_begin_set(p->entry_email_address);
}
return p->ef_email_address;
diff --git a/setting/src/email-view-manual-setup.c b/setting/src/email-view-manual-setup.c
index 226814e..9676269 100755
--- a/setting/src/email-view-manual-setup.c
+++ b/setting/src/email-view-manual-setup.c
@@ -351,9 +351,29 @@ static void _push_naviframe(struct viewdata *vd)
elm_object_style_set(p->l_button2, "naviframe/back_btn/default");
evas_object_show(p->l_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);
+
+ char title_str[50] = { 0, };
+ if (vd->ugd->account_info == GMAIL) {
+ snprintf(title_str, sizeof(title_str), "%s", dgettext("sys_string", "IDS_COM_BODY_GOOGLE"));
+ 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"));
+ 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"));
+ 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"));
+ 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"));
+
Elm_Object_Item *navi_it = NULL;
- navi_it = elm_naviframe_item_push(vd->ugd->navi_bar,
- _("IDS_EMAIL_HEADER_ADD_ACCOUNT"), p->l_button2, NULL, p->layout, NULL);
+ navi_it = elm_naviframe_item_push(vd->ugd->navi_bar, title_str, p->l_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->r_button);
elm_object_item_part_content_set(navi_it, "title_right_btn", p->l_button);
evas_object_show(vd->ugd->navi_bar);
diff --git a/setting/src/email-view-sync-schedule.c b/setting/src/email-view-sync-schedule.c
index 198df28..5f975e4 100755
--- a/setting/src/email-view-sync-schedule.c
+++ b/setting/src/email-view-sync-schedule.c
@@ -68,9 +68,9 @@ static void _gl_con_cb(void *data, Evas_Object *obj, void *event_info);
static int sync_schedule[7] = { 0, 30, 60, 180, 360, 720, 1440 };
-#define SYNC_STATUS_FINISHED 0 /* BIN 00000000 */
-#define SYNC_STATUS_SYNCING 1 /* BIN 00000001 */
-#define SYNC_STATUS_HAVE_NEW_MAILS 2 /* BIN 00000010 */
+#define SYNC_STATUS_FINISHED 0 /* BIN 00000000 */
+#define SYNC_STATUS_SYNCING 1 /* BIN 00000001 */
+#define SYNC_STATUS_HAVE_NEW_MAILS 2 /* BIN 00000010 */
struct priv_data {
struct viewdata *vd;
@@ -122,6 +122,11 @@ void setting_schedule_sync_started(struct viewdata *vd, int account_id)
EmailSettingUGD *ugd = vd->ugd;
p = vd->priv;
+ if (p == NULL) {
+ debug_log("priv is NULL");
+ return;
+ }
+
if (ugd->account_id != account_id) {
debug_log("not interested");
return;
@@ -143,6 +148,11 @@ void setting_schedule_sync_finished(struct viewdata *vd, int account_id)
EmailSettingUGD *ugd = vd->ugd;
p = vd->priv;
+ if (p == NULL) {
+ debug_log("priv is NULL");
+ return;
+ }
+
if (ugd->account_id != account_id) {
debug_log("not interested");
return;
@@ -332,8 +342,25 @@ static void _push_naviframe(struct viewdata *vd)
evas_object_smart_callback_add(p->l_button, "clicked", _back_cb, vd);
elm_object_style_set(p->l_button, "naviframe/back_btn/default");
+ 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);
+
+ account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
+
+ if (user_data->is_preset_account == GMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_GMAIL, NULL);
+ } else if (user_data->is_preset_account == HOTMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_HOTMAIL, NULL);
+ } else if (user_data->is_preset_account == YAHOOMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_YAHOO, NULL);
+ } else if (user_data->is_preset_account == AOL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_AOL, NULL);
+ }
+
Elm_Object_Item *navi_it = NULL;
navi_it = elm_naviframe_item_push(vd->ugd->navi_bar, account_data->account_name, p->l_button, NULL, p->layout, NULL);
+ elm_object_item_part_content_set(navi_it, "icon", title_ic);
elm_object_item_part_content_set(navi_it, "title_right_btn", p->r_button);
elm_object_item_part_content_set(navi_it, "controlbar", p->cbar);
evas_object_show(vd->ugd->navi_bar);
@@ -361,7 +388,7 @@ static void _create_list(struct viewdata *vd)
p->genlist = elm_genlist_add(ugd->navi_bar);
elm_object_style_set(p->genlist, "dialogue");
- p->itc_account.item_style = "dialogue/2text.3icon";
+ p->itc_account.item_style = "dialogue/2text.1icon.6";
p->itc_account.func.text_get = _gl_account_text_get_cb;
p->itc_account.func.content_get = _gl_account_content_get_cb;
p->itc_account.func.state_get = NULL;
@@ -902,9 +929,9 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
struct viewdata *vd = g_vd;
EmailSettingUGD *ugd = vd->ugd;
struct priv_data *p = vd->priv;
- Evas_Object *color_bar = NULL;
+ /*Evas_Object *color_bar = NULL;*/
- if (!g_strcmp0(part, "elm.icon.1")) {
+ /*if (!g_strcmp0(part, "elm.icon.1")) {
Evas_Object *icon = elm_icon_add(ugd->navi_bar);
account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
@@ -932,9 +959,9 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
p->account_icon = icon;
return icon;
- }
+ }*/
- if (!g_strcmp0(part, "elm.icon.2")) {
+ if (!g_strcmp0(part, "elm.icon")) {
if (p->syncing) {
Evas_Object *pb = elm_progressbar_add(ugd->navi_bar);
elm_object_style_set(pb, "list_process_small");
@@ -944,7 +971,7 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
}
}
- if (!g_strcmp0(part, "elm.swallow.colorbar")) {
+ /*if (!g_strcmp0(part, "elm.swallow.colorbar")) {
account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
unsigned int val = user_data->index_color;
int r = (val & 0xff000000) >> 24;
@@ -959,7 +986,7 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
evas_object_color_set(color_bar, r, g, b, a);
return color_bar;
- }
+ }*/
return NULL;
}
diff --git a/setting/src/email-view-sync-setup.c b/setting/src/email-view-sync-setup.c
index d5a408d..0f68fe2 100755
--- a/setting/src/email-view-sync-setup.c
+++ b/setting/src/email-view-sync-setup.c
@@ -122,6 +122,11 @@ void setting_setup_sync_started(struct viewdata *vd, int account_id)
EmailSettingUGD *ugd = vd->ugd;
p = vd->priv;
+ if (p == NULL) {
+ debug_log("priv is NULL");
+ return;
+ }
+
if (ugd->account_id != account_id) {
debug_log("not interested");
return;
@@ -143,6 +148,11 @@ void setting_setup_sync_finished(struct viewdata *vd, int account_id)
EmailSettingUGD *ugd = vd->ugd;
p = vd->priv;
+ if (p == NULL) {
+ debug_log("priv is NULL");
+ return;
+ }
+
if (ugd->account_id != account_id) {
debug_log("not interested");
return;
@@ -332,8 +342,25 @@ static void _push_naviframe(struct viewdata *vd)
evas_object_smart_callback_add(p->l_button, "clicked", _back_cb, vd);
elm_object_style_set(p->l_button, "naviframe/back_btn/default");
+ 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);
+
+ account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
+
+ if (user_data->is_preset_account == GMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_GMAIL, NULL);
+ } else if (user_data->is_preset_account == HOTMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_HOTMAIL, NULL);
+ } else if (user_data->is_preset_account == YAHOOMAIL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_YAHOO, NULL);
+ } else if (user_data->is_preset_account == AOL) {
+ elm_icon_file_set(title_ic, ACCOUNT_ICON_AOL, NULL);
+ }
+
Elm_Object_Item *navi_it = NULL;
navi_it = elm_naviframe_item_push(vd->ugd->navi_bar, account_data->account_name, p->l_button, NULL, p->layout, NULL);
+ elm_object_item_part_content_set(navi_it, "icon", title_ic);
elm_object_item_part_content_set(navi_it, "title_right_btn", p->r_button);
elm_object_item_part_content_set(navi_it, "controlbar", p->cbar);
evas_object_show(vd->ugd->navi_bar);
@@ -361,7 +388,7 @@ static void _create_list(struct viewdata *vd)
p->genlist = elm_genlist_add(ugd->navi_bar);
elm_object_style_set(p->genlist, "dialogue");
- p->itc_account.item_style = "dialogue/2text.3icon";
+ p->itc_account.item_style = "dialogue/2text.1icon.6";
p->itc_account.func.text_get = _gl_account_text_get_cb;
p->itc_account.func.content_get = _gl_account_content_get_cb;
p->itc_account.func.state_get = NULL;
@@ -923,9 +950,9 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
struct viewdata *vd = g_vd;
EmailSettingUGD *ugd = vd->ugd;
struct priv_data *p = vd->priv;
- Evas_Object *color_bar = NULL;
+ /*Evas_Object *color_bar = NULL;*/
- if (!g_strcmp0(part, "elm.icon.1")) {
+ /*if (!g_strcmp0(part, "elm.icon.1")) {
Evas_Object *icon = elm_icon_add(ugd->navi_bar);
account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
@@ -953,9 +980,9 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
p->account_icon = icon;
return icon;
- }
+ }*/
- if (!g_strcmp0(part, "elm.icon.2")) {
+ if (!g_strcmp0(part, "elm.icon")) {
if (p->syncing) {
Evas_Object *pb = elm_progressbar_add(ugd->navi_bar);
elm_object_style_set(pb, "list_process_small");
@@ -965,7 +992,7 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
}
}
- if (!g_strcmp0(part, "elm.swallow.colorbar")) {
+ /*if (!g_strcmp0(part, "elm.swallow.colorbar")) {
account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
unsigned int val = user_data->index_color;
int r = (val & 0xff000000) >> 24;
@@ -980,7 +1007,7 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
evas_object_color_set(color_bar, r, g, b, a);
return color_bar;
- }
+ }*/
return NULL;
}