MODEST_MAIL_OPERATION_ID_RECEIVE,
MODEST_MAIL_OPERATION_ID_OPEN,
MODEST_MAIL_OPERATION_ID_DELETE,
+ MODEST_MAIL_OPERATION_ID_INFO,
MODEST_MAIL_OPERATION_ID_UNKNOWN,
} ModestMailOperationId;
GType modest_mail_operation_get_type (void) G_GNUC_CONST;
/* typical parameter-less _new function */
-ModestMailOperation* modest_mail_operation_new_with_id (ModestMailOperationId id);
-ModestMailOperation* modest_mail_operation_new (void);
+ModestMailOperation* modest_mail_operation_new (ModestMailOperationId id);
/**
* modest_mail_operation_get_id
/* TODO: thick grain mail operation involving
a list of objects. Composite pattern ??? */
/* TODO: add confirmation dialog */
- mail_op = modest_mail_operation_new_with_id (MODEST_MAIL_OPERATION_ID_DELETE);
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_DELETE);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
/* Create the mail operation */
/* TODO: The spec wants us to first do any pending deletions, before receiving. */
- mail_op = modest_mail_operation_new ();
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_INFO);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), mail_op);
modest_mail_operation_update_account (mail_op, TNY_STORE_ACCOUNT(tny_account));
from = modest_account_mgr_get_from_string (account_mgr, account_name);
/* Create the mail operation */
- mail_operation = modest_mail_operation_new_with_id (MODEST_MAIL_OPERATION_ID_SEND);
+ mail_operation = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_SEND);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), mail_operation);
modest_mail_operation_send_new_mail (mail_operation,
if (result == GTK_RESPONSE_REJECT) {
finished = TRUE;
} else {
- ModestMailOperation *mail_op = modest_mail_operation_new ();
+ ModestMailOperation *mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_INFO);
TnyFolder *new_folder = NULL;
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
if (folder_name != NULL && strlen (folder_name) > 0) {
ModestMailOperation *mail_op;
- mail_op = modest_mail_operation_new ();
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_INFO);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
g_free (message);
if (response == GTK_RESPONSE_OK) {
- ModestMailOperation *mail_op = modest_mail_operation_new_with_id (MODEST_MAIL_OPERATION_ID_DELETE);
+ ModestMailOperation *mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_DELETE);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
src_folder = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view));
if (TNY_IS_FOLDER (src_folder)) {
- mail_op = modest_mail_operation_new_with_id (MODEST_MAIL_OPERATION_ID_RECEIVE);
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_RECEIVE);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
/* Transfer messages */
if (response == GTK_RESPONSE_OK) {
- mail_op = modest_mail_operation_new ();
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_RECEIVE);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
ModestMailOperation *mail_op;
/* Create mail op */
- mail_op = modest_mail_operation_new_with_id (MODEST_MAIL_OPERATION_ID_RECEIVE);
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_RECEIVE);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
&folder, -1);
/* Transfer message */
- mail_op = modest_mail_operation_new_with_id (MODEST_MAIL_OPERATION_ID_RECEIVE);
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_RECEIVE);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
&folder, -1);
/* Do the mail operation */
- mail_op = modest_mail_operation_new_with_id (MODEST_MAIL_OPERATION_ID_RECEIVE);
+ mail_op = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_RECEIVE);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
g_signal_connect (G_OBJECT (mail_op), "progress-changed",