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,
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;
}
/* 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;
}
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)