* new object instances require the operation id
pmo-trunk-r1718
if (!from) {
g_printerr ("modest: no from address for account '%s'\n", account_name);
} else {
if (!from) {
g_printerr ("modest: no from address for account '%s'\n", account_name);
} else {
- ModestMailOperation *mail_operation = modest_mail_operation_new ();
+ ModestMailOperation *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,
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (), mail_operation);
modest_mail_operation_send_new_mail (mail_operation,
-modest_mail_operation_new_with_id (ModestMailOperationId id)
+modest_mail_operation_new (ModestMailOperationId id)
{
ModestMailOperation *obj;
ModestMailOperationPrivate *priv;
{
ModestMailOperation *obj;
ModestMailOperationPrivate *priv;
-ModestMailOperation*
-modest_mail_operation_new ()
-{
- return MODEST_MAIL_OPERATION(g_object_new(MODEST_TYPE_MAIL_OPERATION, NULL));
-}
MODEST_MAIL_OPERATION_ID_RECEIVE,
MODEST_MAIL_OPERATION_ID_OPEN,
MODEST_MAIL_OPERATION_ID_DELETE,
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;
MODEST_MAIL_OPERATION_ID_UNKNOWN,
} ModestMailOperationId;
GType modest_mail_operation_get_type (void) G_GNUC_CONST;
/* typical parameter-less _new function */
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
/**
* modest_mail_operation_get_id
from_string = modest_account_mgr_get_from_string (modest_runtime_get_account_mgr(),
account_name);
from_string = modest_account_mgr_get_from_string (modest_runtime_get_account_mgr(),
account_name);
- mail_operation = modest_mail_operation_new ();
+ mail_operation = modest_mail_operation_new (MODEST_MAIL_OPERATION_ID_SEND);
modest_mail_operation_send_new_mail (mail_operation, account,
from_string, mailto,
cc, bcc, subject, body, NULL,
modest_mail_operation_send_new_mail (mail_operation, account,
from_string, mailto,
cc, bcc, subject, body, NULL,
/* TODO: thick grain mail operation involving
a list of objects. Composite pattern ??? */
/* TODO: add confirmation dialog */
/* 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);
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. */
/* 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));
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 */
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,
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 {
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 (),
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;
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);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
g_free (message);
if (response == GTK_RESPONSE_OK) {
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);
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)) {
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);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
/* Transfer messages */
if (response == GTK_RESPONSE_OK) {
/* 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);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
ModestMailOperation *mail_op;
/* Create 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);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
&folder, -1);
/* Transfer message */
&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);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
&folder, -1);
/* Do the mail operation */
&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",
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);
g_signal_connect (G_OBJECT (mail_op), "progress-changed",
g_signal_emit (G_OBJECT(self), signals[HEADER_SELECTED_SIGNAL], 0, NULL);
/* Create the mail operation */
g_signal_emit (G_OBJECT(self), signals[HEADER_SELECTED_SIGNAL], 0, NULL);
/* Create 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);
modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
mail_op);