X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-ui-actions.c;h=e5f7ff6f495e631a21faf7847da2b0e40cee6faa;hp=e38aa0c74037ade673ab90fee1dc601613090d7b;hb=6cfc86073c3ad33565a50c70fce034e9b3fb0a96;hpb=9f4ac039eb47915ec367a05d893c871a077c9390 diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index e38aa0c..e5f7ff6 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -1639,17 +1639,21 @@ new_messages_arrived (ModestMailOperation *self, gpointer user_data) { GObject *source; + gboolean show_visual_notifications; source = modest_mail_operation_get_source (self); - - /* Notify new messages have been downloaded. Do not notify if - the send&receive was invoked by the user, i.e, if the mail - operation has a source (the main window) */ - if ((new_headers != NULL) && (tny_list_get_length (new_headers) > 0) && !source) - modest_platform_on_new_headers_received (new_headers); - + show_visual_notifications = (source) ? FALSE : TRUE; if (source) g_object_unref (source); + + /* Notify new messages have been downloaded. If the + send&receive was invoked by the user then do not show any + visual notification, only play a sound and activate the LED + (for the Maemo version) */ + if ((new_headers != NULL) && (tny_list_get_length (new_headers) > 0)) + modest_platform_on_new_headers_received (new_headers, + show_visual_notifications); + } gboolean