From: Philip Van Hoof Date: Mon, 25 Jun 2007 20:07:50 +0000 (+0000) Subject: Bugfix for 61408 X-Git-Tag: git_migration_finished~3117 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=558219dfdd5d2effce04afd18988b35b14dddf06 Bugfix for 61408 pmo-trunk-r2416 --- diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index bd2b9de..bea2bae 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -514,7 +514,7 @@ on_account_store_connecting_finished (TnyAccountStore *store, ModestMainWindow * TnyDevice *device = tny_account_store_get_device (store); - modest_folder_view_update_model (MODEST_FOLDER_VIEW (priv->folder_view), store); + /* modest_folder_view_update_model (MODEST_FOLDER_VIEW (priv->folder_view), store); */ /* Check that we are really online. * This signal should not be emitted when we are not connected, diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index c120bb0..cd6fa56 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -1486,9 +1486,9 @@ modest_msg_edit_window_insert_image (ModestMsgEditWindow *window) loader = gdk_pixbuf_loader_new_with_mime_type (mime_type, NULL); while (!tny_stream_is_eos (TNY_STREAM (stream))) { - char read_buffer[128]; + unsigned char read_buffer[128]; gint readed; - readed = tny_stream_read (TNY_STREAM (stream), read_buffer, 128); + readed = tny_stream_read (TNY_STREAM (stream), (char *) read_buffer, 128); if (!gdk_pixbuf_loader_write (loader, read_buffer, readed, NULL)) break; } diff --git a/src/modest-tny-account.c b/src/modest-tny-account.c index 42dffc8..25549ee 100644 --- a/src/modest-tny-account.c +++ b/src/modest-tny-account.c @@ -324,10 +324,12 @@ modest_tny_account_new_from_server_account (ModestAccountMgr *account_mgr, /* FIXME: for debugging. * Let's keep this because it is very useful for debugging. */ url = tny_account_get_url_string (TNY_ACCOUNT(tny_account)); - printf ("DEBUG %s:\n account-url: %s\n", __FUNCTION__, url); + + printf ("DEBUG %s:\n account-url: %s\n", __FUNCTION__, url); + g_free (url); /***********************/ - + return tny_account; } @@ -408,6 +410,18 @@ modest_tny_account_new_from_account (ModestAccountMgr *account_mgr, const gchar tny_account_set_pass_func (tny_account, get_pass_func ? get_pass_func: get_pass_dummy); + + TnyAccountStore *astore = (TnyAccountStore *) modest_runtime_get_account_store (); + if (astore) { + TnyDevice *device = tny_account_store_get_device (astore); + GError *err = NULL; + tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (tny_account), + tny_device_is_online (device), &err); + if (err) + g_print ("Error connecting: %s\n", err->message); + g_object_unref (device); + } + /* This name is what shows up in the folder view -- so for some POP/IMAP/... server * account, we set its name to the account of which it is part. */ if (account_data->display_name) diff --git a/src/modest-tny-local-folders-account.c b/src/modest-tny-local-folders-account.c index aa3948e..a884c42 100644 --- a/src/modest-tny-local-folders-account.c +++ b/src/modest-tny-local-folders-account.c @@ -161,6 +161,7 @@ get_folders (TnyFolderStore *self, TnyList *list, TnyFolderStoreQuery *query, GE while (iter) { TnyFolder *folder = TNY_FOLDER (iter->data); + if (folder) tny_list_append (list, G_OBJECT (folder));