fix PLM/SDK issue
authorMinsoo Kim <minnsoo.kim@samsung.com>
Thu, 6 Sep 2012 05:03:23 +0000 (14:03 +0900)
committerMinsoo Kim <minnsoo.kim@samsung.com>
Thu, 6 Sep 2012 05:03:23 +0000 (14:03 +0900)
setting/src/email-view-account-options.c
setting/src/email-view-account-setup.c
setting/src/email-view-sync-setup.c
setting/theme/email-setting-theme.edc

index 3920021..d1d8ac0 100755 (executable)
@@ -759,10 +759,12 @@ static void _onoff_cb(void *data, Evas_Object *obj, void *event_info)
                if (account_data->options.add_signature == TRUE) {
                        if (p->gl_sig_item) {
                                elm_object_item_disabled_set(p->gl_sig_item, EINA_FALSE);
+                               elm_entry_context_menu_disabled_set(p->entry_sig, EINA_FALSE);
                        }
                } else {
                        if (p->gl_sig_item) {
                                elm_object_item_disabled_set(p->gl_sig_item, EINA_TRUE);
+                               elm_entry_context_menu_disabled_set(p->entry_sig, EINA_TRUE);
                        }
                }
        }
@@ -1316,8 +1318,10 @@ static Evas_Object *_gl_ef_content_get_cb(void *data, Evas_Object *obj, const ch
                elm_entry_input_panel_layout_set(p->entry_sig, ELM_INPUT_PANEL_LAYOUT_EMAIL);
                if (account_data->options.add_signature) {
                        elm_entry_editable_set(p->entry_sig, TRUE);
+                       elm_entry_context_menu_disabled_set(p->entry_sig, EINA_FALSE);
                } else {
                        elm_entry_editable_set(p->entry_sig, FALSE);
+                       elm_entry_context_menu_disabled_set(p->entry_sig, EINA_TRUE);
                }
                evas_object_smart_callback_add(p->entry_sig, "cursor,changed", _backup_signature_cb, vd);
                evas_object_smart_callback_add(p->entry_sig, "changed", _entry_changed_cb, p->ef);
@@ -1496,10 +1500,12 @@ static void _gl_sel_cb(void *data, Evas_Object *obj, void *event_info)
                if (account_data->options.add_signature == TRUE) {
                        if (p->gl_sig_item) {
                                elm_object_item_disabled_set(p->gl_sig_item, EINA_FALSE);
+                               elm_entry_context_menu_disabled_set(p->entry_sig, EINA_FALSE);
                        }
                } else {
                        if (p->gl_sig_item) {
                                elm_object_item_disabled_set(p->gl_sig_item, EINA_TRUE);
+                               elm_entry_context_menu_disabled_set(p->entry_sig, EINA_TRUE);
                        }
                }
                break;
index 4a587b4..e1beb05 100755 (executable)
@@ -42,6 +42,8 @@ static void _manual_cb(void *data, Evas_Object *obj, void *event_info);
 static void _back_cb(void *data, Evas_Object *obj, void *event_info);
 static void _check1_clicked_cb(void *data, Evas_Object *obj, void *event_info);
 static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info);
+static void _check1_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info);
+static void _check2_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info);
 static Eina_Bool _after_validation_cb(void *data);
 
 static void _popup_ok_cb(void *data, Evas_Object *obj, void *event_info);
@@ -87,6 +89,7 @@ struct priv_data {
        Evas_Object *manual_btn;
        Evas_Object *icon;
        Evas_Object *show_passwd_check;
+       Evas_Object *default_account_check;
 
        Evas_Object *clicked_object;
 
@@ -307,12 +310,10 @@ static void _push_naviframe(struct viewdata *vd)
        evas_object_show(p->l_button);
 
        if (vd->ugd->account_info == OTHERS) {
-               /*elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_SK_NEXT"));*/
-               elm_object_text_set(p->l_button, _("IDS_EMAIL_OPT_LOG_IN"));
+               elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_BUTTON_LOGIN"));
                evas_object_smart_callback_add(p->l_button, "clicked", _next_cb, vd);
        } else {
-               /*elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_SK_SAVE"));*/
-               elm_object_text_set(p->l_button, _("IDS_EMAIL_OPT_LOG_IN"));
+               elm_object_text_set(p->l_button, dgettext("sys_string", "IDS_COM_BUTTON_LOGIN"));
                evas_object_smart_callback_add(p->l_button, "clicked", _save_cb, vd);
        }
 
@@ -329,19 +330,30 @@ static void _push_naviframe(struct viewdata *vd)
        elm_object_style_set(p->r_button2, "naviframe/back_btn/default");
        evas_object_show(p->r_button2);
 
+
+       Evas_Object *title_ic = elm_icon_add(vd->ugd->navi_bar);
+       evas_object_size_hint_aspect_set(title_ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+       elm_icon_resizable_set(title_ic, EINA_TRUE, EINA_TRUE);
+
        Elm_Object_Item *navi_it = NULL;
        char title_str[50] = { 0, };
-       if (vd->ugd->account_info == GMAIL)
+       if (vd->ugd->account_info == GMAIL) {
                snprintf(title_str, sizeof(title_str), "%s", dgettext("sys_string", "IDS_COM_BODY_GOOGLE"));
-       else if (vd->ugd->account_info == HOTMAIL)
+               elm_icon_file_set(title_ic, ACCOUNT_ICON_GMAIL, NULL);
+       } else if (vd->ugd->account_info == HOTMAIL) {
                snprintf(title_str, sizeof(title_str), "%s", _("IDS_EMAIL_BODY_WINDOWS_LIVE_HOTMAIL"));
-       else if (vd->ugd->account_info == YAHOOMAIL)
+               elm_icon_file_set(title_ic, ACCOUNT_ICON_HOTMAIL, NULL);
+       } else if (vd->ugd->account_info == YAHOOMAIL) {
                snprintf(title_str, sizeof(title_str), "%s", _("IDS_EMAIL_BODY_YAHOO_E_MAIL"));
-       else if (vd->ugd->account_info == AOL)
+               elm_icon_file_set(title_ic, ACCOUNT_ICON_YAHOO, NULL);
+       } else if (vd->ugd->account_info == AOL) {
                snprintf(title_str, sizeof(title_str), "%s", _("IDS_EMAIL_BODY_AOL"));
-       else
+               elm_icon_file_set(title_ic, ACCOUNT_ICON_AOL, NULL);
+       } else
                snprintf(title_str, sizeof(title_str), "%s", dgettext("sys_string", "IDS_COM_BODY_OTHERS"));
+
        navi_it = elm_naviframe_item_push(vd->ugd->navi_bar, title_str, p->r_button2, NULL, p->layout, NULL);
+       elm_object_item_part_content_set(navi_it, "icon", title_ic);
        elm_object_item_part_content_set(navi_it, "title_left_btn", p->l_button);
        elm_object_item_part_content_set(navi_it, "title_right_btn", p->r_button);
        evas_object_show(vd->ugd->navi_bar);
@@ -382,6 +394,7 @@ static void _create_view(struct viewdata *vd)
        evas_object_smart_callback_add(check1, "changed", _check1_clicked_cb, (void *)vd);
        elm_object_part_content_set(checkbox_set, "checkbox.1", check1);
        elm_object_focus_allow_set(check1, EINA_FALSE);
+       p->default_account_check = check1;
 
        Evas_Object *check2 = elm_check_add(checkbox_set);
        elm_check_state_set(check2, EINA_FALSE);
@@ -394,7 +407,7 @@ static void _create_view(struct viewdata *vd)
        Evas_Object *label1 = elm_label_add(checkbox_set);
        char *text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>",
                                desc, "</align></font_size></color>", NULL);
-
+       evas_object_event_callback_add(label1, EVAS_CALLBACK_MOUSE_UP, _check1_clicked_cb2, (void *)vd);
        elm_object_text_set(label1, text);
        evas_object_show(label1);
        g_free(desc);
@@ -405,7 +418,7 @@ static void _create_view(struct viewdata *vd)
        Evas_Object *label2 = elm_label_add(checkbox_set);
        text = g_strconcat("<color=#838B8BFF><font_size=30><align=left>",
                                desc, "</align></font_size></color>", NULL);
-
+       evas_object_event_callback_add(label2, EVAS_CALLBACK_MOUSE_UP, _check2_clicked_cb2, (void *)vd);
        elm_object_text_set(label2, text);
        evas_object_show(label2);
        g_free(desc);
@@ -437,7 +450,7 @@ static void _create_view(struct viewdata *vd)
        evas_object_show(btn);
        p->manual_btn = btn;
        elm_object_part_content_set(button_set, "btn", btn);
-       /*elm_object_disabled_set(btn, EINA_TRUE);*/
+       elm_object_disabled_set(p->manual_btn, EINA_TRUE);
 
        elm_object_part_content_set(sub_ly, "button_set", button_set);
 
@@ -713,9 +726,11 @@ static void _read_all_entries(struct viewdata *vd)
 
        if (p->entry_password) {
                buf = (char *)elm_entry_markup_to_utf8(elm_entry_entry_get(p->entry_password));
-               debug_log("password : %s ", buf);
-               if (buf)
-               account->incoming_server_password = g_strdup(buf);
+               debug_log("password : %s", buf);
+               if (buf) {
+                       account->incoming_server_password = g_strdup(buf);
+                       g_free(buf);
+               }
        }
 }
 
@@ -781,6 +796,7 @@ static void _next_cb(void *data, Evas_Object *obj, void *event_info)
                free(buf);
                return;
        }
+
        g_free(buf);
 
        setting_change_view(VIEW_MANUAL_SETUP, ugd);
@@ -961,15 +977,28 @@ static void _back_cb(void *data, Evas_Object *obj, void *event_info)
 
        struct viewdata *vd = (struct viewdata *)data;
        struct priv_data *p = vd->priv;
-       Ecore_IMF_Context *imf_context = NULL;
-       imf_context = elm_entry_imf_context_get(p->clicked_object);
-       ecore_imf_context_input_panel_hide(imf_context);
 
        if (vd->ugd->atomic_pop) {
                debug_log("During atomic poping");
                return;
        }
 
+       if (p->entry_account_name) {
+               elm_object_focus_allow_set(p->entry_account_name, EINA_FALSE);
+       }
+
+       if (p->entry_email_address) {
+               elm_object_focus_allow_set(p->entry_email_address, EINA_FALSE);
+       }
+
+       if (p->entry_password) {
+               elm_object_focus_allow_set(p->entry_password, EINA_FALSE);
+       }
+
+       Ecore_IMF_Context *imf_context = NULL;
+       imf_context = elm_entry_imf_context_get(p->clicked_object);
+       ecore_imf_context_input_panel_hide(imf_context);
+
        elm_object_disabled_set(p->l_button, EINA_TRUE);
        elm_object_disabled_set(p->r_button, EINA_TRUE);
        elm_object_disabled_set(p->r_button2, EINA_TRUE);
@@ -1001,6 +1030,28 @@ static void _check1_clicked_cb(void *data, Evas_Object *obj, void *event_info)
                p->set_default_account = 0;
 }
 
+static void _check1_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info)
+{
+       debug_log("");
+       struct viewdata *vd = (struct viewdata *)data;
+
+       if (vd == NULL) {
+               debug_log("vd is NULL");
+               return;
+       }
+
+       struct priv_data *p = vd->priv;
+       Eina_Bool state = elm_check_state_get(p->default_account_check);
+
+       if (state) {
+               elm_check_state_set(p->default_account_check, EINA_FALSE);
+               p->set_default_account = 0;
+       } else {
+               elm_check_state_set(p->default_account_check, EINA_TRUE);
+               p->set_default_account = 1;
+       }
+}
+
 static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info)
 {
        debug_log("");
@@ -1020,6 +1071,28 @@ static void _check2_clicked_cb(void *data, Evas_Object *obj, void *event_info)
                elm_entry_password_set(p->entry_password, EINA_TRUE);
 }
 
+static void _check2_clicked_cb2(void *data, Evas * evas, Evas_Object *obj, void *event_info)
+{
+       debug_log("");
+       struct viewdata *vd = (struct viewdata *)data;
+
+       if (vd == NULL) {
+               debug_log("vd is NULL");
+               return;
+       }
+
+       struct priv_data *p = vd->priv;
+       Eina_Bool state = elm_check_state_get(p->show_passwd_check);
+
+       if (state) {
+               elm_check_state_set(p->show_passwd_check, EINA_FALSE);
+               elm_entry_password_set(p->entry_password, EINA_TRUE);
+       } else {
+               elm_check_state_set(p->show_passwd_check, EINA_TRUE);
+               elm_entry_password_set(p->entry_password, EINA_FALSE);
+       }
+}
+
 static Eina_Bool _after_validation_cb(void *data)
 {
        debug_log("");
@@ -1110,10 +1183,8 @@ static void _popup_ok_cb(void *data, Evas_Object *obj, void *event_info)
                ugd->popup_validate = NULL;
        }
 
-       elm_object_disabled_set(p->l_button, EINA_FALSE);
        elm_object_disabled_set(p->r_button, EINA_FALSE);
        elm_object_disabled_set(p->r_button2, EINA_FALSE);
-       elm_object_disabled_set(p->manual_btn, EINA_FALSE);
 }
 
 static void _popup_cancel_validation_cb(void *data, Evas_Object *obj, void *event_info)
@@ -1216,24 +1287,29 @@ static void _backup_input_cb(void *data, Evas_Object *obj, void *event_info)
        if (ugd->account_info == OTHERS) {
                if (p->str_account_name == NULL) {
                        elm_object_disabled_set(p->l_button, EINA_TRUE);
+                       elm_object_disabled_set(p->manual_btn, EINA_TRUE);
                        return;
                }
 
                if (g_strcmp0(p->str_account_name, "") == 0) {
                        elm_object_disabled_set(p->l_button, EINA_TRUE);
+                       elm_object_disabled_set(p->manual_btn, EINA_TRUE);
                        return;
                }
        }
 
        if (p->str_email_address == NULL || p->str_password == NULL) {
                elm_object_disabled_set(p->l_button, EINA_TRUE);
+               elm_object_disabled_set(p->manual_btn, EINA_TRUE);
                return;
        }
 
        if (g_strcmp0(p->str_email_address, "") == 0 || g_strcmp0(p->str_password, "") == 0) {
                elm_object_disabled_set(p->l_button, EINA_TRUE);
+               elm_object_disabled_set(p->manual_btn, EINA_TRUE);
        } else {
                elm_object_disabled_set(p->l_button, EINA_FALSE);
+               elm_object_disabled_set(p->manual_btn, EINA_FALSE);
        }
 }
 
@@ -1337,7 +1413,15 @@ 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 == OTHERS && p->icon_get_cnt1 == 2 &&
+                                       strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) != 0) {
+                               p->clicked_object = p->entry_account_name;
+                               evas_object_show(p->entry_account_name);
+                               elm_object_focus_set(p->entry_account_name, EINA_TRUE);
+                       }
+
+                       if (ugd->account_info == OTHERS && p->icon_get_cnt1 == 3 &&
+                                       strcmp(ugd->start_view_type, EMAIL_BUNDLE_VAL_VIEW_ACCOUNT_ADD) == 0) {
                                p->clicked_object = p->entry_account_name;
                                evas_object_show(p->entry_account_name);
                                elm_object_focus_set(p->entry_account_name, EINA_TRUE);
index 01f057d..a117915 100755 (executable)
@@ -68,9 +68,9 @@ static void _gl_con_cb(void *data, Evas_Object *obj, void *event_info);
 
 static int sync_schedule[7] = { 0, 30, 60, 180, 360, 720, 1440 };
 
-#define SYNC_STATUS_FINISHED                       /* BIN 00000000 */
-#define SYNC_STATUS_SYNCING                        /* BIN 00000001 */
-#define SYNC_STATUS_HAVE_NEW_MAILS                 /* BIN 00000010 */
+#define SYNC_STATUS_FINISHED                   0       /* BIN 00000000 */
+#define SYNC_STATUS_SYNCING                            1       /* BIN 00000001 */
+#define SYNC_STATUS_HAVE_NEW_MAILS             2       /* BIN 00000010 */
 
 struct priv_data {
        struct viewdata *vd;
@@ -542,23 +542,9 @@ static void _get_date_text_with_formatter(time_t time, char *formatted_str)
 static void _account_edit_cb(void *data, Evas_Object *obj, void *event_info)
 {
        debug_log("");
-       struct viewdata *vd = (struct viewdata *)data;
-       EmailSettingUGD *ugd = vd->ugd;
 
        Elm_Object_Item *item = (Elm_Object_Item *)event_info;
        elm_genlist_item_selected_set(item, EINA_FALSE);
-
-       Viewtype top = ugd->view_st[ugd->view_top];
-       if (top != VIEW_SYNC_SETUP) {
-               debug_log("**double clicked**");
-               return;
-       }
-
-       debug_log("Selected account id:%d", account_data->account_id);
-       vd->ugd->account_id = account_data->account_id;
-       vd->ugd->myaccount_id = account_data->account_svc_id;
-
-       setting_change_view(VIEW_ACCOUNT_EDIT, ugd);
 }
 
 static void _onoff_cb(void *data, Evas_Object *obj, void *event_info)
index 28ea8d7..dbc3337 100755 (executable)
@@ -1413,7 +1413,7 @@ collections {
 
                        part { name: "text.1";
                                type: SWALLOW;
-                               mouse_events: 0;
+                               mouse_events: 1;
                                scale: 1;
                                description { state: "default" 0.0;
                                        min: 0 30;
@@ -1459,7 +1459,7 @@ collections {
 
                        part { name: "text.2";
                                type: SWALLOW;
-                               mouse_events: 0;
+                               mouse_events: 1;
                                scale: 1;
                                description { state: "default" 0.0;
                                        min: 0 30;