else {
debug_log("\n email_delete_mailbox succeed : handle[%d]\n", handle);
ug_data->emf_handle = handle;
- if(ug_data->emf_handle == 0)
- {
- _popup_success_cb(ug_data, NULL, NULL);
- }
- else
- {
- _popup_progress_cb(ug_data, obj, event_info);
- }
+ _popup_progress_cb(ug_data, obj, event_info);
}
}
else {
debug_log("\n email_add_mailbox succeed : handle[%d]\n", handle);
alist->ug_data->emf_handle = handle;
- if(alist->ug_data->emf_handle == 0)
- {
- _popup_success_cb(alist->ug_data, NULL, NULL);
- }
- else
- {
- _popup_progress_cb(alist->ug_data, obj, event_info);
- }
+ _popup_progress_cb(alist->ug_data, obj, event_info);
}
}
else {
debug_log("email_rename_mailbox succeed[%d]", handle);
alist->ug_data->emf_handle = handle;
- if(alist->ug_data->emf_handle == 0)
- {
- _popup_success_cb(alist->ug_data, NULL, NULL);
- }
- else
- {
- _popup_progress_cb(alist->ug_data, obj, event_info);
- }
+ _popup_progress_cb(alist->ug_data, obj, event_info);
}
g_free(parent_path);
elm_entry_scrollable_set(entry, EINA_TRUE); // Make entry as scrollable single line.
elm_entry_single_line_set(entry, EINA_TRUE);
elm_entry_entry_set(entry, mlist->alias); // set current folder name
+ elm_entry_cursor_end_set(entry);
+
evas_object_smart_callback_add(entry, "changed", _entry_changed_cb, layout);
evas_object_smart_callback_add(entry, "focused", _entry_focused_cb, layout);
evas_object_smart_callback_add(entry, "unfocused", _entry_unfocused_cb, layout);
int handle;
int on_server = (EMAIL_SERVER_TYPE_POP3 == GET_ACCOUNT_SERVER_TYPE(alist->ug_data->account_id)?0:1);
+ gchar* ptr = g_strrstr_len(mlist_from->mailbox_name, -1, "/");
+ gchar* from_mailbox_name = NULL;
+
+ if(ptr) {
+ ptr++;
+ from_mailbox_name = g_strdup(ptr);
+ }
+ else {
+ from_mailbox_name = g_strdup(mlist_from->mailbox_name);
+ }
+
+ debug_log("from mailbox_name : %s", from_mailbox_name);
+
if(strlen(mlist_to->mailbox_name) > 0)
- snprintf(arg1, sizeof(arg1), "%s/%s", mlist_to->mailbox_name, mlist_from->alias);
+ snprintf(arg1, sizeof(arg1), "%s/%s", mlist_to->mailbox_name, from_mailbox_name);
else
- snprintf(arg1, sizeof(arg1), "%s", mlist_from->alias);
+ snprintf(arg1, sizeof(arg1), "%s", from_mailbox_name);
+
+ g_free(from_mailbox_name);
debug_log("move_to folder from[%s], to[%s], new_name[%s], on_server[%d]", mlist_from->mailbox_name, mlist_to->mailbox_name, arg1, on_server);
debug_log("item_data is NULL");
return;
}
+
+ int to_depth = elm_genlist_item_expanded_depth_get(it);
+ Elm_Object_Item *parent_to = it;
+ char* to_string = g_strdup(mlist->alias);
+ int i = 1;
+
+ for (i = 1; i < to_depth; i++) {
+ parent_to = elm_genlist_item_parent_get(parent_to);
+ Item_Data *parent_to_item_data = elm_object_item_data_get((const Elm_Object_Item *)parent_to);
+ if(parent_to_item_data) {
+ GNode *node_parent = (GNode *)parent_to_item_data->child;
+ if(node_parent) {
+ email_mailbox_t *mlist_parent = (email_mailbox_t *)(node_parent->data);
+ char temp[MAX_STR_LEN] = { 0, };
+ snprintf(temp, sizeof(temp), "%s/%s", mlist_parent->alias, to_string);
+ g_free(to_string);
+ to_string = g_strdup(temp);
+ }
+ }
+ }
+
GNode *node_from = (GNode *)item_data_from->child;
email_mailbox_t *mlist_from = (email_mailbox_t *)(node_from->data);
- snprintf(arg1, sizeof(arg1), "Move folder [%s] to [%s]", mlist_from->mailbox_name, mlist->mailbox_name);
+ int from_depth = elm_genlist_item_expanded_depth_get(it_from);
+ Elm_Object_Item *parent_from = it_from;
+ char* from_string = g_strdup(mlist_from->alias);
+
+ for (i = 1; i < from_depth; i++) {
+ parent_from = elm_genlist_item_parent_get(parent_from);
+ Item_Data *parent_from_item_data = elm_object_item_data_get((const Elm_Object_Item *)parent_from);
+ if(parent_from_item_data) {
+ GNode *node_from_parent = (GNode *)parent_from_item_data->child;
+ if(node_from_parent) {
+ email_mailbox_t *mlist_from_parent = (email_mailbox_t *)(node_from_parent->data);
+ char temp[MAX_STR_LEN] = { 0, };
+ snprintf(temp, sizeof(temp), "%s/%s", mlist_from_parent->alias, from_string);
+ g_free(from_string);
+ from_string = g_strdup(temp);
+ }
+ }
+ }
+ snprintf(arg1, sizeof(arg1), "Move folder [%s] to [%s]", from_string, to_string);
+
+ char *popup_text = elm_entry_utf8_to_markup(arg1);
Evas_Object *notify = elm_popup_add(alist->ug_data->win);
evas_object_size_hint_weight_set(notify, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
}
break;
+ case NOTI_MAILBOX_RENAME:
+ account_id = data1;
+ //In case of native email-service, rename notification is handled here
+ debug_log("NOTI_MAILBOX_RENAME");
+ _popup_success_cb(ug_data, NULL, NULL);
+
+ break;
+
+ case NOTI_MAILBOX_RENAME_FAIL:
+ account_id = data1;
+ debug_log("NOTI_MAILBOX_RENAME_FAIL");
+ _popup_fail_cb(ug_data, NULL, NULL);
+
+ break;
+
default:
debug_log("Uninterested notification");
break;
gint account_id = ug_data->account_id;
- if (handle > 0) {
- debug_log("stop job - handle (%d)", handle);
- email_engine_stop_working(account_id, handle);
- } else {
- debug_warning("handle1 is %d. so we can't call email_engine_stop_working()", handle);
- }
+ debug_log("stop job - handle (%d)", handle);
+ email_engine_stop_working(account_id, handle);
ug_data->emf_handle = EMAIL_HANDLE_INVALID;
}
if (ld->is_attachment == true) {
elm_object_item_signal_emit(ld->item, "elm,state,attach", "elm");
}
+#if 0 // priority icon position is the same with the lastverb icon position
if(ld->priority != EMAIL_OPTION_PRIORITY_NORMAL) {
elm_object_item_signal_emit(ld->item, "elm,state,priority", "elm");
}
- if(ld->reply_flag || ld->forward_flag) {
+#endif
+
+ if( ld->priority == EMAIL_OPTION_PRIORITY_HIGH || ld->reply_flag || ld->forward_flag) {
elm_object_item_signal_emit(ld->item, "elm,state,lastverb", "elm");
}
return (void *)ic;
}
}
-
+#if 0 // support low priority message, priority icon postion is changed
else if(!g_strcmp0(source, "elm.icon.priority"))
{
if(ld->priority == EMAIL_OPTION_PRIORITY_HIGH) {
evas_object_show(ic);
return (void *)ic;
}
-#if 0 // support low priority message
else if(ld->priority == EMAIL_OPTION_PRIORITY_LOW) {
if(ld->item)
edje_object_signal_emit((Evas_Object *)elm_genlist_item_object_get(ld->item), "elm,state,priority", "elm");
evas_object_show(ic);
return (void *)ic;
}
-#endif
}
-
+#endif
else if(!g_strcmp0(source, "elm.icon.lastverb"))
{
-
- if(ld->reply_flag || ld->forward_flag)
- {
+ if(ld->priority == EMAIL_OPTION_PRIORITY_HIGH) {
+ Evas_Object *ic = elm_icon_add(obj);
+ elm_icon_file_set(ic, IMGDIR "/M02_email_icon_priority.png", NULL);
+ elm_icon_resizable_set(ic, 0, 0);
+ evas_object_image_smooth_scale_set(ic, 0);
+ evas_object_show(ic);
+ return (void *)ic;
+ } else if(ld->reply_flag || ld->forward_flag) {
Evas_Object *ic = elm_icon_add(obj);
if(ld->reply_flag == true)