/* 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)
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 {