return FALSE;
} else
fclose (mcc_file);
-
- if (access (MODEST_PROVIDERS_DATA_PATH, R_OK) != 0) {
+
+ if (access(MODEST_PROVIDER_DATA_FILE, R_OK) != 0 &&
+ access(MODEST_MAEMO_PROVIDER_DATA_FILE, R_OK) != 0) {
g_printerr ("modest: cannot find providers data\n");
return FALSE;
}
-
+
return TRUE;
}
/* Register hardware event dbus callback: */
hw_state.shutdown_ind = TRUE;
- osso_hw_set_event_cb(osso_context, NULL,/*&hw_state*/ modest_osso_cb_hw_state_handler, NULL);
+ osso_hw_set_event_cb(osso_context, NULL, NULL, NULL);
/* Register osso auto-save callbacks: */
result = osso_application_set_autosave_cb (osso_context,
gboolean device_online;
TnyDevice *device;
TnyConnectionStatus conn_status;
+ gboolean user_requested;
device = modest_runtime_get_device();
device_online = tny_device_is_online (device);
+ /* Whether the connection is user requested or automatically
+ requested, for example via D-Bus */
+ user_requested = (parent_window) ? TRUE : FALSE;
+
/* If there is no account check only the device status */
if (!account) {
if (device_online)
return TRUE;
else
- return tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device), NULL);
+ return tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device),
+ NULL, user_requested);
}
/* Return if the account is already connected */
G_CALLBACK (on_connection_status_changed),
data);
/* Try to connect the device */
- device_online = tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device), NULL);
+ device_online = tny_maemo_conic_device_connect (TNY_MAEMO_CONIC_DEVICE (device),
+ NULL, user_requested);
/* If the device connection failed then exit */
if (!device_online && data->handler)
void
modest_platform_connect_and_perform (GtkWindow *parent_window,
- TnyAccount *account, ModestConnectedPerformer callback, gpointer user_data)
+ TnyAccount *account,
+ ModestConnectedPerformer callback,
+ gpointer user_data)
{
gboolean device_online;
TnyDevice *device;
TnyConnectionStatus conn_status;
OnWentOnlineInfo *info;
+ gboolean user_requested;
device = modest_runtime_get_device();
device_online = tny_device_is_online (device);
+ /* Whether the connection is user requested or automatically
+ requested, for example via D-Bus */
+ user_requested = (parent_window) ? TRUE : FALSE;
+
/* If there is no account check only the device status */
if (!account) {
info->callback = callback;
tny_maemo_conic_device_connect_async (TNY_MAEMO_CONIC_DEVICE (device), NULL,
- on_conic_device_went_online, info);
+ user_requested, on_conic_device_went_online,
+ info);
/* We'll cleanup in on_conic_device_went_online */
}
* and the account */
tny_maemo_conic_device_connect_async (TNY_MAEMO_CONIC_DEVICE (device), NULL,
- on_conic_device_went_online, info);
+ user_requested, on_conic_device_went_online,
+ info);
} else {
}
void
-modest_platform_connect_and_perform_if_network_folderstore (GtkWindow *parent_window, TnyFolderStore *folder_store,
- ModestConnectedPerformer callback, gpointer user_data)
+modest_platform_connect_and_perform_if_network_folderstore (GtkWindow *parent_window,
+ TnyFolderStore *folder_store,
+ ModestConnectedPerformer callback,
+ gpointer user_data)
{
if (!folder_store) {