Author: pulkomandy Date: 2011-11-07 13:32:22 +0100 (Mon, 07 Nov 2011) New Revision: 43209 Changeset: https://dev.haiku-os.org/changeset/43209 Modified: haiku/trunk/src/servers/mail/Notifier.cpp Log: * Fix case in Notification window group to match the new message notification * Try harder to report useful progress when both sending and receiving messages. Modified: haiku/trunk/src/servers/mail/Notifier.cpp =================================================================== --- haiku/trunk/src/servers/mail/Notifier.cpp 2011-11-07 02:26:10 UTC (rev 43208) +++ haiku/trunk/src/servers/mail/Notifier.cpp 2011-11-07 12:32:22 UTC (rev 43209) @@ -42,7 +42,7 @@ // Two windows for each acocunt : one for sending and the other for // receiving mails fNotification.SetMessageID(identifier); - fNotification.SetGroup(B_TRANSLATE("Mail Status")); + fNotification.SetGroup(B_TRANSLATE("Mail status")); fNotification.SetTitle(desc); app_info info; @@ -104,9 +104,15 @@ fSizeDone += bytes; if (fTotalSize > 0) fNotification.SetProgress(fSizeDone / (float)fTotalSize); - else { - // Likely we should set it as an INFORMATION_NOTIFICATION in that case, - // but this can't be done after object creation... + else if (fTotalItems > 0) { + // No size information available + // Report progress in terms of message count instead + + fNotification.SetProgress(fItemsDone / (float)fTotalITems); + } else { + // No message count information either + // TODO we should use a B_INFORMATION_NOTIFICATION here, but it is not + // possible to change the BNotification type after creating it... fNotification.SetProgress(0); }