fix sdk issues
authorMinsoo Kim <minnsoo.kim@samsung.com>
Tue, 20 Nov 2012 13:05:44 +0000 (22:05 +0900)
committerMinsoo Kim <minnsoo.kim@samsung.com>
Tue, 20 Nov 2012 13:05:44 +0000 (22:05 +0900)
19 files changed:
CMakeLists.txt
packaging/org.tizen.email.spec
setting/CMakeLists.txt
setting/include/email-setting-utils.h
setting/include/email-setting.h
setting/include/sp_list.xml
setting/src/email-setting-account-set.c
setting/src/email-setting-utils.c
setting/src/email-setting.c
setting/src/email-view-account-edit.c
setting/src/email-view-account-options.c
setting/src/email-view-account-setup.c
setting/src/email-view-initial.c
setting/src/email-view-manual-setup.c
setting/src/email-view-setting.c
setting/src/email-view-sp-select.c
setting/src/email-view-sync-schedule.c
setting/src/email-view-sync-setup.c
setting/theme/email-setting-theme.edc

index 2dd57bd..3f16d01 100755 (executable)
@@ -9,6 +9,7 @@ SET(LOCALEDIR "${RESDIR}/locale")
 SET(EDJDIR "${RESDIR}/edje")
 SET(IMGDIR "${RESDIR}/images")
 SET(JSDIR "${RESDIR}/js")
+SET(XMLDIR "${RESDIR}/xml")
 SET(SHAREDIR "/usr/share")
 SET(ICONDIR "${SHAREDIR}/icons/default/small")
 SET(UGDIR "/usr/ug/lib")
index a621086..93f0ef8 100755 (executable)
@@ -132,7 +132,7 @@ ln -sf /usr/bin/ug-client %{_ugdir}/bin/email-composer-efl
 %{_pkgdir}/res/images/*
 %{_pkgdir}/bin/email
 %{_pkgdir}/data/_email_default.html
-%{_pkgdir}/data/sp_list.xml
+%{_pkgdir}/res/xml/sp_list.xml
 %{_sharedir}/packages/org.tizen.email.xml
 /opt/usr/share/account/org.tizen.email.account.xml
 %{_sharedir}/icons/default/small/org.tizen.email.png
index ac69200..b70fa41 100755 (executable)
@@ -65,5 +65,5 @@ ADD_DEPENDENCIES(${PROJECT_NAME} email-setting-theme.edj)
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${UGDIR})
 INSTALL(FILES ${CMAKE_SETTING_BINARY_DIR}/email-setting-theme.edj DESTINATION ${EDJDIR})
-INSTALL(FILES ${CMAKE_SETTING_BINARY_DIR}/include/sp_list.xml DESTINATION ${DATADIR})
+INSTALL(FILES ${CMAKE_SETTING_BINARY_DIR}/include/sp_list.xml DESTINATION ${XMLDIR})
 
index 9044387..e1d0268 100755 (executable)
@@ -66,9 +66,11 @@ void setting_delete_enter(char *string);
 char *setting_get_service_fail_type(int type);
 
 xmlDocPtr setting_create_xml_tree(const char *path);
-void setting_traverse_xml_node(xmlNode *a_node, int depth, void *data);
+void setting_traverse_xml_node(xmlNode *a_node, int depth, void *data, int reset);
 void setting_cleanup_xml_parser(xmlDocPtr xml_source);
+EmailSpDesc *setting_find_sp_desc(char *id, EmailSettingUGD *ugd);
 void setting_dump_sp_desc(EmailSettingUGD *ugd);
+void setting_free_sp_desc(EmailSettingUGD *ugd);
 
 #endif                         /* __EMAIL_SETTING_UTILS_H__ */
 
index a810d43..b6b0e08 100755 (executable)
 #define CBAR_ICON_ADD IMGDIR"/01_controlbar_icon_create_folder.png"
 #define TITLE_ICON_REFRESH IMGDIR"/M02_email_icon_title_refresh.png"
 
-#define SP_XML_PATH DATADIR"/sp_list.xml"
-
-typedef enum {
-       HOTMAIL = 1,
-       GMAIL,
-       YAHOOMAIL,
-       AOL,
-       OTHERS
-} AccountInfo;
+#define SP_XML_PATH RESDIR"/xml/sp_list.xml"
 
 typedef struct sp_desc EmailSpDesc;
 struct sp_desc {
-       int id;
+       int index;
+       char *id;
        char *csc_code;
        char *name;
        char *name_str_id;
@@ -85,6 +78,7 @@ struct sp_desc {
        char *receiving_address;
        int receiving_port;
        int receiving_security;
+       int rgb;
 };
 
 typedef struct ug_data EmailSettingUGD;
@@ -121,7 +115,7 @@ struct ug_data {
        char *start_view_type;
 
        /* view specified variables */
-       AccountInfo account_info;
+       EmailSpDesc *account_info;
        email_account_t *new_account;
        email_account_t *account_list;
 
index 6ed3005..9e1c6f5 100755 (executable)
@@ -1,19 +1,35 @@
 <sp_list>\r
        <sp_desc csc_code="ALL">\r
-               <id>1</id>\r
+               <id>Hotmail</id>\r
+               <name>Windows Live Hotmail</name>\r
+               <name_str_id>IDS_EMAIL_BODY_WINDOWS_LIVE_HOTMAIL</name_str_id>\r
+               <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_hotmail.png</icon>\r
+               <sending_address>smtp.live.com</sending_address>\r
+               <sending_port>587</sending_port>\r
+               <sending_security>2</sending_security>\r
+               <receiving_server_type>pop</receiving_server_type>\r
+               <receiving_address>pop3.live.com</receiving_address>\r
+               <receiving_port>995</receiving_port>\r
+               <receiving_security>1</receiving_security>\r
+               <rgb>0xdc143cff</rgb>\r
+       </sp_desc>\r
+       <sp_desc csc_code="ALL">\r
+               <id>Gmail</id>\r
                <name>Google</name>\r
                <name_str_id>IDS_COM_BODY_GOOGLE</name_str_id>\r
                <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_gmail.png</icon>\r
                <sending_address>smtp.gmail.com</sending_address>\r
                <sending_port>465</sending_port>\r
-               <sending_security>0</sending_security>\r
+               <sending_security>1</sending_security>\r
                <receiving_server_type>imap</receiving_server_type>\r
                <receiving_address>imap.gmail.com</receiving_address>\r
                <receiving_port>993</receiving_port>\r
                <receiving_security>1</receiving_security>\r
+               <rgb>0x0000ffff</rgb>\r
        </sp_desc>\r
+       <!--\r
        <sp_desc csc_code="ALL">\r
-               <id>2</id>\r
+               <id>aol</id>\r
                <name>AOL</name>\r
                <name_str_id>IDS_EMAIL_BODY_AOL</name_str_id>\r
                <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_AOL.png</icon>\r
                <receiving_address>imap.aol.com</receiving_address>\r
                <receiving_port>143</receiving_port>\r
                <receiving_security>0</receiving_security>\r
-       </sp_desc>\r
-       <sp_desc csc_code="ALL">\r
-               <id>3</id>\r
-               <name>Windows Live Hotmail</name>\r
-               <name_str_id>IDS_EMAIL_BODY_WINDOW_LIVE_HOTMAIL</name_str_id>\r
-               <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_hotmail.png</icon>\r
-               <sending_address>smtp.live.com</sending_address>\r
-               <sending_port>587</sending_port>\r
-               <sending_security>2</sending_security>\r
-               <receiving_server_type>pop</receiving_server_type>\r
-               <receiving_address>pop3.live.com</receiving_address>\r
-               <receiving_port>995</receiving_port>\r
-               <receiving_security>1</receiving_security>\r
+               <rgb>0x008080ff</rgb>\r
        </sp_desc>\r
        <sp_desc csc_code="SKT">\r
-               <id>4</id>\r
+               <id>Yahoomail</id>\r
                <name>Yahoo</name>\r
                <name_str_id>IDS_EMAIL_BODY_YAHOO_E_MAIL</name_str_id>\r
                <icon>/usr/apps/org.tizen.email/res/images/M02_email_list_icon_YahooMail.png</icon>\r
@@ -50,5 +54,7 @@
                <receiving_address>pop.mail.yahoo.co.kr</receiving_address>\r
                <receiving_port>995</receiving_port>\r
                <receiving_security>1</receiving_security>\r
+               <rgb>0xdc143cff</rgb>\r
        </sp_desc>\r
+       -->\r
 </sp_list>\r
index 78549a4..eae933e 100755 (executable)
 #include "email-setting-defines.h"
 #include "email-view-setting.h"
 #include "email-setting-account-set.h"
+#include "email-setting-utils.h"
 
 #define DEFAULT_SIGNATURE _("IDS_EMAIL_BODY_SENT_USING_TIZEN_MOBILE")
 
-static void _set_gmail(struct viewdata *vd);
-static void _set_yahoomail(struct viewdata *vd);
-static void _set_hotmail(struct viewdata *vd);
-static void _set_aol(struct viewdata *vd);
-static void _set_others(struct viewdata *vd);
+static void _set_sp_email(struct viewdata *vd, EmailSpDesc *desc);
+static void _set_others_email(struct viewdata *vd);
 static void _set_user_name_with_email_addr(char *email_addr, char **user_name);
 static void _set_display_name_with_email_addr(char *email_addr, char **display_name);
 static void _account_info_print(email_account_t *account);
@@ -41,26 +39,14 @@ void setting_set_account(struct viewdata *vd)
        }
 
        EmailSettingUGD *ugd = vd->ugd;
+       EmailSpDesc *desc= ugd->account_info;
 
-       debug_log("%d", ugd->account_info);
-       int c = ugd->account_info;
-       switch (c) {
-       case GMAIL:
-               _set_gmail(vd);
-               break;
-       case YAHOOMAIL:
-               _set_yahoomail(vd);
-               break;
-       case HOTMAIL:
-               _set_hotmail(vd);
-               break;
-       case AOL:
-               _set_aol(vd);
-               break;
-       case OTHERS:
-               _set_others(vd);
-               break;
+       if (desc) {
+               _set_sp_email(vd, desc);
+       } else {
+               _set_others_email(vd);
        }
+
        return;
 }
 
@@ -74,7 +60,7 @@ void setting_set_account_with_server_info(email_protocol_config_t *incomming,
        int rgb = 0x006400ff;
 
        debug_log("service_name (%s)", service_name);
-       if (!g_strcmp0(service_name, "Hotmail"))
+       if (g_strcmp0(service_name, "Hotmail") == 0 || g_strcmp0(service_name, "AOL") == 0)
                account->incoming_server_user_name = g_strdup(account->user_email_address);
        else
                _set_user_name_with_email_addr(account->user_email_address, &(account->incoming_server_user_name));
@@ -85,16 +71,14 @@ void setting_set_account_with_server_info(email_protocol_config_t *incomming,
        account->return_address = g_strdup(account->user_email_address);
        account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_ALL;       /* EMAIL_IMAP4_RETRIEVAL_MODE_NEW; */
 
-       if (!g_strcmp0(service_name, "Gmail"))
-               preset_account = GMAIL;
-       else if (!g_strcmp0(service_name, "Hotmail"))
-               preset_account = HOTMAIL;
-       else if (!g_strcmp0(service_name, "Yahoo"))
-               preset_account = YAHOOMAIL;
-       else if (!g_strcmp0(service_name, "AOL"))
-               preset_account = AOL;
-       else
+       EmailSpDesc *desc = setting_find_sp_desc(service_name, ugd);
+       if (desc) {
+               preset_account = desc->index;
+               account->logo_icon_path = g_strdup(desc->icon_path);
+       } else {
                preset_account = 0;
+               account->logo_icon_path = g_strdup(ACCOUNT_ICON_OTHERS);
+       }
 
        account->auto_download_size = 1024*10;  /* downloading option, 0 is subject only, 1 is text body, 2 is normal. */
        account->outgoing_server_use_same_authenticator = 1;    /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3' */
@@ -117,17 +101,6 @@ void setting_set_account_with_server_info(email_protocol_config_t *incomming,
        account->options.add_signature = 1;
        account->options.signature = g_strdup(DEFAULT_SIGNATURE);
 
-       if (!g_strcmp0(service_name, "Gmail"))
-               account->logo_icon_path = g_strdup(ACCOUNT_ICON_GMAIL);
-       else if (!g_strcmp0(service_name, "Hotmail"))
-               account->logo_icon_path = g_strdup(ACCOUNT_ICON_HOTMAIL);
-       else if (!g_strcmp0(service_name, "Yahoo"))
-               account->logo_icon_path = g_strdup(ACCOUNT_ICON_YAHOO);
-       else if (!g_strcmp0(service_name, "AOL"))
-               account->logo_icon_path = g_strdup(ACCOUNT_ICON_AOL);
-       else
-               account->logo_icon_path = g_strdup(ACCOUNT_ICON_OTHERS);
-
        account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP;
        account->outgoing_server_need_authentication = 1;
 
@@ -158,7 +131,7 @@ void setting_set_account_with_server_info(email_protocol_config_t *incomming,
        _account_info_print(account);
 }
 
-static void _set_gmail(struct viewdata *vd)
+static void _set_sp_email(struct viewdata *vd, EmailSpDesc *desc)
 {
        debug_log("");
 
@@ -167,83 +140,8 @@ static void _set_gmail(struct viewdata *vd)
                return;
        }
 
-       EmailSettingUGD *ugd = vd->ugd;
-       email_account_t *account = NULL;
-       account = ugd->new_account;
-
-       int rgb = 0x0000ffff;
-
-       _set_user_name_with_email_addr(account->user_email_address, &(account->incoming_server_user_name));
-       _set_display_name_with_email_addr(account->user_email_address, &(account->user_display_name));
-
-       account->account_name = g_strdup(dgettext("sys_string", "IDS_COM_BODY_GOOGLE"));
-       account->reply_to_address = g_strdup(account->user_email_address);
-       account->return_address = g_strdup(account->user_email_address);
-       account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_ALL;       /* EMAIL_IMAP4_RETRIEVAL_MODE_NEW; */
-
-       account->auto_download_size = 1024*10;  /* downloading option, 0 is subject only, 1 is text body, 2 is normal. */
-       account->outgoing_server_use_same_authenticator = 1;    /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3' */
-       account->default_mail_slot_size = 25;
-
-       account->pop_before_smtp = 0;
-       account->incoming_server_requires_apop = 0;
-
-       account->options.priority = 3;
-       account->options.keep_local_copy = 1;
-       account->options.req_delivery_receipt = 0;
-       account->options.req_read_receipt = 0;
-       account->options.download_limit = 0;
-       account->options.block_address = 1;
-       account->options.block_subject = 1;
-       account->options.display_name_from = NULL;
-       account->options.reply_with_body = 1;
-       account->options.forward_with_files = 1;
-       account->options.add_myname_card = 0;
-       account->options.add_signature = 1;
-       account->options.signature = g_strdup(DEFAULT_SIGNATURE);
-
-       account->logo_icon_path = g_strdup(ACCOUNT_ICON_GMAIL);
-
-       account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP;
-       account->outgoing_server_need_authentication = 1;
-
-       /*account->user_display_name = g_strdup(account->user_display_name);
-       account->user_email_address = g_strdup("<User ID>@gmail.com");
-       account->incoming_server_password = g_strdup(<User Password>);*/
-
-       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);
-
-       /*user data set*/
-       account_user_data_t data;
-       data.index_color = rgb;
-       data.is_preset_account = GMAIL;
-       data.show_images = 1;
-       data.send_read_report = 0;
-       data.pop3_deleting_option = 0;
-
-       int data_len = sizeof(account_user_data_t);
-       account->user_data = calloc(1, data_len);
-       memcpy(account->user_data, (void *)&data, data_len);
-       account->user_data_length = data_len;
-
-       _account_info_print(account);
-}
-
-static void _set_yahoomail(struct viewdata *vd)
-{
-       debug_log("");
-
-       if (!vd) {
-               debug_log("vd is NULL");
+       if (!desc) {
+               debug_log("EmailSpDesc is NULL");
                return;
        }
 
@@ -251,173 +149,17 @@ static void _set_yahoomail(struct viewdata *vd)
        email_account_t *account = NULL;
        account = ugd->new_account;
 
-       int rgb = 0xdc143cff;
-
-       _set_user_name_with_email_addr(account->user_email_address, &(account->incoming_server_user_name));
-       _set_display_name_with_email_addr(account->user_email_address, &(account->user_display_name));
-
-       account->account_name = g_strdup(_("IDS_EMAIL_BODY_YAHOO_E_MAIL"));
-       account->reply_to_address = g_strdup(account->user_email_address);
-       account->return_address = g_strdup(account->user_email_address);
-       account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_ALL;       /* EMAIL_IMAP4_RETRIEVAL_MODE_NEW; */
-
-       account->auto_download_size = 1024*10;  /* downloading option, 0 is subject only, 1 is text body, 2 is normal. */
-       account->outgoing_server_use_same_authenticator = 1;    /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3' */
-       account->default_mail_slot_size = 25;
-
-       account->pop_before_smtp = 0;
-       account->incoming_server_requires_apop = 0;
-
-       account->options.priority = 3;
-       account->options.keep_local_copy = 1;
-       account->options.req_delivery_receipt = 0;
-       account->options.req_read_receipt = 0;
-       account->options.download_limit = 0;
-       account->options.block_address = 1;
-       account->options.block_subject = 1;
-       account->options.display_name_from = NULL;
-       account->options.reply_with_body = 1;
-       account->options.forward_with_files = 1;
-       account->options.add_myname_card = 0;
-       account->options.add_signature = 1;
-       account->options.signature = g_strdup(DEFAULT_SIGNATURE);
-
-       account->logo_icon_path = g_strdup(ACCOUNT_ICON_YAHOO);
-
-       account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP;
-       account->outgoing_server_need_authentication = 1;
-
-       /*account->user_display_name = g_strdup(account->user_display_name);
-       account->user_email_address = g_strdup("<User ID>@yahoo.com");
-       account->incoming_server_password = g_strdup(<User Password>);*/
-
-       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/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);
-
-       /*user data set*/
-       account_user_data_t data;
-       data.index_color = rgb;
-       data.is_preset_account = YAHOOMAIL;
-       data.show_images = 1;
-       data.send_read_report = 0;
-       data.pop3_deleting_option = 0;
-
-       int data_len = sizeof(account_user_data_t);
-       account->user_data = calloc(1, data_len);
-       memcpy(account->user_data, (void *)&data, data_len);
-       account->user_data_length = data_len;
-
-       _account_info_print(account);
-}
-
-static void _set_hotmail(struct viewdata *vd)
-{
-       debug_log("");
-
-       if (!vd) {
-               debug_log("vd is NULL");
-               return;
-       }
-
-       EmailSettingUGD *ugd = vd->ugd;
-       email_account_t *account = NULL;
-       account = ugd->new_account;
-
-       int rgb = 0xdc143cff;
-
-       /* hotmail use email address in user name field */
-       account->incoming_server_user_name = g_strdup(account->user_email_address);
-       _set_display_name_with_email_addr(account->user_email_address, &(account->user_display_name));
-
-       account->account_name = g_strdup(_("IDS_EMAIL_BODY_WINDOWS_LIVE_HOTMAIL"));
-       account->reply_to_address = g_strdup(account->user_email_address);
-       account->return_address = g_strdup(account->user_email_address);
-       account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_ALL;       /* EMAIL_IMAP4_RETRIEVAL_MODE_NEW; */
-
-       account->auto_download_size = 1024*10;  /* downloading option, 0 is subject only, 1 is text body, 2 is normal. */
-       account->outgoing_server_use_same_authenticator = 1;    /* Specifies the 'Same as POP3' option, 0 is none, 1 is 'Same as POP3' */
-       account->default_mail_slot_size = 25;
-
-       account->pop_before_smtp = 0;
-       account->incoming_server_requires_apop = 0;
-
-       account->options.priority = 3;
-       account->options.keep_local_copy = 1;
-       account->options.req_delivery_receipt = 0;
-       account->options.req_read_receipt = 0;
-       account->options.download_limit = 0;
-       account->options.block_address = 1;
-       account->options.block_subject = 1;
-       account->options.display_name_from = NULL;
-       account->options.reply_with_body = 1;
-       account->options.forward_with_files = 1;
-       account->options.add_myname_card = 0;
-       account->options.add_signature = 1;
-       account->options.signature = g_strdup(DEFAULT_SIGNATURE);
-
-       account->logo_icon_path = g_strdup(ACCOUNT_ICON_HOTMAIL);
-
-       account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP;
-       account->outgoing_server_need_authentication = 1;
-
-       /*account->user_display_name = g_strdup(account->user_display_name);
-       account->user_email_address = g_strdup("<User ID>@aol.com");
-       account->incoming_server_password = g_strdup(<User Password>);*/
-
-       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/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);
-
-       /*user data set*/
-       account_user_data_t data;
-       data.index_color = rgb;
-       data.is_preset_account = HOTMAIL;
-       data.show_images = 1;
-       data.send_read_report = 0;
-       data.pop3_deleting_option = 0;
-
-       int data_len = sizeof(account_user_data_t);
-       account->user_data = calloc(1, data_len);
-       memcpy(account->user_data, (void *)&data, data_len);
-       account->user_data_length = data_len;
-
-       _account_info_print(account);
-}
-
-static void _set_aol(struct viewdata *vd)
-{
-       debug_log("");
-
-       if (!vd) {
-               debug_log("vd is NULL");
-               return;
-       }
-
-       EmailSettingUGD *ugd = vd->ugd;
-       email_account_t *account = NULL;
-       account = ugd->new_account;
-
-       int rgb = 0x008080ff;
+       if (g_strcmp0(desc->id, "Hotmail") == 0 || g_strcmp0(desc->id, "AOL") == 0)
+               account->incoming_server_user_name = g_strdup(account->user_email_address);
+       else
+               _set_user_name_with_email_addr(account->user_email_address, &(account->incoming_server_user_name));
 
-       account->incoming_server_user_name = g_strdup(account->user_email_address);
        _set_display_name_with_email_addr(account->user_email_address, &(account->user_display_name));
 
-       account->account_name = g_strdup(_("IDS_EMAIL_BODY_AOL"));
+       if (g_str_has_prefix(desc->name_str_id, "IDS_EMAIL"))
+               account->account_name = g_strdup(_(desc->name_str_id));
+       else
+               account->account_name = g_strdup(dgettext("sys_string", desc->name_str_id));
        account->reply_to_address = g_strdup(account->user_email_address);
        account->return_address = g_strdup(account->user_email_address);
        account->retrieval_mode = EMAIL_IMAP4_RETRIEVAL_MODE_ALL;       /* EMAIL_IMAP4_RETRIEVAL_MODE_NEW; */
@@ -443,30 +185,32 @@ static void _set_aol(struct viewdata *vd)
        account->options.add_signature = 1;
        account->options.signature = g_strdup(DEFAULT_SIGNATURE);
 
-       account->logo_icon_path = g_strdup(ACCOUNT_ICON_AOL);
+       account->logo_icon_path = g_strdup(desc->icon_path);
 
        account->outgoing_server_type = EMAIL_SERVER_TYPE_SMTP;
        account->outgoing_server_need_authentication = 1;
 
-       /*account->user_display_name = g_strdup(account->user_display_name);
-       account->user_email_address = g_strdup("<User ID>@aol.com");
-       account->incoming_server_password = g_strdup(<User Password>);*/
+       char *upper_str = g_ascii_strup(desc->receiving_server_type, -1);
+       if (g_strcmp0(upper_str, "IMAP") == 0 || g_strcmp0(upper_str, "IMAP4") == 0)
+               account->incoming_server_type = EMAIL_SERVER_TYPE_IMAP4;
+       else if (g_strcmp0(upper_str, "POP") == 0 || g_strcmp0(upper_str, "POP3") == 0)
+               account->incoming_server_type = EMAIL_SERVER_TYPE_POP3;
+       g_free(upper_str);
 
-       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->incoming_server_port_number = desc->receiving_port;
+       account->incoming_server_secure_connection = desc->receiving_security;
+       account->incoming_server_address = g_strdup(desc->receiving_address);
 
-       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_port_number = desc->sending_port;
+       account->outgoing_server_secure_connection = desc->sending_security;
+       account->outgoing_server_address = g_strdup(desc->sending_address);
        account->outgoing_server_user_name = g_strdup(account->incoming_server_user_name);
        account->outgoing_server_password = g_strdup(account->incoming_server_password);
 
        /*user data set*/
        account_user_data_t data;
-       data.index_color = rgb;
-       data.is_preset_account = AOL;
+       data.index_color = desc->rgb;
+       data.is_preset_account = desc->index;
        data.show_images = 1;
        data.send_read_report = 0;
        data.pop3_deleting_option = 0;
@@ -479,7 +223,7 @@ static void _set_aol(struct viewdata *vd)
        _account_info_print(account);
 }
 
-static void _set_others(struct viewdata *vd)
+static void _set_others_email(struct viewdata *vd)
 {
        debug_log("");
 
index 7486884..b0fb600 100755 (executable)
@@ -478,12 +478,8 @@ void setting_edbus_event_receive(void *local_data, DBusMessage *message)
                                debug_log("account added");
                                if (g_strcmp0(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_FIRST_SETUP) == 0) {
 
-                                       if (ugd->account_info >= HOTMAIL && ugd->account_info <= OTHERS) {
-                                               if (!ugd->start_account_validation) {
+                                       if (!ugd->start_account_validation) {
                                                        ug_destroy_me(ugd->ug);
-                                               }
-                                       } else {
-                                               ug_destroy_me(ugd->ug);
                                        }
                                } else {
                                        if (ugd->b_on_pause) {
@@ -800,7 +796,7 @@ char *setting_get_service_fail_type(int type)
                ret = N_("Sytem failure");
                return strdup(ret);
        } else if (type == EMAIL_ERROR_CANCELLED) {
-               ret = N_("Canceled by user");
+               ret = N_("Cancelled by user");
                return strdup(ret);
        } else if (type == EMAIL_ERROR_CERTIFICATE_FAILURE) {
                ret = N_("Certificate failure");
@@ -833,7 +829,7 @@ char *setting_get_service_fail_type(int type)
                ret = N_("TLS/SSL failure");
                return strdup(ret);
        } else {
-               snprintf(str, sizeof(str), "%s (%d)", dgettext("sys_string", "IDS_COM_POP_INTERNAL_ERROR"), type);
+               snprintf(str, sizeof(str), "%s (%d)", dgettext("sys_string", "IDS_COM_POP_UNKNOWN_ERROR_OCCURRED"), type);
                return strdup(str);
        }
 }
@@ -852,19 +848,20 @@ xmlDocPtr setting_create_xml_tree(const char *path)
        return xml_source;
 }
 
-void setting_traverse_xml_node(xmlNode *a_node, int depth, void *data)
+void setting_traverse_xml_node(xmlNode *a_node, int depth, void *data, int reset)
 {
-       debug_log("");
        xmlNode *cur_node = NULL;
        EmailSettingUGD *ugd = (EmailSettingUGD *)data;
        static int i=0;
+       if (reset) i = 0;
+
        for (cur_node=a_node; cur_node; cur_node=cur_node->next) {
                if (cur_node->type == XML_ELEMENT_NODE) {
-                       /*debug_log("Level%d Node\nName:%s", depth, cur_node->name);*/
+                       //debug_log("Level%d Node\nName:%s", depth, cur_node->name);
                        if (cur_node->properties != NULL) {
                                struct _xmlAttr* pAttr=cur_node->properties;
                                while (pAttr != NULL) {
-                                       /*debug_log("Property:%s=\"%s\"", pAttr->name, pAttr->children->content);*/
+                                       //debug_log("Property:%s=\"%s\"", pAttr->name, pAttr->children->content);
                                        if (depth == 1 && i < ugd->sp_list_len && g_strcmp0("csc_code", (char *)pAttr->name) == 0)
                                                ugd->sp_list[i].csc_code = g_strdup((char *)pAttr->children->content);
                                        pAttr=pAttr->next;
@@ -872,10 +869,11 @@ void setting_traverse_xml_node(xmlNode *a_node, int depth, void *data)
                        }
 
                        if (cur_node->children != NULL) {
-                               /*debug_log("Content:%s", cur_node->children->content);*/
+                               //debug_log("Content:%s", cur_node->children->content);
                                if (depth == 2 && i < ugd->sp_list_len) {
+                                       ugd->sp_list[i].index = i+1;
                                        if (g_strcmp0("id", (char *)cur_node->name) == 0) {
-                                               ugd->sp_list[i].id = atoi((char *)cur_node->children->content);
+                                               ugd->sp_list[i].id = g_strdup((char *)cur_node->children->content);
                                        } else if (g_strcmp0("name", (char *)cur_node->name) == 0) {
                                                ugd->sp_list[i].name = g_strdup((char *)cur_node->children->content);
                                        } else if (g_strcmp0("name_str_id", (char *)cur_node->name) == 0) {
@@ -896,9 +894,12 @@ void setting_traverse_xml_node(xmlNode *a_node, int depth, void *data)
                                                ugd->sp_list[i].receiving_port = atoi((char *)cur_node->children->content);
                                        } else if (g_strcmp0("receiving_security", (char *)cur_node->name) == 0) {
                                                ugd->sp_list[i].receiving_security = atoi((char *)cur_node->children->content);
+                                       } else if (g_strcmp0("rgb", (char *)cur_node->name) == 0) {
+                                               long rgb = strtoul((char *)cur_node->children->content, NULL, 16);
+                                               ugd->sp_list[i].rgb = rgb;
                                        }
                                }
-                               setting_traverse_xml_node(cur_node->children, depth+1, data);
+                               setting_traverse_xml_node(cur_node->children, depth+1, data, 0);
                        }
 
                        if (depth == 1) i++;
@@ -915,6 +916,22 @@ void setting_cleanup_xml_parser(xmlDocPtr xml_source)
        }
 }
 
+EmailSpDesc *setting_find_sp_desc(char *id, EmailSettingUGD *ugd)
+{
+       debug_log("");
+       int i=0;
+       EmailSpDesc *desc = NULL;
+
+       for (i=0; i<ugd->sp_list_len; i++) {
+               desc = &(ugd->sp_list[i]);
+               if (g_strcmp0(desc->id, id) == 0) {
+                       return desc;
+               }
+       }
+
+       return NULL;
+}
+
 void setting_dump_sp_desc(EmailSettingUGD *ugd)
 {
        debug_log("");
@@ -923,7 +940,7 @@ void setting_dump_sp_desc(EmailSettingUGD *ugd)
        for (i=0; i<ugd->sp_list_len; i++) {
                desc = &(ugd->sp_list[i]);
                debug_log("SP-%d===========================================", i);
-               debug_log("ID:%d", desc->id);
+               debug_log("ID:%s", desc->id);
                debug_log("CSC:%s", desc->csc_code);
                debug_log("Name:%s", desc->name);
                debug_log("Name STR:%s", desc->name_str_id);
@@ -938,4 +955,30 @@ void setting_dump_sp_desc(EmailSettingUGD *ugd)
                debug_log("");
        }
 }
+
+void setting_free_sp_desc(EmailSettingUGD *ugd)
+{
+       debug_log("");
+       int i=0;
+       EmailSpDesc *desc = NULL;
+
+       if (ugd->sp_list_len > 0 && ugd->sp_list) {
+               for (i=0; i<ugd->sp_list_len; i++) {
+                       desc = &(ugd->sp_list[i]);
+                       if (desc) {
+                               g_free(desc->id);
+                               g_free(desc->csc_code);
+                               g_free(desc->name);
+                               g_free(desc->name_str_id);
+                               g_free(desc->icon_path);
+                               g_free(desc->sending_address);
+                               g_free(desc->receiving_server_type);
+                               g_free(desc->receiving_address);
+                       }
+               }
+
+               g_free(ugd->sp_list);
+               ugd->sp_list = NULL;
+       }
+}
 /* EOF */
index 6a1e078..39ea457 100755 (executable)
@@ -296,6 +296,8 @@ static void on_destroy(ui_gadget_h ug, service_h service, void *priv)
                ugd->del_timer = NULL;
        }
 
+       setting_free_sp_desc(ugd);
+
        /* theme extension */
        /*elm_theme_extension_del(ugd->theme, EV_THEME_PATH);
        elm_theme_free(ugd->theme);*/
@@ -377,8 +379,9 @@ static void on_start(ui_gadget_h ug, service_h service, void *priv)
                debug_log("Failed to get account list");
        }
 
-#if 0
        /* create xml tree */
+       setting_free_sp_desc(ugd);
+
        xmlDocPtr xml_source = setting_create_xml_tree(SP_XML_PATH);
        if(!xml_source) {
                Evas_Object *popup = elm_popup_add(ugd->layout_main);
@@ -404,11 +407,10 @@ static void on_start(ui_gadget_h ug, service_h service, void *priv)
        debug_log("Count of SP list:%d", sp_count);
        if (sp_count > 0) {
                ugd->sp_list = (EmailSpDesc *)calloc(sp_count, sizeof(EmailSpDesc));
-               setting_traverse_xml_node(root, 0, (void *)ugd);
+               setting_traverse_xml_node(root, 0, (void *)ugd, 1);
                setting_dump_sp_desc(ugd);
        }
        setting_cleanup_xml_parser(xml_source);
-#endif
 
        if (!_parse_option(service, ugd)) {
                return;
@@ -654,27 +656,20 @@ static int _parse_option(service_h service, struct ug_data *ugd)
                        /* account add view */
                        char *account_name = NULL;
                        service_get_extra_data(service, EMAIL_BUNDLE_KEY_ESP_NAME, &account_name);
-                       if (!strcmp(account_name, EMAIL_BUNDLE_VAL_ESP_GMAIL)) {
-                               debug_log("gmail");
-                               ugd->account_info = GMAIL;
-                       } else if (!strcmp(account_name, EMAIL_BUNDLE_VAL_ESP_YAHOO)) {
-                               debug_log("yahoomail");
-                               ugd->account_info = YAHOOMAIL;
-                       } else if (!strcmp(account_name, EMAIL_BUNDLE_VAL_ESP_AOL)) {
-                               debug_log("aol");
-                               ugd->account_info = AOL;
-                       } else if (!strcmp(account_name, EMAIL_BUNDLE_VAL_ESP_HOTMAIL)) {
-                               debug_log("hotmail");
-                               ugd->account_info = HOTMAIL;
-                       } else if (!strcmp(account_name, EMAIL_BUNDLE_VAL_ESP_MSN)) {
-                               debug_log("msn");
-                               ugd->account_info = HOTMAIL;
-                       } else if (!strcmp(account_name, EMAIL_BUNDLE_VAL_ESP_OTHERS)) {
-                               debug_log("others");
-                               ugd->account_info = OTHERS;
-                       } else {
-                               debug_log("Invalid account type!!(%s)", account_name);
-                       }
+                       debug_log("Account name:%s", account_name);
+
+                       EmailSpDesc *desc = NULL;
+                       if (g_strcmp0(account_name, "gmail") == 0)
+                               desc = setting_find_sp_desc("Gmail", ugd);
+                       else if (g_strcmp0(account_name, "msn") == 0)
+                               desc = setting_find_sp_desc("Hotmail", ugd);
+                       else
+                               desc = NULL;
+
+                       if (desc)
+                               ugd->account_info = desc;
+                       else
+                               ugd->account_info = NULL;
 
                        g_free(account_name);
                }
index d978b64..d5c429a 100755 (executable)
@@ -446,24 +446,16 @@ static void _push_naviframe(struct viewdata *vd)
        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_icon_file_set(title_ic, account_data->logo_icon_path, NULL);
+       
        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);
+       if (user_data->is_preset_account != 0)
+               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);
 }
@@ -1393,7 +1385,7 @@ static char *_gl_onoff_text_get_cb(void *data, Evas_Object *obj, const char *par
                }
 
                if (index == 2) {
-                       snprintf(buf, sizeof(buf), "%s", N_("Same as POP3/IMAP4"));
+                       snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_SAME_AS_POP3_IMAP4"));
                }
 
                return g_strdup(buf);
index aa7b613..c7a5ebe 100755 (executable)
@@ -895,7 +895,7 @@ static char *_gl_onoff_text_get_cb(void *data, Evas_Object *obj, const char *par
                }
 
                if (index == 3) {
-                       snprintf(buf, sizeof(buf), "%s", N_("Request delivery report"));
+                       snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_REQUEST_DELIVERY_REPORT"));
                }
 
                if (index == 4) {
@@ -1047,12 +1047,14 @@ static char *_gl_mailbox_text_get_cb(void *data, Evas_Object *obj, const char *p
        }
 
        if (!g_strcmp0(part, "elm.text.2")) {
-               email_mailbox_t *mailbox;
+               email_mailbox_t *mailbox = NULL;
                char buf[MAX_STR_LEN] = { 0, };
 
                email_get_mailbox_by_mailbox_type(ugd->account_id, type, &mailbox);
-               snprintf(buf, sizeof(buf), "%s", mailbox->alias);
-               email_free_mailbox(&mailbox, 1);
+               if (mailbox) {
+                       snprintf(buf, sizeof(buf), "%s", mailbox->alias);
+                       email_free_mailbox(&mailbox, 1);
+               }
 
                return g_strdup(buf);
        }
@@ -1190,33 +1192,11 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
 
        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;
-
-               debug_log("is_preset_account:%d", user_data->is_preset_account);
-
-               switch (user_data->is_preset_account) {
-               case GMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_GMAIL, NULL);
-                       break;
-               case HOTMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_HOTMAIL, NULL);
-                       break;
-               case YAHOOMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_YAHOO, NULL);
-                       break;
-               case AOL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_AOL, NULL);
-                       break;
-               case OTHERS:
-               default:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_OTHERS, NULL);
-                       break;
-               }
 
+               elm_icon_file_set(icon, account_data->logo_icon_path, NULL);
                evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
 
                p->account_icon = icon;
-
                return icon;
        }
 
@@ -1467,6 +1447,9 @@ static void _gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
        elm_genlist_item_selected_set(item, EINA_FALSE);
        account_user_data_t *user_data = NULL;
 
+       if (p->entry_sig)
+               elm_object_focus_set(p->entry_sig, EINA_FALSE);
+
        switch (index) {
        case 0:
                account_data->options.reply_with_body = !account_data->options.reply_with_body;
@@ -1733,6 +1716,9 @@ static void _gl_exp_cb(void *data, Evas_Object *obj, void *event_info)
        /*EmailSettingUGD *ugd = vd->ugd;*/
        int i = 0;
 
+       if (p->entry_sig)
+               elm_object_focus_set(p->entry_sig, EINA_FALSE);
+
        if (it == p->gl_cc_item) {
                for (i = 0; i < 3; i++) {
                        elm_genlist_item_append(p->genlist, &(p->itc_ex_cc), (void *)i,
@@ -1761,6 +1747,12 @@ static void _gl_con_cb(void *data, Evas_Object *obj, void *event_info)
        debug_log("");
        Elm_Object_Item *item = event_info;
        elm_genlist_item_subitems_clear(item);
+
+       struct viewdata *vd = (struct viewdata *)data;
+       struct priv_data *p = vd->priv;
+
+       if (p->entry_sig)
+               elm_object_focus_set(p->entry_sig, EINA_FALSE);
 }
 
 /* EOF */
index d9633e6..df8b8e3 100755 (executable)
@@ -33,7 +33,7 @@ static void _create_account(void *data);
 
 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 int _check_preset_isp_name(char *addr, EmailSpDesc *desc);
 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);
@@ -231,7 +231,7 @@ static int _create(struct viewdata *vd)
        g_vd = vd;
        ugd->wds_account_creation = 0;
 
-       if (vd->ugd->account_info != OTHERS) {
+       if (vd->ugd->account_info != NULL) {
                _set_domain_string(vd);
        }
 
@@ -293,7 +293,7 @@ static int _destroy(struct viewdata *vd)
                ugd->popup_validate = NULL;
        }
 
-       ugd->account_info = 0;
+       ugd->account_info = NULL;
 
        setting_new_acct_final(vd);
        return TRUE;
@@ -337,9 +337,9 @@ static void _push_naviframe(struct viewdata *vd)
        elm_object_style_set(p->cbar, "naviframe");
        evas_object_show(p->cbar);
 
-       if (vd->ugd->account_info == OTHERS) {
+       if (vd->ugd->account_info == NULL) {
                p->c_item[0] = elm_toolbar_item_append(p->cbar, NULL,
-                               dgettext("sys_string", "IDS_COM_BUTTON_LOGIN"), _next_cb, vd);
+                               dgettext("sys_string", "IDS_COM_SK_NEXT"), _next_cb, vd);
        } else {
                p->c_item[0] = elm_toolbar_item_append(p->cbar, NULL,
                                dgettext("sys_string", "IDS_COM_BUTTON_LOGIN"), _save_cb, vd);
@@ -353,8 +353,8 @@ static void _push_naviframe(struct viewdata *vd)
        elm_object_focus_allow_set(p->l_button, EINA_FALSE);
        evas_object_show(p->l_button);
 
-       if (vd->ugd->account_info == OTHERS) {
-               elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_BUTTON_LOGIN"));
+       if (vd->ugd->account_info == NULL) {
+               elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_SK_NEXT"));
                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_BUTTON_LOGIN"));
@@ -383,23 +383,19 @@ static void _push_naviframe(struct viewdata *vd)
 
        Elm_Object_Item *navi_it = NULL;
        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
+       if (vd->ugd->account_info) {
+               if (g_str_has_prefix(vd->ugd->account_info->name_str_id, "IDS_EMAIL"))
+                       snprintf(title_str, sizeof(title_str), "%s", _(vd->ugd->account_info->name_str_id));
+               else
+                       snprintf(title_str, sizeof(title_str), "%s", dgettext("sys_string", vd->ugd->account_info->name_str_id));
+
+               elm_icon_file_set(title_ic, vd->ugd->account_info->icon_path, 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);
-       if (vd->ugd->account_info != OTHERS) {
+       if (vd->ugd->account_info) {
                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);
@@ -430,12 +426,12 @@ static void _create_view(struct viewdata *vd)
        Evas_Object *sub_ly = elm_layout_add(ugd->navi_bar);
 
        if (w == 480) {
-               if (vd->ugd->account_info == OTHERS)
+               if (vd->ugd->account_info == NULL)
                        elm_layout_file_set(sub_ly, EV_THEME_PATH, "other_account_add_wvga");
                else
                        elm_layout_file_set(sub_ly, EV_THEME_PATH, "account_add_wvga");
        } else {
-               if (vd->ugd->account_info == OTHERS)
+               if (vd->ugd->account_info == NULL)
                        elm_layout_file_set(sub_ly, EV_THEME_PATH, "other_account_add");
                else
                        elm_layout_file_set(sub_ly, EV_THEME_PATH, "account_add");
@@ -447,7 +443,11 @@ static void _create_view(struct viewdata *vd)
        elm_object_part_content_set(sub_ly, "list", p->genlist);
 
        Evas_Object *checkbox_set = elm_layout_add(sub_ly);
-       elm_layout_file_set(checkbox_set, EV_THEME_PATH, "account_add_checkbox_set");
+       if (w == 480) {
+               elm_layout_file_set(checkbox_set, EV_THEME_PATH, "account_add_checkbox_set_wvga");
+       } else {
+               elm_layout_file_set(checkbox_set, EV_THEME_PATH, "account_add_checkbox_set");
+       }
        evas_object_size_hint_weight_set(checkbox_set, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_show(checkbox_set);
 
@@ -496,7 +496,11 @@ static void _create_view(struct viewdata *vd)
        elm_object_part_content_set(sub_ly, "checkbox_set", checkbox_set);
 
        Evas_Object *button_set = elm_layout_add(sub_ly);
-       elm_layout_file_set(button_set, EV_THEME_PATH, "account_add_manual_button");
+       if (w == 480) {
+               elm_layout_file_set(button_set, EV_THEME_PATH, "account_add_manual_button_wvga");
+       } else {
+               elm_layout_file_set(button_set, EV_THEME_PATH, "account_add_manual_button");
+       }
        evas_object_size_hint_weight_set(button_set, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_show(button_set);
 
@@ -553,7 +557,7 @@ static void _create_list(struct viewdata *vd)
                        ELM_GENLIST_ITEM_GROUP, NULL, NULL);
        elm_genlist_item_select_mode_set(git, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       if (ugd->account_info == OTHERS) {
+       if (ugd->account_info == NULL) {
                /* Account name for OTHER */
                i = 1;
                item = elm_genlist_item_append(p->genlist, &(p->itc2), (void *)i, git,
@@ -714,12 +718,12 @@ static int _check_preset_null_field(struct viewdata *vd)
                return TRUE;
 }
 
-static int _check_preset_isp_name(char *addr, int isp_type)
+static int _check_preset_isp_name(char *addr, EmailSpDesc *desc)
 {
        debug_log("");
        int ret = FALSE;
 
-       if (isp_type == HOTMAIL) {
+       if (g_strcmp0(desc->id, "Hotmail") == 0) {
                char *ptr1 = NULL;
                char *ptr2 = NULL;
                ptr1 = g_strrstr(addr, "@hotmail.");
@@ -727,10 +731,10 @@ static int _check_preset_isp_name(char *addr, int isp_type)
 
                if (ptr1 != NULL || ptr2 != NULL)
                        ret = TRUE;
-       } else if (isp_type == GMAIL) {
+       } else if (g_strcmp0(desc->id, "Gmail") == 0) {
                ret = g_str_has_suffix(addr, "@gmail.com") ||
                                g_str_has_suffix(addr, "@googlemail.com");
-       } else if (isp_type == AOL) {
+       } else if (g_strcmp0(desc->id, "AOL") == 0) {
                char *ptr1 = NULL;
                char *ptr2 = NULL;
                ptr1 = g_strrstr(addr, "@aol.");
@@ -764,7 +768,7 @@ static void _read_all_entries(struct viewdata *vd)
        setting_new_acct_init(vd);
        email_account_t *account = vd->ugd->new_account;
 
-       if (vd->ugd->account_info == OTHERS) {
+       if (vd->ugd->account_info == NULL) {
                /*buf = elm_entry_markup_to_utf8(elm_entry_entry_get(p->entry_account_name));*/
                if (p->entry_account_name) {
                        buf = (char *)elm_entry_entry_get(p->entry_account_name);
@@ -799,13 +803,13 @@ static void _set_domain_string(struct viewdata *vd)
        struct priv_data *p;
        p = vd->priv;
 
-       if (ugd->account_info == HOTMAIL) {
+       if (g_strcmp0(ugd->account_info->id, "Hotmail") == 0) {
                p->str_email_address = g_strdup("@hotmail.com");
-       } else if (ugd->account_info == YAHOOMAIL) {
+       } else if (g_strcmp0(ugd->account_info->id, "Yahoomail") == 0) {
                p->str_email_address = g_strdup("@yahoo.com");
-       } else if (ugd->account_info == GMAIL) {
+       } else if (g_strcmp0(ugd->account_info->id, "Gmail") == 0) {
                p->str_email_address = g_strdup("@gmail.com");
-       } else if (ugd->account_info == AOL) {
+       } else if (g_strcmp0(ugd->account_info->id, "AOL") == 0) {
                p->str_email_address = g_strdup("@aol.com");
        } else {
                debug_log("Unknown account type");
@@ -1018,7 +1022,7 @@ static void _manual_cb(void *data, Evas_Object *obj, void *event_info)
        }
 
        /* check Null field */
-       if (vd->ugd->account_info == OTHERS) {
+       if (vd->ugd->account_info == NULL) {
                ret = _check_null_field(vd);
        } else {
                ret = _check_preset_null_field(vd);
@@ -1034,7 +1038,7 @@ static void _manual_cb(void *data, Evas_Object *obj, void *event_info)
        }
 
        /* check ISP */
-       if (ugd->account_info != OTHERS) {
+       if (ugd->account_info) {
                buf = g_strdup(account->user_email_address);
                ret = _check_preset_isp_name(buf, ugd->account_info);
                if (ret == FALSE) {
@@ -1068,7 +1072,7 @@ static void _manual_cb(void *data, Evas_Object *obj, void *event_info)
        g_free(buf);
 
        /* account info setting */
-       if (ugd->account_info != OTHERS)
+       if (ugd->account_info)
                setting_set_account(vd);
 
        setting_change_view(VIEW_MANUAL_SETUP, ugd);
@@ -1374,7 +1378,7 @@ static Eina_Bool _startup_focus_cb(void *data)
                ugd->focus_timer = NULL;
        }
 
-       if (ugd->account_info == OTHERS) {
+       if (ugd->account_info == NULL) {
                p->clicked_object = p->entry_account_name;
                elm_object_focus_set(p->entry_account_name, EINA_TRUE);
        } else {
@@ -1512,7 +1516,7 @@ static void _backup_input_cb(void *data, Evas_Object *obj, void *event_info)
                p->str_password = g_strdup(elm_entry_entry_get(eo));
        }
 
-       if (ugd->account_info == OTHERS) {
+       if (ugd->account_info == NULL) {
                if (p->str_account_name == NULL) {
                        elm_object_disabled_set(p->l_button, EINA_TRUE);
                        elm_object_disabled_set(p->manual_btn, EINA_TRUE);
@@ -1699,12 +1703,12 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
        int index = (int)data;
        struct viewdata *vd = g_vd;
        struct priv_data *p = vd->priv;
-       //EmailSettingUGD *ugd = vd->ugd;
+       EmailSettingUGD *ugd = vd->ugd;
        Ecore_IMF_Context *imf_context = NULL;
 
        if (!strcmp(part, "elm.icon")) {
                if (index == 1) {
-                       //p->icon_get_cnt1++;
+                       p->icon_get_cnt1++;
 
                        debug_log("");
                        p->ef_account_name = elm_layout_add(p->genlist);
@@ -1738,19 +1742,19 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
                        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 == NULL && 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 &&
+                       if (ugd->account_info == NULL && 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);
-                       }*/
+                       }
 
                        return p->ef_account_name;
                } else if (index == 2) {
@@ -1822,7 +1826,7 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
 
                        return p->ef_display_name;
                } else if (index == 4) {
-                       //p->icon_get_cnt2++;
+                       p->icon_get_cnt2++;
 
                        debug_log("");
                        p->ef_email_address = elm_layout_add(p->genlist);
@@ -1856,7 +1860,7 @@ 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 != NULL && 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);
@@ -1864,13 +1868,13 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
                                elm_entry_cursor_begin_set(p->entry_email_address);
                        }
 
-                       if (ugd->account_info != OTHERS && p->icon_get_cnt2 == 3 &&
+                       if (ugd->account_info != NULL && 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;
                } else if (index == 5) {
index cada600..b6e9526 100755 (executable)
@@ -25,23 +25,14 @@ static int _hide(struct viewdata *vd);
 
 static void _push_naviframe(struct viewdata *vd);
 static void _create_view(struct viewdata *vd);
-#ifndef INITIAL_VIEW_ADD_BTN
 static void _create_list(struct viewdata *vd);
-#endif
-#ifdef INITIAL_VIEW_ADD_BTN
-static void _add_account_cb(void *data, Evas_Object *obj, void *event_info);
-#endif
-#ifndef INITIAL_VIEW_ADD_BTN
 static void _new_account_cb(void *data, Evas_Object *obj, void *event_info);
-#endif
 static void _back_cb(void *data, Evas_Object *obj, void *event_info);
 
-#ifndef INITIAL_VIEW_ADD_BTN
 static Eina_Bool _gl_state_get_cb(void *data, Evas_Object *obj, const char *part);
 static void _gl_del_cb(void *data, Evas_Object *obj);
 static char *_gl_text_get_cb(void *data, Evas_Object *obj, const char *part);
 static Evas_Object *_gl_content_get_cb(void *data, Evas_Object *obj, const char *part);
-#endif
 
 struct priv_data {
        struct viewdata *vd;
@@ -54,8 +45,9 @@ struct priv_data {
        Evas_Object *b_btn2;
        Evas_Object *b_btn;
 
-       Elm_Genlist_Item_Class itc;
+       Elm_Genlist_Item_Class itc1;
        Elm_Genlist_Item_Class itc2;
+       Elm_Genlist_Item_Class itc3;
        Ecore_Timer *vc_timer;
        int as_flag;
 };
@@ -192,14 +184,6 @@ static void _create_view(struct viewdata *vd)
        evas_object_size_hint_weight_set(sub_ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_show(sub_ly);
 
-#ifdef INITIAL_VIEW_ADD_BTN
-       Evas_Object *btn = elm_button_add(ugd->navi_bar);
-       elm_object_text_set(btn, dgettext("sys_string", "IDS_COM_SK_ADD_ACCOUNT"));
-       evas_object_smart_callback_add(btn, "clicked", _add_account_cb, (void *)vd);
-       elm_object_style_set(btn, "text_only/style2");
-       evas_object_show(btn);
-#endif
-
        char *desc = g_strdup(_("IDS_EMAIL_BODY_YOU_CAN_USE_EMAIL_ON_YOUR_DEVICE_BY_ADDING_YOUR_ACCOUNT_IF_YOU_DO_NOT_HAVE_AN_EMAIL_ACCOUNT_SIGN_UP_FIRST"));
        Evas_Object *label = elm_label_add(ugd->navi_bar);
        elm_label_line_wrap_set(label, ELM_WRAP_WORD);
@@ -217,22 +201,13 @@ static void _create_view(struct viewdata *vd)
        evas_object_show(label);
        g_free(text);
 
-#ifndef INITIAL_VIEW_ADD_BTN
        _create_list(vd);
-#endif
 
-#ifdef INITIAL_VIEW_ADD_BTN
-       elm_object_part_content_set(sub_ly, "btn", btn);
-#endif
        elm_object_part_content_set(sub_ly, "label", label);
-#ifndef INITIAL_VIEW_ADD_BTN
        elm_object_part_content_set(sub_ly, "list", p->list);
-#endif
-
        elm_object_part_content_set(p->layout, "elm.swallow.content", sub_ly);
 }
 
-#ifndef INITIAL_VIEW_ADD_BTN
 static void _create_list(struct viewdata *vd)
 {
        debug_log("");
@@ -247,43 +222,33 @@ static void _create_list(struct viewdata *vd)
        /*elm_object_theme_set(p->list, ugd->theme);*/
        evas_object_show(p->list);
 
-       p->itc.item_style = "dialogue/1text.1icon.2";
-       p->itc.func.text_get = _gl_text_get_cb;
-       p->itc.func.content_get = _gl_content_get_cb;
-       p->itc.func.state_get = _gl_state_get_cb;
-       p->itc.func.del = _gl_del_cb;
+       p->itc1.item_style = "dialogue/1text.1icon.2";
+       p->itc1.func.text_get = _gl_text_get_cb;
+       p->itc1.func.content_get = _gl_content_get_cb;
+       p->itc1.func.state_get = _gl_state_get_cb;
+       p->itc1.func.del = _gl_del_cb;
 
-       p->itc2.item_style = "dialogue/separator/11/with_line";
-       p->itc2.func.text_get = NULL;
-       p->itc2.func.content_get = NULL;
-       p->itc2.func.state_get = NULL;
-       p->itc2.func.del = NULL;
+       p->itc3.item_style = "dialogue/separator/11/with_line";
+       p->itc3.func.text_get = NULL;
+       p->itc3.func.content_get = NULL;
+       p->itc3.func.state_get = NULL;
+       p->itc3.func.del = NULL;
 
-       git = elm_genlist_item_append(p->list, &(p->itc2), NULL, NULL,
+       git = elm_genlist_item_append(p->list, &(p->itc3), NULL, NULL,
                        ELM_GENLIST_ITEM_GROUP, NULL, NULL);
        elm_genlist_item_select_mode_set(git, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       for (index = HOTMAIL; index <= OTHERS; index++) {
-               if (index != YAHOOMAIL) {
-                       elm_genlist_item_append(p->list, &p->itc, (void *)index, git,
-                                       ELM_GENLIST_ITEM_NONE, _new_account_cb, vd);
-               }
+       for (index = 0; index < ugd->sp_list_len; index++) {
+               EmailSpDesc *desc = &(ugd->sp_list[index]);
+               elm_genlist_item_append(p->list, &p->itc1, (void *)desc, git,
+                               ELM_GENLIST_ITEM_NONE, _new_account_cb, vd);
        }
-}
-#endif
-
-#ifdef INITIAL_VIEW_ADD_BTN
-static void _add_account_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       debug_log("");
-       struct viewdata *vd = data;
 
-       /*elm_object_style_set(vd->ugd->bg, "group_list");*/
-       setting_change_view(VIEW_SP_SELECT, vd->ugd);
+       index = -1;
+       elm_genlist_item_append(p->list, &p->itc1, NULL, git,
+                       ELM_GENLIST_ITEM_NONE, _new_account_cb, vd);
 }
-#endif
 
-#ifndef INITIAL_VIEW_ADD_BTN
 static void _new_account_cb(void *data, Evas_Object *obj, void *event_info)
 {
        debug_log("");
@@ -300,12 +265,14 @@ static void _new_account_cb(void *data, Evas_Object *obj, void *event_info)
                return;
        }
 
-       ugd->account_info = (int)elm_object_item_data_get(it);
-       debug_log("ugd->account_info %d", ugd->account_info);
+       EmailSpDesc *desc = (EmailSpDesc *)elm_object_item_data_get(it);
+       if (desc)
+               ugd->account_info = desc;
+       else
+               ugd->account_info = NULL;
 
        setting_change_view(VIEW_ACCOUNT_SETUP, vd->ugd);
 }
-#endif
 
 static void _back_cb(void *data, Evas_Object *obj, void *event_info)
 {
@@ -315,7 +282,6 @@ static void _back_cb(void *data, Evas_Object *obj, void *event_info)
        elm_win_lower(vd->ugd->win);
 }
 
-#ifndef INITIAL_VIEW_ADD_BTN
 static Eina_Bool _gl_state_get_cb(void *data, Evas_Object *obj, const char *part)
 {
        debug_log("");
@@ -331,25 +297,16 @@ static void _gl_del_cb(void *data, Evas_Object *obj)
 static char *_gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
 {
        debug_log("");
-       int index = (int)data;
+       EmailSpDesc *desc = (EmailSpDesc *)data;
        char *str = NULL;
 
-       switch (index) {
-       case GMAIL:
-               str = strdup(dgettext("sys_string", "IDS_COM_BODY_GOOGLE"));
-               break;
-       case HOTMAIL:
-               str = strdup(_("IDS_EMAIL_BODY_WINDOWS_LIVE_HOTMAIL"));
-               break;
-       case YAHOOMAIL:
-               str = strdup(_("IDS_EMAIL_BODY_YAHOO_E_MAIL"));
-               break;
-       case AOL:
-               str = strdup(_("IDS_EMAIL_BODY_AOL"));
-               break;
-       case OTHERS:
-               str = strdup(dgettext("sys_string", "IDS_COM_BODY_OTHERS"));
-               break;
+       if (desc) {
+               if (g_str_has_prefix(desc->name_str_id, "IDS_EMAIL"))
+                       str = g_strdup(_(desc->name_str_id));
+               else
+                       str = g_strdup(dgettext("sys_string", desc->name_str_id));
+       } else {
+               str = g_strdup(dgettext("sys_string", "IDS_COM_BODY_OTHERS"));
        }
 
        return str;
@@ -360,30 +317,16 @@ static Evas_Object *_gl_content_get_cb(void *data, Evas_Object *obj, const char
        debug_log("");
 
        Evas_Object *icon = elm_icon_add(obj);
-       int index = (int)data;
-
-       switch (index) {
-       case GMAIL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_GMAIL, NULL);
-               break;
-       case HOTMAIL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_HOTMAIL, NULL);
-               break;
-       case YAHOOMAIL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_YAHOO, NULL);
-               break;
-       case AOL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_AOL, NULL);
-               break;
-       case OTHERS:
-       default:
+       EmailSpDesc *desc = (EmailSpDesc *)data;
+
+       if (desc) {
+               elm_icon_file_set(icon, desc->icon_path, NULL);
+       } else {
                elm_icon_file_set(icon, ACCOUNT_ICON_OTHERS, NULL);
-               break;
        }
 
        evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
        return icon;
 }
-#endif
 
 /* EOF */
index e91915f..71f1169 100755 (executable)
@@ -232,7 +232,7 @@ static int _create(struct viewdata *vd)
 
                p->account = ugd->new_account;
 
-               if (ugd->account_info == OTHERS) {
+               if (ugd->account_info == NULL) {
                        p->account->incoming_server_type = EMAIL_SERVER_TYPE_POP3;
                        p->account->incoming_server_secure_connection = 0;
                        p->account->outgoing_server_secure_connection = 0;
@@ -375,24 +375,22 @@ static void _push_naviframe(struct viewdata *vd)
        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
+       if (vd->ugd->account_info) {
+               if (g_str_has_prefix(vd->ugd->account_info->name_str_id, "IDS_EMAIL"))
+                       snprintf(title_str, sizeof(title_str), "%s", _(vd->ugd->account_info->name_str_id));
+               else
+                       snprintf(title_str, sizeof(title_str), "%s", dgettext("sys_string", vd->ugd->account_info->name_str_id));
+
+               elm_icon_file_set(title_ic, vd->ugd->account_info->icon_path, 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, title_str, p->l_button2, NULL, p->layout, NULL);
-       elm_object_item_part_content_set(navi_it, "icon", title_ic);
+       if (vd->ugd->account_info) {
+               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);*/
        elm_object_item_part_content_set(navi_it, "controlbar", p->cbar);
@@ -846,7 +844,7 @@ static void _save_cb(void *data, Evas_Object *obj, void *event_info)
                return;
        }
        /* account info setting */
-       if (vd->ugd->account_info == OTHERS)
+       if (vd->ugd->account_info == NULL)
                setting_set_account(vd);
 
        _create_account(vd);
index 334a076..2f7c0cf 100755 (executable)
@@ -505,7 +505,7 @@ static void _color_rect_cb(void *data, Evas * evas, Evas_Object *obj, void *even
 
        p->ly = elm_layout_add(ugd->popup_color);
        elm_layout_file_set(p->ly, EV_THEME_PATH, "color_palette");
-       evas_object_size_hint_align_set(p->ly, EVAS_HINT_FILL, 0.0);
+       evas_object_size_hint_align_set(p->ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_show(p->ly);
 
        p->rect = evas_object_rectangle_add(evas_object_evas_get(ugd->popup_color));
@@ -520,6 +520,11 @@ static void _color_rect_cb(void *data, Evas * evas, Evas_Object *obj, void *even
        evas_object_size_hint_weight_set(p->colorselector, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_smart_callback_add(p->colorselector, "color,item,selected", _colorselector_cb, vd);
 
+       int rotation = elm_win_rotation_get(ugd->win);
+       if (abs(rotation) == 90) {
+               elm_object_style_set(p->colorselector, "landscape");
+       }
+
        /* set new colors */
        elm_colorselector_palette_color_add(p->colorselector, 0x00, 0x80, 0x80, 0xff);
        elm_colorselector_palette_color_add(p->colorselector, 0xff, 0xd7, 0x00, 0xff);
@@ -757,31 +762,8 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
 
        if (!strcmp(part, "elm.icon.1")) {
                icon = elm_icon_add(obj);
-
-               account_user_data_t *user_data = (account_user_data_t *)account_data->user_data;
-               debug_log("is_preset_account:%d", user_data->is_preset_account);
-
-               switch (user_data->is_preset_account) {
-               case GMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_GMAIL, NULL);
-                       break;
-               case HOTMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_HOTMAIL, NULL);
-                       break;
-               case YAHOOMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_YAHOO, NULL);
-                       break;
-               case AOL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_AOL, NULL);
-                       break;
-               case OTHERS:
-               default:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_OTHERS, NULL);
-                       break;
-               }
-
+               elm_icon_file_set(icon, account_data->logo_icon_path, NULL);
                evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
-
                return icon;
        }
 
index f318b4f..6ef26a8 100755 (executable)
@@ -41,9 +41,11 @@ struct priv_data {
        Evas_Object *b_btn2;
        Evas_Object *b_btn;
 
-       Elm_Genlist_Item_Class itc;
+       Elm_Genlist_Item_Class itc1;
        Elm_Genlist_Item_Class itc2;
        Elm_Genlist_Item_Class itc3;
+       Elm_Genlist_Item_Class itc4;
+
        Ecore_Timer *vc_timer;
        int as_flag;
 };
@@ -181,36 +183,39 @@ static void _create_list(struct viewdata *vd)
        elm_object_part_content_set(p->layout, "elm.swallow.content", p->list);
        evas_object_show(p->list);
 
-       p->itc.item_style = "dialogue/1text.1icon.2";
-       p->itc.func.text_get = _gl_text_get_cb;
-       p->itc.func.content_get = _gl_content_get_cb;
-       p->itc.func.state_get = _gl_state_get_cb;
-       p->itc.func.del = _gl_del_cb;
-
-       p->itc2.item_style = "dialogue/separator";
-       p->itc2.func.text_get = NULL;
-       p->itc2.func.content_get = NULL;
-       p->itc2.func.state_get = NULL;
-       p->itc2.func.del = NULL;
+       p->itc1.item_style = "dialogue/1text.1icon.2";
+       p->itc1.func.text_get = _gl_text_get_cb;
+       p->itc1.func.content_get = _gl_content_get_cb;
+       p->itc1.func.state_get = _gl_state_get_cb;
+       p->itc1.func.del = _gl_del_cb;
 
-       p->itc3.item_style = "dialogue/separator/end";
+       p->itc3.item_style = "dialogue/separator";
        p->itc3.func.text_get = NULL;
        p->itc3.func.content_get = NULL;
        p->itc3.func.state_get = NULL;
        p->itc3.func.del = NULL;
 
-       git = elm_genlist_item_append(p->list, &(p->itc2), NULL, NULL,
+       p->itc4.item_style = "dialogue/separator/end";
+       p->itc4.func.text_get = NULL;
+       p->itc4.func.content_get = NULL;
+       p->itc4.func.state_get = NULL;
+       p->itc4.func.del = NULL;
+
+       git = elm_genlist_item_append(p->list, &(p->itc3), NULL, NULL,
                        ELM_GENLIST_ITEM_GROUP, NULL, NULL);
        elm_genlist_item_select_mode_set(git, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
-       for (index = HOTMAIL; index <= OTHERS; index++) {
-               if (index != YAHOOMAIL) {
-                       elm_genlist_item_append(p->list, &p->itc, (void *)index, git,
-                                       ELM_GENLIST_ITEM_NONE, _add_account_cb, vd);
-               }
+       for (index = 0; index < ugd->sp_list_len; index++) {
+               EmailSpDesc *desc = &(ugd->sp_list[index]);
+               elm_genlist_item_append(p->list, &p->itc1, (void *)desc, git,
+                               ELM_GENLIST_ITEM_NONE, _add_account_cb, vd);
        }
 
-       git = elm_genlist_item_append(p->list, &(p->itc3), NULL, NULL,
+       index = -1;
+       elm_genlist_item_append(p->list, &p->itc1, NULL, git,
+                       ELM_GENLIST_ITEM_NONE, _add_account_cb, vd);
+
+       git = elm_genlist_item_append(p->list, &(p->itc4), NULL, NULL,
                        ELM_GENLIST_ITEM_GROUP, NULL, NULL);
        elm_genlist_item_select_mode_set(git, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 }
@@ -231,8 +236,11 @@ static void _add_account_cb(void *data, Evas_Object *obj, void *event_info)
                return;
        }
 
-       ugd->account_info = (int)elm_object_item_data_get(it);
-       debug_log("ugd->account_info %d", ugd->account_info);
+       EmailSpDesc *desc = (EmailSpDesc *)elm_object_item_data_get(it);
+       if (desc)
+               ugd->account_info = desc;
+       else
+               ugd->account_info = NULL;
 
        setting_change_view(VIEW_ACCOUNT_SETUP, vd->ugd);
 }
@@ -256,25 +264,17 @@ static void _back_cb(void *data, Evas_Object *obj, void *event_info)
 static char *_gl_text_get_cb(void *data, Evas_Object *obj, const char *part)
 {
        debug_log("");
-       int index = (int)data;
+
+       EmailSpDesc *desc = (EmailSpDesc *)data;
        char *str = NULL;
 
-       switch (index) {
-       case GMAIL:
-               str = strdup(dgettext("sys_string", "IDS_COM_BODY_GOOGLE"));
-               break;
-       case HOTMAIL:
-               str = strdup(_("IDS_EMAIL_BODY_WINDOWS_LIVE_HOTMAIL"));
-               break;
-       case YAHOOMAIL:
-               str = strdup(_("IDS_EMAIL_BODY_YAHOO_E_MAIL"));
-               break;
-       case AOL:
-               str = strdup(_("IDS_EMAIL_BODY_AOL"));
-               break;
-       case OTHERS:
-               str = strdup(dgettext("sys_string", "IDS_COM_BODY_OTHERS"));
-               break;
+       if (desc) {
+               if (g_str_has_prefix(desc->name_str_id, "IDS_EMAIL"))
+                       str = g_strdup(_(desc->name_str_id));
+               else
+                       str = g_strdup(dgettext("sys_string", desc->name_str_id));
+       } else {
+               str = g_strdup(dgettext("sys_string", "IDS_COM_BODY_OTHERS"));
        }
 
        return str;
@@ -285,25 +285,12 @@ static Evas_Object *_gl_content_get_cb(void *data, Evas_Object *obj, const char
        debug_log("");
 
        Evas_Object *icon = elm_icon_add(obj);
-       int index = (int)data;
-
-       switch (index) {
-       case GMAIL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_GMAIL, NULL);
-               break;
-       case HOTMAIL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_HOTMAIL, NULL);
-               break;
-       case YAHOOMAIL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_YAHOO, NULL);
-               break;
-       case AOL:
-               elm_icon_file_set(icon, ACCOUNT_ICON_AOL, NULL);
-               break;
-       case OTHERS:
-       default:
+       EmailSpDesc *desc = (EmailSpDesc *)data;
+
+       if (desc) {
+               elm_icon_file_set(icon, desc->icon_path, NULL);
+       } else {
                elm_icon_file_set(icon, ACCOUNT_ICON_OTHERS, NULL);
-               break;
        }
 
        evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
index 532d120..839b388 100755 (executable)
@@ -187,6 +187,7 @@ static int _create(struct viewdata *vd)
 
                if (!setting_get_acct_full_data(ugd->account_id, &account_data)) {
                        debug_log("failed to get account data");
+                       return FALSE;
                }
 
                p->layout = setting_add_inner_layout(vd);
@@ -358,22 +359,15 @@ static void _push_naviframe(struct viewdata *vd)
        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_icon_file_set(title_ic, account_data->logo_icon_path, NULL);
 
        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);
+       if (user_data->is_preset_account > 0) {
+               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);
@@ -696,7 +690,7 @@ static void _delete_cb(void *data, Evas_Object *obj, void *event_info)
        elm_object_disabled_set(p->l_button, EINA_TRUE);
        elm_object_item_disabled_set(p->c_item[0], EINA_TRUE);
 
-       ugd->popup_one = setting_get_notify(vd, NULL, N_("All data related to this account will be deleted. Continue?"), 2,
+       ugd->popup_one = setting_get_notify(vd, NULL, _("IDS_EMAIL_POP_ALL_DATA_RELATED_TO_THIS_ACCOUNT_WILL_BE_DELETED_CONTINUE_Q"), 2,
                                                                                        dgettext("sys_string", "IDS_COM_SK_YES"),
                                                                                        _popup_delete_ok_cb,
                                                                                        dgettext("sys_string", "IDS_COM_SK_NO"),
@@ -744,7 +738,7 @@ static Eina_Bool _after_delete_cb(void *data)
                        setting_back_to_prev_view(vd);
                }
 
-               /*setting_get_small_notify(vd, dgettext("sys_string", "IDS_COM_POP_DELETED"));*/
+               setting_get_small_notify(vd, dgettext("sys_string", "IDS_COM_POP_DELETED"));
        }
 
        return ECORE_CALLBACK_CANCEL;
@@ -885,7 +879,7 @@ static char *_gl_sync_text_get_cb(void *data, Evas_Object *obj, const char *part
                } else if (period == sync_schedule[1]) {
                        snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_30_MINUTES"));
                } else if (period == sync_schedule[2]) {
-                       snprintf(buf, sizeof(buf), "%s", N_("Every 1 hour"));
+                       snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_1_HOUR"));
                } else if (period == sync_schedule[3]) {
                        snprintf(buf, sizeof(buf), _("IDS_EMAIL_BODY_EVERY_PD_HOURS"), 3);
                } else if (period == sync_schedule[4]) {
@@ -914,7 +908,7 @@ static char *_gl_ex_sync_text_get_cb(void *data, Evas_Object *obj, const char *p
                } else if (index == 1) {
                        snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_30_MINUTES"));
                } else if (index == 2) {
-                       snprintf(buf, sizeof(buf), "%s", N_("Every 1 hour"));
+                       snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_1_HOUR"));
                } else if (index == 3) {
                        snprintf(buf, sizeof(buf), _("IDS_EMAIL_BODY_EVERY_PD_HOURS"), 3);
                } else if (index == 4) {
@@ -943,37 +937,6 @@ 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;*/
-
-       /*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;
-
-               debug_log("is_preset_account:%d", user_data->is_preset_account);
-
-               switch (user_data->is_preset_account) {
-               case GMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_GMAIL, NULL);
-                       break;
-               case HOTMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_HOTMAIL, NULL);
-                       break;
-               case YAHOOMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_YAHOO, NULL);
-                       break;
-               case AOL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_AOL, NULL);
-                       break;
-               case OTHERS:
-               default:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_OTHERS, NULL);
-                       break;
-               }
-
-               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")) {
                if (p->syncing) {
@@ -985,23 +948,6 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
                }
        }
 
-       /*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;
-               int g = (val & 0x00ff0000) >> 16;
-               int b = (val & 0x0000ff00) >> 8;
-               int a = val & 0x000000ff;
-
-               debug_log("R[%d] G[%d] B[%d] A[%d]", r, g, b, a);
-
-               color_bar = evas_object_rectangle_add(evas_object_evas_get(obj));
-               evas_object_size_hint_fill_set(color_bar, EVAS_HINT_FILL, EVAS_HINT_FILL);
-               evas_object_color_set(color_bar, r, g, b, a);
-
-               return color_bar;
-       }*/
-
        return NULL;
 }
 
index d1ad014..bcb63b3 100755 (executable)
@@ -187,6 +187,7 @@ static int _create(struct viewdata *vd)
 
                if (!setting_get_acct_full_data(ugd->account_id, &account_data)) {
                        debug_log("failed to get account data");
+                       return FALSE;
                }
 
                p->layout = setting_add_inner_layout(vd);
@@ -358,22 +359,15 @@ static void _push_naviframe(struct viewdata *vd)
        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_icon_file_set(title_ic, account_data->logo_icon_path, NULL);
 
        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);
+       if (user_data->is_preset_account > 0) {
+               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);
@@ -653,7 +647,7 @@ static void _refresh_cb(void *data, Evas_Object *obj, void *event_info)
        gboolean res = FALSE;
        email_mailbox_t *mailbox = NULL;
        ret = email_get_mailbox_by_mailbox_type(account_id, EMAIL_MAILBOX_TYPE_INBOX, &mailbox);
-       if (ret != EMAIL_ERROR_NONE || mailbox == NULL || mailbox->mailbox_name == NULL) {
+       if (ret != EMAIL_ERROR_NONE || mailbox == NULL) {
                debug_log("email_get_mailbox_by_mailbox_type failed");
                return;
        }
@@ -696,7 +690,7 @@ static void _delete_cb(void *data, Evas_Object *obj, void *event_info)
        elm_object_disabled_set(p->l_button, EINA_TRUE);
        elm_object_item_disabled_set(p->c_item[0], EINA_TRUE);
 
-       ugd->popup_one = setting_get_notify(vd, NULL, N_("All data related to this account will be deleted. Continue?"), 2,
+       ugd->popup_one = setting_get_notify(vd, NULL, _("IDS_EMAIL_POP_ALL_DATA_RELATED_TO_THIS_ACCOUNT_WILL_BE_DELETED_CONTINUE_Q"), 2,
                                                                                        dgettext("sys_string", "IDS_COM_SK_YES"),
                                                                                        _popup_delete_ok_cb,
                                                                                        dgettext("sys_string", "IDS_COM_SK_NO"),
@@ -719,15 +713,7 @@ static void _back_cb(void *data, Evas_Object *obj, void *event_info)
                ug_destroy_me(vd->ugd->ug);
        } else if (vd->ugd->start_view_type != NULL &&
                        strcmp(vd->ugd->start_view_type, "select-account") == 0) {
-
-               service_h service = NULL;
-               service_create(&service);
-               if (service) {
-                       service_add_extra_data(service, EMAIL_BUNDLE_KEY_REFRESH_ACCOUNT,
-                                       EMAIL_BUNDLE_KEY_REFRESH_ACCOUNT);
-                       ug_send_result(vd->ugd->ug, service);
-                       service_destroy(service);
-               }
+               ug_destroy_me(vd->ugd->ug);
        } else {
                setting_update_acct_list(vd);
                if (vd->ugd->manual_setup) {
@@ -779,7 +765,7 @@ static Eina_Bool _after_delete_cb(void *data)
                }
                vd->ugd->atomic_pop = 0;
 
-               /*setting_get_small_notify(vd, dgettext("sys_string", "IDS_COM_POP_DELETED"));*/
+               setting_get_small_notify(vd, dgettext("sys_string", "IDS_COM_POP_DELETED"));
        }
 
        return ECORE_CALLBACK_CANCEL;
@@ -920,7 +906,7 @@ static char *_gl_sync_text_get_cb(void *data, Evas_Object *obj, const char *part
                } else if (period == sync_schedule[1]) {
                        snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_30_MINUTES"));
                } else if (period == sync_schedule[2]) {
-                       snprintf(buf, sizeof(buf), "%s", N_("Every 1 hour"));
+                       snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_1_HOUR"));
                } else if (period == sync_schedule[3]) {
                        snprintf(buf, sizeof(buf), _("IDS_EMAIL_BODY_EVERY_PD_HOURS"), 3);
                } else if (period == sync_schedule[4]) {
@@ -949,7 +935,7 @@ static char *_gl_ex_sync_text_get_cb(void *data, Evas_Object *obj, const char *p
                } else if (index == 1) {
                        snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_30_MINUTES"));
                } else if (index == 2) {
-                       snprintf(buf, sizeof(buf), "%s", N_("Every 1 hour"));
+                       snprintf(buf, sizeof(buf), "%s", _("IDS_EMAIL_BODY_EVERY_1_HOUR"));
                } else if (index == 3) {
                        snprintf(buf, sizeof(buf), _("IDS_EMAIL_BODY_EVERY_PD_HOURS"), 3);
                } else if (index == 4) {
@@ -978,37 +964,6 @@ 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;*/
-
-       /*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;
-
-               debug_log("is_preset_account:%d", user_data->is_preset_account);
-
-               switch (user_data->is_preset_account) {
-               case GMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_GMAIL, NULL);
-                       break;
-               case HOTMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_HOTMAIL, NULL);
-                       break;
-               case YAHOOMAIL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_YAHOO, NULL);
-                       break;
-               case AOL:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_AOL, NULL);
-                       break;
-               case OTHERS:
-               default:
-                       elm_icon_file_set(icon, ACCOUNT_ICON_OTHERS, NULL);
-                       break;
-               }
-
-               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")) {
                if (p->syncing) {
@@ -1020,23 +975,6 @@ static Evas_Object *_gl_account_content_get_cb(void *data, Evas_Object *obj, con
                }
        }
 
-       /*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;
-               int g = (val & 0x00ff0000) >> 16;
-               int b = (val & 0x0000ff00) >> 8;
-               int a = val & 0x000000ff;
-
-               debug_log("R[%d] G[%d] B[%d] A[%d]", r, g, b, a);
-
-               color_bar = evas_object_rectangle_add(evas_object_evas_get(obj));
-               evas_object_size_hint_fill_set(color_bar, EVAS_HINT_FILL, EVAS_HINT_FILL);
-               evas_object_color_set(color_bar, r, g, b, a);
-
-               return color_bar;
-       }*/
-
        return NULL;
 }
 
index 3398bc1..7e4be05 100755 (executable)
@@ -544,7 +544,7 @@ collections {
                                        rel1 { relative: 0.0 0.0;}
                                        rel2 { relative: 1.0 1.0;}
                                        color: 249 249 249 255;
-                                       min: 720 570;
+                                       min: 0 570;
                                }
                        }
                        part {
@@ -613,7 +613,7 @@ collections {
                                description {
                                        state: "default" 0.0;
                                        visible: 0;
-                                       min: 45 0;
+                                       min: 20 0;
                                        fixed: 1 0;
                                        rel1.relative: 0.0 1.0;
                                        rel2.relative: 0.0 1.0;
@@ -629,7 +629,7 @@ collections {
                                description {
                                        state: "default" 0.0;
                                        visible: 0;
-                                       min: 45 0;
+                                       min: 15 0;
                                        fixed: 1 0;
                                        rel1.relative: 1.0 1.0;
                                        rel2.relative: 1.0 1.0;
@@ -693,23 +693,9 @@ collections {
        group {
                name: "email_block_noc";
                parts {
-                       part { name: "bg";
-                               mouse_events: 0;
-                               type: RECT;
-                               scale: 1;
-                               description { state: "default" 0.0;
-                                       visible: 1;
-                                       rel1 { relative: 0.0 0.0;}
-                                       rel2 { relative: 1.0 1.0;}
-                                       color: 0 0 0 0;
-                                       min: 480 700;
-                               }
-                       }
                        part {
                                name: "contents";
                                type: SWALLOW;
-                               scale: 1;
-                               mouse_events: 1;
                                description {
                                        state: "default" 0.0;
                                }
@@ -886,36 +872,6 @@ collections {
                        }
 
                        part {
-                               name: "btn";
-                               type: SWALLOW;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       fixed: 1 1;
-                                       min: 440 46;
-                                       max: 440 46;
-                                       rel1 { relative: 0 1.0; to_y: "top_padding"; }
-                                       align: 0.5 0;
-                               }
-                       }
-
-                       part {
-                               name: "middle_padding1";
-                               type: RECT;
-                               scale: 1;
-                               description {
-                                       state: "default" 0.0;
-                                       min: 440 54;
-                                       max: 440 54;
-                                       fixed: 0 1;
-                                       align: 0.5 0;
-                                       rel1 { relative: 0 1.0; to_y: "btn"; }
-                                       rel2 { relative: 1 1.0; to_y: "btn"; }
-                                       color: 0 0 0 0;
-                               }
-                       }
-
-                       part {
                                name: "bg_for_sp";
                                type: RECT;
                                scale: 1;
@@ -924,7 +880,7 @@ collections {
                                        fixed: 1 1;
                                        min: 440 50;
                                        max: 440 50;
-                                       rel1 { relative: 0 1.0; to_y: "middle_padding1"; }
+                                       rel1 { relative: 0 1.0; to_y: "top_padding"; }
                                        align: 0.5 0;
                                        color: 0 0 0 0;
                                }
@@ -998,12 +954,38 @@ collections {
                                description {
                                        state: "default" 0.0;
                                        fixed: 1 1;
-                                       min: 620 200;
-                                       max: 620 200;
+                                       min: 440 200;
+                                       max: 440 200;
                                        rel1 { relative: 0 1.0; to_y: "middle_padding2"; }
                                        align: 0.5 0;
                                }
                        }
+                       
+                       part {
+                               name: "middle_padding3";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 440 16;
+                                       max: 440 16;
+                                       fixed: 1 1;
+                                       align: 0.5 0;
+                                       rel1 { relative: 0 1.0; to_y: "label"; }
+                                       rel2 { relative: 1 1.0; to_y: "label"; }
+                                       color: 0 0 0 0;
+                               }
+                       }
+
+                       part {
+                               name: "list";
+                               type: SWALLOW;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0 1.0; to_y: "middle_padding3"; }
+                               }
+                       }
                }
        }
        
@@ -1502,6 +1484,201 @@ collections {
                        }
                }
        }
+       
+       group { name: "account_add_checkbox_set_wvga";
+               parts {
+
+                       part { name: "base";
+                               type: RECT;
+                               repeat_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 100;
+                                       color: 0 0 0 0;
+                                       align: 0.0 0.5;
+                               }
+                       }
+
+                       part { name: "left_padding";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 16 0;
+                                       fixed: 1 0;
+                                       visible: 0;
+                                       rel1 { to: "base"; relative: 0 0; }
+                                       rel2 { to: "base"; relative: 0 1; }
+                                       align: 0.0 0.0;
+                               }
+                       }
+
+                       part { name: "right_padding";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 16 0;
+                                       fixed: 1 0;
+                                       visible: 0;
+                                       rel1 { to: "base"; relative: 1 0; }
+                                       rel2 { to: "base"; relative: 1 1; }
+                                       align: 1.0 0.0;
+                               }
+                       }
+
+                       part { name: "subbox.1";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 50;
+                                       fixed: 1 0;
+                                       visible: 0;
+                                       align: 0.0 0.5;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to_x: "left_padding";
+                                               to_y: "base";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 0.0;
+                                               offset: 0 50;
+                                               to_x: "right_padding";
+                                               to_y: "base";
+                                       }
+                               }
+                       }
+
+                       part { name: "subbox.2";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 50;
+                                       fixed: 1 0;
+                                       visible: 0;
+                                       align: 0.0 0.5;
+                                       rel1 {
+                                               relative: 1.0 1.0;
+                                               to_x: "left_padding";
+                                               to_y: "subbox.1";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 1.0;
+                                               to_x: "right_padding";
+                                               to_y: "base";
+                                       }
+                               }
+                       }
+
+                       part { name: "checkbox.1";
+                               type: SWALLOW;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 42 42;
+                                       max: 42 42;
+                                       fixed: 1 1;
+                                       align: 0.0 0.5;
+                                       visible: 1;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to_x: "left_padding";
+                                               to_y: "subbox.1";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 1.0;
+                                               offset: 42 0;
+                                               to_x: "left_padding";
+                                               to_y: "subbox.1";
+                                       }
+                               }
+                       }
+
+                       part { name: "text.1";
+                               type: SWALLOW;
+                               ignore_flags: ON_HOLD;
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 32;
+                                       fixed: 0 1;
+                                       align: 0.0 0.0;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               offset: 16 8;
+                                               to_x: "checkbox.1";
+                                               to_y: "subbox.1";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 1.0;
+                                               offset: 0 0;
+                                               to_x: "right_padding";
+                                               to_y: "subbox.1";
+                                       }
+                               }
+                       }
+
+                       part { name: "checkbox.2";
+                               type: SWALLOW;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 42 42;
+                                       max: 42 42;
+                                       fixed: 1 1;
+                                       align: 0.0 0.5;
+                                       visible: 1;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to_x: "left_padding";
+                                               to_y: "subbox.2";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 1.0;
+                                               offset: 42 0;
+                                               to_x: "left_padding";
+                                               to_y: "subbox.2";
+                                       }
+                               }
+                       }
+
+                       part { name: "text.2";
+                               type: SWALLOW;
+                               ignore_flags: ON_HOLD;
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 32;
+                                       fixed: 0 1;
+                                       align: 0.0 0.5;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               offset: 16 8;
+                                               to_x: "checkbox.2";
+                                               to_y: "subbox.2";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 1.0;
+                                               offset: 0 0;
+                                               to_x: "right_padding";
+                                               to_y: "subbox.2";
+                                       }
+                               }
+                       }
+               }
+               
+               programs {
+                       program {
+                               name: "text1_clicked";
+                               signal: "mouse,up,1";
+                               source: "text.1";
+                               action: SIGNAL_EMIT "elm,action,text1_clicked" "elm";
+                       }
+
+                       program {
+                               name: "text2_clicked";
+                               signal: "mouse,up,1";
+                               source: "text.2";
+                               action: SIGNAL_EMIT "elm,action,text2_clicked" "elm";
+                       }
+               }
+       }
 
        group { name: "account_add_manual_button";
                parts {
@@ -1591,6 +1768,95 @@ collections {
                        }
                }
        }
+       
+       group { name: "account_add_manual_button_wvga";
+               parts {
+                       part { name: "base";
+                               type: RECT;
+                               repeat_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 80;
+                                       color: 0 0 0 0;
+                                       align: 0.0 0.5;
+                               }
+                       }
+
+                       part { name: "top_padding";
+                               type: RECT;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 15;
+                                       fixed: 0 1;
+                                       visible: 0;
+                                       rel1 { to: "base"; relative: 0 0; }
+                                       rel2 { to: "base"; relative: 1 0; }
+                                       align: 0.0 0.0;
+                               }
+                       }
+
+                       part { name: "bottom_padding";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 15;
+                                       fixed: 0 1;
+                                       visible: 0;
+                                       rel1 { to: "base"; relative: 0 1; }
+                                       rel2 { to: "base"; relative: 1 1; }
+                                       align: 0.0 1.0;
+                               }
+                       }
+
+                       part { name: "left_padding";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 117 0;
+                                       fixed: 1 0;
+                                       visible: 0;
+                                       rel1 { to: "base"; relative: 0 0; }
+                                       rel2 { to: "base"; relative: 0 1; }
+                                       align: 0.0 0.0;
+                               }
+                       }
+
+                       part { name: "right_padding";
+                               type: RECT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 117 0;
+                                       fixed: 1 0;
+                                       visible: 0;
+                                       rel1 { to: "base"; relative: 1 0; }
+                                       rel2 { to: "base"; relative: 1 1; }
+                                       align: 1.0 0.0;
+                               }
+                       }
+
+                       part { name: "btn";
+                               type: SWALLOW;
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 50;
+                                       fixed: 0 1;
+                                       align: 0 0;
+                                       rel1 {
+                                               relative: 1.0 1.0;
+                                               to_x: "left_padding";
+                                               to_y: "top_padding";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 0.0;
+                                               to_x: "right_padding";
+                                               to_y: "bottom_padding";
+                                       }
+                               }
+                       }
+               }
+       }
 
        group { name: "account_add";
                parts {
@@ -1713,7 +1979,7 @@ collections {
                                description { state: "default" 0.0;
                                        align: 0 0;
                                        rel1 { relative: 0 0; to: "bg"; }
-                                       rel2 { relative: 1 0; offset: 0 295.0*_SCALE; to: "bg"; }
+                                       rel2 { relative: 1 0; offset: 0 200.0*_SCALE; to: "bg"; }
                                }
                        }
 
@@ -1721,10 +1987,10 @@ collections {
                                type: SWALLOW;
                                scale: 1;
                                description { state: "default" 0.0;
-                                       min: 0 200;
+                                       min: 0 100;
                                        align: 0 0;
                                        rel1 { relative: 0 1.0; to_y: "list"; }
-                                       rel2 { relative: 1 1.0; offset: 0 200; to_y: "list"; }
+                                       rel2 { relative: 1 1.0; offset: 0 100; to_y: "list"; }
                                }
                        }
 
@@ -1732,10 +1998,10 @@ collections {
                                type: SWALLOW;
                                scale: 1;
                                description { state: "default" 0.0;
-                                       min: 0 158;
+                                       min: 0 80;
                                        align: 0 0;
                                        rel1 { relative: 0 1.0; to_y: "checkbox_set"; }
-                                       rel2 { relative: 1 1.0; offset: 0 128; to_y: "checkbox_set"; }
+                                       rel2 { relative: 1 1.0; offset: 0 80; to_y: "checkbox_set"; }
                                }
                        }
                }
@@ -1762,7 +2028,7 @@ collections {
                                description { state: "default" 0.0;
                                        align: 0 0;
                                        rel1 { relative: 0 0; to: "bg"; }
-                                       rel2 { relative: 1 0; offset: 0 425.0*_SCALE; to: "bg"; }
+                                       rel2 { relative: 1 0; offset: 0 290.0*_SCALE; to: "bg"; }
                                }
                        }
 
@@ -1770,10 +2036,10 @@ collections {
                                type: SWALLOW;
                                scale: 1;
                                description { state: "default" 0.0;
-                                       min: 0 200;
+                                       min: 0 100;
                                        align: 0 0;
                                        rel1 { relative: 0 1.0; to_y: "list"; }
-                                       rel2 { relative: 1 1.0; offset: 0 200; to_y: "list"; }
+                                       rel2 { relative: 1 1.0; offset: 0 100; to_y: "list"; }
                                }
                        }
 
@@ -1781,10 +2047,10 @@ collections {
                                type: SWALLOW;
                                scale: 1;
                                description { state: "default" 0.0;
-                                       min: 0 158;
+                                       min: 0 80;
                                        align: 0 0;
                                        rel1 { relative: 0 1.0; to_y: "checkbox_set"; }
-                                       rel2 { relative: 1 1.0; offset: 0 128; to_y: "checkbox_set"; }
+                                       rel2 { relative: 1 1.0; offset: 0 80; to_y: "checkbox_set"; }
                                }
                        }
                }