From 7ff9885f75416716b8eee83046ae89cac9a28e61 Mon Sep 17 00:00:00 2001 From: Kim Jinho Date: Wed, 23 Jan 2013 15:04:18 +0900 Subject: [PATCH] Committed all the changes of the master branch --- account/include/email-account.h | 2 +- composer/src/email-composer-recipient.c | 2 +- ..._icon_refresh.png => M02_popup_icon_sender.png} | Bin 5133 -> 3717 bytes ...0_icon_folder.png => M02_title_icon_folder.png} | Bin 3251 -> 3279 bytes images/M02_title_icon_refresh.png | Bin 0 -> 5554 bytes mailbox/include/email-mailbox-controlbar.h | 4 + mailbox/include/email-mailbox-move.h | 0 mailbox/include/email-mailbox.h | 20 +- mailbox/src/email-mailbox-controlbar.c | 614 ++++++++++++++++++--- mailbox/src/email-mailbox-list.c | 108 ++-- mailbox/src/email-mailbox-move.c | 13 + mailbox/src/email-mailbox-noti-mgr.c | 20 +- mailbox/src/email-mailbox-search.c | 285 ++++++++-- mailbox/src/email-mailbox.c | 221 +++++--- packaging/org.tizen.email.spec | 2 +- setting/include/email-setting.h | 2 +- 16 files changed, 1068 insertions(+), 225 deletions(-) rename images/{00_icon_refresh.png => M02_popup_icon_sender.png} (52%) rename images/{00_icon_folder.png => M02_title_icon_folder.png} (81%) create mode 100755 images/M02_title_icon_refresh.png mode change 100755 => 100644 mailbox/include/email-mailbox-move.h mode change 100755 => 100644 mailbox/src/email-mailbox-move.c diff --git a/account/include/email-account.h b/account/include/email-account.h index e87a430..5ff6882 100755 --- a/account/include/email-account.h +++ b/account/include/email-account.h @@ -50,7 +50,7 @@ #define THEME_PATH EDJDIR"/email-account-theme.edj" #define CONTROLBAR_ICON_COMPOSE IMGDIR"/M02_controlbar_icon_compose.png" -#define CONTROLBAR_ICON_UPDATE IMGDIR"/00_icon_refresh.png" +#define CONTROLBAR_ICON_UPDATE IMGDIR"/M02_title_icon_refresh.png" #define CONTROLBAR_ICON_ADD IMGDIR"/M02_controlbar_icon_add_folder.png" #define CONTROLBAR_ICON_RENAME IMGDIR"/M02_controlbar_icon_edit.png" #define CONTROLBAR_ICON_MOVE IMGDIR"/M02_controlbar_icon_move.png" diff --git a/composer/src/email-composer-recipient.c b/composer/src/email-composer-recipient.c index 06bcd06..fa6aaf1 100755 --- a/composer/src/email-composer-recipient.c +++ b/composer/src/email-composer-recipient.c @@ -117,7 +117,7 @@ static Evas_Object *_composer_mbe_create_mbe(Evas_Object *parent, COMPOSER_RECIP if (recp_type != COMPOSER_RECIPIENT_TYPE_FROM) { Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(entry); ecore_imf_context_input_panel_event_callback_add(imf_context, ECORE_IMF_INPUT_PANEL_STATE_EVENT, _composer_input_panel_state_changed_cb, ugd); - ecore_imf_context_input_panel_event_callback_add (imf_context, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, _composer_input_panel_resize_cb, ugd); + ecore_imf_context_input_panel_event_callback_add(imf_context, ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, _composer_input_panel_resize_cb, ugd); debug_log("ugd->is_prediction: %d", ugd->is_prediction); } diff --git a/images/00_icon_refresh.png b/images/M02_popup_icon_sender.png similarity index 52% rename from images/00_icon_refresh.png rename to images/M02_popup_icon_sender.png index f545ed3c172f6d6f4ba41b5fbd1e032b124669fb..feedcdf53f9b2ae57ca43e35cc1783e2baf7cd5d 100755 GIT binary patch delta 1016 zcmV;DW#OMY?|iVi_Uo5?%nR6bIzW--7nXDX7~5I=X~$^{m$>tsguM) z#v&Ft3IYlO3IYlO7Bm*m(R(XEtADvS0;9kr@Y4H8B>B8LBn?UWt#Evkv`4Y+6;G((bo`6oEIfYzr3gT*#fQ}5Z zz4L*9_Ke$QIqw9tWRzc)cLFMNEI;Q2looO>u)~D9S+LtBi7o@7GB9T1fPbvm1l-Tt z3aGa9XftqYKCJ+NkHBDz=U)4o zyl(=gNtg|jJ_l4ZMm)bSPJeZ%VljlS83O8oqrjdR&o=X~Alm3-V6Jz83eX4aC3$J= zC$Is>-6B`5u^ylw*h;#Z-jvBB!Y1DZbn~y;Trw-=v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`t=K0EgnisOMl;t$KxL^FZdVRFN&gkWpHrtW@l&T?zOJ%bUK5x zv$OB4wh~LH)3PkfuVt+-y(m7PZ=2n2AIwbaBuPRr7{tK90Q&p;F*P-nE-fv6r>Lmt zNJ~r0-IdmCZ*Tt@P17$lH8r_hE*G>~?TY)jd-v{TtJV5+)`1r)m;?Fw`G1!wiei>K zlHuWD3=9llbaWKaXjHP>?IQ&R1$}zGepsi|d5#@B*5BFLxqE(o-YEz|^W@~@{$w&~ zcDY>Gw{IUB8XCZ|?21my>-Fxcs;c^QQ-A>=kx2YVuh;)!d5bm{i(z770@tox!|3QJ zrl+SN2m+GHBvPpqBuRo=t$&7AtA)W}fYoY+!{I<(T^(v_YOtDSVK^NA$YQa4eJ%Ul zFfc_?NF);9*XeX`0$?(oVJekEI2=YG5I`UhKrk3YG#Z5{ib$nWU>F8QqY*sMWBc~) zc`@$qj}R#v{d>A(w?Zd!oewmb?fz6TaXaev9evMeuIm}Oby z<>f8CH(q6Ze9de&KfdPuKg^z%D2kk-DCfw-6CWYu8A8Y>nMzrf$@uvAv+LP^R+@OJ zRH~K`^2ZH;exfMKQ;X}xVzHf)BuN=1>Ex9wSLiPca7K*e2_Z)aA%7!;tdvZQ5JKLN zWqHT_)`~Xe2b=@W0q1~oz?&ui9snGhMla#^UgZD)002ov JPDHLkV1ja`!xsPm diff --git a/images/00_icon_folder.png b/images/M02_title_icon_folder.png similarity index 81% rename from images/00_icon_folder.png rename to images/M02_title_icon_folder.png index 73e8978b1269a2eaed2b2cfccb42b6b4dd6ecdd6..3b0a0d6a9dbba347122750a6bedc2d4726ce6383 100755 GIT binary patch delta 574 zcmdlid0tYnGr-TCmrII^fq{Y7)59eQNV|YA2OE&I5T3kgqvCw7`d^+djv*Dd-rP1^ zeJenM?SZ+cpecuxCyxj_yDS%9)kX!s$X(yWztrD(*wZxouf&i#q%ZJ3zr6T#4L?_|9jm-?m6xH_boYHPJfm;^Ztd30*51qlR%R|ivo)x zoOxbHpHKIL&HH-OhJ1!M%--)AYZyL!ox%N~_W%E;E3dzP-$U0uV!sEU}Jc(t1oJ8TYcX4Zi~K+5ju9c z+i!AwnTvz{c@z>12Yf7gLJ}YHqQAMejS?J?4g-ICFtT#Z;ho&norLzES0J^ me9VIgb|fRtTidfU$Ovc5JskL|z#Et(7(8A5T-G@yGywpnjr92d delta 545 zcmX>vxmi-NGr-TCmrII^fq{Y7)59eQNZWug2OE&I`g5~rqvCw7`g@)(jv*Dd-rPFa zbt^#R*vJ39N=XF^FPv%6;J6xlFye)D$+pidwQTVT-}HV7#FpO=-F?Dr_Q8ldJA*X( zG^B)hB2~VZUCz7h<1T4EFTd8}!{egKldBi^7{&zY=;<(tZD?TCNnqrTIKU+KVPcS8 zkcm|9y~t@_Su4J7k6LTmez?BzZ=Ju0>-WfMwJdh?xgJ#BTl^|?;`*g0Q$B@ie%xaAa)`oQ#?ffJ5o~X4SYUjT!xz+W!g6ED6x5R>=l@BcV`X0|&vfr?+ zY`5Z_+`Y$?+@y(mOWv}*PV9bITRAq5$f`Qtx} z{TySbY~Oj$|LiiWsxZ1CQOurmPB6Pi(Nm~ww`}IDyoTNOSG9lEg2EX|f5F5*G7Kf{ W8@SBwRe1qpox#)9&t;ucLK6U`Soin< diff --git a/images/M02_title_icon_refresh.png b/images/M02_title_icon_refresh.png new file mode 100755 index 0000000000000000000000000000000000000000..a31a2686f4e65e6fe57681d083b85c8fb73cf33a GIT binary patch literal 5554 zcmZvfXEdDO*M=V;TMVL?5uNBn^xj3Cj2aQWMT<_=@_!qIk3A(QGaIpi&{N&? z4FC{R{}{10>hK&1N`3f0qd^6>F^7Dtk4E-l z^-M`KF6_OghXFN+#Xu=Bj4GXzhm{cgB966qfm*-sk%|f)<492)Zc0j6616^rB!TEB z!6s`-N@QtV!r1kCaH-2&=f(EKUGu!$PW36W2~E%oBFR=4(SIIBQla$t(XYtiZ$s;w z{0iYj?4AG^)MU^4=JqKL@Gn$GhL^3Epc}vmm>~uMz1oOgL8jPy@_nVe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)L?lh2-Q?jCg!2s;UlfvmMsN=t$BW0`DWk{^*56 z@D~T&VquUNZ2hY+GBT1&Atxin{cp`ovzwk%J84CVW^QL``ZJxCMf31bxdH@)C Wbb_V2qAzwR1~gQ3lxvl&BmNIMfRj}K literal 0 HcmV?d00001 diff --git a/mailbox/include/email-mailbox-controlbar.h b/mailbox/include/email-mailbox-controlbar.h index 332525a..9d2f7b3 100755 --- a/mailbox/include/email-mailbox-controlbar.h +++ b/mailbox/include/email-mailbox-controlbar.h @@ -20,7 +20,11 @@ void _create_controlbar(EmailMailboxUGD *mailbox_ugd); void _delete_controlbar(EmailMailboxUGD *mailbox_ugd); +void _create_controlbar_for_split_view(EmailMailboxUGD *mailbox_ugd); +void _delete_controlbar_for_split_view(EmailMailboxUGD *mailbox_ugd); void _hide_toolbar(EmailMailboxUGD *mailbox_ugd); void _show_toolbar(EmailMailboxUGD *mailbox_ugd); +void _hide_split_toolbar(EmailMailboxUGD *mailbox_ugd); +void _show_split_toolbar(EmailMailboxUGD *mailbox_ugd); #endif /* __DEF_EMAIL_MAILBOX_CONTROL_BAR_H_ */ diff --git a/mailbox/include/email-mailbox-move.h b/mailbox/include/email-mailbox-move.h old mode 100755 new mode 100644 diff --git a/mailbox/include/email-mailbox.h b/mailbox/include/email-mailbox.h index f0d33dc..985ac72 100755 --- a/mailbox/include/email-mailbox.h +++ b/mailbox/include/email-mailbox.h @@ -59,8 +59,8 @@ #define ICON_MARKUNREAD IMGDIR"/M02_controlbar_icon_mark_as_unread.png" #define ICON_CANCEL IMGDIR"/M02_controlbar_icon_cancel.png" #define ICON_COMPOSE IMGDIR"/M02_controlbar_icon_compose.png" -#define ICON_UPDATE IMGDIR"/00_icon_refresh.png" -#define ICON_FOLDERS IMGDIR"/00_icon_folder.png" +#define ICON_UPDATE IMGDIR"/M02_title_icon_refresh.png" +#define ICON_FOLDERS IMGDIR"/M02_title_icon_folder.png" #define ICON_SORTBY IMGDIR"/M02_controlbar_icon_sort_by.png" #define ICON_VIEWMODE IMGDIR"/M02_controlbar_icon_view_mode.png" #define ICON_MORE IMGDIR"/M02_controlbar_icon_more.png" @@ -221,6 +221,7 @@ typedef struct _MailboxAdvSearchViewInfo { Evas_Object *search_sender_address; Evas_Object *search_date_from; Evas_Object *search_date_to; + Evas_Object *search_list_popup; /* for search date popup */ char* str_title; char* str_sender_address; char* str_search_criteria; @@ -251,6 +252,14 @@ struct ug_data { Evas_Object *ly; Evas_Object *check; Evas_Object *navi_bar; + Evas_Object *split_ly; + Evas_Object *sub_layout_split; + Evas_Object *split_navi_bar; + Evas_Object *split_more_btn; + Evas_Object *split_lbtn; + Evas_Object *split_rbtn; + Elm_Object_Item *split_navi_it; + Evas_Object *split_back_btn; Evas_Object *controlbar_more_btn; Evas_Object *controlbar_lbtn; Evas_Object *controlbar_rbtn; @@ -271,6 +280,7 @@ struct ug_data { Evas_Object *folder_ctxpopup; Evas_Object *passwd_popup; Evas_Object *password_entry; + Evas_Object *flag_popup; GList *important_list; Evas_Object *selectioninfo_layout; Evas_Object *sub_layout[EMAIL_VIEW_MAX]; @@ -291,6 +301,7 @@ struct ug_data { Evas_Object *viewby_popup; Evas_Object *delete_popup; Evas_Object *searchby_ctx_popup; + Elm_Object_Item* navi_item_search; Evas_Object *account_dim; GList *folder_list; GList *selected_list; /* revised, used to move the mails selected in previous view */ @@ -301,6 +312,7 @@ struct ug_data { gint thread_id; gint thread_mail_count; gint total_count; + gint account_count; gint chk_cnt; gint unread_cnt; EmailSortType sort_type; @@ -321,6 +333,7 @@ struct ug_data { email_move_list *move_list; email_account_t *move_account_list; + int b_move_list_view; int move_account_cnt; int move_src_mailbox_id; int b_duplicated_node; @@ -436,8 +449,6 @@ void _main_back_clicked(void *data, Evas_Object *obj, void *event_info); void _update_navigationbar_title(EmailMailboxUGD *mailbox_ugd); ui_gadget_h create_composer_ug(char *ug_name, service_h service, void *data); ui_gadget_h create_setting_ug(char *ug_name, service_h service, void *data); -void layout_composer_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); -void result_composer_cb(ui_gadget_h ug, service_h service, void *priv); void _stop_emf_job(EmailMailboxUGD *mailbox_ugd, int handle, gboolean change_download_label_in_panel); void email_rotate_landscape(EmailMailboxUGD *mailbox_ugd); void _update_toolbar_clicked_cb(void *data, Evas_Object *obj, void *event_info); @@ -450,5 +461,6 @@ void _create_email_no_content_view(EmailMailboxUGD *mailbox_ugd); void _reset_refer_item_and_idx(EmailMailboxUGD *mailbox_ugd); email_sort_type_t _mailbox_conv_sort_type(EmailSortType sort_type); void mailbox_create_password_changed_popup(void *data); +void _split_back_clicked(void *data, Evas_Object *obj, void *event_info); #endif /* __DEF_email-mailbox_H__ */ diff --git a/mailbox/src/email-mailbox-controlbar.c b/mailbox/src/email-mailbox-controlbar.c index a1e34e4..40808a3 100755 --- a/mailbox/src/email-mailbox-controlbar.c +++ b/mailbox/src/email-mailbox-controlbar.c @@ -32,10 +32,36 @@ typedef struct { } viewby_req_t; viewby_req_t viewby_req[VIEWBY_MAX]; +typedef enum { + POPUP__LIST_TYPE_UNKNOWN = -1, + MARK_AS_READ, + MARK_AS_UNREAD, + SET_AS_FAVOURITE, + SET_AS_UNFAVOURITE, + POPUP_LIST_TYPE_MAX, +} MailboxPopupListIndex; + +typedef enum { + MARK_READ_UNREAD_POPUP = MARK_AS_READ, + SET_FAVOURITE_UNFAVOURITE_POPUP = SET_AS_FAVOURITE, + POPUP_TYPE_MAX, +} MailboxPopupType; + extern Eina_List *edit_list; extern gboolean b_editmode; extern int ug_pushed; +#define MAILBOX_MORE_OPTION_SORT_BY IMGDIR"/M02_popup_icon_sort_by.png" +#define MAILBOX_MORE_OPTION_DELETE_ALL IMGDIR"/M02_popup_icon_delete_all.png" +#define MAILBOX_MORE_OPTION_MARK_UNREAD IMGDIR"/M02_popup_icon_mark_as_unread.png" +#define MAILBOX_MORE_OPTION_SET_FAVOURITE IMGDIR"/M02_icon_favorite_off_74x74.png" //To be modified +#define MAILBOX_MORE_OPTION_SET_FLAG IMGDIR"/M02_controlbar_icon_mark_as_unread.png" //To be modified +#define MAILBOX_MORE_OPTION_BLOCK IMGDIR"/M02_popup_icon_block.png" +#define MAILBOX_MORE_OPTION_MOVE IMGDIR"/M02_popup_icon_move.png" +#define MAILBOX_MORE_OPTION_VIEW_MODE IMGDIR"/M02_popup_icon_view_mode.png" +#define MAILBOX_MORE_OPTION_DOCUMENT IMGDIR"/M02_icon_popup_document.png" +#define MAILBOX_MORE_OPTION_ADD_ACCOUNT IMGDIR"/M02_popup_icon_add_account.png" + static Evas_Object *create_control_option(EmailMailboxUGD *ad); static Evas_Object *create_edit_control_option(EmailMailboxUGD *ad); @@ -52,10 +78,20 @@ static void _move_ctxpopup(Evas_Object *ctxpopup, Evas_Object *win); static void _move_mail_cb(void *data, Evas_Object *obj, void *event_info); static void _add_account_cb(void *data, Evas_Object *obj, void *event_info); static void _search_button_clicked_cb(void *data, Evas_Object *obj, void *event_info); +static void _set_as_unfavourite_mail_cb(void *data, Evas_Object *obj, void *event_info); +static void _set_as_favourite_mail_cb(void *data, Evas_Object *obj, void *event_info); +static void _create_favourite_status_popup_cb(void *data, Evas_Object *obj, void *event_info); +static void _create_mark_status_popup_cb(void *data, Evas_Object *obj, void *event_info); +static void _create_mailbox_list_popup_cb(void *data, MailboxPopupType popup_type); +static void _mailbox_list_popup_canceled_cb(void *data, Evas_Object *obj, void *event_info); +static void _mailbox_list_popup_item_selected_cb(void *data, Evas_Object *obj, void *event_info); static Evas_Object *_create_toolbar_more_btn(Evas_Object *parent, Evas_Smart_Cb func, void *data); static Evas_Object *_create_toolbar_btn(Evas_Object *parent, const char *text, Evas_Smart_Cb func, void *data); +static Evas_Object *create_control_option_for_split_view(EmailMailboxUGD *mailbox_ugd); +static Evas_Object *create_edit_control_option_for_split_view(EmailMailboxUGD *mailbox_ugd); + static void _block_clicked_cb(void *data, Evas_Object *obj, void *event_info) { evas_object_del(obj); @@ -301,51 +337,101 @@ static void _more_toolbar_clicked_cb(void *data, Evas_Object *obj, void *event_i EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; Evas_Object* icon; - mailbox_ugd->ctxpopup = elm_ctxpopup_add(mailbox_ugd->navi_bar); + if(mailbox_ugd->isRotate){ + mailbox_ugd->ctxpopup = elm_ctxpopup_add(mailbox_ugd->split_navi_bar); + } else { + mailbox_ugd->ctxpopup = elm_ctxpopup_add(mailbox_ugd->navi_bar); + } + evas_object_smart_callback_add(mailbox_ugd->ctxpopup, "dismissed", _dismissed_cb, mailbox_ugd); - icon = elm_icon_add(mailbox_ugd->ctxpopup); - elm_image_file_set(icon, IMGDIR "/M02_popup_icon_sort_by.png", NULL); - elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_SK_SORT_BY"), icon, _viewby_cb, mailbox_ugd); + if (mailbox_ugd->view_type != EMAIL_VIEW_EDIT) { + icon = elm_icon_add(mailbox_ugd->ctxpopup); + elm_image_file_set(icon, MAILBOX_MORE_OPTION_SORT_BY, NULL); + elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_SK_SORT_BY"), icon, _viewby_cb, mailbox_ugd); + } if (mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { int i = 0; - bool read_mail_exist = false; + bool use_popup = false; + bool use_flag_opt = true; //If flag or favourites option is needed Eina_List *list = edit_list; int checked_count = eina_list_count(list); if (checked_count <= 0) return; - for (i = 0; i < checked_count; i++) { + Eina_List *first_list = eina_list_nth_list(list, 0); + list_data *first_ld = eina_list_data_get(first_list); + int first_read_status = first_ld->is_seen; + int first_favourite_status = first_ld->imp_sel; + int first_account_type = GET_ACCOUNT_SERVER_TYPE(first_ld->account_id); + + for (i = 1; i < checked_count; i++) { Eina_List *nth_list = eina_list_nth_list(list, i); list_data *ld = eina_list_data_get(nth_list); - if (ld->is_seen) - read_mail_exist = true; + if (ld->is_seen != first_read_status) { + use_popup = true; + break; + } } - if (read_mail_exist) { - icon = elm_icon_add(mailbox_ugd->ctxpopup); - elm_image_file_set(icon, IMGDIR "/M02_popup_icon_mark_as_unread.png", NULL); - elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_OPT_MARK_AS_UNREAD"), icon, _markunread_mail_cb, mailbox_ugd); + icon = elm_icon_add(mailbox_ugd->ctxpopup); + elm_image_file_set(icon, MAILBOX_MORE_OPTION_MARK_UNREAD, NULL); + + if(use_popup) { + elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, N_("Mark all as"), icon, _create_mark_status_popup_cb, mailbox_ugd); } else { - icon = elm_icon_add(mailbox_ugd->ctxpopup); - elm_image_file_set(icon, IMGDIR "/M02_popup_icon_mark_as_unread.png", NULL); - elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_OPT_MARK_AS_READ"), icon, _markread_mail_cb, mailbox_ugd); + if (first_read_status) { + elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_OPT_MARK_AS_UNREAD"), icon, _markunread_mail_cb, mailbox_ugd); + } else { + elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_OPT_MARK_AS_READ"), icon, _markread_mail_cb, mailbox_ugd); + } } - if (mailbox_ugd->isRotate) { + if(mailbox_ugd->mode != EMAIL_MAILBOX_MODE_MAILBOX) { + for (i = 1; i < checked_count; i++) { + Eina_List *nth_list = eina_list_nth_list(list, i); + list_data *ld = eina_list_data_get(nth_list); + + if (first_account_type != GET_ACCOUNT_SERVER_TYPE(ld->account_id)) { + use_flag_opt = false; + break; + } + } + } + + if(use_flag_opt) { + use_popup = false; + for (i = 1; i < checked_count; i++) { + Eina_List *nth_list = eina_list_nth_list(list, i); + list_data *ld = eina_list_data_get(nth_list); + + if (ld->imp_sel != first_favourite_status) { + use_popup = true; + break; + } + } + icon = elm_icon_add(mailbox_ugd->ctxpopup); - elm_image_file_set(icon, IMGDIR "/M02_popup_icon_move.png", NULL); - elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, dgettext("sys_string", "IDS_COM_BODY_MOVE"), icon, _move_mail_cb, mailbox_ugd); + elm_image_file_set(icon, MAILBOX_MORE_OPTION_SET_FAVOURITE, NULL); + if(use_popup) { + elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, N_("Set all as"), icon, _create_favourite_status_popup_cb, mailbox_ugd); + } else { + if (first_favourite_status) { + elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, N_("Set as unfavourites"), icon, _set_as_unfavourite_mail_cb, mailbox_ugd); + } else { + elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, N_("Set as favourites"), icon, _set_as_favourite_mail_cb, mailbox_ugd); + } + } } } else { icon = elm_icon_add(mailbox_ugd->ctxpopup); - elm_image_file_set(icon, IMGDIR "/M02_popup_icon_delete_all.png", NULL); + elm_image_file_set(icon, MAILBOX_MORE_OPTION_DELETE_ALL, NULL); elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_OPT_DELETE_ALL"), icon, _delete_all_emails_cb, mailbox_ugd); icon = elm_icon_add(mailbox_ugd->ctxpopup); - elm_image_file_set(icon, IMGDIR "/M02_popup_icon_add_account.png", NULL); + elm_image_file_set(icon, MAILBOX_MORE_OPTION_ADD_ACCOUNT, NULL); elm_ctxpopup_item_append(mailbox_ugd->ctxpopup, _("IDS_EMAIL_HEADER_ADD_ACCOUNT"), icon, _add_account_cb, mailbox_ugd); } @@ -572,6 +658,11 @@ static void _viewby_cb(void *data, Evas_Object *obj, void *event_info) ELM_GENLIST_ITEM_NONE, _gl_viewby_popup_sel, NULL); break; case VIEWBY_IMPORTANT: + if(mailbox_ugd->account_id != 0) + elm_genlist_item_append(genlist, &itc_popup, &viewby_req[index], NULL, + ELM_GENLIST_ITEM_NONE, _gl_viewby_popup_sel, NULL); + break; + case VIEWBY_PRIORITY: elm_genlist_item_append(genlist, &itc_popup, &viewby_req[index], NULL, ELM_GENLIST_ITEM_NONE, _gl_viewby_popup_sel, NULL); break; @@ -617,28 +708,158 @@ static void _add_account_cb(void *data, Evas_Object *obj, void *event_info) service_destroy(service); } -void _create_controlbar(EmailMailboxUGD *mailbox_ugd) +void _create_controlbar_for_split_view(EmailMailboxUGD *mailbox_ugd) { debug_log(""); - _delete_selection_info(mailbox_ugd); + if(mailbox_ugd) { + _delete_selection_info(mailbox_ugd); + + _delete_controlbar_for_split_view(mailbox_ugd); + + if(mailbox_ugd->view_type == EMAIL_VIEW_SEARCH + || mailbox_ugd->b_advanced_search_view || mailbox_ugd->b_move_list_view) { + _hide_split_toolbar(mailbox_ugd); + } else if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + create_edit_control_option_for_split_view(mailbox_ugd); + } else { + create_control_option_for_split_view(mailbox_ugd); + } + } +} + +static Evas_Object *create_control_option_for_split_view(EmailMailboxUGD *mailbox_ugd) +{ + debug_log(""); + Evas_Object *more_btn, *btn1, *btn2; + + if(!mailbox_ugd->split_back_btn) { + Evas_Object *btn = elm_button_add(mailbox_ugd->split_navi_bar); + elm_object_style_set(btn, "naviframe/back_btn/default"); + evas_object_smart_callback_add(btn, "clicked", _split_back_clicked, mailbox_ugd); + mailbox_ugd->split_back_btn = btn; + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "prev_btn", mailbox_ugd->split_back_btn); + } + + more_btn = _create_toolbar_more_btn(mailbox_ugd->split_navi_bar, _more_toolbar_clicked_cb, mailbox_ugd); + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "toolbar_more_btn", more_btn); + mailbox_ugd->split_more_btn = more_btn; + + btn1 = _create_toolbar_btn(mailbox_ugd->split_navi_bar, _("IDS_EMAIL_SK_COMPOSE"), _compose_toolbar_clicked_cb, mailbox_ugd); + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "toolbar_button1", btn1); + mailbox_ugd->split_lbtn = btn1; + + btn2 = _create_toolbar_btn(mailbox_ugd->split_navi_bar, dgettext("sys_string", "IDS_COM_SK_SEARCH"), _search_button_clicked_cb, mailbox_ugd); + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "toolbar_button2", btn2); + mailbox_ugd->split_rbtn = btn2; + + return NULL; +} - _delete_controlbar(mailbox_ugd); +static Evas_Object *create_edit_control_option_for_split_view(EmailMailboxUGD *mailbox_ugd) +{ + debug_log(""); - switch (mailbox_ugd->view_type) { - case EMAIL_VIEW_DATE: - case EMAIL_VIEW_UNREAD: - case EMAIL_VIEW_IMPORTANT: - case EMAIL_VIEW_RECIPIENT: - case EMAIL_VIEW_ATTACHMENTS: - case EMAIL_VIEW_PRIORITY: - create_control_option(mailbox_ugd); - break; - case EMAIL_VIEW_EDIT: - create_edit_control_option(mailbox_ugd); - break; - default: - break; + Evas_Object *delete_btn, *move_btn, *more_btn; + + if(!mailbox_ugd->split_back_btn) { + Evas_Object *btn = elm_button_add(mailbox_ugd->split_navi_bar); + elm_object_style_set(btn, "naviframe/back_btn/default"); + evas_object_smart_callback_add(btn, "clicked", _split_back_clicked, mailbox_ugd); + mailbox_ugd->split_back_btn = btn; + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "prev_btn", mailbox_ugd->split_back_btn); + } + + more_btn = _create_toolbar_more_btn(mailbox_ugd->split_navi_bar, _more_toolbar_clicked_cb, mailbox_ugd); + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "toolbar_more_btn", more_btn); + mailbox_ugd->split_more_btn = more_btn; + + delete_btn = _create_toolbar_btn(mailbox_ugd->navi_bar, dgettext("sys_string", "IDS_COM_SK_DELETE"), _delete_mail_cb, mailbox_ugd); + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "toolbar_button1", delete_btn); + mailbox_ugd->split_lbtn = delete_btn; + + move_btn = _create_toolbar_btn(mailbox_ugd->navi_bar, dgettext("sys_string", "IDS_COM_BODY_MOVE"), _move_mail_cb, mailbox_ugd); + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "toolbar_button2", move_btn); + mailbox_ugd->split_rbtn = move_btn; + + return NULL; + +} +void _delete_controlbar_for_split_view(EmailMailboxUGD *mailbox_ugd) +{ + debug_log(""); + + if (mailbox_ugd->split_more_btn) { + evas_object_del(mailbox_ugd->split_more_btn); + mailbox_ugd->split_more_btn = NULL; + } + + if (mailbox_ugd->split_lbtn) { + evas_object_del(mailbox_ugd->split_lbtn); + mailbox_ugd->split_lbtn = NULL; + } + if (mailbox_ugd->split_rbtn) { + evas_object_del(mailbox_ugd->split_rbtn); + mailbox_ugd->split_rbtn = NULL; + } +} + +void _hide_split_toolbar(EmailMailboxUGD *mailbox_ugd) +{ + debug_log(""); + + if(mailbox_ugd) { + if(mailbox_ugd->split_back_btn) { + evas_object_del(mailbox_ugd->split_back_btn); + mailbox_ugd->split_back_btn = NULL; + } + _delete_controlbar_for_split_view(mailbox_ugd); + + elm_object_item_signal_emit(mailbox_ugd->split_navi_it, "elm,state,toolbar,close", ""); + } +} + +void _show_split_toolbar(EmailMailboxUGD *mailbox_ugd) +{ + debug_log(""); + + if(mailbox_ugd) { + if(!mailbox_ugd->split_back_btn) { + Evas_Object *btn = elm_button_add(mailbox_ugd->split_navi_bar); + elm_object_style_set(btn, "naviframe/back_btn/default"); + evas_object_smart_callback_add(btn, "clicked", _split_back_clicked, mailbox_ugd); + mailbox_ugd->split_back_btn = btn; + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "prev_btn", mailbox_ugd->split_back_btn); + } + _create_controlbar_for_split_view(mailbox_ugd); + + elm_object_item_signal_emit(mailbox_ugd->split_navi_it, "elm,state,toolbar,open", ""); + } +} + +void _create_controlbar(EmailMailboxUGD *mailbox_ugd) +{ + debug_log(""); + if(mailbox_ugd) { + + _delete_selection_info(mailbox_ugd); + _delete_controlbar(mailbox_ugd); + + switch (mailbox_ugd->view_type) { + case EMAIL_VIEW_DATE: + case EMAIL_VIEW_UNREAD: + case EMAIL_VIEW_IMPORTANT: + case EMAIL_VIEW_RECIPIENT: + case EMAIL_VIEW_ATTACHMENTS: + case EMAIL_VIEW_PRIORITY: + create_control_option(mailbox_ugd); + break; + case EMAIL_VIEW_EDIT: + create_edit_control_option(mailbox_ugd); + break; + default: + break; + } } } @@ -647,18 +868,15 @@ void _delete_controlbar(EmailMailboxUGD *mailbox_ugd) debug_log(""); if (mailbox_ugd->controlbar_more_btn) { - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "toolbar_more_btn"); evas_object_del(mailbox_ugd->controlbar_more_btn); mailbox_ugd->controlbar_more_btn = NULL; mailbox_ugd->delete_all_button = NULL; } if (mailbox_ugd->controlbar_lbtn) { - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "toolbar_button1"); evas_object_del(mailbox_ugd->controlbar_lbtn); mailbox_ugd->controlbar_lbtn = NULL; } if (mailbox_ugd->controlbar_rbtn) { - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "toolbar_button2"); evas_object_del(mailbox_ugd->controlbar_rbtn); mailbox_ugd->controlbar_rbtn = NULL; } @@ -842,6 +1060,16 @@ static void _search_button_clicked_cb(void *data, Evas_Object *obj, void *event_ } EmailMailboxUGD* mailbox_ugd = (EmailMailboxUGD *)data; + //apply default search mode + Evas_Object *searchby_icon = elm_icon_add(mailbox_ugd->searchby_button); + Evas_Object *prev_searchby_btn = elm_object_content_get(mailbox_ugd->searchby_button); + evas_object_del(prev_searchby_btn); + mailbox_ugd->search_type = EMAIL_SEARCH_ALL; + elm_image_file_set(searchby_icon, IMGDIR"/M02_popup_icon_all.png", NULL); + elm_image_resizable_set(searchby_icon, EINA_TRUE, EINA_TRUE); + evas_object_image_smooth_scale_set(searchby_icon, 0); + elm_object_content_set(mailbox_ugd->searchby_button, searchby_icon); + if (evas_object_visible_get(mailbox_ugd->navi_title_ly)) { debug_log("title is visible, hide title"); elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title"); @@ -860,44 +1088,298 @@ void _hide_toolbar(EmailMailboxUGD *mailbox_ugd) { debug_log(""); - if(mailbox_ugd->main_back_btn) { - evas_object_del(mailbox_ugd->main_back_btn); - mailbox_ugd->main_back_btn = NULL; + if(mailbox_ugd) { + if(mailbox_ugd->main_back_btn) { + evas_object_del(mailbox_ugd->main_back_btn); + mailbox_ugd->main_back_btn = NULL; + } + + if(mailbox_ugd->controlbar_lbtn) { + evas_object_del(mailbox_ugd->controlbar_lbtn); + mailbox_ugd->controlbar_lbtn = NULL; + } + if(mailbox_ugd->controlbar_rbtn) { + evas_object_del(mailbox_ugd->controlbar_rbtn); + mailbox_ugd->controlbar_rbtn = NULL; + } + if(mailbox_ugd->controlbar_more_btn) { + evas_object_del(mailbox_ugd->controlbar_more_btn); + mailbox_ugd->controlbar_more_btn = NULL; + } + + if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + elm_object_item_signal_emit(mailbox_ugd->navibar_item[mailbox_ugd->previous_view], "elm,state,toolbar,close", ""); + } else { + elm_object_item_signal_emit(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "elm,state,toolbar,close", ""); + } } - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "prev_btn"); +} - if(mailbox_ugd->controlbar_lbtn) { - evas_object_del(mailbox_ugd->controlbar_lbtn); - mailbox_ugd->controlbar_lbtn = NULL; - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "toolbar_button1"); +void _show_toolbar(EmailMailboxUGD *mailbox_ugd) +{ + debug_log(""); + + if(mailbox_ugd) { + if(!mailbox_ugd->main_back_btn) { + Evas_Object *btn = elm_button_add(mailbox_ugd->navi_bar); + elm_object_style_set(btn, "naviframe/back_btn/default"); + evas_object_smart_callback_add(btn, "clicked", _main_back_clicked, mailbox_ugd); + mailbox_ugd->main_back_btn = btn; + } + + if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->previous_view], "prev_btn", mailbox_ugd->main_back_btn); + } else { + elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "prev_btn", mailbox_ugd->main_back_btn); + } + + _create_controlbar(mailbox_ugd); + + if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + elm_object_item_signal_emit(mailbox_ugd->navibar_item[mailbox_ugd->previous_view], "elm,state,toolbar,open", ""); + } else { + elm_object_item_signal_emit(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "elm,state,toolbar,open", ""); + } } - if(mailbox_ugd->controlbar_rbtn) { - evas_object_del(mailbox_ugd->controlbar_rbtn); - mailbox_ugd->controlbar_rbtn = NULL; - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "toolbar_more_btn"); + +} + +static void _create_mark_status_popup_cb(void *data, Evas_Object *obj, void *event_info) +{ + debug_log(""); + if (data == NULL) { + debug_log("data == NULL"); + return; } - if(mailbox_ugd->controlbar_more_btn) { - evas_object_del(mailbox_ugd->controlbar_more_btn); - mailbox_ugd->controlbar_more_btn = NULL; - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "toolbar_button2"); + + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + + if (mailbox_ugd->ctxpopup) { + evas_object_del(mailbox_ugd->ctxpopup); + mailbox_ugd->ctxpopup = NULL; } - elm_object_item_signal_emit(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "elm,state,toolbar,close", ""); + + _create_mailbox_list_popup_cb(data, MARK_READ_UNREAD_POPUP); + } -void _show_toolbar(EmailMailboxUGD *mailbox_ugd) +static void _create_favourite_status_popup_cb(void *data, Evas_Object *obj, void *event_info) { debug_log(""); + if (data == NULL) { + debug_log("data == NULL"); + return; + } + + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + + if (mailbox_ugd->ctxpopup) { + evas_object_del(mailbox_ugd->ctxpopup); + mailbox_ugd->ctxpopup = NULL; + } + _create_mailbox_list_popup_cb(data, SET_FAVOURITE_UNFAVOURITE_POPUP); +} + +static void _set_as_favourite_mail_cb(void *data, Evas_Object *obj, void *event_info) +{ + debug_log(""); + if (data == NULL) { + debug_log("data == NULL"); + return; + } + + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + + if (mailbox_ugd->ctxpopup) { + evas_object_del(mailbox_ugd->ctxpopup); + mailbox_ugd->ctxpopup = NULL; + } + + int i = 0; + Eina_List *list = edit_list; + int checked_count = eina_list_count(list); + + if (checked_count <= 0) return; + + for (i = 0; i < checked_count; i++) { + Eina_List *nth_list = eina_list_nth_list(list, i); + + list_data *ld = eina_list_data_get(nth_list); + + //make it favourites state in all cases + int err = email_set_flags_field(ld->account_id, &(ld->mail_id), 1, EMAIL_FLAGS_FLAGGED_FIELD, 1, 1); + if (err != EMAIL_ERROR_NONE) + debug_log("email_set_flags_field - err(%d)", err); + } + + mailbox_ugd->view_type = mailbox_ugd->previous_view; + + edit_list = eina_list_free(edit_list); + + elm_genlist_decorate_mode_set(mailbox_ugd->gl[mailbox_ugd->view_type], EINA_FALSE); + elm_genlist_reorder_mode_set(mailbox_ugd->gl[mailbox_ugd->view_type], EINA_FALSE); + elm_genlist_select_mode_set(mailbox_ugd->gl[mailbox_ugd->view_type], ELM_OBJECT_SELECT_MODE_DEFAULT); + b_editmode = false; + elm_object_disabled_set(mailbox_ugd->folder_button, EINA_FALSE); + _update_navigationbar_title(mailbox_ugd); + + if (mailbox_ugd->isRotate == true) { + email_rotate_landscape(mailbox_ugd); + } + _refresh_mailbox(mailbox_ugd); +} + +static void _set_as_unfavourite_mail_cb(void *data, Evas_Object *obj, void *event_info) +{ + debug_log(""); + if (data == NULL) { + debug_log("data == NULL"); + return; + } + + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + + if (mailbox_ugd->ctxpopup) { + evas_object_del(mailbox_ugd->ctxpopup); + mailbox_ugd->ctxpopup = NULL; + } + + int i = 0; + Eina_List *list = edit_list; + int checked_count = eina_list_count(list); + + if (checked_count <= 0) return; + + for (i = 0; i < checked_count; i++) { + Eina_List *nth_list = eina_list_nth_list(list, i); + + list_data *ld = eina_list_data_get(nth_list); - if(!mailbox_ugd->main_back_btn) { - Evas_Object *btn = elm_button_add(mailbox_ugd->navi_bar); - elm_object_style_set(btn, "naviframe/end_btn/default"); - evas_object_smart_callback_add(btn, "clicked", _main_back_clicked, mailbox_ugd); - mailbox_ugd->main_back_btn = btn; + //make it unfavourites state in all cases + int err = email_set_flags_field(ld->account_id, &(ld->mail_id), 1, EMAIL_FLAGS_FLAGGED_FIELD, 0, 1); + if (err != EMAIL_ERROR_NONE) + debug_log("email_set_flags_field - err(%d)", err); } - elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "prev_btn", mailbox_ugd->main_back_btn); - _create_controlbar(mailbox_ugd); + mailbox_ugd->view_type = mailbox_ugd->previous_view; + + edit_list = eina_list_free(edit_list); - elm_object_item_signal_emit(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "elm,state,toolbar,open", ""); + elm_genlist_decorate_mode_set(mailbox_ugd->gl[mailbox_ugd->view_type], EINA_FALSE); + elm_genlist_reorder_mode_set(mailbox_ugd->gl[mailbox_ugd->view_type], EINA_FALSE); + elm_genlist_select_mode_set(mailbox_ugd->gl[mailbox_ugd->view_type], ELM_OBJECT_SELECT_MODE_DEFAULT); + b_editmode = false; + elm_object_disabled_set(mailbox_ugd->folder_button, EINA_FALSE); + _update_navigationbar_title(mailbox_ugd); + + if (mailbox_ugd->isRotate == true) { + email_rotate_landscape(mailbox_ugd); + } + + _refresh_mailbox(mailbox_ugd); } + + +static void _create_mailbox_list_popup_cb(void *data, MailboxPopupType popup_type) +{ + debug_log(""); + Evas_Object *popup; + int index = 0; + int max_item_cnt = 0; + Elm_Object_Item *item; + Evas_Object *btn1; + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + + popup = elm_popup_add(mailbox_ugd->win_main); + elm_object_style_set(popup,"menustyle"); + + if(popup_type == MARK_READ_UNREAD_POPUP) { + elm_object_part_text_set(popup, "title,text", N_("Mark all as")); + max_item_cnt = 2; + } + else if (popup_type == SET_FAVOURITE_UNFAVOURITE_POPUP) { + elm_object_part_text_set(popup, "title,text", N_("Set all as")); + max_item_cnt = 2; + } + + evas_object_smart_callback_add(popup, "block,clicked", _block_clicked_cb, NULL); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + btn1 = elm_button_add(popup); + elm_object_style_set(btn1, "popup_button/default"); + elm_object_text_set(btn1, dgettext("sys_string", "IDS_COM_SK_CANCEL")); + elm_object_part_content_set(popup, "button1", btn1); + mailbox_ugd->flag_popup = popup; + evas_object_smart_callback_add(btn1, "clicked", _mailbox_list_popup_canceled_cb, mailbox_ugd); + + char buf[4096]; + for (index = (int)popup_type; index < ((int)popup_type + max_item_cnt); index++) { + switch(index) { + case MARK_AS_READ: + snprintf(buf, sizeof(buf), "Read"); + break; + case MARK_AS_UNREAD: + snprintf(buf, sizeof(buf), "Unread"); + break; + case SET_AS_FAVOURITE: + snprintf(buf, sizeof(buf), "Favourites"); + break; + case SET_AS_UNFAVOURITE: + snprintf(buf, sizeof(buf), "Unfavourites"); + break; + } + item = elm_popup_item_append(popup, buf, NULL, _mailbox_list_popup_item_selected_cb, data); + debug_log("buf : %s index : %d", buf, index); + } + + evas_object_show(popup); +} + +static void _mailbox_list_popup_item_selected_cb(void *data, Evas_Object *obj, void *event_info) +{ + debug_log(""); + const char *label = elm_object_item_text_get((Elm_Object_Item *) event_info); + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + + if(!mailbox_ugd) { + debug_critical("mailbox_ugd is null"); + return; + } + + if(!label) { + if(mailbox_ugd->flag_popup) { + evas_object_del(mailbox_ugd->flag_popup); + mailbox_ugd->flag_popup = NULL; + } + debug_log("popup item string is null"); + return; + } + + debug_log("text(%s) is clicked\n", label); + + if(!g_strcmp0(label, N_("Read"))) + _markread_mail_cb(data, NULL, NULL); + else if (!g_strcmp0(label, N_("Unread"))) + _markunread_mail_cb(data, NULL, NULL); + else if (!g_strcmp0(label, N_("Favourites"))) + _set_as_favourite_mail_cb(data, NULL, NULL); + else if (!g_strcmp0(label, N_("Unfavourites"))) + _set_as_unfavourite_mail_cb(data, NULL, NULL); + + if(mailbox_ugd->flag_popup) { + evas_object_del(mailbox_ugd->flag_popup); + mailbox_ugd->flag_popup = NULL; + } + +} + +static void _mailbox_list_popup_canceled_cb(void *data, Evas_Object *obj, void *event_info) +{ + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + if(mailbox_ugd->flag_popup) { + evas_object_del(mailbox_ugd->flag_popup); + mailbox_ugd->flag_popup = NULL; + } +} + + diff --git a/mailbox/src/email-mailbox-list.c b/mailbox/src/email-mailbox-list.c index 0a532fc..d6cefe4 100755 --- a/mailbox/src/email-mailbox-list.c +++ b/mailbox/src/email-mailbox-list.c @@ -390,12 +390,15 @@ static void _my_gl_mode_cancel(void *data, Evas_Object *obj, void *event_info) static Evas_Object *_create_progress_part_in_outbox(list_data *ld, Evas_Object *obj) { - debug_log("ld->mail_status(%d)", ld->mail_status); + debug_log(""); + if (ld == NULL || obj == NULL) { debug_critical("ld or obj is NULL"); return NULL; } + debug_log("ld->mail_status(%d)", ld->mail_status); + switch(ld->mail_status) { case EMAIL_MAIL_STATUS_SENDING: { /* Since mail send is in progress, @@ -813,6 +816,13 @@ static Evas_Object *_gl_outbox_mail_item_content_get(void *data, Evas_Object *ob return (void *)icon; } } else if(!g_strcmp0(source, "elm.icon.4")) { + if(ld->is_attachment == true) { + icon = elm_icon_add(obj); + elm_image_file_set(icon, IMGDIR "/M02_icon_attach.png", NULL); + evas_object_size_hint_min_set(icon, 38, 38); + return icon; + } + } else if(!g_strcmp0(source, "elm.icon.5")) { Evas_Object *outbox_progress_part = NULL; if (ld->mailbox_ugd->mode == EMAIL_MAILBOX_MODE_MAILBOX && ld->mailbox_type == EMAIL_MAILBOX_TYPE_OUTBOX) { @@ -865,7 +875,7 @@ static char *_gl_mail_item_text_get(void *data, Evas_Object *obj, const char *pa //strcat(title, ""); return g_strdup(title); - } else if (!g_strcmp0(part, "elm.text.2")) { + } else if (!g_strcmp0(part, "elm.text.3")) { /* if (ld->from == NULL) { debug_log("from is NULL"); @@ -894,7 +904,7 @@ static char *_gl_mail_item_text_get(void *data, Evas_Object *obj, const char *pa return g_strdup(ld->alias); } - } else if (!g_strcmp0(part, "elm.text.3")) { + } else if (!g_strcmp0(part, "elm.text.2")) { if (ld->preview_body == NULL) { debug_log("preview text is NULL"); return NULL; @@ -945,7 +955,7 @@ static char *_gl_outbox_mail_item_text_get(void *data, Evas_Object *obj, const c strncat(title, ld->title, SUBJECT_LEN + TAG_LEN); /* search tag may be contained */ //strcat(title, ""); return g_strdup(title); - } else if (!g_strcmp0(part, "elm.text.2")) { + } else if (!g_strcmp0(part, "elm.text.3")) { /* if (ld->from == NULL) { debug_log("from is NULL"); @@ -973,7 +983,7 @@ static char *_gl_outbox_mail_item_text_get(void *data, Evas_Object *obj, const c else return g_strdup(ld->alias); } - } else if (!g_strcmp0(part, "elm.text.3")) { + } else if (!g_strcmp0(part, "elm.text.2")) { if (ld->preview_body == NULL) { debug_log("preview text is NULL"); return NULL; @@ -1140,7 +1150,7 @@ void mailbox_create_list_view(EmailMailboxUGD *mailbox_ugd) elm_scroller_policy_set(gl, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); elm_genlist_block_count_set(gl, BLOCK_COUNT); elm_genlist_homogeneous_set(gl, EINA_TRUE); - //elm_genlist_mode_set(gl, ELM_LIST_COMPRESS); //genlist is updated when rotate event is detected(Resize) + elm_genlist_mode_set(gl, ELM_LIST_COMPRESS); //compress mode should be used because of text block(should be check rotate sweep menu issue) elm_genlist_select_mode_set(gl, ELM_OBJECT_SELECT_MODE_ALWAYS); evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL); @@ -1177,37 +1187,57 @@ void email_maillist_select_info(EmailMailboxUGD *mailbox_ugd) double dou_panes = elm_panes_content_left_size_get(mailbox_ugd->panes); debug_log("panes: %lf ", dou_panes); - if(!mailbox_ugd->selectioninfo_layout) - { - mailbox_ugd->selectioninfo_layout = elm_layout_add(mailbox_ugd->sub_layout[mailbox_ugd->previous_view]); - elm_object_part_content_set(mailbox_ugd->sub_layout[mailbox_ugd->previous_view], "selection_info", mailbox_ugd->selectioninfo_layout); - evas_object_size_hint_weight_set(mailbox_ugd->selectioninfo_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - evas_object_size_hint_align_set(mailbox_ugd->selectioninfo_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); - } + if(!mailbox_ugd->isRotate) { + if(!mailbox_ugd->selectioninfo_layout) + { + mailbox_ugd->selectioninfo_layout = elm_layout_add(mailbox_ugd->sub_layout[mailbox_ugd->previous_view]); + elm_object_part_content_set(mailbox_ugd->sub_layout[mailbox_ugd->previous_view], "selection_info", mailbox_ugd->selectioninfo_layout); + evas_object_size_hint_weight_set(mailbox_ugd->selectioninfo_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(mailbox_ugd->selectioninfo_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + } - Eina_List *list = NULL; - int cnt = 0; - list = edit_list; - cnt = eina_list_count(list); + Eina_List *list = NULL; + int cnt = 0; + list = edit_list; + cnt = eina_list_count(list); - char text[128]; + char text[128]; - /* Set the layout theme */ - elm_layout_theme_set(mailbox_ugd->selectioninfo_layout, "standard", "selectioninfo", "center_text"); + /* Set the layout theme */ + elm_layout_theme_set(mailbox_ugd->selectioninfo_layout, "standard", "selectioninfo", "center_text"); - if (!cnt) { - elm_object_signal_emit(mailbox_ugd->sub_layout[mailbox_ugd->previous_view], "hide_selection_info", "elm"); - return; - } + if (!cnt) { + elm_object_signal_emit(mailbox_ugd->sub_layout[mailbox_ugd->previous_view], "hide_selection_info", "elm"); + return; + } - if (cnt == 1) - snprintf(text, sizeof(text), "%s (%d)", dgettext("sys_string", "IDS_COM_POP_SELECTED"), cnt); - else - snprintf(text, sizeof(text), "%s (%d)", dgettext("sys_string", "IDS_COM_POP_SELECTED"), cnt); + if (cnt == 1) + snprintf(text, sizeof(text), "%s (%d)", dgettext("sys_string", "IDS_COM_POP_SELECTED"), cnt); + else + snprintf(text, sizeof(text), "%s (%d)", dgettext("sys_string", "IDS_COM_POP_SELECTED"), cnt); - /* Set the text */ - elm_object_part_text_set(mailbox_ugd->selectioninfo_layout, "elm.text", text); - elm_object_signal_emit(mailbox_ugd->sub_layout[mailbox_ugd->previous_view], "show_selection_info", "elm"); + /* Set the text */ + elm_object_part_text_set(mailbox_ugd->selectioninfo_layout, "elm.text", text); + elm_object_signal_emit(mailbox_ugd->sub_layout[mailbox_ugd->previous_view], "show_selection_info", "elm"); + } else { + if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + char tmp[MAX_STR_LEN] = { 0, }; + Eina_List *list = NULL; + int cnt = 0; + list = edit_list; + cnt = eina_list_count(list); + + if(mailbox_ugd->selectioninfo_layout) { + elm_object_signal_emit(mailbox_ugd->sub_layout[mailbox_ugd->previous_view], "hide_selection_info", "elm"); + } + + snprintf(tmp, sizeof(tmp), "%s (%d)", N_("Selected"), cnt); + elm_object_part_text_set(mailbox_ugd->split_nocontent, "elm.text", tmp); + } + else { + elm_object_part_text_set(mailbox_ugd->split_nocontent, "elm.text", N_("No email selected")); + } + } } @@ -1286,8 +1316,12 @@ static void _process_item_check_changed_cb(list_data *ld) mailbox_ugd->previous_view = mailbox_ugd->view_type; mailbox_ugd->view_type = EMAIL_VIEW_EDIT; - _create_controlbar(mailbox_ugd); - //elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->previous_view], "controlbar", mailbox_ugd->controlbar_btns); + if(mailbox_ugd->isRotate) { + _create_controlbar_for_split_view(mailbox_ugd); + } else { + _create_controlbar(mailbox_ugd); + } + elm_object_disabled_set(mailbox_ugd->folder_button, EINA_TRUE); } else if(cnt <= 0) @@ -1869,7 +1903,11 @@ void _make_mail_list(EmailMailboxUGD *mailbox_ugd, const EmailSearchData *search debug_log("COUNT: %d", mail_count); if( mail_count > FIRST_BLOCK_SIZE ) {/* add remainder list by using thread */ mail_remaining_list_t *req = MEM_ALLOC(req, 1); - if(!req) return; + if(!req) { + debug_critical("failure in memory allocation."); + FREE(mail_list); + return; + } *req = (mail_remaining_list_t) {mail_list, FIRST_BLOCK_SIZE, mail_count, mailbox_ugd->view_type, mailbox_ugd->mode, mailbox_ugd}; debug_log("Spawning thread"); @@ -2277,7 +2315,7 @@ void _mailbox_make_sorting_rule_list(EmailSortType sort_type, email_list_sorting break; case EMAIL_SORT_PRIORITY: sorting_rule_list[0].target_attribute = EMAIL_MAIL_ATTRIBUTE_PRIORITY; - sorting_rule_list[0].sort_order = EMAIL_SORT_ORDER_DESCEND; + sorting_rule_list[0].sort_order = EMAIL_SORT_ORDER_ASCEND; sorting_rule_list[0].force_boolean_check = false; break; case EMAIL_SORT_ATTACHMENTS: diff --git a/mailbox/src/email-mailbox-move.c b/mailbox/src/email-mailbox-move.c old mode 100755 new mode 100644 index d407b93..bef8654 --- a/mailbox/src/email-mailbox-move.c +++ b/mailbox/src/email-mailbox-move.c @@ -18,6 +18,7 @@ #include "email-mailbox.h" #include "email-mailbox-list.h" #include "email-mailbox-item.h" +#include "email-mailbox-controlbar.h" #include "email-mailbox-move.h" extern gboolean _g_move_lock; @@ -81,6 +82,11 @@ int create_mailbox_move_list_view(void *data, int account_id) int err = EMAIL_ERROR_NONE; Elm_Object_Item *account_item = NULL; int src_type = GET_ACCOUNT_SERVER_TYPE(account_id); + mailbox_ugd->b_move_list_view = true; + + if(mailbox_ugd->isRotate) { + _hide_split_toolbar(mailbox_ugd); + } if(mailbox_ugd->move_account_list && mailbox_ugd->move_account_cnt > 0) { err = email_engine_free_account_list(&(mailbox_ugd->move_account_list), mailbox_ugd->move_account_cnt); @@ -216,6 +222,11 @@ static void _mailbox_list_move_cancel_cb(void *data, Evas_Object *obj, void *eve _stop_emf_job(mailbox_ugd, mailbox_ugd->emf_handle, true); elm_naviframe_item_pop(mailbox_ugd->navi_bar); + mailbox_ugd->b_move_list_view = false; + + if(mailbox_ugd->isRotate) { + _show_split_toolbar(mailbox_ugd); + } if(mailbox_ugd->selected_list) { g_list_free(mailbox_ugd->selected_list); @@ -477,6 +488,7 @@ FINISH: mailbox_ugd->selected_list = NULL; elm_naviframe_item_pop(mailbox_ugd->navi_bar); + mailbox_ugd->b_move_list_view = false; if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { @@ -752,6 +764,7 @@ static void _gl_exp_sel(void *data, Evas_Object *obj, void *event_info) mailbox_ugd->selected_list = NULL; elm_naviframe_item_pop(mailbox_ugd->navi_bar); + mailbox_ugd->b_move_list_view = false; if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { diff --git a/mailbox/src/email-mailbox-noti-mgr.c b/mailbox/src/email-mailbox-noti-mgr.c index aac0567..ea27f8a 100755 --- a/mailbox/src/email-mailbox-noti-mgr.c +++ b/mailbox/src/email-mailbox-noti-mgr.c @@ -464,6 +464,12 @@ static void _edbus_event_mailbox_receive(void *local_data, DBusMessage *message) case NOTI_ACCOUNT_DELETE: debug_log("account added or deleted during pause status"); + /* for update colorbar */ + if (subtype == NOTI_ACCOUNT_ADD) + mailbox_ugd->account_count++; + else if (subtype == NOTI_ACCOUNT_DELETE) + mailbox_ugd->account_count--; + /* destroy all top ug and refresh all emails */ if (mailbox_ugd->ug_account) { destroy_account_cb(mailbox_ugd->ug_account, mailbox_ugd); @@ -479,6 +485,17 @@ static void _edbus_event_mailbox_receive(void *local_data, DBusMessage *message) debug_log("no account exists"); ug_destroy_me(mailbox_ugd->ug); } else { + if (subtype == NOTI_ACCOUNT_ADD) { + EmailAccountInfo *account_info = NULL; + if (email_engine_get_account_info(data1, &account_info)) { + if (account_info && account_info->receiving_type == EMAIL_SERVER_TYPE_ACTIVE_SYNC) { + debug_log("EAS account added, cancel sync header"); + break; + } + if (account_info) + email_engine_free_account_info(&account_info); + } + } if (list_lock) { debug_log("locked"); if (!evas_object_visible_get(mailbox_ugd->gl[view_type])) @@ -961,13 +978,10 @@ static void _mailbox_remove_deleted_flag_mail(int mail_id, void *data) debug_log("Invalid parameter(mail_id)"); return; } - debug_log("mail_id : %d view_type : %d, mailbox_ugd->mode : %d", mail_id, view_type, mailbox_ugd->mode); list_data *ld = _find_mailinfo_by_mailid(mail_id, mailbox_ugd->list_data[view_type]); if(ld) { - debug_log("list data exist"); if(view_type != EMAIL_VIEW_EDIT && view_type != EMAIL_VIEW_SEARCH) { - debug_log("ld->mailbox_type %d ld->mailbox_id :%d, mailbox_ugd->mailbox_id : %d", ld->mailbox_type, ld->mailbox_id, mailbox_ugd->mailbox_id); if ((mailbox_ugd->mode == EMAIL_MAILBOX_MODE_ALL && mailbox_ugd->mailbox_type == ld->mailbox_type) || (mailbox_ugd->mode == EMAIL_MAILBOX_MODE_MAILBOX && ld->mailbox_id == mailbox_ugd->mailbox_id)) { debug_log("Remove mail from list mail_id : %d", ld->mail_id); diff --git a/mailbox/src/email-mailbox-search.c b/mailbox/src/email-mailbox-search.c index 1d151ab..439ec39 100755 --- a/mailbox/src/email-mailbox-search.c +++ b/mailbox/src/email-mailbox-search.c @@ -72,6 +72,8 @@ static void _searchbar_entry_unfocus_cb(void *data, Evas_Object *obj, void *even static void _searchbar_entry_changed_cb(void *data, Evas_Object *obj, void *event_info); static Eina_Bool _mailbox_create_search_criteria_view(int search_type, void *data); +static Eina_Bool _mailbox_create_date_search_view(int search_type, void *data); +static Eina_Bool _mailbox_create_advanced_search_view(int search_type, void *data); static void _mailbox_advanced_search_start_cb(void *data, Evas_Object *obj, void *event_info); static void _mailbox_advanced_search_cancel_cb(void *data, Evas_Object *obj, void *event_info); static void _mailbox_advanced_search_key_down_cb(void *data, Evas * e, Evas_Object * obj, void *event_info); @@ -87,6 +89,7 @@ static void _mailbox_search_from_date_changed_cb(void *data, Evas_Object *obj, v static void _mailbix_search_to_date_changed_cb(void *data, Evas_Object *obj, void *event_info); static void _mailbox_advanced_view_create_controlbar_button(Evas_Object *btn, char *label, char *style, void (*func) (void *data, Evas_Object *obj, void *event_info), void* data); void _mailbox_free_search_list_data(MailboxAdvSearchViewInfo *search_info); +static void _input_panel_state_changed_cb(void *data, Ecore_IMF_Context *ctx, int value); void mailbox_create_searchbar(EmailMailboxUGD *mailbox_ugd) { @@ -343,7 +346,7 @@ static void _searchbar_entry_focus_cb(void *data, Evas_Object *obj, void *event_ if (!mailbox_ugd->b_advanced_search_view && (mailbox_ugd->search_type == EMAIL_SEARCH_ADVANCED || mailbox_ugd->search_type == EMAIL_SEARCH_DATE)) { elm_entry_entry_set(mailbox_ugd->searchbar_en, ""); - _mailbox_create_search_criteria_view(mailbox_ugd->search_type, data); + _mailbox_create_search_criteria_view(mailbox_ugd->search_type, mailbox_ugd); return; } @@ -357,8 +360,11 @@ static void _searchbar_entry_focus_cb(void *data, Evas_Object *obj, void *event_ } elm_genlist_realized_items_update(mailbox_ugd->gl[mailbox_ugd->view_type]); - //_delete_controlbar(mailbox_ugd); - _hide_toolbar(mailbox_ugd); + + if(mailbox_ugd->isRotate) + _hide_split_toolbar(mailbox_ugd); + else + _hide_toolbar(mailbox_ugd); debug_log("view_type = %d", mailbox_ugd->view_type); @@ -368,8 +374,6 @@ static void _searchbar_entry_focus_cb(void *data, Evas_Object *obj, void *event_ _stop_emf_job(mailbox_ugd, mailbox_ugd->emf_handle, true); mailbox_ugd->gl[mailbox_ugd->view_type] = mailbox_ugd->gl[mailbox_ugd->previous_view]; - elm_object_disabled_set(mailbox_ugd->folder_button, EINA_TRUE); - g_focus_lock = true; evas_object_smart_callback_add(obj, "changed", _searchbar_entry_changed_cb, mailbox_ugd); evas_object_smart_callback_add(obj, "preedit,changed", _searchbar_entry_changed_cb, mailbox_ugd); @@ -415,7 +419,9 @@ static void _searchbar_cancel_clicked_cb(void *data, Evas_Object *obj, void *eve evas_object_smart_callback_del(mailbox_ugd->searchbar_en, "changed", _searchbar_entry_changed_cb); evas_object_smart_callback_del(mailbox_ugd->searchbar_en, "preedit,changed", _searchbar_entry_changed_cb); - elm_object_focus_set(mailbox_ugd->main_back_btn, EINA_TRUE); + if(!mailbox_ugd->isRotate) + elm_object_focus_set(mailbox_ugd->main_back_btn, EINA_TRUE); + mailbox_finish_search_mode(mailbox_ugd); } @@ -442,10 +448,12 @@ void mailbox_finish_search_mode(EmailMailboxUGD *mailbox_ugd) list_lock = false; - if (!evas_object_visible_get(mailbox_ugd->navi_title_ly)) { - debug_log("title is not visible, show title. view_type:%d, previous_view:%d", mailbox_ugd->view_type, mailbox_ugd->previous_view); - elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title", mailbox_ugd->navi_title_ly); - evas_object_show(mailbox_ugd->navi_title_ly); + if(!mailbox_ugd->isRotate) { + if (!evas_object_visible_get(mailbox_ugd->navi_title_ly)) { + debug_log("title is not visible, show title. view_type:%d, previous_view:%d", mailbox_ugd->view_type, mailbox_ugd->previous_view); + elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title", mailbox_ugd->navi_title_ly); + evas_object_show(mailbox_ugd->navi_title_ly); + } } @@ -458,7 +466,11 @@ void mailbox_finish_search_mode(EmailMailboxUGD *mailbox_ugd) evas_object_hide(mailbox_ugd->searchbar_layout); } - _show_toolbar(mailbox_ugd); + if(mailbox_ugd->isRotate) { + _show_split_toolbar(mailbox_ugd); + } else { + _show_toolbar(mailbox_ugd); + } _refresh_mailbox(mailbox_ugd); } @@ -539,17 +551,79 @@ static Eina_Bool _mailbox_create_search_criteria_view(int search_type, void *dat { debug_log(""); EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; - Elm_Object_Item* navi_item; + + if (!mailbox_ugd) { + debug_log("mailbox_ugd is null"); + return 0; + } + + if(search_type == EMAIL_SEARCH_ADVANCED) { + _mailbox_create_advanced_search_view(search_type, data); + } else if (search_type == EMAIL_SEARCH_DATE) { + _mailbox_create_date_search_view(search_type, data); + } else { + debug_log("_create_search_criteria_view failed search type is invalid\n"); + return 0; + } + return 0; +} + +static Eina_Bool _mailbox_create_date_search_view(int search_type, void *data) +{ + debug_log(""); + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + Evas_Object *popup; Evas_Object *btn_ok; Evas_Object *btn_cancel; - Evas_Object *btn_back; MailboxAdvSearchViewInfo *adv_search_info = NULL; - if (!mailbox_ugd || (search_type != EMAIL_SEARCH_ADVANCED && search_type != EMAIL_SEARCH_DATE)) { - debug_log("_create_search_criteria_view failed search type is invalid(or mailbox_ugd : null)\n"); + if(mailbox_ugd->adv_search_info) + _mailbox_free_search_list_data(mailbox_ugd->adv_search_info); + + adv_search_info = (MailboxAdvSearchViewInfo *) calloc(1, sizeof(MailboxAdvSearchViewInfo)); + + if (!adv_search_info) { + debug_log("adv_search_info: memory alloc failed!\n"); return 0; } + adv_search_info->mailbox_ugd = (EmailMailboxUGD *)data; + mailbox_ugd->adv_search_info = adv_search_info; + mailbox_ugd->b_advanced_search_view = true; + + popup = elm_popup_add(mailbox_ugd->win_main); + elm_object_style_set(popup, "menustyle"); + elm_object_part_text_set(popup, "title,text", _("IDS_EMAIL_HEADER_DATE_RANGE")); + evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + adv_search_info->search_list_popup = popup; + + genlist_for_search = elm_genlist_add(popup); + _mailbox_create_list_view_for_advanced_search(data, search_type); + elm_object_content_set(popup, genlist_for_search); + + btn_ok = elm_button_add(popup); + _mailbox_advanced_view_create_controlbar_button(btn_ok, dgettext("sys_string", "IDS_COM_SK_OK"), NULL, _mailbox_advanced_search_start_cb, data); + elm_object_part_content_set(popup, "button1", btn_ok); + + btn_cancel = elm_button_add(popup); + _mailbox_advanced_view_create_controlbar_button(btn_cancel, dgettext("sys_string", "IDS_COM_SK_CANCEL"), NULL, _mailbox_advanced_search_cancel_cb, data); + elm_object_part_content_set(popup, "button2", btn_cancel); + + evas_object_show(popup); + return 0; +} + +static Eina_Bool _mailbox_create_advanced_search_view(int search_type, void *data) +{ + debug_log(""); + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + Elm_Object_Item* navi_item; + Evas_Object *btn_ok; + Evas_Object *btn_cancel; + Evas_Object *btn_ok2; + Evas_Object *btn_cancel2; + MailboxAdvSearchViewInfo *adv_search_info = NULL; + if(mailbox_ugd->adv_search_info) _mailbox_free_search_list_data(mailbox_ugd->adv_search_info); @@ -560,6 +634,10 @@ static Eina_Bool _mailbox_create_search_criteria_view(int search_type, void *dat return 0; } + if(mailbox_ugd->isRotate) { + _hide_split_toolbar(mailbox_ugd); + } + adv_search_info->mailbox_ugd = (EmailMailboxUGD *)data; mailbox_ugd->adv_search_info = adv_search_info; mailbox_ugd->b_advanced_search_view = true; @@ -568,25 +646,36 @@ static Eina_Bool _mailbox_create_search_criteria_view(int search_type, void *dat _mailbox_create_list_view_for_advanced_search(data, search_type); - /* back button */ - btn_back = elm_button_add(mailbox_ugd->navi_bar); - evas_object_smart_callback_add(btn_back, "clicked", _mailbox_advanced_search_cancel_cb, data); - elm_object_style_set(btn_back, "naviframe/back_btn/default"); - - //should be replaced with new string - if ( search_type == EMAIL_SEARCH_ADVANCED ) { - navi_item = elm_naviframe_item_push(mailbox_ugd->navi_bar, _("IDS_EMAIL_OPT_ADVANCED"), btn_back, NULL, genlist_for_search, NULL); - } else if ( search_type == EMAIL_SEARCH_DATE ) { - navi_item = elm_naviframe_item_push(mailbox_ugd->navi_bar, _("IDS_EMAIL_HEADER_DATE_RANGE"), btn_back, NULL, genlist_for_search, NULL); - } - btn_ok = elm_button_add(mailbox_ugd->navi_bar); - _mailbox_advanced_view_create_controlbar_button(btn_ok, dgettext("sys_string", "IDS_COM_SK_OK"), NULL, _mailbox_advanced_search_start_cb, data); - elm_object_item_part_content_set(navi_item, "title_left_btn", btn_ok); + elm_object_style_set(btn_ok, "naviframe/toolbar/default"); + elm_object_text_set(btn_ok, dgettext("sys_string", "IDS_COM_SK_OK")); + evas_object_smart_callback_add(btn_ok, "clicked", _mailbox_advanced_search_start_cb, data); + evas_object_show(btn_ok); + + btn_ok2 = elm_button_add(mailbox_ugd->navi_bar); + elm_object_style_set(btn_ok2, "naviframe/toolbar/default"); + elm_object_text_set(btn_ok2, dgettext("sys_string", "IDS_COM_SK_OK")); + evas_object_smart_callback_add(btn_ok2, "clicked", _mailbox_advanced_search_start_cb, data); + evas_object_show(btn_ok2); btn_cancel = elm_button_add(mailbox_ugd->navi_bar); - _mailbox_advanced_view_create_controlbar_button(btn_cancel, dgettext("sys_string", "IDS_COM_SK_CANCEL"), NULL, _mailbox_advanced_search_cancel_cb, data); - elm_object_item_part_content_set(navi_item, "title_right_btn", btn_cancel); + elm_object_style_set(btn_cancel, "naviframe/end_btn/default"); + evas_object_smart_callback_add(btn_cancel, "clicked", _mailbox_advanced_search_cancel_cb, data); + evas_object_show(btn_cancel); + + btn_cancel2 = elm_button_add(mailbox_ugd->navi_bar); + elm_object_style_set(btn_cancel2, "naviframe/end_btn/default"); + evas_object_smart_callback_add(btn_cancel2, "clicked", _mailbox_advanced_search_cancel_cb, data); + evas_object_show(btn_cancel2); + + navi_item = elm_naviframe_item_push(mailbox_ugd->navi_bar, _("IDS_EMAIL_OPT_ADVANCED"), NULL, NULL, genlist_for_search, NULL); + + elm_object_item_part_content_set(navi_item, "title_toolbar_button1", btn_ok); + elm_object_item_part_content_set(navi_item, "title_prev_btn", btn_cancel); + elm_object_item_part_content_set(navi_item, "toolbar_button1", btn_ok2); + elm_object_item_part_content_set(navi_item, "prev_btn", btn_cancel2); + + mailbox_ugd->navi_item_search = navi_item; return 0; } @@ -620,8 +709,41 @@ static void _mailbox_advanced_search_cancel_cb(void *data, Evas_Object *obj, voi { debug_log(""); EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + Ecore_IMF_Context *imf_context = NULL; + + if(!mailbox_ugd) { + debug_log("mailbox_ugd is null"); + return; + } + if(mailbox_ugd->adv_search_info) { + MailboxAdvSearchViewInfo *adv_search_info = mailbox_ugd->adv_search_info; + if(adv_search_info->entry_title) { + imf_context = elm_entry_imf_context_get(adv_search_info->entry_title); + if (imf_context) { + ecore_imf_context_input_panel_hide(imf_context); + ecore_imf_context_input_panel_event_callback_del(imf_context, + ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_state_changed_cb); + } + } + if(adv_search_info->entry_sender_address) { + imf_context = elm_entry_imf_context_get(adv_search_info->entry_sender_address); + if (imf_context) { + ecore_imf_context_input_panel_hide(imf_context); + ecore_imf_context_input_panel_event_callback_del(imf_context, + ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_state_changed_cb); + } + } + } + + + if (mailbox_ugd->search_type == EMAIL_SEARCH_ADVANCED) + elm_naviframe_item_pop(mailbox_ugd->navi_bar); + else { + if (mailbox_ugd->adv_search_info && mailbox_ugd->adv_search_info->search_list_popup) + evas_object_del(mailbox_ugd->adv_search_info->search_list_popup); + mailbox_ugd->adv_search_info->search_list_popup = NULL; + } - elm_naviframe_item_pop(mailbox_ugd->navi_bar); mailbox_ugd->b_advanced_search_view = false; evas_object_smart_callback_del(mailbox_ugd->searchbar_en, "changed", _searchbar_entry_changed_cb); @@ -634,10 +756,15 @@ static void _mailbox_advanced_search_cancel_cb(void *data, Evas_Object *obj, voi } else { elm_object_focus_set(mailbox_ugd->gl[mailbox_ugd->view_type], EINA_TRUE); - if (!evas_object_visible_get(mailbox_ugd->navi_title_ly)) { - debug_log("title is not visible, show title. view_type:%d, previous_view:%d", mailbox_ugd->view_type, mailbox_ugd->previous_view); - elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title", mailbox_ugd->navi_title_ly); - evas_object_show(mailbox_ugd->navi_title_ly); + if(mailbox_ugd->isRotate) { + _show_split_toolbar(mailbox_ugd); + } else { + if (!evas_object_visible_get(mailbox_ugd->navi_title_ly)) { + debug_log("title is not visible, show title. view_type:%d, previous_view:%d", mailbox_ugd->view_type, mailbox_ugd->previous_view); + elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title", mailbox_ugd->navi_title_ly); + evas_object_show(mailbox_ugd->navi_title_ly); + } + _show_toolbar(mailbox_ugd); } if (evas_object_visible_get(mailbox_ugd->searchbar_layout)) { @@ -648,7 +775,6 @@ static void _mailbox_advanced_search_cancel_cb(void *data, Evas_Object *obj, voi edje_object_signal_emit(_EDJ(mailbox_ugd->search_layout), "hide_searchbar", "search"); evas_object_hide(mailbox_ugd->searchbar_layout); } - _show_toolbar(mailbox_ugd); } } @@ -657,15 +783,22 @@ static void _mailbox_advanced_search_start_cb(void *data, Evas_Object *obj, void debug_log(""); EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; MailboxAdvSearchViewInfo* search_info = NULL; + Ecore_IMF_Context *imf_context = NULL; struct tm tm_from; struct tm tm_to; if (mailbox_ugd) { - elm_naviframe_item_pop(mailbox_ugd->navi_bar); - search_info = mailbox_ugd->adv_search_info; + if (mailbox_ugd->search_type == EMAIL_SEARCH_ADVANCED) + elm_naviframe_item_pop(mailbox_ugd->navi_bar); + else { + if (search_info->search_list_popup) + evas_object_del(search_info->search_list_popup); + search_info->search_list_popup = NULL; + } + if (search_info) { localtime_r(&search_info->from_date, &tm_from); @@ -679,6 +812,23 @@ static void _mailbox_advanced_search_start_cb(void *data, Evas_Object *obj, void elm_entry_entry_set(mailbox_ugd->searchbar_en, search_info->str_search_criteria); debug_log("search_info->str_search_criteria[%s]",search_info->str_search_criteria); + + if(search_info->entry_title) { + imf_context = elm_entry_imf_context_get(search_info->entry_title); + if (imf_context) { + ecore_imf_context_input_panel_hide(imf_context); + ecore_imf_context_input_panel_event_callback_del(imf_context, + ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_state_changed_cb); + } + } + if(search_info->entry_sender_address) { + imf_context = elm_entry_imf_context_get(search_info->entry_sender_address); + if (imf_context) { + ecore_imf_context_input_panel_hide(imf_context); + ecore_imf_context_input_panel_event_callback_del(imf_context, + ECORE_IMF_INPUT_PANEL_STATE_EVENT, _input_panel_state_changed_cb); + } + } } mailbox_ugd->b_advanced_search_view = false; @@ -725,14 +875,16 @@ static void _mailbox_create_list_view_for_advanced_search(void *data, int search i = 2; item_data[i].type = MAILBOX_SEARCH_LIST_TYPE_TITLE; item_data[i].search_info = mailbox_ugd->adv_search_info; - elm_genlist_item_append(genlist_for_search, &itc_search_view, &item_data[i], NULL, + item = elm_genlist_item_append(genlist_for_search, &itc_search_view, &item_data[i], NULL, ELM_GENLIST_ITEM_NONE, _gl_advanced_search_sel_cb, &item_data[i]); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_NONE); /* Sender */ i = 3; item_data[i].type = MAILBOX_SEARCH_LIST_TYPE_SENDER; item_data[i].search_info = mailbox_ugd->adv_search_info; - elm_genlist_item_append(genlist_for_search, &itc_search_view, &item_data[i], NULL, + item = elm_genlist_item_append(genlist_for_search, &itc_search_view, &item_data[i], NULL, ELM_GENLIST_ITEM_NONE, _gl_advanced_search_sel_cb, &item_data[i]); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_NONE); } else if (search_type == EMAIL_SEARCH_DATE) { item_data = (mailbox_search_list_item *)calloc(2, sizeof(mailbox_search_list_item)); } else { @@ -806,13 +958,15 @@ static Evas_Object *_gl_advanced_searcn_view_content_get_cb(void *data, Evas_Obj if (!g_strcmp0(part, "elm.icon")) { switch (item_data->type) { case MAILBOX_SEARCH_LIST_TYPE_TITLE: + { + Ecore_IMF_Context *imf_context = NULL; search_info->search_title = elm_layout_add(genlist_for_search); elm_layout_theme_set(search_info->search_title, "layout", "editfield", "title"); search_info->entry_title = elm_entry_add(genlist_for_search); elm_entry_scrollable_set(search_info->entry_title, EINA_TRUE); elm_entry_single_line_set(search_info->entry_title, EINA_TRUE); elm_entry_cnp_mode_set(search_info->entry_title, ELM_CNP_MODE_PLAINTEXT); - elm_entry_input_panel_layout_set(search_info->entry_title, ELM_INPUT_PANEL_LAYOUT_EMAIL); + elm_entry_input_panel_layout_set(search_info->entry_title, ELM_INPUT_PANEL_LAYOUT_NORMAL); elm_entry_editable_set(search_info->entry_title, TRUE); evas_object_event_callback_add(search_info->entry_title, EVAS_CALLBACK_KEY_DOWN, _mailbox_advanced_search_key_down_cb, data); evas_object_smart_callback_add(search_info->entry_title, "changed", _mailbox_advanced_search_backup_input_cb, data); @@ -821,6 +975,13 @@ static Evas_Object *_gl_advanced_searcn_view_content_get_cb(void *data, Evas_Obj evas_object_smart_callback_add(search_info->entry_title, "unfocused", _mailbox_advanced_edit_entry_unfocused_cb, search_info->search_title); evas_object_show(search_info->entry_title); + imf_context = elm_entry_imf_context_get(search_info->entry_title); + if (imf_context) + ecore_imf_context_input_panel_event_callback_add(imf_context, + ECORE_IMF_INPUT_PANEL_STATE_EVENT, + _input_panel_state_changed_cb, (void *)mailbox_ugd); + + elm_object_part_content_set(search_info->search_title, "elm.swallow.content", search_info->entry_title); elm_object_part_text_set(search_info->search_title, "elm.text", _("IDS_EMAIL_OPT_TITLE")); elm_object_signal_callback_add(search_info->search_title, "elm,eraser,clicked", "elm", _mailbox_advanced_edit_eraser_clicked_cb, search_info->entry_title); @@ -832,8 +993,10 @@ static Evas_Object *_gl_advanced_searcn_view_content_get_cb(void *data, Evas_Obj elm_entry_entry_set(search_info->entry_title, search_info->str_title); return search_info->search_title; - + } case MAILBOX_SEARCH_LIST_TYPE_SENDER: + { + Ecore_IMF_Context *imf_context = NULL; search_info->search_sender_address = elm_layout_add(genlist_for_search); elm_layout_theme_set(search_info->search_sender_address, "layout", "editfield", "title"); search_info->entry_sender_address = elm_entry_add(genlist_for_search); @@ -849,6 +1012,12 @@ static Evas_Object *_gl_advanced_searcn_view_content_get_cb(void *data, Evas_Obj evas_object_smart_callback_add(search_info->entry_sender_address, "unfocused", _mailbox_advanced_edit_entry_unfocused_cb, search_info->search_sender_address); evas_object_show(search_info->entry_sender_address); + imf_context = elm_entry_imf_context_get(search_info->entry_sender_address); + if (imf_context) + ecore_imf_context_input_panel_event_callback_add(imf_context, + ECORE_IMF_INPUT_PANEL_STATE_EVENT, + _input_panel_state_changed_cb, (void *)mailbox_ugd); + elm_object_part_content_set(search_info->search_sender_address, "elm.swallow.content", search_info->entry_sender_address); if ((mailbox_ugd->mailbox_type == EMAIL_MAILBOX_TYPE_SENTBOX) @@ -868,7 +1037,7 @@ static Evas_Object *_gl_advanced_searcn_view_content_get_cb(void *data, Evas_Obj elm_entry_entry_set(search_info->entry_sender_address, search_info->str_sender_address); return search_info->search_sender_address; - + } case MAILBOX_SEARCH_LIST_TYPE_FROM_DATE: search_info->search_date_from = elm_layout_add(genlist_for_search); elm_layout_file_set(search_info->search_date_from, THEME_PATH, "dialoguegroup/email_datetime"); @@ -1064,3 +1233,31 @@ static void _mailbix_search_to_date_changed_cb(void *data, Evas_Object *obj, voi search_info->to_date = mktime(&tm); debug_log("search_info->to_date : %d", search_info->to_date); } + +static void _input_panel_state_changed_cb(void *data, Ecore_IMF_Context *ctx, int value) +{ + debug_log(""); + + if (!data) { + debug_log("data is NULL"); + return; + } + + EmailMailboxUGD *mailbox_ugd = (EmailMailboxUGD *)data; + + int state = ecore_imf_context_input_panel_state_get(ctx); + + if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW) + debug_log("state:SHOW"); + else if (state == ECORE_IMF_INPUT_PANEL_STATE_HIDE) + debug_log("state HIDE"); + + if (state == ECORE_IMF_INPUT_PANEL_STATE_SHOW) { + debug_log("input panel show"); + elm_object_item_signal_emit(mailbox_ugd->navi_item_search, "elm,state,sip,shown", ""); + } else if (state == ECORE_IMF_INPUT_PANEL_STATE_HIDE) { + debug_log("input panel hide"); + elm_object_item_signal_emit(mailbox_ugd->navi_item_search, "elm,state,sip,hidden", ""); + } +} + diff --git a/mailbox/src/email-mailbox.c b/mailbox/src/email-mailbox.c index 35b9426..3cdb426 100755 --- a/mailbox/src/email-mailbox.c +++ b/mailbox/src/email-mailbox.c @@ -93,15 +93,17 @@ static Evas_Object *create_fullview(Evas_Object *parent, EmailMailboxUGD *mailbo static void layout_setting_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); static void layout_account_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); static void layout_viewer_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); +static void layout_composer_cb(ui_gadget_h ug, enum ug_mode mode, void *priv); static void result_setting_cb(ui_gadget_h ug, service_h service, void *priv); static void result_cb(ui_gadget_h ug, service_h service, void *priv); +static void result_viewer_cb(ui_gadget_h ug, service_h service, void *priv); +static void result_composer_cb(ui_gadget_h ug, service_h service, void *priv); static void destroy_setting_cb(ui_gadget_h ug, void *priv); static void destroy_viewer_cb(ui_gadget_h ug, void *priv); static void destroy_composer_cb(ui_gadget_h ug, void *priv); static ui_gadget_h create_account_ug(char *ug_name, service_h service, void *data); static ui_gadget_h create_folder_ug(char *ug_name, service_h service, void *data); static ui_gadget_h create_viewer_ug(char *ug_name, service_h service, void *data); -static void result_viewer_cb(ui_gadget_h ug, service_h service, void *priv); static void _email_mailbox_timezone_change_cb(keynode_t *key, void *data); @@ -120,6 +122,8 @@ static void _password_entry_unfocused_cb(void *data, Evas_Object *obj, void *eve static void _password_entry_focused_cb(void *data, Evas_Object *obj, void *event_info); static void _password_entry_changed_cb(void *data, Evas_Object *obj, void *event_info); +void _split_back_clicked(void *data, Evas_Object *obj, void *event_info); + #if 0 struct timeval before_time; @@ -199,6 +203,8 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, voi debug_log(""); Evas_Object *parent; EmailMailboxUGD *mailbox_ugd; + int account_count; + email_account_t *account_list = NULL; if (!ug || !priv) return NULL; @@ -228,6 +234,13 @@ static void *on_create(ui_gadget_h ug, enum ug_mode mode, service_h service, voi mailbox_ugd->download_idx = 0; mailbox_ugd->isRotate = false; + if (email_engine_get_account_list(&account_count, &account_list)) + mailbox_ugd->account_count = account_count; + else + mailbox_ugd->account_count = 0; + if (account_list && account_count > 0) + email_engine_free_account_list(&account_list, account_count); + int w, h; ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h); debug_log("WINDOW W[%d] H[%d]", w, h); @@ -589,20 +602,20 @@ static void _mailbox_rotate_to_potrait(void *data, int angle) mailbox_ugd->passwd_popup = NULL; } - //elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "controlbar"); - _create_controlbar(mailbox_ugd); + if(mailbox_ugd->ctxpopup) { + evas_object_del(mailbox_ugd->ctxpopup); + mailbox_ugd->ctxpopup = NULL; + } + + if(mailbox_ugd->view_type != EMAIL_VIEW_SEARCH) + _show_toolbar(mailbox_ugd); elm_win_rotation_with_resize_set(mailbox_ugd->win_main, angle); - if (!evas_object_visible_get(mailbox_ugd->navi_title_ly)) { - debug_log("title is not visible, show title. view_type:%d, previous_view:%d", mailbox_ugd->view_type, mailbox_ugd->previous_view); - if (mailbox_ugd->view_type == EMAIL_VIEW_EDIT) - elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->previous_view], "title", mailbox_ugd->navi_title_ly); - else - elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title", mailbox_ugd->navi_title_ly); - } + debug_log("show title. view_type:%d, previous_view:%d", mailbox_ugd->view_type, mailbox_ugd->previous_view); + elm_object_item_part_content_set(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title", mailbox_ugd->navi_title_ly); - if (elm_object_part_content_get(mailbox_ugd->panes, "right") == mailbox_ugd->split_nocontent) { + if (elm_object_part_content_get(mailbox_ugd->panes, "right") == mailbox_ugd->split_ly) { elm_panes_content_left_size_set(mailbox_ugd->panes, 1.0); Evas_Object *r_content = elm_object_part_content_get(mailbox_ugd->panes, "right"); if (r_content) evas_object_hide(r_content); @@ -636,29 +649,12 @@ static void _mailbox_rotate_to_landscape(void *data, int angle) mailbox_ugd->passwd_popup = NULL; } - if (elm_panes_content_left_size_get(mailbox_ugd->panes) == 1.0) { - if(mailbox_ugd->b_advanced_search_view) { - debug_log("advanced search view exists. should be removed"); - elm_naviframe_item_pop(mailbox_ugd->navi_bar); - mailbox_ugd->b_advanced_search_view = false; - - if(!g_focus_lock) { - elm_object_focus_set(mailbox_ugd->gl[mailbox_ugd->view_type], EINA_TRUE); - - if (evas_object_visible_get(mailbox_ugd->searchbar_layout)) { - debug_log("search_bar is visible, hide search bar"); - elm_entry_entry_set(mailbox_ugd->searchbar_en, ""); - elm_object_focus_set(mailbox_ugd->searchbar_layout, EINA_FALSE); - elm_object_part_content_unset(mailbox_ugd->search_layout, "searchbar"); - edje_object_signal_emit(_EDJ(mailbox_ugd->search_layout), "hide_searchbar", "search"); - evas_object_hide(mailbox_ugd->searchbar_layout); - } - _show_toolbar(mailbox_ugd); - } - } + if(mailbox_ugd->ctxpopup) { + evas_object_del(mailbox_ugd->ctxpopup); + mailbox_ugd->ctxpopup = NULL; + } - if(mailbox_ugd->view_type == EMAIL_VIEW_SEARCH) - mailbox_finish_search_mode(mailbox_ugd); + if (elm_panes_content_left_size_get(mailbox_ugd->panes) == 1.0) { elm_win_rotation_with_resize_set(mailbox_ugd->win_main, angle); _create_email_no_content_view(mailbox_ugd); } @@ -675,28 +671,20 @@ static void _mailbox_rotate_to_landscape(void *data, int angle) if (!evas_object_visible_get(mailbox_ugd->gl[mailbox_ugd->view_type])) evas_object_show(mailbox_ugd->gl[mailbox_ugd->view_type]); + _hide_toolbar(mailbox_ugd); if (mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { - _create_controlbar(mailbox_ugd); email_maillist_select_info(mailbox_ugd); } - else - { - _delete_controlbar(mailbox_ugd); - } - - if (evas_object_visible_get(mailbox_ugd->navi_title_ly)) { - debug_log("title is visible, hide title"); - debug_log("title is not visible, show title. view_type:%d, previous_view:%d", mailbox_ugd->view_type, mailbox_ugd->previous_view); - if (mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->previous_view], "title"); - } else { - elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title"); - } - evas_object_hide(mailbox_ugd->navi_title_ly); + debug_log("hide title"); + if (mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->previous_view], "title"); + } else { + elm_object_item_part_content_unset(mailbox_ugd->navibar_item[mailbox_ugd->view_type], "title"); } + evas_object_hide(mailbox_ugd->navi_title_ly); /* destroy account ug and create mailbox ug */ @@ -804,7 +792,8 @@ static void layout_account_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) Evas_Object *blk; float scale_factor=0; - int acc_max_h=909, acc_w=688; + int acc_h = 150, acc_max_h = 909, acc_w = 688; + //int acc_h=150, acc_cnt=email_engine_get_count_account(); if (!ug || !priv) return; @@ -834,8 +823,18 @@ static void layout_account_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) edje_object_signal_callback_add(blk, "action,click", "", _account_dim_clicked, ugd);/*when dim area is clicked this signal is sent*/ // create frame view + + acc_h = acc_h * ugd->account_count; + if(ugd->account_count > 1) + acc_h = acc_h + (120*2); // add account + all account + else + acc_h = acc_h + 120; // add account + + acc_h = ((acc_h > acc_max_h) ? acc_max_h: acc_h); + debug_log("acc_h [%d], acc_cnt [%d]", acc_h, ugd->account_count); + evas_object_raise(base); - evas_object_resize(base, acc_w, acc_max_h); + evas_object_resize(base, acc_w, acc_h); //evas_object_move(base, 16, 168); // indicator(50)+Navi(108) + 10(gap) evas_object_move(base, 16, 181); // indicator(60)+Navi(111) + 10(gap) @@ -853,7 +852,7 @@ static void layout_account_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) } } -void layout_composer_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) +static void layout_composer_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) { debug_log(""); Evas_Object *base; @@ -1043,19 +1042,28 @@ static void result_viewer_cb(ui_gadget_h ug, service_h service, void *priv) if (NULL != mailbox_msg) { if (0 == g_strcmp0(mailbox_msg, "MAILBOX_RESIZE_FULL")) { debug_log("MAILBOX_RESIZE_FULL"); - if (elm_genlist_item_selected_get((Elm_Object_Item *)g_selected_item) == EINA_TRUE) - elm_genlist_item_selected_set((Elm_Object_Item *)g_selected_item, EINA_FALSE); - if (!evas_object_visible_get(mailbox_ugd->gl[mailbox_ugd->view_type])) - evas_object_show(mailbox_ugd->gl[mailbox_ugd->view_type]); + if(mailbox_ugd->isRotate) { + if (elm_genlist_item_selected_get((Elm_Object_Item *)g_selected_item) == EINA_TRUE) + elm_genlist_item_selected_set((Elm_Object_Item *)g_selected_item, EINA_FALSE); - elm_panes_content_left_size_set(mailbox_ugd->panes, 1.0); - if (mailbox_ugd->ly != NULL && elm_object_part_content_get(mailbox_ugd->panes, "left") == NULL) - elm_object_part_content_set(mailbox_ugd->panes, "left", mailbox_ugd->ly); + _create_email_no_content_view(mailbox_ugd); - Evas_Object *r_content = elm_object_part_content_get(mailbox_ugd->panes, "right"); - if (r_content) evas_object_hide(r_content); - elm_object_part_content_unset(mailbox_ugd->panes, "right"); + } else { + if (elm_genlist_item_selected_get((Elm_Object_Item *)g_selected_item) == EINA_TRUE) + elm_genlist_item_selected_set((Elm_Object_Item *)g_selected_item, EINA_FALSE); + + if (!evas_object_visible_get(mailbox_ugd->gl[mailbox_ugd->view_type])) + evas_object_show(mailbox_ugd->gl[mailbox_ugd->view_type]); + + elm_panes_content_left_size_set(mailbox_ugd->panes, 1.0); + if (mailbox_ugd->ly != NULL && elm_object_part_content_get(mailbox_ugd->panes, "left") == NULL) + elm_object_part_content_set(mailbox_ugd->panes, "left", mailbox_ugd->ly); + + Evas_Object *r_content = elm_object_part_content_get(mailbox_ugd->panes, "right"); + if (r_content) evas_object_hide(r_content); + elm_object_part_content_unset(mailbox_ugd->panes, "right"); + } } g_free(mailbox_msg); @@ -1064,7 +1072,7 @@ static void result_viewer_cb(ui_gadget_h ug, service_h service, void *priv) } } -void result_composer_cb(ui_gadget_h ug, service_h service, void *priv) +static void result_composer_cb(ui_gadget_h ug, service_h service, void *priv) { EmailMailboxUGD *mailbox_ugd; debug_log(""); @@ -1538,12 +1546,12 @@ static void _create_view(EmailMailboxUGD *mailbox_ugd) mailbox_ugd->search_layout = mailbox_ugd->sub_layout[mailbox_ugd->view_type]; Evas_Object *btn = elm_button_add(mailbox_ugd->navi_bar); - elm_object_style_set(btn, "naviframe/end_btn/default"); + elm_object_style_set(btn, "naviframe/back_btn/default"); evas_object_smart_callback_add(btn, "clicked", _main_back_clicked, mailbox_ugd); mailbox_ugd->main_back_btn = btn; // push the content to naviframe. - mailbox_ugd->navibar_item[mailbox_ugd->view_type] = elm_naviframe_item_push(mailbox_ugd->navi_bar, NULL, btn, NULL, mailbox_ugd->sub_layout[mailbox_ugd->view_type], "empty"); + mailbox_ugd->navibar_item[mailbox_ugd->view_type] = elm_naviframe_item_push(mailbox_ugd->navi_bar, NULL, mailbox_ugd->main_back_btn, NULL, mailbox_ugd->sub_layout[mailbox_ugd->view_type], "empty"); // Create custom style layout mailbox_ugd->navi_title_ly = elm_layout_add(mailbox_ugd->navi_bar); @@ -1688,7 +1696,34 @@ void _main_back_clicked(void *data, Evas_Object *obj, void *event_info) } } +void _split_back_clicked(void *data, Evas_Object *obj, void *event_info) +{ + debug_log(""); + + if (!data) { + debug_log("data is NULL"); + return; + } + EmailMailboxUGD *mailbox_ugd = data; + if (mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + if(mailbox_ugd->split_nocontent) + elm_object_part_text_set(mailbox_ugd->split_nocontent, "elm.text", N_("No email selected")); + + _edit_back_cb(mailbox_ugd, NULL, NULL); + } + else { + Elm_Object_Item* it_sweep = NULL; + it_sweep = (Elm_Object_Item *)elm_genlist_decorated_item_get(mailbox_ugd->gl[mailbox_ugd->view_type]); + + if (it_sweep) { + elm_genlist_item_decorate_mode_set(it_sweep, "slide", EINA_FALSE); + elm_genlist_item_select_mode_set(it_sweep, ELM_OBJECT_SELECT_MODE_DEFAULT); + } + + elm_win_lower(ug_get_window()); + } +} static void _change_unread_icon_to_read_icon(Elm_Object_Item *item) @@ -1785,19 +1820,67 @@ void _create_email_no_content_view(EmailMailboxUGD *mailbox_ugd) { debug_log(""); - if (mailbox_ugd->split_nocontent == NULL) { - Evas_Object *no_content = elm_layout_add(mailbox_ugd->navi_bar); - elm_layout_theme_set(no_content, "layout", "nocontents", "full"); - elm_object_part_text_set(no_content, "elm.text", dgettext("sys_string", "IDS_COM_BODY_NO_CONTENTS")); + if(!mailbox_ugd->split_ly) { + mailbox_ugd->split_ly = elm_layout_add(mailbox_ugd->panes); + elm_layout_theme_set(mailbox_ugd->split_ly, "layout", "application", "noindicator"); + evas_object_size_hint_weight_set(mailbox_ugd->split_ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + } + + if (!mailbox_ugd->split_navi_bar) { + mailbox_ugd->split_navi_bar = _create_navigation_layout(mailbox_ugd->split_ly); + } + + if(!mailbox_ugd->sub_layout_split) { + mailbox_ugd->sub_layout_split = elm_layout_add(mailbox_ugd->split_navi_bar); + evas_object_size_hint_weight_set(mailbox_ugd->sub_layout_split, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_layout_file_set(mailbox_ugd->sub_layout_split, THEME_PATH, "layout.email.mailbox.hd"); + } + + if(!mailbox_ugd->split_nocontent) { + Evas_Object *no_content = elm_layout_add(mailbox_ugd->sub_layout_split); + elm_layout_theme_set(no_content, "layout", "nocontents", "text"); mailbox_ugd->split_nocontent = no_content; + elm_object_part_content_set(mailbox_ugd->sub_layout_split, "noc", mailbox_ugd->split_nocontent); } + if(mailbox_ugd->view_type == EMAIL_VIEW_EDIT) { + char tmp[MAX_STR_LEN] = { 0, }; + Eina_List *list = NULL; + int cnt = 0; + list = edit_list; + cnt = eina_list_count(list); + + snprintf(tmp, sizeof(tmp), "%s (%d)", N_("Selected"), cnt); + elm_object_part_text_set(mailbox_ugd->split_nocontent, "elm.text", tmp); + } + else { + elm_object_part_text_set(mailbox_ugd->split_nocontent, "elm.text", N_("No email selected")); + } + evas_object_show(mailbox_ugd->split_nocontent); + + if(!mailbox_ugd->split_navi_it) { + if(mailbox_ugd->split_back_btn) { + evas_object_del(mailbox_ugd->split_back_btn); + mailbox_ugd->split_back_btn = NULL; + } + Evas_Object *btn = elm_button_add(mailbox_ugd->split_navi_bar); + elm_object_style_set(btn, "naviframe/back_btn/default"); + evas_object_smart_callback_add(btn, "clicked", _split_back_clicked, mailbox_ugd); + mailbox_ugd->split_back_btn = btn; + elm_object_item_part_content_set(mailbox_ugd->split_navi_it, "prev_btn", mailbox_ugd->split_back_btn); + + mailbox_ugd->split_navi_it = elm_naviframe_item_push(mailbox_ugd->split_navi_bar, NULL, mailbox_ugd->split_back_btn, NULL, mailbox_ugd->split_nocontent, "empty"); + } + + _create_controlbar_for_split_view(mailbox_ugd); + Evas_Object *r_content = elm_object_part_content_get(mailbox_ugd->panes, "right"); if (r_content) evas_object_hide(r_content); elm_object_part_content_unset(mailbox_ugd->panes, "right"); - elm_object_part_content_set(mailbox_ugd->panes, "right", mailbox_ugd->split_nocontent); + elm_object_part_content_set(mailbox_ugd->panes, "right", mailbox_ugd->split_ly); elm_panes_content_left_size_set(mailbox_ugd->panes, 0.4); + evas_object_show(mailbox_ugd->split_ly); } static Evas_Object *_create_navigation_layout(Evas_Object *parent) diff --git a/packaging/org.tizen.email.spec b/packaging/org.tizen.email.spec index b6be911..ee0df03 100755 --- a/packaging/org.tizen.email.spec +++ b/packaging/org.tizen.email.spec @@ -1,6 +1,6 @@ Name: org.tizen.email Summary: Native email application -Version: 0.0.17 +Version: 0.0.18 Release: 1 Group: devel License: Flora diff --git a/setting/include/email-setting.h b/setting/include/email-setting.h index d579ebb..e4e80d7 100755 --- a/setting/include/email-setting.h +++ b/setting/include/email-setting.h @@ -60,7 +60,7 @@ #define ACCOUNT_ICON_OTHERS IMGDIR"/M02_list_icon_other.png" #define CBAR_ICON_ADD IMGDIR"/01_controlbar_icon_create_folder.png" -#define TITLE_ICON_REFRESH IMGDIR"/00_icon_refresh.png" +#define TITLE_ICON_REFRESH IMGDIR"/M02_title_icon_refresh.png" #define SP_XML_PATH RESDIR"/xml/sp_list.xml" -- 2.7.4