Fixes NB#141137, do not play email tone twice when sending notifications
[modest] / src / hildon2 / modest-platform.c
index f926ba8..0dc579d 100644 (file)
@@ -1546,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);
 
@@ -1672,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;
 
@@ -2646,7 +2644,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