{
TnyAccountStoreViewIface *klass = (TnyAccountStoreViewIface *)g;
- klass->set_account_store_func = modest_folder_view_set_account_store;
-
- return;
+ klass->set_account_store = modest_folder_view_set_account_store;
}
static void
}
if (priv->cur_folder_store) {
- if (TNY_IS_FOLDER(priv->cur_folder_store))
- tny_folder_sync (TNY_FOLDER(priv->cur_folder_store), FALSE, NULL);
+ if (TNY_IS_FOLDER(priv->cur_folder_store)) {
+ ModestMailOperation *mail_op;
+
+ mail_op = modest_mail_operation_new (NULL);
+ modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
+ mail_op);
+ modest_mail_operation_sync_folder (mail_op, TNY_FOLDER (priv->cur_folder_store), FALSE);
+ }
g_object_unref (priv->cur_folder_store);
priv->cur_folder_store = NULL;
gpointer user_data)
{
DndHelper *helper;
+ GtkWidget *folder_view;
helper = (DndHelper *) user_data;
+ folder_view = g_object_ref (helper->folder_view);
/* Common part */
xfer_cb (mail_op, user_data);
/* Select the folder */
if (new_folder)
- modest_folder_view_select_folder (MODEST_FOLDER_VIEW (helper->folder_view),
+ modest_folder_view_select_folder (MODEST_FOLDER_VIEW (folder_view),
new_folder, FALSE);
+ g_object_unref (folder_view);
}