[M-git] Mahogany sources repository. branch master updated. v0.67-646-g6712f8a
"Vadim Zeitlin" <[email protected]> Sat, 21 Jul 2012 15:55:12 +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 6712f8a8e1725f5ae33a0ac47ac2c760d82c1614 (commit)
via 400a6c6769168e313d552489048a745835bd3691 (commit)
via 7b3a04867d5ab0195bdefe4513161afb2b8d0908 (commit)
via a6b165271948b69d311e0ecad3ddcfbf4bb17287 (commit)
via 18ead94521592072a5192559888b3917f9428629 (commit)
via 80d5dd16d9eb15515c7bc9811bb1d01b898e51c4 (commit)
via 220136631171dc75f9c0dc9e6f37464a3046daa3 (commit)
via f75d43e8f93d7f72f895b95a11bc860b734be997 (commit)
via 9f36dd1ae66d70ca0c7bcd087c8112c616634d54 (commit)
via 84d60de9d3775d03bf764c2b8739c7e647803b77 (commit)
via a769fc671ed6007c5b9209a09fc81ccf05bc7a6d (commit)
via 73a53a8748c534407ab466dc8e53519210f789d9 (commit)
via 6c6fc93e2a2dc8f96c6fe6b1e98c8d30e245f69b (commit)
via a4d22ceb7f31fa0da647579b8fd079fdcc0e58ab (commit)
via 9b13020df2394ddcda421cee4480a59498fd42f8 (commit)
from 668d4de46b2e612f7c4c300247ffb8d10e1a32e0 (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 6712f8a8e1725f5ae33a0ac47ac2c760d82c1614
Author: Vadim Zeitlin <[email protected]>
Date: Sat Jul 21 15:57:52 2012 +0200
Expose MP_MBOXDIR in the options dialog.
This option is useful as it allows to put all local mailboxes into a
non-default directory, do allow editing it.
diff --git a/CHANGES b/CHANGES
index 8013d3e..cf8cf05 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,7 @@
Release 0.68 'Cynthia' September xx, 2010
-----------------------------------------
+2012-07-21 VZ: Make it possible to set base mailbox path in the GUI.
2011-12-26 VZ: Allow to create and configure new folders in "Quick filter".
2010-08-01 VZ: Show hidden folders if new mail arrives into them.
2010-07-05 VZ: Send messages from a separate background thread.
diff --git a/src/gui/wxOptionsDlg.cpp b/src/gui/wxOptionsDlg.cpp
index fa4c828..a1c939b 100644
--- a/src/gui/wxOptionsDlg.cpp
+++ b/src/gui/wxOptionsDlg.cpp
@@ -338,6 +338,8 @@ enum ConfigFields
ConfigField_TrashName,
ConfigField_DraftsName,
ConfigField_DraftsAutoDelete,
+ ConfigField_MboxPathHelp,
+ ConfigField_MboxPath,
ConfigField_FoldersFileFormat,
ConfigField_CreateInternalMessage,
ConfigField_StatusFormatHelp,
@@ -1473,6 +1475,11 @@ const wxOptionsPage::FieldInfo wxOptionsPageStandard::ms_aFields[] =
{ gettext_noop("&Trash folder name"), Field_Folder, ConfigField_UseTrash},
{ gettext_noop("&Drafts folder name"), Field_Folder, -1 },
{ gettext_noop("Delete drafts &automatically"), Field_Bool, -1 },
+ { gettext_noop("\n"
+ "Directory used by default for local file folders.\n"
+ "This can be either an absolute path or a one relative to\n"
+ "the user data directory."), Field_Message | Field_AppWide, -1 },
+ { gettext_noop("Base mailboxes path"), Field_Dir | Field_AppWide, -1 },
{ gettext_noop("Default format for mailbox files"
":Unix mbx mailbox:Unix mailbox:MMDF (SCO Unix):Tenex (Unix MM format)"),
Field_Combo | Field_AppWide | Field_Advanced, -1},
@@ -2156,6 +2163,8 @@ const ConfigValueDefault wxOptionsPageStandard::ms_aConfigDefaults[] =
CONFIG_ENTRY(MP_TRASH_FOLDER),
CONFIG_ENTRY(MP_DRAFTS_FOLDER),
CONFIG_ENTRY(MP_DRAFTS_AUTODELETE),
+ CONFIG_NONE(),
+ CONFIG_ENTRY(MP_MBOXDIR),
CONFIG_ENTRY(MP_FOLDER_FILE_DRIVER),
CONFIG_ENTRY(MP_CREATE_INTERNAL_MESSAGE),
CONFIG_NONE(),
commit 400a6c6769168e313d552489048a745835bd3691
Author: Vadim Zeitlin <[email protected]>
Date: Sat Jul 21 15:56:48 2012 +0200
Allow MP_MBOXDIR to be a relative path.
Interpret the value of this option relatively to user directory in this case.
diff --git a/src/util/strutil.cpp b/src/util/strutil.cpp
index d249be2..8994c2e 100644
--- a/src/util/strutil.cpp
+++ b/src/util/strutil.cpp
@@ -1079,8 +1079,8 @@ strutil_expandfoldername(const String &name, MFolderType folderType)
if ( folderType == MF_FILE )
{
String mboxpath = READ_APPCONFIG(MP_MBOXDIR);
- if ( mboxpath.empty() )
- mboxpath = mApplication->GetLocalDir();
+ if ( mboxpath.empty() || !strutil_isabsolutepath(mboxpath) )
+ mboxpath = mApplication->GetLocalDir() + DIR_SEPARATOR + mboxpath;
if ( !mboxpath.empty() )
mboxpath += DIR_SEPARATOR;
commit 7b3a04867d5ab0195bdefe4513161afb2b8d0908
Author: Vadim Zeitlin <[email protected]>
Date: Sat Jul 21 15:55:10 2012 +0200
Simplify local directory setting code.
Do use GetUserDataDir(), just not under Unix where we use ~/.M for
compatibility.
diff --git a/src/classes/MApplication.cpp b/src/classes/MApplication.cpp
index 5aa0ca5..7d5df15 100644
--- a/src/classes/MApplication.cpp
+++ b/src/classes/MApplication.cpp
@@ -989,18 +989,13 @@ MAppBase::InitDirectories()
// if still not given, try to find a good default one ourselves
if ( m_localDir.empty() )
{
- // for historical reasons, we use Mahogany for the base directory name
- // under Windows but M under Unix, hence we can't use GetUserDataDir()
- // which would use the same one under both systems
- m_localDir = wxStandardPaths::Get().GetUserConfigDir();
-
-#ifdef OS_WIN
- m_localDir += "\\Mahogany";
-#elif defined(OS_UNIX)
- m_localDir += "/.M";
-#else
- #error "Don't know where to put per-user Mahogany files on this system"
-#endif // OS_WIN
+ // For historical reasons, we use ~/.M as base directory under Unix, so
+ // don't use GetUserDataDir() there as this would return ~/.Mahogany.
+#if defined(OS_UNIX) && !defined(OS_MAC)
+ m_localDir << wxGetHomeDir() << "/.M";
+#else // Windows or OS X
+ m_localDir = wxStandardPaths::Get().GetUserDataDir();
+#endif
// save it for the next runs
m_profile->writeEntry(MP_USERDIR, m_localDir);
commit a6b165271948b69d311e0ecad3ddcfbf4bb17287
Author: Vadim Zeitlin <[email protected]>
Date: Sat Jul 21 14:40:36 2012 +0200
Don't use view filters when viewing big messages.
This is a simple workaround for #937 to avoid waiting for ages until a big
message is displayed.
diff --git a/include/MessageView.h b/include/MessageView.h
index 55ffb16..3b4f8be 100644
--- a/include/MessageView.h
+++ b/include/MessageView.h
@@ -767,13 +767,26 @@ private:
*/
//@{
+ /// Kind of the check to make.
+ enum SizeCheck
+ {
+ /// Just verify the size, don't ask the user.
+ Check_NonInteractive,
+
+ /// Ask the user if part size exceeds the threshold.
+ Check_Part,
+
+ /// Ask the user if the full message size exceeds the threshold.
+ Check_Message
+ };
+
/// ask user if it's ok to download this message/part if size > limit
- bool CheckMessageOrPartSize(unsigned long size, bool part) const;
+ bool CheckMessageOrPartSize(unsigned long size, SizeCheck check) const;
- /// call CheckMessageOrPartSize(true) for IMAP
+ /// call CheckMessageOrPartSize(Check_Part) for IMAP
bool CheckMessagePartSize(const MimePart *part) const;
- /// call CheckMessageOrPartSize(false) for POP/NNTP
+ /// call CheckMessageOrPartSize(Check_Message) for POP/NNTP
bool CheckMessageSize(const Message *message) const;
//@}
@@ -907,6 +920,14 @@ private:
/// linked list of the filters
class ViewFilterNode *m_filters;
+ /**
+ The null filter terminating m_filters linked list.
+
+ Notice that it's deleted when m_filters is, there is no need to delete
+ it explicitly.
+ */
+ class TransparentFilter* m_nullFilter;
+
//@}
diff --git a/src/classes/MessageView.cpp b/src/classes/MessageView.cpp
index 3d094b9..c81286a 100644
--- a/src/classes/MessageView.cpp
+++ b/src/classes/MessageView.cpp
@@ -635,6 +635,7 @@ MessageView::Init()
m_viewer =
m_viewerOld = NULL;
m_filters = NULL;
+ m_nullFilter = NULL;
m_virtualMimeParts = NULL;
m_cidsInMemory = NULL;
@@ -842,9 +843,10 @@ MessageView::InitializeViewFilters()
CHECK_RET( !m_filters, "InitializeViewFilters() called twice?" );
// always insert the terminating, "do nothing", filter at the end
+ m_nullFilter = new TransparentFilter(this);
m_filters = new ViewFilterNode
(
- new TransparentFilter(this),
+ m_nullFilter,
ViewFilter::Priority_Lowest,
wxEmptyString,
wxEmptyString,
@@ -2034,7 +2036,16 @@ void MessageView::ShowText(String textPart, wxFontEncoding textEnc)
InitializeViewFilters();
}
- ViewFilter *filter = m_filters->GetFilter();
+ // This is a hack to avoid a problem with some filters (notably the
+ // quoting/URL detection one) taking worse than O(N) time to execute making
+ // them impractical to use for large messages. So we don't use any filters
+ // at all for such "large" messages. A better solution is discussed in #937
+ // but would need significantly more effort.
+ ViewFilter* const
+ filter = CheckMessageOrPartSize(textPart.length(), Check_NonInteractive)
+ ? m_filters->GetFilter()
+ : m_nullFilter;
+
CHECK_RET( filter, "no view filters at all??" );
filter->StartText();
@@ -3891,7 +3902,7 @@ MessageView::ShowMessage(UIdType uid)
}
bool
-MessageView::CheckMessageOrPartSize(unsigned long size, bool part) const
+MessageView::CheckMessageOrPartSize(unsigned long size, SizeCheck check) const
{
unsigned long maxSize = (unsigned long)READ_CONFIG(GetProfile(),
MP_MAX_MESSAGE_SIZE);
@@ -3903,14 +3914,21 @@ MessageView::CheckMessageOrPartSize(unsigned long size, bool part) const
// it's ok, don't ask
return true;
}
- //else: big message, ask
+ else // big message
+ {
+ if ( check == Check_NonInteractive )
+ return false;
+ }
wxString msg;
msg.Printf(_("The selected %s is %lu KiB long which is "
"more than the current threshold of %lu KiB for inline display.\n"
"\n"
"Do you still want to download it and show it inline?"),
- part ? _("message part") : _("message"), size, maxSize);
+ check == Check_Part
+ ? _("message part")
+ : _("message"),
+ size, maxSize);
return MDialog_YesNoDialog(msg, GetParentFrame());
}
@@ -3921,7 +3939,7 @@ MessageView::CheckMessagePartSize(const MimePart *mimepart) const
// only check for IMAP here: for POP/NNTP we had already checked it in
// CheckMessageSize() below and the local folders are fast
return (m_asyncFolder->GetType() != MF_IMAP) ||
- CheckMessageOrPartSize(mimepart->GetSize(), true);
+ CheckMessageOrPartSize(mimepart->GetSize(), Check_Part);
}
bool
@@ -3936,7 +3954,7 @@ MessageView::CheckMessageSize(const Message *message) const
// 100 bytes (and then, second time, before downloading 2b!)
MFolderType folderType = m_asyncFolder->GetType();
return (folderType != MF_POP && folderType != MF_NNTP) ||
- CheckMessageOrPartSize(message->GetSize(), false);
+ CheckMessageOrPartSize(message->GetSize(), Check_Message);
}
void
commit 18ead94521592072a5192559888b3917f9428629
Author: Vadim Zeitlin <[email protected]>
Date: Sat Jul 21 14:39:40 2012 +0200
Disable the use of GPG agent to avoid duplicate passphrase prompts.
When GPG agent was in use, both it and Mahogany prompted for the passphrase
which was confusing and annoying. Disable the use of the agent with the
corresponding GPG command line option to prevent this from happening.
diff --git a/src/modules/crypt/PGPEngine.cpp b/src/modules/crypt/PGPEngine.cpp
index b6c1027..0aa1f54 100644
--- a/src/modules/crypt/PGPEngine.cpp
+++ b/src/modules/crypt/PGPEngine.cpp
@@ -229,12 +229,19 @@ PGPEngine::ExecCommand(const String& options,
{
if ( !pgp.empty() )
{
+ // As we ask for the passphrase ourselves, disable the use of the
+ // agent to avoid duplicate prompts. Alternative solution would be to
+ // check if GPG_AGENT_INFO environment variable is set and not prompt
+ // for the passphrase from Mahogany in this case, but it wouldn't work
+ // if there were "no-use-agent" in gpg.conf while this solution always
+ // works as the command line option overrides the config file one.
const String
command = wxString::Format
(
- _T("%s --status-fd=2 --command-fd 0 --output - -a %s"),
- pgp.c_str(),
- options.c_str()
+ "%s --status-fd=2 --command-fd 0 "
+ "--output - -a --no-use-agent %s",
+ pgp,
+ options
);
if ( log )
commit 80d5dd16d9eb15515c7bc9811bb1d01b898e51c4
Author: Vadim Zeitlin <[email protected]>
Date: Sat Jul 21 00:09:51 2012 +0200
Use mahogany background for the splash screen/about dialog.
This makes slightly more sense than the old background.
diff --git a/res/Msplash.png b/res/Msplash.png
index 008650c..f24f219 100644
Binary files a/res/Msplash.png and b/res/Msplash.png differ
diff --git a/src/icons/Msplash.xcf b/src/icons/Msplash.xcf
index e703539..bd6de4d 100644
Binary files a/src/icons/Msplash.xcf and b/src/icons/Msplash.xcf differ
commit 220136631171dc75f9c0dc9e6f37464a3046daa3
Author: Vadim Zeitlin <[email protected]>
Date: Fri Jul 20 23:57:19 2012 +0200
Fix display of contributors names in the about dialog under Unix.
The names were not shown at all because they were not properly UTF-8-encoded.
Do encode them in UTF-8 and use wxString::FromUTF8() explicitly to ensure
that this works under Windows too.
diff --git a/src/gui/wxMSplash.cpp b/src/gui/wxMSplash.cpp
index 7074093..a092801 100644
--- a/src/gui/wxMSplash.cpp
+++ b/src/gui/wxMSplash.cpp
@@ -268,8 +268,11 @@ AboutWindow::AboutWindow(wxFrame *parent, wxBitmap bmp, bool bCloseOnTimeout)
<< "<p>"
"<h4>" << _("List of contributors:") << "</h4>"
"<p>"
- "Karsten Ball\374der, Vadim Zeitlin, Greg Noel,<br>"
- "Nerijus Bali\373nas, Xavier Nodet, Vaclav Slavik,<br>"
+ "Vadim Zeitlin, " <<
+ wxString::FromUTF8("Karsten Ball\xc3\xbc""der") << ", "
+ "Greg Noel,<br>" <<
+ wxString::FromUTF8("Nerijus Bali\xc3\xbbnas") << ", "
+ "Xavier Nodet, Vaclav Slavik,<br>"
"Daniel Seifert, Michele Ravani, Michael A Chase,<br>"
"Robert Vazan " << _("and many others") << "<br>"
"<br>"
commit f75d43e8f93d7f72f895b95a11bc860b734be997
Author: Vadim Zeitlin <[email protected]>
Date: Fri Jul 20 14:54:52 2012 +0200
Don't copy filter rule into a temporary std::string unnecessarily.
Just use the provided char* pointer directly. This is not only more efficient
as it avoids an unnecessary copy but also makes it less tempting to use string
operations on an UTF-8-encoded string which wouldn't work very well.
diff --git a/src/modules/Filters.cpp b/src/modules/Filters.cpp
index fc6a991..6dc92cb 100644
--- a/src/modules/Filters.cpp
+++ b/src/modules/Filters.cpp
@@ -221,7 +221,7 @@ protected:
~FilterRuleImpl();
public:
- const SyntaxNode * Parse(const std::string &);
+ const SyntaxNode * Parse(const char* filterrule);
const SyntaxNode * ParseProgram(void);
const SyntaxNode * ParseFilters(void);
const SyntaxNode * ParseIfElse(void);
@@ -298,24 +298,22 @@ public:
protected:
char Char(void) const
{
- return m_Position == m_Input.length()
- ? '\0'
- : m_Input[m_Position];
+ return m_Input[m_Position];
}
void EatWhiteSpace(void)
{ while(isspace(Char())) m_Position++; }
char CharInc(void)
{ return m_Input[m_Position++]; }
std::string CharLeft(void)
- { return std::string(m_Input, 0, m_Position); }
- std::string CharMid(void)
{ return std::string(m_Input, m_Position); }
+ std::string CharMid(void)
+ { return std::string(m_Input + m_Position); }
private:
MModule_Filters *m_FilterModule;
MInterface *m_MInterface;
- std::string m_Input;
+ const char* m_Input; // UTF-8 encoded filter program text.
Token token; // current token
size_t m_Position; // seek offset of current token
size_t m_Peek; // seek offset of next token
@@ -1269,14 +1267,24 @@ static void PreProcessInput(std::string *input)
}
const SyntaxNode *
-FilterRuleImpl::Parse(const std::string &input)
+FilterRuleImpl::Parse(const char* filterrule)
{
MOcheck();
/* Here we handle the one special occasion of input being @filename
in which case we replace input with the contents of that file.
*/
- m_Input = input;
- PreProcessInput(&m_Input);
+ std::string expanded;
+ if ( *filterrule == '@' )
+ {
+ expanded = filterrule;
+ PreProcessInput(&expanded);
+ m_Input = expanded.c_str();
+ }
+ else // Normal case, no need to make a copy of the rule.
+ {
+ m_Input = filterrule;
+ }
+
Rewind();
#ifndef TEST
return ParseProgram();
commit 9f36dd1ae66d70ca0c7bcd087c8112c616634d54
Author: Vadim Zeitlin <[email protected]>
Date: Thu Jul 19 20:24:40 2012 +0200
Update the year on the splash screen.
s/2010/2012/
diff --git a/res/Msplash.png b/res/Msplash.png
index 23b2cf4..008650c 100644
Binary files a/res/Msplash.png and b/res/Msplash.png differ
diff --git a/src/icons/Msplash.xcf b/src/icons/Msplash.xcf
index ee22d1b..e703539 100644
Binary files a/src/icons/Msplash.xcf and b/src/icons/Msplash.xcf differ
commit 84d60de9d3775d03bf764c2b8739c7e647803b77
Author: Vadim Zeitlin <[email protected]>
Date: Thu Jul 19 20:10:16 2012 +0200
Allow using wild cards in "own addresses" option.
Use wxString::Matches() instead of Address::Compare() to support use of things
such as "user+*@domain" as an own address catching all local parts starting
with "user+".
diff --git a/src/mail/HeaderInfoImpl.cpp b/src/mail/HeaderInfoImpl.cpp
index 72193cf..184ee97 100644
--- a/src/mail/HeaderInfoImpl.cpp
+++ b/src/mail/HeaderInfoImpl.cpp
@@ -406,26 +406,37 @@ HeaderInfo::GetFromOrTo(const HeaderInfo *hi,
if ( replaceFromWithTo )
{
size_t nAdrCount = ownAddresses.GetCount();
- for ( size_t nAdr = 0; nAdr < nAdrCount; nAdr++ )
+ if ( nAdrCount )
{
- if ( Address::Compare(*value, ownAddresses[nAdr]) )
+ AddressList_obj addrList(*value);
+ const Address* const addr = addrList->GetFirst();
+ if ( addr )
{
- // sender is the user himself, do the replacement
- *value = hi->GetTo();
-
- if ( value->empty() )
+ const String email = addr->GetEMail();
+ for ( size_t nAdr = 0; nAdr < nAdrCount; nAdr++ )
{
- // hmm, must be a newsgroup message
- String ng = hi->GetNewsgroups();
- if ( !ng.empty() )
+ // Allow the use of wildcards, e.g. to support own addresses of
+ // the form "localpart+*@domain".
+ if ( email.Matches(ownAddresses[nAdr]) )
{
- *value = ng;
- return Newsgroup;
+ // sender is the user himself, do the replacement
+ *value = hi->GetTo();
+
+ if ( value->empty() )
+ {
+ // hmm, must be a newsgroup message
+ String ng = hi->GetNewsgroups();
+ if ( !ng.empty() )
+ {
+ *value = ng;
+ return Newsgroup;
+ }
+ //else: weird, both to and newsgroup are empty??
+ }
+
+ return To;
}
- //else: weird, both to and newsgroup are empty??
}
-
- return To;
}
}
}
commit a769fc671ed6007c5b9209a09fc81ccf05bc7a6d
Author: Vadim Zeitlin <[email protected]>
Date: Thu Jul 19 19:52:23 2012 +0200
Fix multiple g++ 4.7 warnings about set but unused variables.
Remove the code setting variables that are never used to fix g++
"-Wunused-but-set-variable" warnings.
diff --git a/src/classes/MFolder.cpp b/src/classes/MFolder.cpp
index 1fe9d26..af3ae08 100644
--- a/src/classes/MFolder.cpp
+++ b/src/classes/MFolder.cpp
@@ -1197,7 +1197,6 @@ bool MFolderFromProfile::Move(MFolder *newParent)
wxLogError(_("Could not copy profile."));
return false;
}
- bool rc = true;
if ( GetFolderType(GetType()) == MF_IMAP )
{
@@ -1263,8 +1262,8 @@ bool MFolderFromProfile::Move(MFolder *newParent)
struct MailFolderStatus status;
MfStatusCache* cache = MfStatusCache::Get();
- rc = cache->GetStatus(m_folderName, &status);
- cache->UpdateStatus(newFullName, status);
+ if ( cache->GetStatus(m_folderName, &status) )
+ cache->UpdateStatus(newFullName, status);
return true;
}
diff --git a/src/classes/MessageView.cpp b/src/classes/MessageView.cpp
index c7d9ad0..3d094b9 100644
--- a/src/classes/MessageView.cpp
+++ b/src/classes/MessageView.cpp
@@ -1580,13 +1580,6 @@ MessageView::ShowSelectedHeaders(const wxArrayString& headersUser_,
}
}
- // the index of the envelop headers if we have to show it, -1 otherwise
- int envelopIndices[EnvelopHeader_Max];
- for ( n = 0; n < EnvelopHeader_Max; n++ )
- {
- envelopIndices[n] = wxNOT_FOUND;
- }
-
// a boolean array (in spite of its name) telling us, for each header we
// show, whether it's present in the envelop or not
wxArrayInt headerIsEnv;
diff --git a/src/gui/wxSortDialog.cpp b/src/gui/wxSortDialog.cpp
index 13777a0..25da73e 100644
--- a/src/gui/wxSortDialog.cpp
+++ b/src/gui/wxSortDialog.cpp
@@ -265,15 +265,12 @@ bool wxMessageSortingDialog::TransferDataToWindow()
bool wxMessageSortingDialog::TransferDataFromWindow()
{
- bool uses_scoring = false;
int selection;
long sortOrder = 0;
for( int n = NUM_SORTLEVELS-1; n >= 0; n--)
{
sortOrder <<= 4;
selection = 2*m_Choices[n]->GetSelection();
- if( selection == MSO_SCORE )
- uses_scoring = true;
if ( m_Checkboxes[n]->GetValue() )
{
diff --git a/src/gui/wxllist.cpp b/src/gui/wxllist.cpp
index a83f309..0e1be45 100644
--- a/src/gui/wxllist.cpp
+++ b/src/gui/wxllist.cpp
@@ -1144,7 +1144,7 @@ wxLayoutLine::Draw(wxDC &dc,
CoordType xpos = 0; // cursorpos, lenght of line
- CoordType from, to, tempto;
+ CoordType from, to;
int highlight = llist->IsSelected(this, &from, &to);
// WXLO_DEBUG(("highlight=%d", highlight ));
@@ -1154,7 +1154,6 @@ wxLayoutLine::Draw(wxDC &dc,
if (highlight == -1) // partially highlight line
{
// parts of the line need highlighting
- tempto = xpos+(**i).GetLength();
(**i).Draw(dc, pos, llist, from-xpos, to-xpos);
}
else
diff --git a/src/util/matchurl.cpp b/src/util/matchurl.cpp
index 72b48dd..49a72ab 100644
--- a/src/util/matchurl.cpp
+++ b/src/util/matchurl.cpp
@@ -323,7 +323,6 @@ KeywordDetectorCell::computeBackArc(KeywordDetectorCell* root,
ASSERT_MSG(parentBack == 0 || parentBack->_c == '\000',
_T("logic error in KeywordDetectorCell?"));
- KeywordDetectorCell* back = 0;
KeywordDetectorCell* current = 0;
int backLevel = 0;
if (! parentBack)
@@ -345,7 +344,6 @@ KeywordDetectorCell::computeBackArc(KeywordDetectorCell* root,
{
if (current->_c == _c)
{
- back = current;
break;
}
commit 73a53a8748c534407ab466dc8e53519210f789d9
Author: Vadim Zeitlin <[email protected]>
Date: Thu Jul 19 19:51:15 2012 +0200
Avoid warnings about int-to-pointer conversions in 64 bit build.
Work around g++ 4.7 "-Wint-to-pointer-cast" warnings in 64 bit build in
mail_parameters() calls by using wxUIntToPtr() instead of just a cast.
diff --git a/src/mail/MailFolderCC.cpp b/src/mail/MailFolderCC.cpp
index 650a844..5a62062 100644
--- a/src/mail/MailFolderCC.cpp
+++ b/src/mail/MailFolderCC.cpp
@@ -2441,12 +2441,12 @@ bool MailFolderCC::Resume()
void
MailFolderCC::ApplyTimeoutValues(void)
{
- (void) mail_parameters(NIL, SET_OPENTIMEOUT, (void *) m_TcpOpenTimeout);
- (void) mail_parameters(NIL, SET_READTIMEOUT, (void *) m_TcpReadTimeout);
- (void) mail_parameters(NIL, SET_WRITETIMEOUT, (void *) m_TcpWriteTimeout);
- (void) mail_parameters(NIL, SET_CLOSETIMEOUT, (void *) m_TcpCloseTimeout);
- (void) mail_parameters(NIL, SET_RSHTIMEOUT, (void *) m_TcpRshTimeout);
- (void) mail_parameters(NIL, SET_SSHTIMEOUT, (void *) m_TcpSshTimeout);
+ (void) mail_parameters(NIL, SET_OPENTIMEOUT, wxUIntToPtr(m_TcpOpenTimeout));
+ (void) mail_parameters(NIL, SET_READTIMEOUT, wxUIntToPtr(m_TcpReadTimeout));
+ (void) mail_parameters(NIL, SET_WRITETIMEOUT, wxUIntToPtr(m_TcpWriteTimeout));
+ (void) mail_parameters(NIL, SET_CLOSETIMEOUT, wxUIntToPtr(m_TcpCloseTimeout));
+ (void) mail_parameters(NIL, SET_RSHTIMEOUT, wxUIntToPtr(m_TcpRshTimeout));
+ (void) mail_parameters(NIL, SET_SSHTIMEOUT, wxUIntToPtr(m_TcpSshTimeout));
// only set the paths if we do use rsh/ssh
if ( m_TcpRshTimeout )
@@ -4282,7 +4282,7 @@ MsgnoType MailFolderCC::GetHeaderInfo(ArrayHeaderInfo& headers,
lookAhead = m_LookAhead;
}
- mail_parameters(m_MailStream, SET_LOOKAHEAD, (void *) lookAhead);
+ mail_parameters(m_MailStream, SET_LOOKAHEAD, wxUIntToPtr(lookAhead));
// do fill the listing
size_t n;
commit 6c6fc93e2a2dc8f96c6fe6b1e98c8d30e245f69b
Author: Vadim Zeitlin <[email protected]>
Date: Thu Jul 19 19:49:59 2012 +0200
Avoid warning about converting false to NULL.
Don't use false when we need a NULL pointer. g++ 4.7 gives a
"-Wconversion-null" warning for this and it's, of course, generally wrong.
diff --git a/include/mail/Driver.h b/include/mail/Driver.h
index 54419bb..c874d52 100644
--- a/include/mail/Driver.h
+++ b/include/mail/Driver.h
@@ -144,7 +144,7 @@ public:
MailFolder::OpenMode mode,
wxFrame *frame)
{ return Initialize() ? (*m_open)(folder, login,
- password, mode, frame) : false; }
+ password, mode, frame) : NULL; }
/// updates the status of a folder
bool CheckFolder(const MFolder *folder)
commit a4d22ceb7f31fa0da647579b8fd079fdcc0e58ab
Author: Vadim Zeitlin <[email protected]>
Date: Thu Jul 19 19:48:22 2012 +0200
Avoid g++ 4.7 warnings about implicit unsigned to int conversions.
g++ 4.7 gives -Wnarrowing warnings when a constant unsigned value is converted
to negative integer in initialization. Avoid them by making the flags field
unsigned, especially as it makes more sense anyhow.
diff --git a/include/gui/wxOptionsPage.h b/include/gui/wxOptionsPage.h
index 6385752..068e12e 100644
--- a/include/gui/wxOptionsPage.h
+++ b/include/gui/wxOptionsPage.h
@@ -126,7 +126,7 @@ public:
struct FieldInfo
{
const char *label; // which is shown in the dialog
- int flags; // contains the type and the flags (see above)
+ unsigned flags; // contains the type and the flags (see above)
int enable; // enable this field depending on the value of
// the "enable" one if != -1 (using negative ids
// != -1 negates the condition, i.e. this field is
commit 9b13020df2394ddcda421cee4480a59498fd42f8
Author: Vadim Zeitlin <[email protected]>
Date: Thu Jul 19 19:38:24 2012 +0200
Copy URLs to both primary and clipboard selections under Unix.
Different browsers use different selections when pasting URLs, to copy the
selected URL to both selections in the corresponding context menu item.
diff --git a/src/gui/ClickURL.cpp b/src/gui/ClickURL.cpp
index ebc9ca8..8cb9e6b 100644
--- a/src/gui/ClickURL.cpp
+++ b/src/gui/ClickURL.cpp
@@ -262,13 +262,16 @@ UrlPopup::OnCommandEvent(wxCommandEvent &event)
}
else
{
-#ifdef DEBUG_nerijus
- wxTheClipboard->UsePrimarySelection();
- wxTheClipboard->SetData(new wxTextDataObject(m_clickableURL->GetUrl()));
-#endif
- wxURLDataObject *dobj = new wxURLDataObject;
- dobj->SetURL(m_clickableURL->GetUrl());
- wxTheClipboard->SetData(dobj);
+ const wxString url = m_clickableURL->GetUrl();
+
+ wxTheClipboard->SetData(new wxURLDataObject(url));
+
+#ifdef __UNIX__
+ // Different browsers (Firefox and Chromium) use different
+ // selections for pasting URLs, so just copy it to both.
+ wxTheClipboard->UsePrimarySelection(true);
+ wxTheClipboard->SetData(new wxURLDataObject(url));
+#endif // __UNIX__
}
}
break;
-----------------------------------------------------------------------
Summary of changes:
CHANGES | 1 +
include/MessageView.h | 27 ++++++++++++++++++++++++---
include/gui/wxOptionsPage.h | 2 +-
include/mail/Driver.h | 2 +-
res/Msplash.png | Bin 83591 -> 309456 bytes
src/classes/MApplication.cpp | 19 +++++++------------
src/classes/MFolder.cpp | 5 ++---
src/classes/MessageView.cpp | 39 +++++++++++++++++++++++++--------------
src/gui/ClickURL.cpp | 17 ++++++++++-------
src/gui/wxMSplash.cpp | 7 +++++--
src/gui/wxOptionsDlg.cpp | 9 +++++++++
src/gui/wxSortDialog.cpp | 3 ---
src/gui/wxllist.cpp | 3 +--
src/icons/Msplash.xcf | Bin 266709 -> 779204 bytes
src/mail/HeaderInfoImpl.cpp | 39 +++++++++++++++++++++++++--------------
src/mail/MailFolderCC.cpp | 14 +++++++-------
src/modules/Filters.cpp | 28 ++++++++++++++++++----------
src/modules/crypt/PGPEngine.cpp | 13 ++++++++++---
src/util/matchurl.cpp | 2 --
src/util/strutil.cpp | 4 ++--
20 files changed, 148 insertions(+), 86 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/