hrev48678 adds 3 changesets to branch 'master' old head: 1736cb1d596076b3f727bbe501b15be4ada7b769 new head: 0b90f99bc3ba04f924e1706d9759a0ebcb93dd88 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=0b90f99bc3ba+%5E1736cb1d5960 ---------------------------------------------------------------------------- 6394d0e83870: Mail Preferences: use correct message constant Would crash the SMTP add-on as the message sent would end up trying to toggle a non-existing checkbox. d8853b49535b: Add mail provider data for hotmail.com. Servers only accept SSL connections, so the MX entry isn't enough to autoconfigure. Moreover, hotmail.com MX still points to mx3.hotmail.com, while outlook.com suggests to use pop3.live.com. 0b90f99bc3ba: Mail server: fix disabling notifications * The default notifier didn't always take the setting into account. * The mail server was not using the setting from the settings file and instead waiting for a message that wasn't sent anywhere. Fixes #10852. [ Adrien Destugues <pulkomandy@xxxxxxxxx> ] ---------------------------------------------------------------------------- 8 files changed, 34 insertions(+), 22 deletions(-) headers/private/mail/MailPrivate.h | 1 - src/kits/mail/ProtocolConfigView.cpp | 2 +- src/preferences/mail/ProviderInfo/Jamfile | 1 + .../mail/ProviderInfo/hotmail.com.rdef | 7 ++++++ src/servers/mail/DefaultNotifier.cpp | 24 ++++++++++++++------ src/servers/mail/DefaultNotifier.h | 5 +++- src/servers/mail/MailDaemonApplication.cpp | 15 ++++-------- src/servers/mail/MailDaemonApplication.h | 1 - ############################################################################ Commit: 6394d0e8387033a547d85e47b9754c0cf582a215 URL: http://cgit.haiku-os.org/haiku/commit/?id=6394d0e83870 Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Wed Jan 14 12:59:34 2015 UTC Mail Preferences: use correct message constant Would crash the SMTP add-on as the message sent would end up trying to toggle a non-existing checkbox. ---------------------------------------------------------------------------- diff --git a/src/kits/mail/ProtocolConfigView.cpp b/src/kits/mail/ProtocolConfigView.cpp index 36cb5d1..6b0d0fc 100644 --- a/src/kits/mail/ProtocolConfigView.cpp +++ b/src/kits/mail/ProtocolConfigView.cpp @@ -249,7 +249,7 @@ MailProtocolConfigView::AddAuthMethod(const char* label, bool needUserPassword) if (fAuthenticationField != NULL) { fAuthenticationField->Menu()->AddItem(new BMenuItem(label, new BMessage(needUserPassword - ? kMsgLeaveOnServer : kMsgNoPassword))); + ? kMsgNeedPassword : kMsgNoPassword))); if (fAuthenticationField->Menu()->FindMarked() == NULL) { BMenuItem* item = fAuthenticationField->Menu()->ItemAt(0); ############################################################################ Commit: d8853b49535b733aa741a38b2ffba7506266ec5f URL: http://cgit.haiku-os.org/haiku/commit/?id=d8853b49535b Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Wed Jan 14 13:03:11 2015 UTC Add mail provider data for hotmail.com. Servers only accept SSL connections, so the MX entry isn't enough to autoconfigure. Moreover, hotmail.com MX still points to mx3.hotmail.com, while outlook.com suggests to use pop3.live.com. ---------------------------------------------------------------------------- diff --git a/src/preferences/mail/ProviderInfo/Jamfile b/src/preferences/mail/ProviderInfo/Jamfile index fa3276a..12d23b0 100644 --- a/src/preferences/mail/ProviderInfo/Jamfile +++ b/src/preferences/mail/ProviderInfo/Jamfile @@ -11,6 +11,7 @@ HAIKU_PROVIDER_INFOS = gmail.com gmx.de googlemail.com + hotmail.com laposte.net lycos.de mymail.ch diff --git a/src/preferences/mail/ProviderInfo/hotmail.com.rdef b/src/preferences/mail/ProviderInfo/hotmail.com.rdef new file mode 100644 index 0000000..f57a7a3 --- /dev/null +++ b/src/preferences/mail/ProviderInfo/hotmail.com.rdef @@ -0,0 +1,7 @@ +resource(1, "POP Server") "pop3.live.com"; +resource(3, "SMTP Server") "smtp.live.com"; +resource(4, "POP Authentication") 0; +resource(5, "SMTP Authentication") 1; +resource(6, "POP SSL") 1; +resource(8, "SMTP SSL") 1; +resource(9, "Username Pattern") 0; ############################################################################ Revision: hrev48678 Commit: 0b90f99bc3ba04f924e1706d9759a0ebcb93dd88 URL: http://cgit.haiku-os.org/haiku/commit/?id=0b90f99bc3ba Author: Adrien Destugues <pulkomandy@xxxxxxxxx> Date: Wed Jan 14 14:38:09 2015 UTC Ticket: https://dev.haiku-os.org/ticket/10852 Mail server: fix disabling notifications * The default notifier didn't always take the setting into account. * The mail server was not using the setting from the settings file and instead waiting for a message that wasn't sent anywhere. Fixes #10852. ---------------------------------------------------------------------------- diff --git a/headers/private/mail/MailPrivate.h b/headers/private/mail/MailPrivate.h index e30ff64..9363899 100644 --- a/headers/private/mail/MailPrivate.h +++ b/headers/private/mail/MailPrivate.h @@ -22,7 +22,6 @@ const uint32 kMsgCheckMessage = 'mnow'; const uint32 kMsgSendMessages = 'msnd'; const uint32 kMsgSettingsUpdated = 'mrrs'; const uint32 kMsgAccountsChanged = 'macc'; -const uint32 kMsgSetStatusWindowMode = 'shst'; const uint32 kMsgCountNewMessages = 'mnum'; const uint32 kMsgMarkMessageAsRead = 'mmar'; const uint32 kMsgFetchBody = 'mfeb'; diff --git a/src/servers/mail/DefaultNotifier.cpp b/src/servers/mail/DefaultNotifier.cpp index 018472f..66aebf8 100644 --- a/src/servers/mail/DefaultNotifier.cpp +++ b/src/servers/mail/DefaultNotifier.cpp @@ -21,7 +21,7 @@ DefaultNotifier::DefaultNotifier(const char* accountName, bool inbound, - ErrorLogWindow* errorWindow, uint32& showMode) + ErrorLogWindow* errorWindow, uint32 showMode) : fAccountName(accountName), fIsInbound(inbound), @@ -131,11 +131,7 @@ DefaultNotifier::ReportProgress(uint32 messages, uint64 bytes, if (fItemsDone == fTotalItems && fTotalItems != 0) timeout = 1; // We're done, make the window go away faster - if ((!fIsInbound - && (fShowMode & B_MAIL_SHOW_STATUS_WINDOW_WHEN_SENDING) != 0) - || (fIsInbound - && (fShowMode & B_MAIL_SHOW_STATUS_WINDOW_WHEN_ACTIVE) != 0)) - fNotification.Send(timeout); + _NotifyIfAllowed(timeout); } @@ -145,5 +141,19 @@ DefaultNotifier::ResetProgress(const char* message) fNotification.SetProgress(0); if (message != NULL) fNotification.SetTitle(message); - fNotification.Send(0); + _NotifyIfAllowed(); +} + + +void +DefaultNotifier::_NotifyIfAllowed(int timeout) +{ + int32 flag; + if (fIsInbound) + flag = B_MAIL_SHOW_STATUS_WINDOW_WHEN_ACTIVE; + else + flag = B_MAIL_SHOW_STATUS_WINDOW_WHEN_SENDING; + + if ((fShowMode & flag) != 0) + fNotification.Send(timeout); } diff --git a/src/servers/mail/DefaultNotifier.h b/src/servers/mail/DefaultNotifier.h index fa292dd..5c2ada5 100644 --- a/src/servers/mail/DefaultNotifier.h +++ b/src/servers/mail/DefaultNotifier.h @@ -20,7 +20,7 @@ class DefaultNotifier : public BMailNotifier { public: DefaultNotifier(const char* accountName, bool inbound, ErrorLogWindow* errorWindow, - uint32& showMode); + uint32 showMode); ~DefaultNotifier(); BMailNotifier* Clone(); @@ -35,6 +35,9 @@ public: void ResetProgress(const char* message = NULL); private: + void _NotifyIfAllowed(int timeout = 0); + +private: BString fAccountName; bool fIsInbound; ErrorLogWindow* fErrorWindow; diff --git a/src/servers/mail/MailDaemonApplication.cpp b/src/servers/mail/MailDaemonApplication.cpp index bb6c0be..8a15376 100644 --- a/src/servers/mail/MailDaemonApplication.cpp +++ b/src/servers/mail/MailDaemonApplication.cpp @@ -305,14 +305,6 @@ MailDaemonApplication::MessageReceived(BMessage* msg) _ReloadAccounts(msg); break; - case kMsgSetStatusWindowMode: // when to show the status window - { - int32 mode; - if (msg->FindInt32("ShowStatusWindow", &mode) == B_OK) - fNotifyMode = mode; - break; - } - case kMsgMarkMessageAsRead: { int32 account = msg->FindInt32("account"); @@ -413,7 +405,8 @@ MailDaemonApplication::MessageReceived(BMessage* msg) _UpdateNewMessagesNotification(); - if (fNotifyMode != B_MAIL_SHOW_STATUS_WINDOW_NEVER) + if (fSettingsFile.ShowStatusWindow() + != B_MAIL_SHOW_STATUS_WINDOW_NEVER) fNotification->Send(); break; } @@ -654,7 +647,7 @@ MailDaemonApplication::_InitAccount(BMailAccountSettings& settings) } if (account.inboundProtocol != NULL) { DefaultNotifier* notifier = new DefaultNotifier(settings.Name(), true, - fErrorLogWindow, fNotifyMode); + fErrorLogWindow, fSettingsFile.ShowStatusWindow()); account.inboundProtocol->SetMailNotifier(notifier); account.inboundProtocol->Run(); } @@ -666,7 +659,7 @@ MailDaemonApplication::_InitAccount(BMailAccountSettings& settings) } if (account.outboundProtocol != NULL) { DefaultNotifier* notifier = new DefaultNotifier(settings.Name(), false, - fErrorLogWindow, fNotifyMode); + fErrorLogWindow, fSettingsFile.ShowStatusWindow()); account.outboundProtocol->SetMailNotifier(notifier); account.outboundProtocol->Run(); } diff --git a/src/servers/mail/MailDaemonApplication.h b/src/servers/mail/MailDaemonApplication.h index 7960f15..92d43cd 100644 --- a/src/servers/mail/MailDaemonApplication.h +++ b/src/servers/mail/MailDaemonApplication.h @@ -111,7 +111,6 @@ private: ErrorLogWindow* fErrorLogWindow; BNotification* fNotification; - uint32 fNotifyMode; };