${PROJECT_EDC_DIR}/mailbox/email-mailbox-search-entry.edc
${PROJECT_EDC_DIR}/common/email-colors.edc
${PROJECT_EDC_DIR}/common/email-parts.edc
+ ${PROJECT_EDC_DIR}/common/email-flat-buttons.edc
)
ADD_CUSTOM_TARGET(email-mailbox.edj ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/email-mailbox.edj)
#define NAVIFRAME_TITLE_BG 61 185 204 255
#define NAVI_BTN_SELECT_BG 46 140 154 255
+/*Star button*/
+#define STAR_BTN_NORMAL_COLOR 245 171 0 255
+#define STAR_BTN_DIM_COLOR 213 213 213 255
+
#define AO001 42 184 66 255
#define AO002 61 185 204 255
#define AO003 255 178 0 255
#define GLIDE_EASE_OUT(duration) CUBIC_BEZIER (duration) 0.25 0.46 0.45 1.0
#define FLAT_SQUARE_BTN_CORNER_RADIUS "10"
-#define FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF 1.3
/**
* @brief Macros to generate styles for button with icon inside with support of click VI effect and sound.
} \
}
-#define FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, part_ext) \
+#define FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, vg_effect_start_koeff, vg_effect_end_koeff, part_ext) \
group { name: "elm/button/base/email.flat.square."style_name; \
data.item: "vector_ux" "no_bg"; \
data.item: "corner_radius" FLAT_SQUARE_BTN_CORNER_RADIUS; \
fixed: 1 1; \
rel1.relative: 0.5 0.5; \
rel2.relative: 0.5 0.5; \
- min: (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_width) (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_height); \
- max: (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_width) (FLAT_SQUARE_BTN_VG_EFFECT_SPACER_SIZE_KOEFF * min_height); \
+ min: (vg_effect_end_koeff * min_width) (vg_effect_end_koeff * min_height); \
+ max: (vg_effect_end_koeff * min_width) (vg_effect_end_koeff * min_height); \
} \
} \
part { name: "tizen_vg_shape"; \
} \
description { state: "ready" 0.0; \
fixed: 1 1; \
- rel1.to: "effect_spacer"; \
- rel2.to: "effect_spacer"; \
+ rel1.relative: ((1.0 - vg_effect_start_koeff) / 2.0) ((1.0 - vg_effect_start_koeff) / 2.0); \
+ rel2.relative: (1.0 + (vg_effect_start_koeff - 1.0) / 2.0) (1.0 + (vg_effect_start_koeff - 1.0) / 2.0); \
} \
description { state: "pressed" 0.0; \
inherit: "ready" 0.0; \
- rel1.relative: -0.15 -0.15; \
- rel2.relative: 1.15 1.15; \
+ rel1.relative: ((1.0 - vg_effect_end_koeff) / 2.0) ((1.0 - vg_effect_end_koeff) / 2.0); \
+ rel2.relative: (1.0 + (vg_effect_end_koeff - 1.0) / 2.0) (1.0 + (vg_effect_end_koeff - 1.0) / 2.0); \
} \
} \
part { name: "tizen_vg_shape_clipper"; \
} \
}
-#define FLAT_SQUARE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height) \
- FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, )
+#define FLAT_SQUARE_BTN_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, vg_effect_start_koeff, vg_effect_end_koeff) \
+ FLAT_SQUARE_BTN_CUSTOM_STYLE(style_name, image_normal, color_normal, color_press, color_dim, min_width, min_height, vg_effect_start_koeff, vg_effect_end_koeff,)
} \
} \
-FLAT_SQUARE_BTN_STYLE("insert_image", EC_IMAGE_TOOLBAR_INSERT_IMAGE, AO007, AO007S, AO007D, 48, 48);
-FLAT_SQUARE_BTN_STYLE("fontsize", EC_IMAGE_TOOLBAR_FONTSIZE, AO007, AO007S, AO007D, 48, 48);
-FLAT_SQUARE_BTN_STYLE("bold", EC_IMAGE_TOOLBAR_BOLD, AO007, AO007S, AO007D, 48, 48);
-FLAT_SQUARE_BTN_STYLE("italic", EC_IMAGE_TOOLBAR_ITALIC, AO007, AO007S, AO007D, 48, 48);
-FLAT_SQUARE_BTN_STYLE("underline", EC_IMAGE_TOOLBAR_UNDERLINE, AO007, AO007S, AO007D, 48, 48);
-FLAT_SQUARE_BTN_CUSTOM_STYLE("fontcolor", EC_IMAGE_TOOLBAR_FONTCOLOR, AO007, AO007S, AO007D, 48, 48, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
-FLAT_SQUARE_BTN_CUSTOM_STYLE("fontbgcolor", EC_IMAGE_TOOLBAR_FONTBGCOLOR, AO007, AO007S, AO007D, 48, 48, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
-FLAT_SQUARE_BTN_STYLE("ordered_list", EC_IMAGE_TOOLBAR_NUMBERING, AO007, AO007S, AO007D, 48, 48);
-FLAT_SQUARE_BTN_STYLE("unordered_list", EC_IMAGE_TOOLBAR_ALEADSYMBOL, AO007, AO007S, AO007D, 48, 48);
+FLAT_SQUARE_BTN_STYLE("insert_image", EC_IMAGE_TOOLBAR_INSERT_IMAGE, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
+FLAT_SQUARE_BTN_STYLE("fontsize", EC_IMAGE_TOOLBAR_FONTSIZE, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
+FLAT_SQUARE_BTN_STYLE("bold", EC_IMAGE_TOOLBAR_BOLD, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
+FLAT_SQUARE_BTN_STYLE("italic", EC_IMAGE_TOOLBAR_ITALIC, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
+FLAT_SQUARE_BTN_STYLE("underline", EC_IMAGE_TOOLBAR_UNDERLINE, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
+FLAT_SQUARE_BTN_CUSTOM_STYLE("fontcolor", EC_IMAGE_TOOLBAR_FONTCOLOR, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
+FLAT_SQUARE_BTN_CUSTOM_STYLE("fontbgcolor", EC_IMAGE_TOOLBAR_FONTBGCOLOR, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3, FONTCOLOR_SQUARE_ICON_BUTTON_PART_EXT);
+FLAT_SQUARE_BTN_STYLE("ordered_list", EC_IMAGE_TOOLBAR_NUMBERING, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
+FLAT_SQUARE_BTN_STYLE("unordered_list", EC_IMAGE_TOOLBAR_ALEADSYMBOL, AO007, AO007S, AO007D, 48, 48, 1.0, 1.3);
\ No newline at end of file
}
}
-#define STAR_ICON_PADDING_LEFT 15
-#define STAR_ICON_PADDING_RIGHT 15
-#define STAR_ICON_PADDING_TOP 15
-#define STAR_ICON_PADDING_BOTTOM 15
-#define STAR_ICON_SIZE 50
-
- group {
- name: "email/layout/star.icon";
- parts {
- PART(RECT, "bg",
- repeat_events: 0;\
- description { state: "default" 0.0;
- color: 0 0 0 0;
- }
- )
-
- PART(SPACER, "elm.padding.left",
- DSC_FROM_L("default" 0.0,
- min: STAR_ICON_PADDING_LEFT 0;
- max: STAR_ICON_PADDING_LEFT -1;
- )
- )
-
- PART(SPACER, "elm.padding.right",
- DSC_FROM_R("default" 0.0,
- min: STAR_ICON_PADDING_RIGHT 0;
- max: STAR_ICON_PADDING_RIGHT -1;
- )
- )
-
- PART(SPACER, "elm.padding.top",
- DSC_FROM_T("default" 0.0,
- min: 0 STAR_ICON_PADDING_TOP;
- max: -1 STAR_ICON_PADDING_TOP;
- )
- )
-
- PART(SPACER, "elm.padding.bottom",
- DSC_FROM_B("default" 0.0,
- min: 0 STAR_ICON_PADDING_BOTTOM;
- max: -1 STAR_ICON_PADDING_BOTTOM;
- )
- )
-
- PART(SWALLOW, "elm.swallow.content",
- DSC_LR("default" 0.0, "elm.padding.left", "elm.padding.right",
- min: STAR_ICON_SIZE STAR_ICON_SIZE;
- max: STAR_ICON_SIZE STAR_ICON_SIZE;
- )
- )
- }
- }
-
#define SELECT_ICON_PADDING_LEFT 0
#define SELECT_ICON_PADDING_RIGHT 32
#define SELECT_ICON_PADDING_TOP 47
PART(SWALLOW, "elm.swallow.content",
DSC_LR("default" 0.0, "elm.padding.left", "elm.padding.right",
- min: SELECT_ICON_SIZE STAR_ICON_SIZE;
- max: SELECT_ICON_SIZE STAR_ICON_SIZE;
+ min: SELECT_ICON_SIZE SELECT_ICON_SIZE;
+ max: SELECT_ICON_SIZE SELECT_ICON_SIZE;
)
)
}
}
}
}
+
+FLAT_SQUARE_BTN_STYLE("mbox.favourite_on", "list_icon/index_icon_favorite_on.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
+FLAT_SQUARE_BTN_STYLE("mbox.favourite_off", "list_icon/index_icon_favorite_off.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
#define SUBJECT_LAYOUT_LEFT_PADDING 32
#define SUBJECT_LAYOUT_TOP_PADDING 24
#define SUBJECT_LAYOUT_BOTTOM_PADDING 12
-#define SUBJECT_LAYOUT_FAVOURITE_BTN_OUTER_SIZE 80
-#define SUBJECT_LAYOUT_FAVOURITE_BTN_INNER_SIZE 50
-#define SUBJECT_LAYOUT_FAVOURITE_BTN_INNER_PADDING 15
-#define SUBJECT_LAYOUT_FAVOURITE_BTN_TOP_PADDING (17 + SUBJECT_LAYOUT_FAVOURITE_BTN_INNER_PADDING)
-#define SUBJECT_LAYOUT_FAVOURITE_BTN_RIGHT_PADDING (17 + SUBJECT_LAYOUT_FAVOURITE_BTN_INNER_PADDING)
+#define SUBJECT_LAYOUT_FAVOURITE_BTN_TOP_PADDING 17
+#define SUBJECT_LAYOUT_FAVOURITE_BTN_LEFT_PADDING 17
+#define SUBJECT_LAYOUT_FAVOURITE_BTN_RIGHT_PADDING 17
+#define SUBJECT_LAYOUT_FAVOURITE_BTN_SIZE 80
//details layout
#define DETAILS_LAYOUT_LEFT_PADDING 32
}
)
+ E_PART_SPACER("favourite_btn.padding.right",
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.5;
+ rel1.relative: 1.0 0.0;
+ min: SUBJECT_LAYOUT_FAVOURITE_BTN_RIGHT_PADDING 0;
+ }
+ )
+
E_PART_SWALLOW("swallow.favourite.btn",
description { state: "default" 0.0;
fixed: 1 0;
align: 1 0;
rel1 {
relative: 0 1;
- to_x: "padding.right";
+ to_x: "favourite_btn.padding.right";
to_y: "favourite_btn.padding.top";
}
rel2 {
relative: 0 0;
- to_x: "padding.right";
+ to_x: "favourite_btn.padding.right";
to_y: "padding.bottom";
}
- min: SUBJECT_LAYOUT_FAVOURITE_BTN_INNER_SIZE SUBJECT_LAYOUT_FAVOURITE_BTN_INNER_SIZE;
+ min: SUBJECT_LAYOUT_FAVOURITE_BTN_SIZE SUBJECT_LAYOUT_FAVOURITE_BTN_SIZE;
+ max: SUBJECT_LAYOUT_FAVOURITE_BTN_SIZE SUBJECT_LAYOUT_FAVOURITE_BTN_SIZE;
}
)
relative: 0 1;
to_x: "swallow.favourite.btn";
}
- min: SUBJECT_LAYOUT_FAVOURITE_BTN_RIGHT_PADDING 0;
+ min: SUBJECT_LAYOUT_FAVOURITE_BTN_LEFT_PADDING 0;
}
)
}
}
-#define PROG1 \
- programs { \
- program { name: "clicked"; \
- signal: "mouse,clicked,1"; \
- source: "bg"; \
- action: SIGNAL_EMIT "clicked" "edje"; \
- after: "touch_snd"; \
- } \
- program { name: "pressed"; \
- signal: "mouse,down,1"; \
- source: "bg"; \
- script { \
- set_state(PART:"icon", "pressed", 0.0); \
- } \
- } \
- program { name: "unpressed"; \
- signal: "mouse,up,1"; \
- source: "bg"; \
- script { \
- set_state(PART:"icon", "default", 0.0); \
- } \
- } \
- program { name: "touch_snd"; \
- action: RUN_PLUGIN "touch_sound"; \
- } \
- }
-
-#define PROG2 \
- programs { \
- program { name: "clicked"; \
- signal: "mouse,clicked,1"; \
- source: "bg"; \
- action: SIGNAL_EMIT "clicked" "edje"; \
- after: "touch_snd"; \
- } \
- program { name: "touch_snd"; \
- action: RUN_PLUGIN "touch_sound"; \
- } \
- }
-#define PROG3 \
- programs { \
- program { name: "clicked"; \
- signal: "mouse,clicked,1"; \
- source: "bg"; \
- action: SIGNAL_EMIT "clicked" "edje"; \
- after: "touch_snd"; \
- } \
- program { name: "pressed"; \
- signal: "mouse,down,1"; \
- source: "bg"; \
- script { \
- set_state(PART:"btn_text", "pressed", 0.0); \
- } \
- } \
- program { name: "unpressed"; \
- signal: "mouse,up,1"; \
- source: "bg"; \
- script { \
- set_state(PART:"btn_text", "default", 0.0); \
- } \
- } \
- program { name: "touch_snd"; \
- action: RUN_PLUGIN "touch_sound"; \
- } \
- }
-
#define BODY_BUTTON_STYLE(_name, _color) \
style { \
name: _name; \
}
}
-#define ICON_BUTTON(NAME, IMG, PAD_L, PAD_T, WIDTH, HEIGHT, COLOR, PROG) \
- group { name: NAME; \
- images { image: IMG COMP; } \
- parts { \
- part { name: "bg"; \
- type: RECT; \
- scale: 1; \
- mouse_events: 1; \
- description { \
- state: "default" 0.0; \
- color: 0 0 0 0; \
- } \
- } \
- part { name: "pad_l_t"; \
- type: SPACER; \
- scale: 1; \
- description { \
- state: "default" 0.0; \
- min: PAD_L PAD_T; fixed: 1 1; \
- rel2.relative: 0 0; \
- align: 0 0; \
- } \
- } \
- part { name: "icon"; \
- type: IMAGE; \
- scale: 1; \
- repeat_events: 1; \
- description { \
- state: "default" 0.0; \
- image.normal: IMG; \
- color: COLOR; \
- min: WIDTH HEIGHT; max: WIDTH HEIGHT; \
- fixed: 1 1; align: 0 0; \
- rel1 { relative: 1 1; to: "pad_l_t"; } \
- } \
- description { \
- state: "pressed" 0.0; \
- inherit: "default" 0.0; \
- } \
- } \
- } \
- PROG\
- }
-
-ICON_BUTTON("elm/layout/flag.none.icon/default", "list_icon/index_icon_favorite_off.png", 0, 0, 50, 50, AO003, PROG2)
-ICON_BUTTON("elm/layout/flag.star.icon/default", "list_icon/index_icon_favorite_on.png", 0, 0, 50, 50, AO003, PROG2)
+FLAT_SQUARE_BTN_STYLE("ev.favourite_on", "viewer_icon/email_icon_favorite_on.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
+FLAT_SQUARE_BTN_STYLE("ev.favourite_off", "viewer_icon/email_icon_favorite_off.png", STAR_BTN_NORMAL_COLOR, STAR_BTN_NORMAL_COLOR, STAR_BTN_DIM_COLOR, 80, 80, 0.7, 1.0);
\ No newline at end of file
if(ld) {\
switch(flag_type) { \
case EMAIL_FLAG_NONE:\
- elm_check_state_set(ld->check_favorite_btn, EINA_FALSE); \
+ elm_object_style_set(ld->check_favorite_btn, "email.flat.square.mbox.favourite_off"); \
break;\
case EMAIL_FLAG_FLAGED:\
- elm_check_state_set(ld->check_favorite_btn, EINA_TRUE); \
+ elm_object_style_set(ld->check_favorite_btn, "email.flat.square.mbox.favourite_on"); \
break;\
} \
break;\
AddRemainingMailReqData *remaining_req;
- EmailMailboxCheckCache star_check_cache;
EmailMailboxCheckCache select_check_cache;
Eina_List *folders_names_cache;
static char *_mail_item_gl_time_stamp_text_add(MailItemData *ld);
static Evas_Object *_mail_item_gl_attach_icon_add(Evas_Object *parent, MailItemData *ld);
static Evas_Object *_mail_item_gl_status_icons_add(Evas_Object *parent, MailItemData *ld);
-static Evas_Object *_mail_item_gl_star_checkbox_add(Evas_Object *parent, MailItemData *ld);
+static Evas_Object *_mail_item_gl_star_btn_add(Evas_Object *parent, MailItemData *ld);
static Evas_Object *_mail_item_gl_select_checkbox_add(Evas_Object *parent, MailItemData *ld);
static Evas_Object *_mail_item_gl_account_colorbar_add(Evas_Object *parent, MailItemData *ld);
static void _mail_item_gl_text_style_set(MailItemData *ld);
static void _mail_item_data_insert_search_tag(char *dest, int dest_len, const char *src, const char *key);
static void _mail_item_data_list_free(GList **mail_item_data_list);
-static void _mailbox_star_ly_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _mailbox_star_btn_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _mailbox_select_checkbox_ly_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
/* insert mail item data into list */
{
EmailMailboxView *view = data;
- _mailbox_check_cache_free(&view->star_check_cache);
_mailbox_check_cache_free(&view->select_check_cache);
}
}
-static Evas_Object *_mail_item_gl_star_checkbox_add(Evas_Object *parent, MailItemData *ld)
+static Evas_Object *_mail_item_gl_star_btn_add(Evas_Object *parent, MailItemData *ld)
{
retvm_if(!ld, NULL, "ld is NULL");
retvm_if(!parent, NULL, "parent is NULL");
- Evas_Object *star_ly = elm_layout_add(parent);
- evas_object_size_hint_weight_set(star_ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_layout_file_set(star_ly, email_get_mailbox_theme_path(), "email/layout/star.icon");
+ Evas_Object *star_btn = elm_button_add(parent);
+ evas_object_repeat_events_set(star_btn, EINA_FALSE);
+ evas_object_propagate_events_set(star_btn, EINA_FALSE);
- Evas_Object *star_checkbox = _mailbox_check_cache_get_obj(&ld->view->star_check_cache, parent);
-
- if (ld->flag_type == EMAIL_FLAG_FLAGED) {
- elm_check_state_set(star_checkbox, EINA_TRUE);
+ if (ld->flag_type == EMAIL_FLAG_NONE) {
+ elm_object_style_set(star_btn, "email.flat.square.mbox.favourite_off");
} else {
- elm_check_state_set(star_checkbox, EINA_FALSE);
+ elm_object_style_set(star_btn, "email.flat.square.mbox.favourite_on");
}
if (!ld->view->b_editmode) {
- evas_object_freeze_events_set(star_checkbox, EINA_FALSE);
- evas_object_smart_callback_add(star_checkbox, "changed", _mail_item_important_status_changed_cb, ld);
+ evas_object_freeze_events_set(star_btn, EINA_FALSE);
+ evas_object_smart_callback_add(star_btn, "clicked", _mail_item_important_status_changed_cb, ld);
} else {
- evas_object_freeze_events_set(star_checkbox, EINA_TRUE);
+ evas_object_freeze_events_set(star_btn, EINA_TRUE);
}
- ld->check_favorite_btn = star_checkbox;
- elm_layout_content_set(star_ly, "elm.swallow.content", star_checkbox);
-
- evas_object_event_callback_add(star_ly, EVAS_CALLBACK_DEL, _mailbox_star_ly_del_cb, ld);
+ ld->check_favorite_btn = star_btn;
+ evas_object_event_callback_add(star_btn, EVAS_CALLBACK_DEL, _mailbox_star_btn_del_cb, ld);
- return star_ly;
+ return star_btn;
}
static Evas_Object *_mail_item_gl_status_icons_add(Evas_Object *parent, MailItemData *ld)
}
if (!strcmp(part, "email.star.icon") && (ld->mailbox_type != EMAIL_MAILBOX_TYPE_OUTBOX && ld->mailbox_type != EMAIL_MAILBOX_TYPE_DRAFT)) {
- return _mail_item_gl_star_checkbox_add(obj, ld);
+ return _mail_item_gl_star_btn_add(obj, ld);
}
if (!strcmp(part, "email.status.icon") && (ld->reply_flag || ld->forward_flag || (ld->is_priority_sender_mail && (view->mode == EMAIL_MAILBOX_MODE_ALL
debug_enter();
MailItemData *ld = (MailItemData *)data;
- int count = 0;
+ int count = 1;
retm_if(!ld, "ld is NULL");
retm_if(!ld->check_favorite_btn, "ld->check_favorite_btn is NULL");
- if (email_dpm_is_policy_not_allowed(EMAIL_DPM_POLICY_POPIMAP)) {
- if (ld->flag_type == EMAIL_FLAG_FLAGED) {
- elm_check_state_set(ld->check_favorite_btn, EINA_TRUE);
- common_util_show_dpm_error_popup("IDS_EMAIL_OPT_UNMARK_AS_FAVOURITES_ABB");
- } else {
- elm_check_state_set(ld->check_favorite_btn, EINA_FALSE);
- common_util_show_dpm_error_popup("IDS_EMAIL_OPT_MARK_AS_FAVOURITES_ABB");
- }
+ if (email_dpm_show_policy_not_allowed_error(EMAIL_DPM_POLICY_POPIMAP,
+ (ld->flag_type == EMAIL_FLAG_FLAGED) ? "IDS_EMAIL_OPT_MARK_AS_UNREAD_ABB" : "IDS_EMAIL_OPT_MARK_AS_FAVOURITES_ABB")) {
return;
}
int mail_id = (int)ld->mail_id;
- email_engine_set_flags_field(ld->account_id, &mail_id, count, EMAIL_FLAGS_FLAGGED_FIELD, ld->flag_type ? 0 : 1, true);
+ int res = email_engine_set_flags_field(ld->account_id, &mail_id, count, EMAIL_FLAGS_FLAGGED_FIELD, ld->flag_type ? 0 : 1, true);
+
+ if (res) {
+ int new_flag_val = ((ld->flag_type == EMAIL_FLAG_FLAGED) ? EMAIL_FLAG_NONE : EMAIL_FLAG_FLAGED);
+ MAILBOX_UPDATE_GENLIST_ITEM_FLAG_STATE(ld->view->gl, ld->base.item, new_flag_val);
+ } else {
+ notification_status_message_post(_("IDS_EMAIL_HEADER_UNABLE_TO_PERFORM_ACTION_ABB"));
+ }
}
/* dest_len is max str len of dest (not including \0)*/
*mail_item_data_list = NULL;
}
-static void _mailbox_star_ly_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void _mailbox_star_btn_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
MailItemData *ld = data;
-
- evas_object_smart_callback_del(ld->check_favorite_btn, "changed", _mail_item_important_status_changed_cb);
-
- _mailbox_check_cache_release_obj(&ld->view->star_check_cache, ld->check_favorite_btn);
-
ld->check_favorite_btn = NULL;
}
}
Evas_Object *gl = elm_genlist_add(view->content_layout);
- if (view->theme) {
- elm_object_theme_set(gl, view->theme);
- }
-
- debug_log("genlist = %p", gl);
evas_object_smart_callback_add(gl, "realized", _realized_item_cb, view);
evas_object_smart_callback_add(gl, "unhighlighted", _realized_item_cb, view);
evas_object_smart_callback_add(gl, "highlighted", _pressed_item_cb, view);
view->selected_group_list = eina_list_free(view->selected_group_list);
mailbox_refresh_flicks_cb_register(view);
- _mailbox_check_cache_init(&view->star_check_cache, "favorite");
_mailbox_check_cache_init(&view->select_check_cache, "default");
evas_object_event_callback_add(gl, EVAS_CALLBACK_MOUSE_DOWN, mailbox_set_main_thread_busy_cb, NULL);
static int _mailbox_initialize(EmailMailboxView *view);
static void _mailbox_finalize(EmailMailboxView *view);
+static void _mailbox_initialize_theme(EmailMailboxView *view);
+static void _mailbox_deinitialize_theme(EmailMailboxView *view);
+
static email_run_type_e _mailbox_params_get_run_type(email_params_h params);
static int _mailbox_params_get_account_id(email_params_h params);
static int _mailbox_params_get_mail_id(email_params_h params);
return -1;
}
+ /*Initialize theme*/
+ _mailbox_initialize_theme(view);
+
ret = _mailbox_push_base_view_layout(view);
retvm_if(ret != 0, -1, "_mailbox_push_base_view_layout() failed! ret: [%d]", ret);
}
}
- if (account_list)
+ if (account_list) {
email_engine_free_account_list(&account_list, account_count);
+ }
mailbox_view_title_update_all(view);
mailbox_list_refresh(view, NULL);
return 0;
}
+static void _mailbox_initialize_theme(EmailMailboxView *view)
+{
+ debug_enter();
+ retm_if(!view, "Invalid parameter, view is NULL");
+
+ view->theme = elm_theme_new();
+ elm_theme_ref_set(view->theme, NULL);
+ elm_theme_extension_add(view->theme, email_get_mailbox_theme_path());
+
+ debug_leave();
+}
+
+static void _mailbox_deinitialize_theme(EmailMailboxView *view)
+{
+ debug_enter();
+ retm_if(!view, "Invalid parameter, view is NULL");
+
+ elm_theme_extension_del(view->theme, email_get_mailbox_theme_path());
+ elm_theme_free(view->theme);
+ view->theme = NULL;
+
+ debug_leave();
+}
+
static void _mailbox_activate(email_view_t *self, email_view_state prev_state)
{
debug_enter();
debug_error("email_unset_vip_rule_change_callback failed. err = %d", res);
}
- elm_theme_extension_del(view->theme, email_get_mailbox_theme_path());
- elm_theme_free(view->theme);
+ _mailbox_deinitialize_theme(view);
mailbox_list_system_settings_callback_unregister();
{
debug_enter();
- /*load theme*/
- view->theme = elm_theme_new();
- elm_theme_ref_set(view->theme, NULL); /* refer to default theme(NULL) */
- elm_theme_extension_add(view->theme, email_get_mailbox_theme_path()); /* add extension to the new theme */
-
/*base content*/
view->content_layout = elm_layout_add(view->base.content);
evas_object_size_hint_weight_set(view->content_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
view->base.content = elm_layout_add(view->base.module->navi);
elm_layout_theme_set(view->base.content, "layout", "application", "default");
evas_object_size_hint_weight_set(view->base.content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ if (view->theme) {
+ elm_object_theme_set(view->base.content, view->theme);
+ }
evas_object_show(view->base.content);
email_module_view_push(&view->base, NULL, EVPF_NO_BACK_BUTTON | EVPF_NO_TITLE);
if ((view->mailbox_type != EMAIL_MAILBOX_TYPE_OUTBOX) && (view->viewer_type == EMAIL_VIEWER)) {
view->favourite_btn = elm_button_add(view->subject_ly);
- elm_object_style_set(view->favourite_btn, "transparent");
evas_object_smart_callback_add(view->favourite_btn, "clicked", _header_favorite_clicked_cb, view);
elm_object_part_content_set(view->subject_ly, "swallow.favourite.btn", view->favourite_btn);
}
retm_if(!view, "Invalid parameter: view[NULL]");
retm_if(!view->favourite_btn, "Invalid parameter: favourite_btn[NULL]");
- Evas_Object *start_icon = elm_layout_add(view->favourite_btn);
- debug_log("favorite: %d", view->favorite);
switch (view->favorite) {
case EMAIL_FLAG_NONE:
- elm_layout_file_set(start_icon, email_get_viewer_theme_path(), "elm/layout/flag.none.icon/default");
+ elm_object_style_set(view->favourite_btn, "email.flat.square.ev.favourite_off");
break;
case EMAIL_FLAG_FLAGED:
- elm_layout_file_set(start_icon, email_get_viewer_theme_path(), "elm/layout/flag.star.icon/default");
+ elm_object_style_set(view->favourite_btn, "email.flat.square.ev.favourite_on");
break;
}
- elm_object_content_set(view->favourite_btn, start_icon);
}
void header_update_subject_text(EmailViewerView *view)
elm_theme_extension_add(view->theme, email_get_viewer_theme_path());
debug_leave();
-
}
static void _viewer_deinitialize_theme(EmailViewerView *view)
view->theme = NULL;
debug_leave();
-
}
static void _destroy_viewer(EmailViewerView *view)
*/
collections {
- plugins {
- plugin {
- name: "touch_sound";// Name run by RUN_PLUGIN
- source: "feedback";// External edje plugin name
- param: "FEEDBACK_TYPE_SOUND FEEDBACK_PATTERN_TAP";
- }
- }
base_scale: 2.6;
#include "../../edc/common/email-colors.edc"
#include "../../edc/common/email-parts.edc"
+ #include "../../edc/common/email-flat-buttons.edc"
#include "../../edc/mailbox/email-mailbox-macros.edc"
#include "../../edc/mailbox/email-mailbox-theme.edc"
#include "../../edc/mailbox/email-mailbox-genlist-style.edc"
#include "../../edc/mailbox/email-mailbox-server-search.edc"
#include "../../edc/mailbox/email-mailbox-search-entry.edc"
-}
\ No newline at end of file
+}