* Fixed accounts order in the folder view
[modest] / src / modest-mail-operation.c
index 5062800..2bfd135 100644 (file)
@@ -229,11 +229,12 @@ modest_mail_operation_send_new_mail (ModestMailOperation *self,
                                     const gchar *cc,  const gchar *bcc,
                                     const gchar *subject, const gchar *plain_body,
                                     const gchar *html_body,
-                                    const GList *attachments_list)
+                                    const GList *attachments_list,
+                                    TnyHeaderFlags priority_flags)
 {
        TnyMsg *new_msg;
        ModestMailOperationPrivate *priv = NULL;
-       GList *node = NULL;
+       /* GList *node = NULL; */
 
        g_return_if_fail (MODEST_IS_MAIL_OPERATION (self));
        g_return_if_fail (TNY_IS_TRANSPORT_ACCOUNT (transport_account));
@@ -258,6 +259,9 @@ modest_mail_operation_send_new_mail (ModestMailOperation *self,
                return;
        }
 
+       /* TODO: add priority handling. It's received in the priority_flags operator, and
+          it should have effect in the sending operation */
+
        /* Call mail operation */
        modest_mail_operation_send_mail (self, transport_account, new_msg);
 
@@ -301,6 +305,8 @@ update_folders_cb (TnyFolderStore *folder_store, TnyList *list, GError **err, gp
        self  = MODEST_MAIL_OPERATION (user_data);
        priv  = MODEST_MAIL_OPERATION_GET_PRIVATE (self);
 
+       g_message (__FUNCTION__);
+       
        if (*err) {
                priv->error = g_error_copy (*err);
                priv->status = MODEST_MAIL_OPERATION_STATUS_FAILED;
@@ -376,10 +382,11 @@ modest_mail_operation_update_account (ModestMailOperation *self,
        priv->total = 0;
        priv->done  = 0;
        priv->status = MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS;
-
+       
        /* Get subscribed folders & refresh them */
        folders = TNY_LIST (tny_simple_list_new ());
 
+       g_message ("tny_folder_store_get_folders_async");
        tny_folder_store_get_folders_async (TNY_FOLDER_STORE (store_account),
                                            folders, update_folders_cb, NULL, self);
        
@@ -758,30 +765,24 @@ on_refresh_folder (TnyFolder   *folder,
        modest_mail_operation_queue_remove (modest_runtime_get_mail_operation_queue (), self);
 }
 
-static void
-on_refresh_folder_status_update (TnyFolder *folder, const gchar *msg,
-                                gint num, gint total,  gpointer user_data)
-{
-       ModestMailOperation *self;
-       ModestMailOperationPrivate *priv;
-
-       /* TODO: if tinymail issues a status update before the
-          callback call then this could happen. If this is true the
-          we must review the design */
-       if (!G_IS_OBJECT (user_data))
-         return;
+/* static void */
+/* on_refresh_folder_status_update (TnyFolder *folder, const gchar *msg, */
+/*                              gint num, gint total,  gpointer user_data) */
+/* { */
+/*     ModestMailOperation *self; */
+/*     ModestMailOperationPrivate *priv; */
 
-       self = MODEST_MAIL_OPERATION (user_data);
-       priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self);
+/*     self = MODEST_MAIL_OPERATION (user_data); */
+/*     priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self); */
 
-       priv->done = num;
-       priv->total = total;
+/*     priv->done = num; */
+/*     priv->total = total; */
 
-       if (num == 1 && total == 100)
-               return;
+/*     if (num == 1 && total == 100) */
+/*             return; */
 
-       g_signal_emit (G_OBJECT (self), signals[PROGRESS_CHANGED_SIGNAL], 0, NULL);
-}
+/*     g_signal_emit (G_OBJECT (self), signals[PROGRESS_CHANGED_SIGNAL], 0, NULL); */
+/* } */
 
 void 
 modest_mail_operation_refresh_folder  (ModestMailOperation *self,
@@ -796,10 +797,13 @@ modest_mail_operation_refresh_folder  (ModestMailOperation *self,
 
        priv->status = MODEST_MAIL_OPERATION_STATUS_IN_PROGRESS;
 
-       /* Refresh the folder */
+       /* Refresh the folder. TODO: tinymail could issue a status
+          updates before the callback call then this could happen. We
+          must review the design */
        tny_folder_refresh_async (folder,
                                  on_refresh_folder,
-                                 on_refresh_folder_status_update,
+/*                               on_refresh_folder_status_update, */
+                                 NULL,
                                  self);
 }