[M-git] Mahogany sources repository. branch master updated. v0.67-768-g6b0283a4
Vadim Zeitlin via Mahogany-cvsupdates <[email protected]> Sun, 08 Jul 2018 17:39:42 +0000
| Newsgroups | gmane.mail.mahogany.cvs |
|---|---|
| Message-ID | <[email protected]> |
--===============0023436938362190894==
Content-Type: text/plain
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 6b0283a44f53a5429078b663bec71287453726dc (commit)
via 9bde3628a0cc8053e63f1b49d2a9e11638f8379b (commit)
via 9713e1a8f4e83fbec580e494b7e4f95f71954da1 (commit)
via b3e9245ef0a468190fee14d7aee31250f6806b89 (commit)
via 2dab036b615c8512bc1fe2f865fd970ba4d2ba3f (commit)
via 3ffe567a61402a057c31a86036f7da5be56ecfb3 (commit)
via d95b85e6454c7eb3a02b994bc96f6bab6dee53c9 (commit)
via 54e985b6761badeb51aa19e3a1c628cca3e23e1a (commit)
via 27485d606c4c240e181e69021db9a36bddd3c2ad (commit)
via dea15864927f6b5aecb028f747a0e17514eb3034 (commit)
from 20d10932c1b273b65e0cfcabb2553fbda64578d5 (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 6b0283a44f53a5429078b663bec71287453726dc
Author: Vadim Zeitlin <[email protected]>
Date: Sun Jul 8 19:37:01 2018 +0200
Upgrade MSVS projects to 2017 version
No real changes, just use a newer toolset.
diff --git a/M.vcxproj b/M.vcxproj
index 4f1133ec..6eac4b31 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug DLL|Win32">
<Configuration>Debug DLL</Configuration>
@@ -38,48 +38,48 @@
<ProjectGuid>{1515C8EB-5C72-43DF-9D3A-0703F155F268}</ProjectGuid>
<RootNamespace>M</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -146,7 +146,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -179,7 +179,7 @@
<ClCompile>
<WholeProgramOptimization>true</WholeProgramOptimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -214,7 +214,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -248,7 +248,7 @@
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>Mpch.h</PrecompiledHeaderFile>
@@ -281,7 +281,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -313,7 +313,7 @@
<AdditionalOptions>/Zm110 %(AdditionalOptions)</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;WXUSINGDLL;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -347,7 +347,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -381,7 +381,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>include;$(wxwin)/include/msvc;$(wxwin)/include;lib/compface;lib/imap/src/osdep/nt;lib/imap/src/c-client;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION_AUTO;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_UNICODE;wxMSVC_VERSION=140;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
diff --git a/Mconfig.vcxproj b/Mconfig.vcxproj
index c7607f70..7c077d7b 100644
--- a/Mconfig.vcxproj
+++ b/Mconfig.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -23,28 +23,28 @@
<ProjectGuid>{86C1D2C7-C961-4017-88E8-63D0BCCBD0D5}</ProjectGuid>
<RootNamespace>config</RootNamespace>
<Keyword>MakeFileProj</Keyword>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -138,4 +138,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/compface/compface.vcxproj b/lib/compface/compface.vcxproj
index e04849b1..0bfbac14 100644
--- a/lib/compface/compface.vcxproj
+++ b/lib/compface/compface.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -20,32 +20,32 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{0E9F4403-1AA1-4824-A99F-041B1BF18D14}</ProjectGuid>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -249,4 +249,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/dspam/dspam.vcxproj b/lib/dspam/dspam.vcxproj
index 2ae9197f..2a69f4e0 100644
--- a/lib/dspam/dspam.vcxproj
+++ b/lib/dspam/dspam.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -21,32 +21,32 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{62156246-DCEA-4713-95E0-C01F595F1A20}</ProjectGuid>
<RootNamespace>dspam</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -242,4 +242,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/lib/imap/imap.vcxproj b/lib/imap/imap.vcxproj
index 491e8b7b..4ee803e0 100644
--- a/lib/imap/imap.vcxproj
+++ b/lib/imap/imap.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -21,32 +21,32 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{457cfec8-5c3f-4c7e-98a6-b65e1de22682}</ProjectGuid>
<RootNamespace>imap</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -240,4 +240,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/src/wx/vcard/versit.vcxproj b/src/wx/vcard/versit.vcxproj
index b9e41256..eadb043e 100644
--- a/src/wx/vcard/versit.vcxproj
+++ b/src/wx/vcard/versit.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -21,28 +21,28 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{E46C11C7-5924-4F7C-B82E-5BEB8856A8BC}</ProjectGuid>
<RootNamespace>versit</RootNamespace>
- <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
- <PlatformToolset>v140</PlatformToolset>
+ <PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -271,4 +271,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
commit 9bde3628a0cc8053e63f1b49d2a9e11638f8379b
Author: Vadim Zeitlin <[email protected]>
Date: Sun Jul 8 19:36:14 2018 +0200
Just some minor tweaks to the progress dialog appearance
No real changes, just reserve more space for the dialog width.
diff --git a/src/mail/MailFolderCC.cpp b/src/mail/MailFolderCC.cpp
index 44fc12c6..3e4185ef 100644
--- a/src/mail/MailFolderCC.cpp
+++ b/src/mail/MailFolderCC.cpp
@@ -676,9 +676,9 @@ public:
m_progdlg = new MProgressDialog
(
name,
- m_msgProgress + "\n\n" +
- _("Initializing...") + '\n' +
- wxString(' ', 100) + '\n',
+ m_msgProgress + "\n" +
+ _("Initializing...") + wxString(L'\u00a0', 150) +
+ '\n',
m_nTotal
);
}
@@ -695,7 +695,7 @@ public:
// construct the label
String label;
- label << m_msgProgress << "\n\n"
+ label << m_msgProgress << "\n"
<< _("From: ") << ShortenIfNecessary(entry.GetFrom()) << _T('\n')
<< _("Subject: ") << ShortenIfNecessary(entry.GetSubject());
commit 9713e1a8f4e83fbec580e494b7e4f95f71954da1
Author: Vadim Zeitlin <[email protected]>
Date: Fri Nov 10 15:58:28 2017 +0100
Improve showing multiple messages in an info bar
This is still far from ideal as all but the most important (or last, if
they are all equally important) message is basically lost, but it's
slightly better than showing all of them in quick succession, which
still didn't allow to read them and just resulted in flicker.
diff --git a/include/gui/wxMLog.h b/include/gui/wxMLog.h
index 5ac4a678..3fb065b0 100644
--- a/include/gui/wxMLog.h
+++ b/include/gui/wxMLog.h
@@ -36,12 +36,21 @@ private:
// Ctor is private, use static Activate() to actually create the object.
wxMLog() = default;
+ // This method is private and can be called only by wxMLogTargetSetter.
+ void SetInfoBarToUse(wxInfoBarBase* infobar);
+
// The unique currently used wxMLog.
static wxMLog* ms_MLog;
- // This member is private and can be manipulated only by wxMLogTargetSetter.
+ // SetInfoBarToUse() must be called to change this from outside this class.
wxInfoBarBase* m_activeInfoBar = nullptr;
+ // The last shown message using the same infobar as is currently used.
+ wxString m_lastMsg;
+
+ // The level of the last shown message, only used if m_lastMsg is not empty.
+ wxLogLevel m_lastShownLevel = wxLOG_Max;
+
friend class wxMLogTargetSetter;
wxMLog(const wxMLog&);
@@ -57,13 +66,13 @@ public:
: m_infobarOrig(wxMLog::ms_MLog ? wxMLog::ms_MLog->m_activeInfoBar : NULL)
{
if ( wxMLog::ms_MLog )
- wxMLog::ms_MLog->m_activeInfoBar = infobar;
+ wxMLog::ms_MLog->SetInfoBarToUse(infobar);
}
~wxMLogTargetSetter()
{
if ( wxMLog::ms_MLog )
- wxMLog::ms_MLog->m_activeInfoBar = m_infobarOrig;
+ wxMLog::ms_MLog->SetInfoBarToUse(m_infobarOrig);
}
private:
diff --git a/src/gui/wxMLog.cpp b/src/gui/wxMLog.cpp
index 679a36ae..4ce68fc2 100644
--- a/src/gui/wxMLog.cpp
+++ b/src/gui/wxMLog.cpp
@@ -42,32 +42,30 @@ wxMLog::Activate()
}
void
-wxMLog::DoLogRecord(wxLogLevel level,
- const wxString& msg,
- const wxLogRecordInfo& info)
+wxMLog::SetInfoBarToUse(wxInfoBarBase* infobar)
{
- if ( !m_activeInfoBar )
- {
- wxLogGui::DoLogRecord(level, msg, info);
- return;
- }
+ // Last message was shown in a different infobar, so forget about it.
+ m_lastMsg.clear();
+ m_lastShownLevel = wxLOG_Max;
- int flags = 0;
+ m_activeInfoBar = infobar;
+}
+
+static
+int GetFlagsForLogLevel(wxLogLevel level)
+{
switch ( level )
{
case wxLOG_FatalError:
case wxLOG_Error:
- flags |= wxICON_ERROR;
- break;
+ return wxICON_ERROR;
case wxLOG_Warning:
- flags |= wxICON_WARNING;
- break;
+ return wxICON_WARNING;
case wxLOG_Message:
case wxLOG_Info:
- flags |= wxICON_INFORMATION;
- break;
+ return wxICON_INFORMATION;
case wxLOG_Status:
case wxLOG_Debug:
@@ -76,9 +74,54 @@ wxMLog::DoLogRecord(wxLogLevel level,
case wxLOG_User:
case wxLOG_Max:
default:
- // These messages are not shown in the infobar at all.
- return;
+ return 0;
+ }
+}
+
+void
+wxMLog::DoLogRecord(wxLogLevel level,
+ const wxString& msg,
+ const wxLogRecordInfo& info)
+{
+ if ( !m_activeInfoBar )
+ {
+ wxLogGui::DoLogRecord(level, msg, info);
+ return;
+ }
+
+ int flags = GetFlagsForLogLevel(level);
+ if ( !flags )
+ {
+ // These messages are too low priority to be shown in the infobar.
+ return;
+ }
+
+ wxString msgToShow;
+
+ if ( m_lastMsg.empty() )
+ {
+ m_lastMsg = msg;
+ msgToShow = msg;
+ }
+ else // We already have another message shown
+ {
+ // Check if we need to override it with the more recent one: normally we
+ // do it, but avoid overriding an error with an informational message.
+ if ( level <= m_lastShownLevel )
+ {
+ m_lastMsg = msg;
+ m_lastShownLevel = level;
+ }
+ else // The new message has strictly lower severity
+ {
+ // Don't show it and don't update the last values, but do use the same
+ // flags as the last time instead of the new ones.
+ flags = GetFlagsForLogLevel(m_lastShownLevel);
+ }
+
+ msgToShow = m_lastMsg;
+ msgToShow += " (and other messages, see log)";
}
- m_activeInfoBar->ShowMessage(msg, flags);
+ m_activeInfoBar->ShowMessage(msgToShow, flags);
}
commit b3e9245ef0a468190fee14d7aee31250f6806b89
Author: Vadim Zeitlin <[email protected]>
Date: Fri Nov 10 15:36:02 2017 +0100
Use C++11 member initialization in wxMLog
There is no need to write out the ctor now that C++11 is used.
No real changes, just make the code shorter and safer.
diff --git a/include/gui/wxMLog.h b/include/gui/wxMLog.h
index 636dc324..5ac4a678 100644
--- a/include/gui/wxMLog.h
+++ b/include/gui/wxMLog.h
@@ -33,14 +33,14 @@ protected:
const wxLogRecordInfo& info);
private:
- // Ctor is private, use static Activate() to
- wxMLog();
+ // Ctor is private, use static Activate() to actually create the object.
+ wxMLog() = default;
// The unique currently used wxMLog.
static wxMLog* ms_MLog;
// This member is private and can be manipulated only by wxMLogTargetSetter.
- wxInfoBarBase* m_activeInfoBar;
+ wxInfoBarBase* m_activeInfoBar = nullptr;
friend class wxMLogTargetSetter;
diff --git a/src/gui/wxMLog.cpp b/src/gui/wxMLog.cpp
index 19774ff9..679a36ae 100644
--- a/src/gui/wxMLog.cpp
+++ b/src/gui/wxMLog.cpp
@@ -41,11 +41,6 @@ wxMLog::Activate()
delete wxLog::SetActiveTarget(ms_MLog);
}
-wxMLog::wxMLog()
-{
- m_activeInfoBar = NULL;
-}
-
void
wxMLog::DoLogRecord(wxLogLevel level,
const wxString& msg,
commit 2dab036b615c8512bc1fe2f865fd970ba4d2ba3f
Merge: 3ffe567a 54e985b6
Author: Vadim Zeitlin <[email protected]>
Date: Fri Nov 10 15:09:42 2017 +0100
Merge branch 'better-log'
Improve UI for errors logged while showing the messages by showing them
in an unobtrusive wxInfoBar instead of modal message boxes.
commit 3ffe567a61402a057c31a86036f7da5be56ecfb3
Author: Vadim Zeitlin <[email protected]>
Date: Fri Nov 10 15:07:56 2017 +0100
Improve appearance of progress dialog on folder opening
Especially under Windows, with the native wxProgressDialog
implementation, it is important to keep the messages used in the dialog
of roughly the same size as otherwise it can be automatically resized,
resulting in jarring size changes while the headers are being retrieved.
This is a purely cosmetic change.
diff --git a/src/mail/MailFolderCC.cpp b/src/mail/MailFolderCC.cpp
index 6a17a08e..44fc12c6 100644
--- a/src/mail/MailFolderCC.cpp
+++ b/src/mail/MailFolderCC.cpp
@@ -671,10 +671,14 @@ public:
m_msgProgress.Printf(_("Retrieving %lu message headers..."), m_nTotal);
+ // Make a placeholder for the message of comparable size to the messages
+ // shown below by UpdateProgress().
m_progdlg = new MProgressDialog
(
name,
- m_msgProgress + _T("\n\n"),
+ m_msgProgress + "\n\n" +
+ _("Initializing...") + '\n' +
+ wxString(' ', 100) + '\n',
m_nTotal
);
}
@@ -691,9 +695,9 @@ public:
// construct the label
String label;
- label << m_msgProgress << _T('\n')
- << _("From: ") << entry.GetFrom() << _T('\n')
- << _("Subject: ") << entry.GetSubject();
+ label << m_msgProgress << "\n\n"
+ << _("From: ") << ShortenIfNecessary(entry.GetFrom()) << _T('\n')
+ << _("Subject: ") << ShortenIfNecessary(entry.GetSubject());
if ( !m_progdlg->Update(m_nRetrieved, label) )
{
@@ -706,6 +710,26 @@ public:
}
private:
+ // A small helper to avoid showing too long strings in the progress dialog.
+ static wxString ShortenIfNecessary(const String& s)
+ {
+ wxString label(s);
+
+ // Ensure it doesn't have multiple lines.
+ label = label.BeforeFirst('\n');
+
+ // This is arbitrary, but we need to have some limit.
+ const size_t MAX_LABEL_LEN = 72;
+ if ( label.length() > MAX_LABEL_LEN )
+ {
+ label.Truncate(MAX_LABEL_LEN - 3);
+ label += "...";
+ }
+
+ return label;
+ }
+
+
// the total number of messages we are going to retrieve
size_t m_nTotal;
commit d95b85e6454c7eb3a02b994bc96f6bab6dee53c9
Author: Vadim Zeitlin <[email protected]>
Date: Fri Nov 10 15:00:53 2017 +0100
Get rid of extra junk in quote prefix for mailing list posts
Many mailing lists use "From:" header of the form "Real Poster via
Mailing List" nowadays to work around DKIM constraints. This results in
using "RPvML" as quote prefix, which doesn't make much sense, so check
for this particular case and ignore everything coming after "via".
This is just a hack, but then so is the "via Mailing List" suffix to
begin with.
diff --git a/src/classes/ComposeTemplate.cpp b/src/classes/ComposeTemplate.cpp
index d712cf90..d7acbb6f 100644
--- a/src/classes/ComposeTemplate.cpp
+++ b/src/classes/ComposeTemplate.cpp
@@ -598,7 +598,21 @@ static String GetReplyPrefix(Message *msg, Profile *profile)
wxStringTokenizer tk(name, " '-", wxTOKEN_STRTOK);
while ( tk.HasMoreTokens() )
{
- wxChar chInitial = tk.GetNextToken()[0u];
+ const wxString& token = tk.GetNextToken();
+ if ( token == "via" )
+ {
+ // Many mailing lists rewrite "From:" header to be "Original
+ // Sender via Mailing List <[email protected]>" to avoid
+ // problems with DKIM, don't include the nonsensical "vML"
+ // string into our attribution here.
+ if ( !prefix.empty() )
+ break;
+
+ // Unless we have nothing in it yet, in this case "via" might
+ // have been a false positive?
+ }
+
+ wxChar chInitial = token[0u];
if ( chInitial == '<' )
{
commit 54e985b6761badeb51aa19e3a1c628cca3e23e1a
Author: Vadim Zeitlin <[email protected]>
Date: Sun Oct 1 00:59:24 2017 +0200
Add a way to show log messages less intrusively
Create wxMLog class redirecting log messages to the currently active
wxInfoBar, if any, and set up an active wxInfoBar when showing a message in
a wxMessageView.
This shows any errors that may occur while parsing and showing the message in
this infobar without annoying the user with message boxes, which is much
better from the UI point of view.
diff --git a/M.vcxproj b/M.vcxproj
index e0bc5992..4f1133ec 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -481,6 +481,7 @@
<ClCompile Include="src\gui\wxMGuiUtils.cpp" />
<ClCompile Include="src\gui\wxMimeDialog.cpp" />
<ClCompile Include="src\gui\wxMIMETreeDialog.cpp" />
+ <ClCompile Include="src\gui\wxMLog.cpp" />
<ClCompile Include="src\gui\wxModulesDlg.cpp" />
<ClCompile Include="src\gui\wxMsgCmdProc.cpp" />
<ClCompile Include="src\gui\wxMSplash.cpp" />
@@ -1404,6 +1405,7 @@
<ClInclude Include="include\FolderType.h" />
<ClInclude Include="include\FolderView.h" />
<ClInclude Include="include\guidef.h" />
+ <ClInclude Include="include\gui\wxMLog.h" />
<ClInclude Include="include\HeaderInfo.h" />
<ClInclude Include="include\HeaderInfoImpl.h" />
<ClInclude Include="include\HeadersDialogs.h" />
diff --git a/M.vcxproj.filters b/M.vcxproj.filters
index a6914e2f..f75f942a 100644
--- a/M.vcxproj.filters
+++ b/M.vcxproj.filters
@@ -582,6 +582,9 @@
<ClCompile Include="src\wx\generic\vcarddlg.cpp">
<Filter>Source Files\vcard</Filter>
</ClCompile>
+ <ClCompile Include="src\gui\wxMLog.cpp">
+ <Filter>Source Files\gui</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="include\interface\HeaderInfo.i">
@@ -937,6 +940,9 @@
<ClInclude Include="include\mail\Header.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="include\gui\wxMLog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\M.rc">
diff --git a/include/MessageView.h b/include/MessageView.h
index d077a034..20921ab1 100644
--- a/include/MessageView.h
+++ b/include/MessageView.h
@@ -101,6 +101,10 @@ public:
*/
//@{
+ /// Get the window containing the viewer window and any other helper GUI
+ /// elements.
+ virtual wxWindow *GetContainerWindow() const = 0;
+
/// get the underlying window
wxWindow *GetWindow() const;
diff --git a/include/gui/wxMLog.h b/include/gui/wxMLog.h
new file mode 100644
index 00000000..636dc324
--- /dev/null
+++ b/include/gui/wxMLog.h
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////////
+// Project: M - cross platform e-mail GUI client
+// File name: gui/wxMLog.h
+// Purpose: wxMLog is a custom wxLog target showing the messages in a less
+// intrusive way by using the active wxInfoBar or showing them in
+// the default way if there is no active one currently
+// Author: Vadim Zeitlin
+// Created: 2017-09-30
+// Copyright: (c) 2017 Mahogany team
+// Licence: M license
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _M_MLOG_H_
+#define _M_MLOG_H_
+
+#include <wx/log.h>
+
+class wxInfoBarBase;
+
+// This class is never used directly, you need to use wxMLogTargetSetter below
+// to set the given wxInfoBar object as the target of log messages.
+class wxMLog : public wxLogGui
+{
+public:
+ // Install an object of this class as current wxLog target.
+ //
+ // Normally should be called exactly once, on program startup.
+ static void Activate();
+
+protected:
+ virtual void DoLogRecord(wxLogLevel level,
+ const wxString& msg,
+ const wxLogRecordInfo& info);
+
+private:
+ // Ctor is private, use static Activate() to
+ wxMLog();
+
+ // The unique currently used wxMLog.
+ static wxMLog* ms_MLog;
+
+ // This member is private and can be manipulated only by wxMLogTargetSetter.
+ wxInfoBarBase* m_activeInfoBar;
+
+ friend class wxMLogTargetSetter;
+
+ wxMLog(const wxMLog&);
+ wxMLog& operator=(const wxMLog&);
+};
+
+// Small RAII helper class ensuring that the active info bar is reset in its
+// dtor.
+class wxMLogTargetSetter
+{
+public:
+ explicit wxMLogTargetSetter(wxInfoBarBase* infobar)
+ : m_infobarOrig(wxMLog::ms_MLog ? wxMLog::ms_MLog->m_activeInfoBar : NULL)
+ {
+ if ( wxMLog::ms_MLog )
+ wxMLog::ms_MLog->m_activeInfoBar = infobar;
+ }
+
+ ~wxMLogTargetSetter()
+ {
+ if ( wxMLog::ms_MLog )
+ wxMLog::ms_MLog->m_activeInfoBar = m_infobarOrig;
+ }
+
+private:
+ wxInfoBarBase* const m_infobarOrig;
+
+ wxMLogTargetSetter(const wxMLogTargetSetter&);
+ wxMLogTargetSetter& operator=(const wxMLogTargetSetter&);
+};
+
+#endif // _M_MLOG_H_
diff --git a/include/gui/wxMessageView.h b/include/gui/wxMessageView.h
index ae222efa..bd6d94c8 100644
--- a/include/gui/wxMessageView.h
+++ b/include/gui/wxMessageView.h
@@ -27,6 +27,7 @@
class FolderView;
class MsgCmdProc;
+class wxInfoBar;
// ----------------------------------------------------------------------------
// wxMessageView
@@ -49,6 +50,8 @@ public:
/// Destructor
~wxMessageView();
+ virtual wxWindow *GetContainerWindow() const { return m_viewerParent; }
+
/// show message
virtual void DoShowMessage(Message *msg);
@@ -79,6 +82,14 @@ private:
/// the array containing the names of all the existing viewers
wxArrayString m_namesViewers;
+
+ /// The window containing the real viewer and various helper elements such
+ /// as the wxInfoBar below.
+ wxWindow* m_viewerParent;
+
+ /// The info bar object used for showing errors and warnings specific to
+ /// this message.
+ wxInfoBar* m_infobar;
};
// ----------------------------------------------------------------------------
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 0b3c6386..ca16b3dc 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -341,6 +341,9 @@ public:
wxFolderListCtrl *listCtrl);
virtual ~wxFolderMsgWindow();
+ // Called only once, soon after creation.
+ void SetViewerContainerWindow(wxWindow *winViewerContainer);
+
// called when the old viewer window is about to be destroyed and replaced
// with the new one
void SetViewerWindow(wxWindow *winViewerNew);
@@ -376,6 +379,9 @@ private:
// the folder view list part
wxFolderListCtrl *m_listCtrl;
+ // the window containing the viewer window (never NULL)
+ wxWindow *m_winViewerContainer;
+
// the current viewer window (may be NULL)
wxWindow *m_winViewer;
@@ -1138,10 +1144,15 @@ wxFolderMsgWindow::wxFolderMsgWindow(wxWindow *parent,
#endif // USE_VIEWER_BAR
m_folderView = folderView;
m_listCtrl = listCtrl;
- m_winViewer = NULL;
+ m_winViewerContainer = NULL;
m_evtHandlerMsgView = NULL;
}
+void wxFolderMsgWindow::SetViewerContainerWindow(wxWindow *winViewerContainer)
+{
+ m_winViewerContainer = winViewerContainer;
+}
+
// called when the old viewer window is about to be destroyed and replaced
// with the new one
void wxFolderMsgWindow::SetViewerWindow(wxWindow *winViewerNew)
@@ -1365,7 +1376,7 @@ void wxFolderMsgWindow::UpdateOptions()
void wxFolderMsgWindow::OnSize(wxSizeEvent& /* event */)
{
- if ( m_winViewer )
+ if ( m_winViewerContainer )
{
Resize();
}
@@ -1439,7 +1450,7 @@ void wxFolderMsgWindow::Resize()
y = 0;
}
- m_winViewer->SetSize(0, y, size.x, size.y - y);
+ m_winViewerContainer->SetSize(0, y, size.x, size.y - y);
}
// ----------------------------------------------------------------------------
@@ -3365,6 +3376,9 @@ wxFolderView::wxFolderView(wxWindow *parent)
m_MessagePreview = MessageView::Create(m_MessageWindow, this);
+ m_MessageWindow->
+ SetViewerContainerWindow(m_MessagePreview->GetContainerWindow());
+
m_MessageWindow->SetViewerWindow(m_MessagePreview->GetWindow());
m_msgCmdProc = MsgCmdProc::Create(m_MessagePreview, m_FolderCtrl);
diff --git a/src/gui/wxMApp.cpp b/src/gui/wxMApp.cpp
index c6c51371..097a7117 100644
--- a/src/gui/wxMApp.cpp
+++ b/src/gui/wxMApp.cpp
@@ -74,6 +74,7 @@
#include "PathFinder.h"
#include "gui/wxMDialogs.h"
+#include "gui/wxMLog.h"
#include "gui/wxMainFrame.h"
#include "FolderMonitor.h"
#include "MModule.h"
@@ -983,6 +984,10 @@ wxMApp::OnInit()
// format for it to have consistent output everywhere
wxLog::SetTimestamp("%Y-%m-%d %H:%M:%S");
+ // Replace the default logger with our own one which will try to show the
+ // messages better and less intrusively (see wxMLog class implementation).
+ wxMLog::Activate();
+
#ifdef USE_I18N
// Set up locale first, so everything is in the right language.
wxString locale = m_cmdLineOptions->lang;
diff --git a/src/gui/wxMLog.cpp b/src/gui/wxMLog.cpp
new file mode 100644
index 00000000..19774ff9
--- /dev/null
+++ b/src/gui/wxMLog.cpp
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////////
+// Project: M - cross platform e-mail GUI client
+// File name: gui/wxMLog.cpp
+// Purpose: wxMLog implementation
+// Author: Vadim Zeitlin
+// Created: 2017-09-30
+// Copyright: (c) 2017 Mahogany team
+// Licence: M license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "Mpch.h"
+
+#ifndef USE_PCH
+# include "Mcommon.h"
+#endif // !USE_PCH
+
+#include "gui/wxMLog.h"
+
+#include <wx/infobar.h>
+
+// ============================================================================
+// wxMLog implementation
+// ============================================================================
+
+wxMLog* wxMLog::ms_MLog = NULL;
+
+void
+wxMLog::Activate()
+{
+ ASSERT( !ms_MLog );
+ ms_MLog = new wxMLog;
+
+ delete wxLog::SetActiveTarget(ms_MLog);
+}
+
+wxMLog::wxMLog()
+{
+ m_activeInfoBar = NULL;
+}
+
+void
+wxMLog::DoLogRecord(wxLogLevel level,
+ const wxString& msg,
+ const wxLogRecordInfo& info)
+{
+ if ( !m_activeInfoBar )
+ {
+ wxLogGui::DoLogRecord(level, msg, info);
+ return;
+ }
+
+ int flags = 0;
+ switch ( level )
+ {
+ case wxLOG_FatalError:
+ case wxLOG_Error:
+ flags |= wxICON_ERROR;
+ break;
+
+ case wxLOG_Warning:
+ flags |= wxICON_WARNING;
+ break;
+
+ case wxLOG_Message:
+ case wxLOG_Info:
+ flags |= wxICON_INFORMATION;
+ break;
+
+ case wxLOG_Status:
+ case wxLOG_Debug:
+ case wxLOG_Trace:
+ case wxLOG_Progress:
+ case wxLOG_User:
+ case wxLOG_Max:
+ default:
+ // These messages are not shown in the infobar at all.
+ return;
+ }
+
+ m_activeInfoBar->ShowMessage(msg, flags);
+}
diff --git a/src/gui/wxMessageView.cpp b/src/gui/wxMessageView.cpp
index 6e1b40f2..d633f167 100644
--- a/src/gui/wxMessageView.cpp
+++ b/src/gui/wxMessageView.cpp
@@ -30,6 +30,8 @@
# include <wx/menu.h>
#endif //USE_PCH
+#include <wx/infobar.h>
+
#include "MessageViewer.h"
#include "MsgCmdProc.h"
#include "FolderView.h"
@@ -44,6 +46,7 @@
#include "mail/MimeDecode.h"
#include "gui/wxMessageView.h"
+#include "gui/wxMLog.h"
// ----------------------------------------------------------------------------
// options we use here
@@ -192,7 +195,17 @@ wxMessageView::wxMessageView(wxWindow *parent,
// OnViewerChange() for the initial dummy viewer
m_FolderView = NULL;
- Init(parent, profile);
+ m_viewerParent = new wxWindow(parent, wxID_ANY);
+ m_infobar = new wxInfoBar(m_viewerParent);
+
+ // Don't delay showing the error messages with unnecessary effects.
+ m_infobar->SetShowHideEffects(wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE);
+
+ wxBoxSizer* const sizer = new wxBoxSizer(wxVERTICAL);
+ sizer->Add(m_infobar, wxSizerFlags().Expand());
+ m_viewerParent->SetSizer(sizer);
+
+ Init(m_viewerParent, profile);
// now really set it
m_FolderView = folderView;
@@ -222,6 +235,11 @@ MessageView::CreateStandalone(wxWindow *parent, Profile *profile)
void
wxMessageView::DoShowMessage(Message *mailMessage)
{
+ // First, dismiss any previously shown warnings.
+ m_infobar->Dismiss();
+
+ wxMLogTargetSetter logTarget(m_infobar);
+
MessageView::DoShowMessage(mailMessage);
wxFrame *frame = GetParentFrame();
@@ -243,6 +261,8 @@ wxMessageView::OnViewerChange(const MessageViewer *viewerOld,
const MessageViewer *viewerNew,
const String& nameViewer)
{
+ m_infobar->Dismiss();
+
if ( m_FolderView )
{
m_FolderView->OnMsgViewerChange(viewerNew ? viewerNew->GetWindow()
@@ -251,6 +271,8 @@ wxMessageView::OnViewerChange(const MessageViewer *viewerOld,
if ( viewerOld )
{
+ // Deleting the window will also remove it from the viewer parent sizer,
+ // no need to do anything else.
delete viewerOld->GetWindow();
}
@@ -268,15 +290,21 @@ wxMessageView::OnViewerChange(const MessageViewer *viewerOld,
CHECK_RET( mbar, _T("no menu bar in the frame containing wxMessageView?") );
mbar->Check(WXMENU_VIEW_VIEWERS_BEGIN + 1 + n, true);
+ }
- // finally we must ensure that the new viewer is positioned/sized
- // correctly: folder view does it itself in OnMsgViewerChange() but for
- // standalone message view frame we have to do it ourselves
- if ( !m_FolderView )
- {
- frame->SendSizeEvent();
- }
+ // finally we must ensure that the new viewer is positioned/sized correctly:
+ if ( viewerNew )
+ {
+ m_viewerParent->GetSizer()->Add(viewerNew->GetWindow(),
+ wxSizerFlags(1).Expand());
}
+
+ m_viewerParent->Layout();
+
+ // We may not return to the event loop immediately, as we could be opening a
+ // new folder, which takes time, so update the viewer window here explicitly
+ // to avoid not laid out yet window showing on the screen, which is ugly.
+ m_viewerParent->Update();
}
MessageViewer *
commit 27485d606c4c240e181e69021db9a36bddd3c2ad
Author: Vadim Zeitlin <[email protected]>
Date: Sat Sep 30 23:29:40 2017 +0200
Remove the never used logging macros
These macros were defined together with ERRORMESSAGE and others, but were
never actually used, so just drop them entirely.
diff --git a/include/Mcommon.h b/include/Mcommon.h
index 7a347732..7c1809b2 100644
--- a/include/Mcommon.h
+++ b/include/Mcommon.h
@@ -83,19 +83,12 @@ extern void CloseSplash();
# define M_LOG_URGENT wxLOG_Error
# define ERRORMESSAGE(arg) CloseSplash(); wxLogError arg
-# define SYSERRMESSAGE(arg) CloseSplash(); wxLogSysError arg
-# define FATALERROR(arg) CloseSplash(); wxLogFatalError arg
-# define INFOMESSAGE(arg) CloseSplash(); wxLogInfo arg
# define LOGMESSAGE(arg) wxLogGeneric arg
# define STATUSMESSAGE(arg) wxLogStatus arg
# ifdef DEBUG
# define DBGMESSAGE(arg) wxLogDebug arg
-# define TRACEMESSAGE(arg) wxLogTrace arg
-# define INTERNALERROR(arg) wxLogFatalError arg // aborts
# else
# define DBGMESSAGE(arg)
-# define TRACEMESSAGE(arg)
-# define INTERNALERROR(arg) wxLogError arg // just log the error
# endif
#if defined(OS_UNIX) || defined(__CYGWIN__)
commit dea15864927f6b5aecb028f747a0e17514eb3034
Author: Vadim Zeitlin <[email protected]>
Date: Sat Sep 30 23:25:13 2017 +0200
Really use ISO date time format in message log
The comment said that we already did, but we actually used locale date and
time representation.
diff --git a/src/gui/wxMApp.cpp b/src/gui/wxMApp.cpp
index d0b8d75f..c6c51371 100644
--- a/src/gui/wxMApp.cpp
+++ b/src/gui/wxMApp.cpp
@@ -981,7 +981,7 @@ wxMApp::OnInit()
// by default only time stamp is used by wxLog, we want to have the time
// with date as the program may run for several days and we also use ISO
// format for it to have consistent output everywhere
- wxLog::SetTimestamp("%c");
+ wxLog::SetTimestamp("%Y-%m-%d %H:%M:%S");
#ifdef USE_I18N
// Set up locale first, so everything is in the right language.
-----------------------------------------------------------------------
Summary of changes:
M.vcxproj | 38 ++++++------
M.vcxproj.filters | 6 ++
Mconfig.vcxproj | 14 ++---
include/Mcommon.h | 7 ---
include/MessageView.h | 4 ++
include/gui/wxMLog.h | 85 +++++++++++++++++++++++++++
include/gui/wxMessageView.h | 11 ++++
lib/compface/compface.vcxproj | 14 ++---
lib/dspam/dspam.vcxproj | 14 ++---
lib/imap/imap.vcxproj | 14 ++---
src/classes/ComposeTemplate.cpp | 16 ++++-
src/gui/wxFolderView.cpp | 20 ++++++-
src/gui/wxMApp.cpp | 7 ++-
src/gui/wxMLog.cpp | 127 ++++++++++++++++++++++++++++++++++++++++
src/gui/wxMessageView.cpp | 44 +++++++++++---
src/mail/MailFolderCC.cpp | 32 ++++++++--
src/wx/vcard/versit.vcxproj | 14 ++---
17 files changed, 390 insertions(+), 77 deletions(-)
create mode 100644 include/gui/wxMLog.h
create mode 100644 src/gui/wxMLog.cpp
hooks/post-receive
--
Mahogany sources repository.
--===============0023436938362190894==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============0023436938362190894==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates
--===============0023436938362190894==--