X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-platform.c;h=12181452e78c56ed70154945d60849166c7a3926;hb=266e59ba330fbca5c32475b5696ec2e28a99ede6;hp=563c347b2cccd1d5a8f5c6b85a06f066fbfb48a3;hpb=4fef18a124feda302dbc494166c1ab43f232b851;p=modest diff --git a/src/hildon2/modest-platform.c b/src/hildon2/modest-platform.c index 563c347..1218145 100644 --- a/src/hildon2/modest-platform.c +++ b/src/hildon2/modest-platform.c @@ -97,7 +97,7 @@ #define HILDON_OSSO_URI_ACTION "uri-action" #define URI_ACTION_COPY "copy:" #define MODEST_NOTIFICATION_CATEGORY "email-message" -#define MODEST_NEW_MAIL_LIGHTING_PATTERN "PatternCommunicationEmail" +#define MODEST_NEW_MAIL_LIGHTING_PATTERN "PatternChatAndEmail" #ifdef MODEST_USE_PROFILE #define PROFILE_MAIL_TONE PROFILEKEY_EMAIL_ALERT_TONE #define PROFILE_MAIL_VOLUME PROFILEKEY_EMAIL_ALERT_VOLUME @@ -700,7 +700,7 @@ folder_chooser_dialog_run (ModestFolderView *original, GtkWidget *pannable; const gchar *visible_id = NULL; - userdata.dialog = hildon_dialog_new (); + userdata.dialog = gtk_dialog_new (); pannable = hildon_pannable_area_new (); folder_view = modest_platform_create_folder_view (NULL); @@ -1506,7 +1506,8 @@ modest_platform_set_update_interval (guint minutes) /* Delete any existing alarm, because we will replace it: */ alarm_cookies = alarmd_event_query (0,0, 0,0, MODEST_ALARMD_APPID); if (alarm_cookies) { - for (; alarm_cookies != NULL; alarm_cookies++) { + /* alarmd_event_query returns a zero terminated array */ + for (; *alarm_cookies != 0; alarm_cookies++) { alarmd_event_del (*alarm_cookies); } modest_conf_set_int (conf, MODEST_CONF_ALARM_ID, 0, NULL); @@ -1545,7 +1546,7 @@ modest_platform_set_update_interval (guint minutes) * (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); @@ -1671,8 +1672,6 @@ modest_platform_on_new_headers_received (GList *URI_list, g_object_unref (account); } - /* Play sound */ - modest_platform_play_email_tone (); if (notify_notification_show (NOTIFY_NOTIFICATION (notification), NULL)) { GSList *notifications_list = NULL; @@ -1926,17 +1925,14 @@ on_timeout_check_account_is_online(CheckAccountIdleData* data) { 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: */ @@ -1947,15 +1943,15 @@ on_timeout_check_account_is_online(CheckAccountIdleData* data) ++(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. */ @@ -2645,7 +2641,7 @@ modest_platform_play_email_tone (void) g_free (mail_volume); g_free (active_profile); #else - mail_tone = MAIL_TONE; + mail_tone = g_strdup (MAIL_TONE); mail_volume_int = 100; #endif