if (G_UNLIKELY (!first_time))
tny_folder_poke_status (TNY_FOLDER (folder));
}
+
tny_folder_remove_observer (TNY_FOLDER (folder), TNY_FOLDER_OBSERVER (observer));
g_object_unref (observer);
observer = NULL;
ModestTnyFolderRules parent_rules = 0, rules;
XFerMsgAsyncHelper *helper = NULL;
const gchar *folder_name = NULL;
+ const gchar *error_msg;
g_return_if_fail (MODEST_IS_MAIL_OPERATION (self));
g_return_if_fail (TNY_IS_FOLDER (folder));
priv = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
folder_name = tny_folder_get_name (folder);
+ /* Set the error msg */
+ error_msg = (delete_original) ?
+ _("mail_in_ui_folder_move_target_error") :
+ _("mail_in_ui_folder_copy_target_error");
+
/* Get account and set it into mail_operation */
priv->account = modest_tny_folder_get_account (TNY_FOLDER(folder));
priv->status = MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS;
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
MODEST_MAIL_OPERATION_ERROR_FOLDER_RULES,
- _("mail_in_ui_folder_move_target_error"));
+ error_msg);
/* Notify the queue */
modest_mail_operation_notify_end (self);
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
MODEST_MAIL_OPERATION_ERROR_FOLDER_RULES,
- _("FIXME: parent folder does not accept new folders"));
+ error_msg);
/* Notify the queue */
modest_mail_operation_notify_end (self);
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
MODEST_MAIL_OPERATION_ERROR_FOLDER_RULES,
- _("mail_in_ui_folder_copy_target_error"));
+ error_msg);
/* Notify the queue */
modest_mail_operation_notify_end (self);
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
MODEST_MAIL_OPERATION_ERROR_FOLDER_RULES,
- _("mail_in_ui_folder_move_target_error"));
+ error_msg);
/* Notify the queue */
modest_mail_operation_notify_end (self);
priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR,
MODEST_MAIL_OPERATION_ERROR_FOLDER_RULES,
- _("mail_in_ui_folder_move_target_error"));
+ error_msg);
/* Notify the queue */
modest_mail_operation_notify_end (self);