+2007-06-01 Murray Cumming <murrayc@murrayc.com>
+
+ * src/maemo/modest-maemo-global-settings-dialog.c:
+ (current_connection): Check that we are even connected before trying to
+ get the current connection name, to prevent a warning.
+
+ * src/maemo/modest-platform.c: (modest_platform_connect_and_wait):
+ Change the comments because tny_maemo_conic_device_connect() is now meant to
+ block.
+ * src/modest-mail-operation.c:
+ (modest_mail_operation_update_account): Call modest_platform_connect_and_wait() to
+ make sure we have a connection and fail if we can't connect.
+
2007-05-31 Murray Cumming <murrayc@murrayc.com>
* src/maemo/modest-main-window.c:
account_store = TNY_ACCOUNT_STORE (modest_runtime_get_account_store ());
device = tny_account_store_get_device (account_store);
+ if (!tny_device_is_online (device))
+ return MODEST_CONNECTED_VIA_ANY;
+
/* Get iap id */
const gchar *iap_id = tny_maemo_conic_device_get_current_iap_id (TNY_MAEMO_CONIC_DEVICE (device));
if (iap_id) {
if (tny_device_is_online (device))
return TRUE;
- /* TODO: Block on the result: */
- gboolean request_sent = tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device), NULL);
- if (!request_sent)
- return FALSE;
-
- return TRUE;
+ /* This blocks on the result: */
+ return tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device), NULL);
}
void
g_return_val_if_fail (MODEST_IS_MAIL_OPERATION (self), FALSE);
g_return_val_if_fail (account_name, FALSE);
+ /* Make sure that we have a connection, and request one
+ * if necessary:
+ * TODO: Is there some way to trigger this for every attempt to
+ * use the network? */
+ if (!modest_platform_connect_and_wait(NULL))
+ return FALSE;
+
/* Init mail operation. Set total and done to 0, and do not
update them, this way the progress objects will know that
we have no clue about the number of the objects */