[M-git] Mahogany sources repository. branch master updated. v0.67-630-g0f647bd
"Vadim Zeitlin" <[email protected]> Tue, 8 May 2012 21:37:31 +0000
| Newsgroups | gmane.mail.mahogany.cvs |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".
The branch, master has been updated
via 0f647bd33786cc5b54fc6836d5db8e74ec7d7d1c (commit)
via b6aa0ef090e1bf75b4a5e1e10b9dac6fb70bb53f (commit)
from 03e5b814005d4195967904335736f95412a74100 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0f647bd33786cc5b54fc6836d5db8e74ec7d7d1c
Author: Vadim Zeitlin <[email protected]>
Date: Tue May 8 23:36:13 2012 +0200
Correct the initial size of the "Quick Filter" dialog.
The size set in wxQuickFilterDialog was ignored as the base class set its own
default size, inappropriate for this dialog, before.
Add a flag for wxProfileSettingsEditDialog::CreateAllControls() preventing it
from setting the size to avoid this.
diff --git a/include/gui/wxDialogLayout.h b/include/gui/wxDialogLayout.h
index d69647b..c376757 100644
--- a/include/gui/wxDialogLayout.h
+++ b/include/gui/wxDialogLayout.h
@@ -219,6 +219,7 @@ protected:
{
ProfileEdit_WithoutApply = 0,
ProfileEdit_WithApply = 1,
+ ProfileEdit_NoDefSize = 2
};
void CreateAllControls(int flags = ProfileEdit_WithApply);
diff --git a/src/gui/wxDialogLayout.cpp b/src/gui/wxDialogLayout.cpp
index fe626cc..522042f 100644
--- a/src/gui/wxDialogLayout.cpp
+++ b/src/gui/wxDialogLayout.cpp
@@ -1421,7 +1421,10 @@ void wxProfileSettingsEditDialog::CreateAllControls(int flags)
}
// set dialog size (FIXME these are more or less arbitrary numbers)
- SetDefaultSize(6*wBtn, 27*hBtn, TRUE /* set as min size too */);
+ if ( !(flags & ProfileEdit_NoDefSize) )
+ {
+ SetDefaultSize(6*wBtn, 27*hBtn, TRUE /* set as min size too */);
+ }
}
// -----------------------------------------------------------------------------
diff --git a/src/gui/wxFiltersDialog.cpp b/src/gui/wxFiltersDialog.cpp
index 6eabc20..5fd9c1c 100644
--- a/src/gui/wxFiltersDialog.cpp
+++ b/src/gui/wxFiltersDialog.cpp
@@ -2481,8 +2481,10 @@ wxQuickFilterDialog::wxQuickFilterDialog(MFolder *folder,
// the dialog
m_action = NULL;
- CreateAllControls(ProfileEdit_WithoutApply);
+ CreateAllControls(ProfileEdit_WithoutApply | ProfileEdit_NoDefSize);
+ // Set the size ourselves, we want this dialog to be wider but less tall
+ // than the default profile settings dialog.
SetDefaultSize(8*wBtn, 16*hBtn);
DoUpdateUI();
commit b6aa0ef090e1bf75b4a5e1e10b9dac6fb70bb53f
Author: Vadim Zeitlin <[email protected]>
Date: Tue May 8 23:29:24 2012 +0200
Correct saving of default sender address in "Quick Filter" dialog.
We need to split the address in personal name and email parts, putting the
entire string in MP_FROM_ADDRESS results in wrong sender address being used
when actually sending the messages (which might be a bug in its own right but
right now MP_FROM_ADDRESS is really only supposed to contain an email address
and not the full address string).
diff --git a/src/gui/wxFiltersDialog.cpp b/src/gui/wxFiltersDialog.cpp
index 067f78a..6eabc20 100644
--- a/src/gui/wxFiltersDialog.cpp
+++ b/src/gui/wxFiltersDialog.cpp
@@ -36,6 +36,7 @@
# include <wx/statbox.h>
#endif // USE_PCH
+#include "Address.h"
#include "MFilter.h"
#include "MFolder.h"
#include "MailFolder.h"
@@ -57,6 +58,7 @@ class WXDLLIMPEXP_FWD_CORE wxWindow;
extern const MOption MP_COMPOSE_TO;
extern const MOption MP_FROM_ADDRESS;
+extern const MOption MP_PERSONALNAME;
// ----------------------------------------------------------------------------
// persistent msgboxes we use here
@@ -2754,7 +2756,26 @@ bool wxQuickFilterDialog::TransferDataFromWindow()
if ( !recipient.empty() )
profileTargetFolder->writeEntry(MP_COMPOSE_TO, recipient);
if ( !sender.empty() )
- profileTargetFolder->writeEntry(MP_FROM_ADDRESS, sender);
+ {
+ AddressList_obj addrList(sender);
+ Address* const addr = addrList->GetFirst();
+ if ( !addr )
+ {
+ wxLogError(_("Please correct the invalid sender address."));
+ return false;
+ }
+
+ if ( addrList->HasNext(addr) )
+ {
+ wxLogWarning(_("Only a single sender address can be specified "
+ "here, \"%s\" will be used and the rest of "
+ "the sender string will be ignored."),
+ addr->GetAddress().c_str());
+ }
+
+ profileTargetFolder->writeEntry(MP_FROM_ADDRESS, addr->GetEMail());
+ profileTargetFolder->writeEntry(MP_PERSONALNAME, addr->GetName());
+ }
}
}
-----------------------------------------------------------------------
Summary of changes:
include/gui/wxDialogLayout.h | 1 +
src/gui/wxDialogLayout.cpp | 5 ++++-
src/gui/wxFiltersDialog.cpp | 27 +++++++++++++++++++++++++--
3 files changed, 30 insertions(+), 3 deletions(-)
hooks/post-receive
--
Mahogany sources repository.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/