From ea1d9b217b92d13d4af15914a0ccf3b58dc402ef Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Wed, 21 Jan 2009 17:21:00 +0000 Subject: [PATCH] Fix tests build pmo-trunk-r7223 --- po/POTFILES.in | 17 +++------ tests/Makefile.am | 31 ++++------------ tests/check_account-mgr.c | 80 ++++++++++++++++++++++------------------- tests/check_folder-transfer.c | 12 +++++-- tests/check_modest-conf.c | 1 + tests/check_text-utils.c | 31 +++++++++------- tests/check_update-account.c | 7 ++-- 7 files changed, 87 insertions(+), 92 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 68b8854..a5380f0 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -3,7 +3,6 @@ src/modest-ui-actions.c src/modest-account-mgr-helpers.c src/modest-tny-folder.c src/gnome/modest-store-widget.h -src/gnome/modest-gnome-info-bar.c src/gnome/modest-platform.c src/gnome/modest-transport-widget.h src/gnome/modest-main-window-ui.h @@ -12,11 +11,9 @@ src/gnome/modest-main-window.c src/gnome/modest-store-widget.c src/gnome/modest-msg-view-window.c src/gnome/modest-transport-widget.c -src/gnome/modest-gnome-info-bar.h src/gnome/modest-msg-edit-window.c src/gnome/modest-address-book.c src/gnome/modest-account-view-window.c -src/modest-account-mgr-priv.c src/modest-conf.h src/modest-tny-account.c src/modest-error.h @@ -29,40 +26,34 @@ src/modest-account-mgr.h src/modest-mail-operation-queue.c src/modest-pair.h src/modest-account-mgr-helpers.h -src/modest-protocol-info.c +src/modest-protocol.c +src/modest-protocol-registry.c src/modest-cache-mgr.h src/modest-runtime.c src/modest-singletons.c src/modest-address-book.h src/modest-defs.h -src/modest-protocol-info.h +src/modest-protocol.h +src/modest-protocol-registry.h src/modest-pair.c src/modest-widget-memory.c src/modest-conf.c src/modest-account-mgr-priv.h -src/maemo/modest-store-widget.h src/maemo/modest-platform.c -src/maemo/modest-transport-widget.h src/maemo/modest-main-window-ui.h src/maemo/modest-icon-names.h src/maemo/modest-main-window.c -src/maemo/modest-store-widget.c -src/maemo/easysetup/modest-wizard-dialog.h src/maemo/easysetup/modest-presets.h src/maemo/easysetup/modest-presets.c src/maemo/easysetup/modest-easysetup-provider-combo-box.h -src/maemo/easysetup/modest-wizard-dialog.c -src/maemo/easysetup/modest-easysetup-wizard.h src/maemo/easysetup/modest-easysetup-servertype-combo-box.c src/maemo/easysetup/main.c src/maemo/easysetup/modest-easysetup-provider-combo-box.c src/maemo/easysetup/modest-easysetup-country-combo-box.h -src/maemo/easysetup/modest-easysetup-wizard.c src/maemo/easysetup/modest-easysetup-country-combo-box.c src/maemo/modest-maemo-utils.h src/maemo/modest-maemo-utils.c src/maemo/modest-msg-view-window.c -src/maemo/modest-transport-widget.c src/maemo/modest-msg-edit-window.c src/maemo/modest-address-book.c src/maemo/modest-account-view-window.c diff --git a/tests/Makefile.am b/tests/Makefile.am index c9f6ffe..f9b0efb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,43 +28,26 @@ noinst_PROGRAMS= \ INCLUDES=\ @CHECK_CFLAGS@ \ $(MODEST_GSTUFF_CFLAGS)\ + $(MODEST_PLATFORM_CFLAGS)\ + $(MODEST_TOOLKIT_CFLAGS)\ + $(MODEST_PLUGIN_DEFINES)\ $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \ $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \ - -I$(MODEST_TOOLKIT_DIR) \ + -I${top_srcdir}/src/$(MODEST_TOOLKIT_DIR) \ -I${top_srcdir}/src \ -DPREFIX=\"@prefix@\" \ -DMODESTLOCALEDIR=\""$(modestlocaledir)"\" objects=\ @CHECK_LIBS@ \ $(MODEST_GSTUFF_LIBS) \ + $(MODEST_PLATFORM_LIBS) \ + $(MODEST_TOOLKIT_LIBS) \ $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS) \ $(MODEST_LIBTINYMAIL_MAEMO_LIBS) \ ${top_srcdir}/src/$(MODEST_TOOLKIT_DIR)/libmodest-ui.la \ ${top_srcdir}/src/widgets/libmodest-widgets.la \ ${top_srcdir}/src/dbus_api/libmodest-dbus-api.la \ - ${top_srcdir}/src/modest-runtime.o \ - ${top_srcdir}/src/modest-singletons.o \ - ${top_srcdir}/src/modest-tny-account.o \ - ${top_srcdir}/src/modest-tny-msg.o \ - ${top_srcdir}/src/modest-tny-send-queue.o \ - ${top_srcdir}/src/modest-widget-memory.o \ - ${top_srcdir}/src/modest-account-mgr-helpers.o \ - ${top_srcdir}/src/modest-account-mgr-priv.o \ - ${top_srcdir}/src/modest-account-mgr.o \ - ${top_srcdir}/src/modest-cache-mgr.o \ - ${top_srcdir}/src/modest-conf.o \ - ${top_srcdir}/src/modest-formatter.o \ - ${top_srcdir}/src/modest-local-folder-info.o \ - ${top_srcdir}/src/modest-mail-operation-queue.o \ - ${top_srcdir}/src/modest-mail-operation.o \ - ${top_srcdir}/src/modest-marshal.o \ - ${top_srcdir}/src/modest-pair.o \ - ${top_srcdir}/src/modest-protocol-info.o \ - ${top_srcdir}/src/modest-ui-actions.o \ - ${top_srcdir}/src/modest-text-utils.o \ - ${top_srcdir}/src/modest-tny-account-store.o \ - ${top_srcdir}/src/modest-tny-folder.o \ - ${top_srcdir}/src/modest-tny-platform-factory.o + ${top_srcdir}/src/libmodest.la check_folder_xfer_SOURCES=\ diff --git a/tests/check_account-mgr.c b/tests/check_account-mgr.c index 6c00667..b944b96 100644 --- a/tests/check_account-mgr.c +++ b/tests/check_account-mgr.c @@ -31,7 +31,6 @@ #include #include #include -#include /* ----------------------- Defines ---------------------- */ @@ -63,14 +62,12 @@ fx_setup_default_account_mgr () TEST_MODEST_ACCOUNT_NAME, FALSE)) modest_account_mgr_remove_account (account_mgr, - TEST_MODEST_ACCOUNT_NAME, - FALSE); + TEST_MODEST_ACCOUNT_NAME); if (modest_account_mgr_account_exists(account_mgr, TEST_MODEST_ACCOUNT_NAME, TRUE)) modest_account_mgr_remove_account (account_mgr, - TEST_MODEST_ACCOUNT_NAME, - TRUE); + TEST_MODEST_ACCOUNT_NAME); } static void @@ -104,7 +101,8 @@ START_TEST (test_add_exists_remove_account_regular) gchar *hostname = NULL; gchar *username = NULL; gchar *password = NULL; - ModestTransportStoreProtocol proto; + gint portnum; + ModestProtocolType proto; gboolean result; name = g_strdup (TEST_MODEST_ACCOUNT_NAME); @@ -113,6 +111,10 @@ START_TEST (test_add_exists_remove_account_regular) transport_account = g_strdup ("local-smtp"); result = modest_account_mgr_add_account (account_mgr, name, + "test display name", + "user fullname", + "user@email.com", + MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY, store_account, transport_account, TRUE); fail_unless (result, @@ -134,8 +136,7 @@ START_TEST (test_add_exists_remove_account_regular) /* Test 3 */ result = modest_account_mgr_remove_account (account_mgr, - name, - FALSE); + name); fail_unless (result, "modest_account_mgr_remove_account failed:\nname: %s\nerror: %s", name); @@ -145,15 +146,17 @@ START_TEST (test_add_exists_remove_account_regular) hostname = g_strdup ("myhostname.mydomain.com"); username = g_strdup ("myusername"); password = g_strdup ("mypassword"); - proto = MODEST_PROTOCOL_TRANSPORT_SMTP; + proto = MODEST_PROTOCOLS_TRANSPORT_SMTP; + portnum = 25; result = modest_account_mgr_add_server_account (account_mgr, name, hostname, + portnum, username, password, proto, - MODEST_PROTOCOL_SECURITY_NONE, - MODEST_PROTOCOL_AUTH_NONE); + MODEST_PROTOCOLS_CONNECTION_NONE, + MODEST_PROTOCOLS_AUTH_NONE); fail_unless (result, "modest_account_mgr_add_server_account failed:\n" \ "name: %s\nhostname: %s\nusername: %s\npassword: %s\nproto: %s", @@ -171,8 +174,7 @@ START_TEST (test_add_exists_remove_account_regular) /* Test 6 */ result = modest_account_mgr_remove_account (account_mgr, - name, - TRUE); + name); fail_unless (result, "modest_account_mgr_remove_account failed:\nname: %s\nerror: %s", name); @@ -211,7 +213,7 @@ END_TEST * - Test 5: Create server account with NULL name * - Test 6: Create server account with invalid name string * - Test 7: Remove a non-existing account - * - Test 8: Remove a non-existing server account + * - Test 8: Remove a non-existing server account (REMOVED) * - Test 9: Remove with NULL acount manager * - Test 10: Remove with NULL name * - Test 11: Check if an account exists with NULL account_mgr @@ -226,6 +228,10 @@ START_TEST (test_add_exists_remove_account_invalid) /* Test 1 */ result = modest_account_mgr_add_account (NULL, TEST_MODEST_ACCOUNT_NAME, + "test display name", + "user fullname", + "user@email.com", + MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY, "store_account", "transport_account", TRUE); fail_unless (!result, @@ -235,6 +241,10 @@ START_TEST (test_add_exists_remove_account_invalid) /* Test 2 */ result = modest_account_mgr_add_account (account_mgr, NULL, + "test display name", + "user fullname", + "user@email.com", + MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY, "store_account", "transport_account", TRUE); fail_unless (!result, @@ -244,6 +254,10 @@ START_TEST (test_add_exists_remove_account_invalid) /* Test 3*/ result = modest_account_mgr_add_account (account_mgr, "ïnválid//accountñ//nÄméç", + "test display name", + "user fullname", + "user@email.com", + MODEST_ACCOUNT_RETRIEVE_HEADERS_ONLY, "store_account", "transport_account", TRUE); fail_unless (!result, @@ -254,11 +268,12 @@ START_TEST (test_add_exists_remove_account_invalid) result = modest_account_mgr_add_server_account (NULL, TEST_MODEST_ACCOUNT_NAME, "hostname", + 143, "username", "password", - MODEST_PROTOCOL_STORE_IMAP, - MODEST_PROTOCOL_SECURITY_NONE, - MODEST_PROTOCOL_AUTH_NONE); + MODEST_PROTOCOLS_STORE_IMAP, + MODEST_PROTOCOLS_CONNECTION_NONE, + MODEST_PROTOCOLS_AUTH_NONE); fail_unless (!result, "modest_account_mgr_add_server_account does not return " \ "FALSE when passing a NULL ModestAccountMgr"); @@ -267,11 +282,12 @@ START_TEST (test_add_exists_remove_account_invalid) result = modest_account_mgr_add_server_account (account_mgr, NULL, "hostname", + 143, "username", "password", - MODEST_PROTOCOL_STORE_IMAP, - MODEST_PROTOCOL_SECURITY_NONE, - MODEST_PROTOCOL_AUTH_NONE); + MODEST_PROTOCOLS_STORE_IMAP, + MODEST_PROTOCOLS_CONNECTION_NONE, + MODEST_PROTOCOLS_AUTH_NONE); fail_unless (!result, "modest_account_mgr_add_server_account does not return " \ "FALSE when passing a NULL account name"); @@ -280,43 +296,33 @@ START_TEST (test_add_exists_remove_account_invalid) result = modest_account_mgr_add_server_account (account_mgr, "ïnválid//accountñ//nÄméç", "hostname", + 143, "username", "password", - MODEST_PROTOCOL_STORE_IMAP, - MODEST_PROTOCOL_SECURITY_NONE, - MODEST_PROTOCOL_AUTH_NONE); + MODEST_PROTOCOLS_STORE_IMAP, + MODEST_PROTOCOLS_CONNECTION_NONE, + MODEST_PROTOCOLS_AUTH_NONE); fail_unless (!result, "modest_account_mgr_add_server_account does not return " \ "FALSE when passing an invalid account name"); /* Test 7 */ result = modest_account_mgr_remove_account (account_mgr, - "a_name_that_does_not_exist", - FALSE); + "a_name_that_does_not_exist"); fail_unless (!result, "modest_account_mgr_remove_acccount does not return FALSE " \ "when trying to remove an account that does not exist"); - /* Test 8 */ - result = modest_account_mgr_remove_account (account_mgr, - "a_name_that_does_not_exist", - TRUE); - fail_unless (!result, - "modest_account_mgr_remove_acccount does not return FALSE " \ - "when trying to remove a server account that does not exist"); - /* Test 9 */ result = modest_account_mgr_remove_account (NULL, - TEST_MODEST_ACCOUNT_NAME, - FALSE); + TEST_MODEST_ACCOUNT_NAME); fail_unless (!result, "modest_account_mgr_remove_acccount does not return " \ "FALSE when passing a NULL ModestAccountMgr"); /* Test 10 */ result = modest_account_mgr_remove_account (account_mgr, - NULL, - FALSE); + NULL); fail_unless (!result, "modest_account_mgr_remove_acccount does not return " \ "FALSE when passing a NULL account name"); diff --git a/tests/check_folder-transfer.c b/tests/check_folder-transfer.c index f3af164..7278e04 100644 --- a/tests/check_folder-transfer.c +++ b/tests/check_folder-transfer.c @@ -42,6 +42,7 @@ #include #include +#include static gchar *cachedir=NULL; static gboolean move=FALSE; @@ -59,7 +60,7 @@ find_folders (TnyFolderStore *store, TnyFolderStoreQuery *query, return; folders = tny_simple_list_new (); - tny_folder_store_get_folders (store, folders, query, NULL); + tny_folder_store_get_folders (store, folders, query, FALSE /*no poke*/, NULL); iter = tny_list_create_iterator (folders); while (!tny_iterator_is_done (iter) && (!*folder_src || !*folder_dst)) @@ -126,6 +127,10 @@ main (int argc, char **argv) } g_option_context_free (context); + if (!modest_init (argc, argv)) { + return 0; + } + acc_mgr = modest_runtime_get_account_mgr (); account_store = modest_runtime_get_account_store(); @@ -168,11 +173,12 @@ main (int argc, char **argv) src_headers = tny_simple_list_new (); tny_folder_get_headers (folder_src, src_headers, TRUE, NULL); - mail_op = modest_mail_operation_new (); + mail_op = modest_mail_operation_new (NULL); modest_mail_operation_xfer_folder (mail_op, folder_src, - TNY_FOLDER_STORE (folder_dst), move); + TNY_FOLDER_STORE (folder_dst), move, + NULL, NULL); g_object_unref (G_OBJECT (src_headers)); g_object_unref (G_OBJECT (mail_op)); diff --git a/tests/check_modest-conf.c b/tests/check_modest-conf.c index 0cba48d..06efcd7 100644 --- a/tests/check_modest-conf.c +++ b/tests/check_modest-conf.c @@ -28,6 +28,7 @@ */ #include +#include #include #include diff --git a/tests/check_text-utils.c b/tests/check_text-utils.c index e60fdeb..d3b1160 100644 --- a/tests/check_text-utils.c +++ b/tests/check_text-utils.c @@ -62,7 +62,7 @@ START_TEST (test_get_display_address_regular) /* Tests 1, 2, 3, 4 */ for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) { gchar *str = g_strdup (tests[i].original); - str = modest_text_utils_get_display_address (str); + modest_text_utils_get_display_address (str); fail_unless (str && strcmp(str, tests[i].expected) == 0, "modest_text_utils_get_display_address failed for '%s': " "expected '%s' but got '%s'", @@ -80,8 +80,7 @@ END_TEST START_TEST (test_get_display_address_invalid) { /* Test 1 */ - fail_unless (modest_text_utils_get_display_address (NULL) == NULL, - "modest_text_utils_get_display_address(NULL) should be NULL"); + modest_text_utils_get_display_address (NULL); } END_TEST @@ -164,7 +163,8 @@ START_TEST (test_quote_regular) for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) { text = g_strdup (tests[i].original); expected_quoted_text = g_strdup (tests[i].expected); - quoted_text = modest_text_utils_quote (text, "text/plain", "foo@bar", 0, 15); + quoted_text = modest_text_utils_quote (text, "text/plain", NULL /*signature*/, + "foo@bar", 0 /* date */, NULL /*attachments*/, 15 /*limit*/); fail_unless (quoted_text && strcmp(expected_quoted_text, quoted_text)==0, "modest_text_utils_quote failed:\nOriginal text:\n\"%s\"\n" \ "Expected quotation:\n\"%s\"\nQuoted text:\n\"%s\"", @@ -178,7 +178,8 @@ START_TEST (test_quote_regular) text = g_strdup ("Quotation test example"); expected_quoted_text = g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n> Quotation\n> test\n> example\n> \n"); - quoted_text = modest_text_utils_quote (text, "text/plain", "foo@bar", 0, 1); + quoted_text = modest_text_utils_quote (text, "text/plain", NULL /*signature */, + "foo@bar", 0 /*date*/, NULL /*attachments*/, 1 /*limit*/); fail_unless (quoted_text && !strcmp (expected_quoted_text, quoted_text), "modest_text_utils_quote failed:\nOriginal text:\n\"%s\"\n" \ "Expected quotation:\n\"%s\"\nQuoted text:\n\"%s\"", @@ -205,7 +206,7 @@ START_TEST (test_quote_invalid) /* Test 1 (Fault) */ text = NULL; - quoted_text = modest_text_utils_quote (NULL, "text/plain", "foo@bar", 0, 15); + quoted_text = modest_text_utils_quote (NULL, "text/plain", NULL, "foo@bar", 0, NULL, 15); fail_unless (quoted_text == NULL, "modest_text_utils_quote failed:\nOriginal text: NULL\n" \ "Expected quotation: NULL\nQuoted text: \"%s\"", @@ -216,7 +217,7 @@ START_TEST (test_quote_invalid) /* Test 2 (Fault) */ text = g_strdup ("Text"); expected_quoted_text = g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n> Text\n"); - quoted_text = modest_text_utils_quote (text, NULL, "foo@bar", 0, 15); + quoted_text = modest_text_utils_quote (text, NULL, NULL, "foo@bar", 0, NULL, 15); fail_unless (quoted_text == NULL, "modest_text_utils_quote failed:\nOriginal text: NULL\n" \ "Expected quotation: NULL\nQuoted text: \"%s\"", @@ -228,7 +229,7 @@ START_TEST (test_quote_invalid) /* Test 3 */ text = g_strdup ("Text"); expected_quoted_text = g_strdup ("On Thu Jan 1 01:00:00 1970, (null) wrote:\n> Text\n"); - quoted_text = modest_text_utils_quote (text, "text/plain", NULL, 0, 15); + quoted_text = modest_text_utils_quote (text, "text/plain", NULL, NULL, 0, NULL, 15); fail_unless (quoted_text == NULL, "modest_text_utils_quote failed:\nOriginal text: NULL\n" \ "Expected quotation: NULL\nQuoted text: \"%s\"", @@ -240,7 +241,7 @@ START_TEST (test_quote_invalid) /* Test 4 */ text = g_strdup ("This is a text"); expected_quoted_text = g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n> This\n> is\n> a\n> text\n> \n"); - quoted_text = modest_text_utils_quote (text, "text/plain", "foo@bar", 0, 0); + quoted_text = modest_text_utils_quote (text, "text/plain", NULL, "foo@bar", 0, NULL, 0); fail_unless (quoted_text && !strcmp (expected_quoted_text, quoted_text), "modest_text_utils_quote failed:\nOriginal text:\n\"%s\"\n" \ "Expected quotation:\n\"%s\"\nQuoted text:\n\"%s\"", @@ -277,7 +278,7 @@ START_TEST (test_cite_regular) /* Tests 1, 2, 3, 4 */ for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) { - cited_text = modest_text_utils_cite (tests[i].original, "text/plain", "foo@bar", 0); + cited_text = modest_text_utils_cite (tests[i].original, "text/plain", NULL, "foo@bar", 0); fail_unless (cited_text && !strcmp (tests[i].expected, cited_text), "modest_text_utils_cite failed:\nOriginal text:\n\"%s\"\n" \ "Expected cite:\n\"%s\"\nCite obtained:\n\"%s\"", @@ -302,7 +303,7 @@ START_TEST (test_cite_invalid) /* Test 1 */ text = NULL; expected_cite = g_strdup ("On Thu Jan 1 01:00:00 1970, foo@bar wrote:\n(null)\n"); - cited_text = modest_text_utils_cite (text, "text/plain", "foo@bar", 0); + cited_text = modest_text_utils_cite (text, "text/plain", NULL, "foo@bar", 0); fail_unless (cited_text && !strcmp (expected_cite, cited_text), "modest_text_utils_cite failed:\nOriginal text:\nNULL\n" \ "Expected cite:\n\"%s\"\nCite obtained:\n\"%s\"", @@ -313,7 +314,7 @@ START_TEST (test_cite_invalid) /* Test 2 */ text = g_strdup ("This is some text"); expected_cite = g_strdup ("On Thu Jan 1 01:00:00 1970, (null) wrote:\nThis is some text\n"); - cited_text = modest_text_utils_cite (text, "text/plain", NULL, 0); + cited_text = modest_text_utils_cite (text, "text/plain", NULL, NULL, 0); fail_unless (cited_text && !strcmp (expected_cite, cited_text), "modest_text_utils_cite failed:\nOriginal text:\n\"%s\"\n" \ "Expected cite:\n\"%s\"\nCite obtained:\n\"%s\"", @@ -364,6 +365,7 @@ START_TEST (test_inline_regular) for (i = 0; i != sizeof(tests)/sizeof(StringPair); ++i) { inlined_text = modest_text_utils_inline (tests[i].original, "text/plain", + NULL, "foo@bar", 0, "bar@foo", @@ -401,6 +403,7 @@ START_TEST (test_inline_invalid) "(null)"); inlined_text = modest_text_utils_inline (NULL, "text/plain", + NULL, "foo@bar", 0, "bar@foo", @@ -419,6 +422,7 @@ START_TEST (test_inline_invalid) "Some text"); inlined_text = modest_text_utils_inline (text, NULL, + NULL, "foo@bar", 0, "bar@foo", @@ -438,6 +442,7 @@ START_TEST (test_inline_invalid) inlined_text = modest_text_utils_inline (text, "text/plain", NULL, + NULL, 0, "bar@foo", "Any subject"); @@ -456,6 +461,7 @@ START_TEST (test_inline_invalid) "Some text"); inlined_text = modest_text_utils_inline (text, "text/plain", + NULL, "foo@bar", 0, NULL, @@ -474,6 +480,7 @@ START_TEST (test_inline_invalid) "Some text"); inlined_text = modest_text_utils_inline (text, "text/plain", + NULL, "foo@bar", 0, "bar@foo", diff --git a/tests/check_update-account.c b/tests/check_update-account.c index 3039e91..1202f7a 100644 --- a/tests/check_update-account.c +++ b/tests/check_update-account.c @@ -88,13 +88,14 @@ func (gpointer_data) g_object_unref (G_OBJECT (accounts)); queue = modest_runtime_get_mail_operation_queue (); - mail_op = modest_mail_operation_new (); + mail_op = modest_mail_operation_new (NULL); g_signal_connect (G_OBJECT (mail_op), "progress_changed", G_CALLBACK (on_progress_changed), queue); - if (modest_mail_operation_update_account (mail_op, account)) - modest_mail_operation_queue_add (queue, mail_op); + modest_mail_operation_update_account (mail_op, tny_account_get_name (TNY_ACCOUNT (account)), + TRUE, FALSE, NULL, NULL, NULL); + modest_mail_operation_queue_add (queue, mail_op); g_object_unref (G_OBJECT (mail_op)); -- 1.7.9.5