* (The old maemo email-client did this, though it isn't specified in the UI spec.)
* ALARM_EVENT_CONNECTED will prevent the alarm from being called in case that the device is offline
*/
- event->flags = ALARM_EVENT_CONNECTED;
+ event->flags = ALARM_EVENT_CONNECTED | ALARM_EVENT_RUN_DELAYED;
alarm_cookie = alarmd_event_add (event);
g_object_unref (account);
}
- /* Play sound */
- modest_platform_play_email_tone ();
if (notify_notification_show (NOTIFY_NOTIFICATION (notification), NULL)) {
GSList *notifications_list = NULL;
{
gboolean stop_trying = FALSE;
g_return_val_if_fail (data && data->account, FALSE);
-
- printf ("DEBUG: %s: tny_account_get_connection_status()==%d\n", __FUNCTION__,
- tny_account_get_connection_status (data->account));
-
+
if (data && data->account &&
/* We want to wait until TNY_CONNECTION_STATUS_INIT has changed to something else,
* after which the account is likely to be usable, or never likely to be usable soon: */
(tny_account_get_connection_status (data->account) != TNY_CONNECTION_STATUS_INIT) )
{
data->is_online = TRUE;
-
+
stop_trying = TRUE;
} else {
/* Give up if we have tried too many times: */
++(data->count_tries);
}
}
-
+
if (stop_trying) {
/* Allow the function that requested this idle callback to continue: */
if (data->loop)
g_main_loop_quit (data->loop);
-
+
if (data->account)
g_object_unref (data->account);
-
+
return FALSE; /* Don't call this again. */
} else {
return TRUE; /* Call this timeout callback again. */
g_free (mail_volume);
g_free (active_profile);
#else
- mail_tone = MAIL_TONE;
+ mail_tone = g_strdup (MAIL_TONE);
mail_volume_int = 100;
#endif