[M-git] Mahogany sources repository. branch master updated. v0.67-811-ga89d73c3

Vadim Zeitlin via Mahogany-cvsupdates <[email protected]> Mon, 07 Dec 2020 02:26:29 +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  a89d73c33234732c0ddba4c4644ff981e6c95fef (commit)
       via  5214239b00d8ec5a591f3a06175394ea0efd2cd8 (commit)
       via  34d06bf0e7d6b081a727e6abf3704c45945b49e8 (commit)
       via  bf0ee0fa3afa6a07f25e152f6d43850459f380e6 (commit)
      from  3dfac8814400d46cc8ed7ade7ad4656a06c103d2 (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 a89d73c33234732c0ddba4c4644ff981e6c95fef
Author: Vadim Zeitlin <[email protected]>
Date:   Mon Dec 7 03:25:39 2020 +0100

    Simplify opening URLs in the simple case
    
    Just use wxLaunchDefaultBrowser() instead of calling ShellExecute()
    directly, this is simpler and doesn't require any platform checks.

diff --git a/src/gui/ClickURL.cpp b/src/gui/ClickURL.cpp
index f477e9c9..93c470d1 100644
--- a/src/gui/ClickURL.cpp
+++ b/src/gui/ClickURL.cpp
@@ -446,10 +446,7 @@ void ClickableURL::OpenInBrowser(int options) const
       }
       else // easy case: open in the same window
       {
-#if !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__WINE__) // FIXME ShellExecute() is defined in <w32api/shellapi.h>, how to include it?
-         bOk = (int)ShellExecute(NULL, _T("open"), m_url,
-                                 NULL, NULL, SW_SHOWNORMAL ) > 32;
-#endif
+         bOk = wxLaunchDefaultBrowser(m_url, wxBROWSER_NOBUSYCURSOR);
       }
 #else  // Unix
       // propose to choose program for opening URLs

commit 5214239b00d8ec5a591f3a06175394ea0efd2cd8
Author: Vadim Zeitlin <[email protected]>
Date:   Mon Dec 7 03:21:07 2020 +0100

    Make wxHTML VFS file names simpler and more unique
    
    Using "this" pointer to ensure uniqueness doesn't really work as it's
    perfectly possible to create another HtmlViewer using the same memory
    location as a previously existing one, so just use a monotone counter
    instead: this is both simpler and more reliable.
    
    And it also doesn't trigger any warnings about pointer truncation in 64
    bit MSW builds.

diff --git a/src/modules/HtmlViewer.cpp b/src/modules/HtmlViewer.cpp
index dc5a8996..f06a619a 100644
--- a/src/modules/HtmlViewer.cpp
+++ b/src/modules/HtmlViewer.cpp
@@ -870,10 +870,10 @@ int HtmlViewer::CalculateFontSize(const wxFont& font)
 
 wxString HtmlViewer::GetVirtualFileName(size_t n) const
 {
-   // the image file names must be globally unique, so concatenate the address
-   // of this object together with counter to obtain a really unique name
-   return wxString::Format(_T("Mhtml%08lx%lu.png"),
-                           (unsigned long)this, (unsigned long)n);
+   // the image file names must be globally unique, so use a counter to ensure
+   // we never reuse it
+   static unsigned long s_htmlImage = 0;
+   return wxString::Format(_T("Mhtml%08lx%zd.png"), ++s_htmlImage, n);
 }
 
 wxString HtmlViewer::CreateImageInMemoryFS(const wxImage& image)

commit 34d06bf0e7d6b081a727e6abf3704c45945b49e8
Author: Vadim Zeitlin <[email protected]>
Date:   Mon Dec 7 03:19:19 2020 +0100

    Remove hard-coded Python paths from the project file
    
    Python headers path must be specified via python.vsprops.

diff --git a/M.vcxproj b/M.vcxproj
index bf45de23..07070ead 100644
--- a/M.vcxproj
+++ b/M.vcxproj
@@ -280,7 +280,7 @@
     <ClCompile>

       <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;w:\dev\lang\python\2.7.3\Include;w:\dev\lang\python\2.7.3\PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

+      <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_ABI_COMPAT;wxNO_AUI_LIB;wxNO_GL_LIB;wxNO_MEDIA_LIB;wxNO_RIBBON_LIB;wxNO_RICHTEXT_LIB;wxNO_XRC_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>

       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>

       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>


commit bf0ee0fa3afa6a07f25e152f6d43850459f380e6
Author: Vadim Zeitlin <[email protected]>
Date:   Mon Dec 7 00:23:12 2020 +0100

    Remove obsolete MSVS 2008 project file
    
    This is not used any more since a very long time.

diff --git a/Mconfig.vcproj b/Mconfig.vcproj
deleted file mode 100644
index 0022eed4..00000000
--- a/Mconfig.vcproj
+++ /dev/null
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>

-<VisualStudioProject

-	ProjectType="Visual C++"

-	Version="9.00"

-	Name="config"

-	ProjectGUID="{86C1D2C7-C961-4017-88E8-63D0BCCBD0D5}"

-	RootNamespace="config"

-	Keyword="MakeFileProj"

-	TargetFrameworkVersion="131072"

-	>

-	<Platforms>

-		<Platform

-			Name="Win32"

-		/>

-		<Platform

-			Name="x64"

-		/>

-	</Platforms>

-	<ToolFiles>

-	</ToolFiles>

-	<Configurations>

-		<Configuration

-			Name="Debug|Win32"

-			OutputDirectory=".\Debug"

-			IntermediateDirectory=".\Debug"

-			ConfigurationType="10"

-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"

-			UseOfMFC="0"

-			ATLMinimizesCRunTimeLibraryUsage="false"

-			>

-			<Tool

-				Name="VCPreBuildEventTool"

-			/>

-			<Tool

-				Name="VCCustomBuildTool"

-			/>

-			<Tool

-				Name="VCMIDLTool"

-				TypeLibraryName=".\Debug/Mconfig.tlb"

-				HeaderFileName=""

-			/>

-			<Tool

-				Name="VCPostBuildEventTool"

-			/>

-		</Configuration>

-		<Configuration

-			Name="Release|Win32"

-			OutputDirectory=".\Release"

-			IntermediateDirectory=".\Release"

-			ConfigurationType="10"

-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"

-			UseOfMFC="0"

-			ATLMinimizesCRunTimeLibraryUsage="false"

-			>

-			<Tool

-				Name="VCPreBuildEventTool"

-			/>

-			<Tool

-				Name="VCCustomBuildTool"

-			/>

-			<Tool

-				Name="VCMIDLTool"

-				TypeLibraryName=".\Release/Mconfig.tlb"

-				HeaderFileName=""

-			/>

-			<Tool

-				Name="VCPostBuildEventTool"

-			/>

-		</Configuration>

-		<Configuration

-			Name="Debug|x64"

-			OutputDirectory="$(PlatformName)\$(ConfigurationName)"

-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"

-			ConfigurationType="10"

-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"

-			UseOfMFC="0"

-			ATLMinimizesCRunTimeLibraryUsage="false"

-			>

-			<Tool

-				Name="VCPreBuildEventTool"

-			/>

-			<Tool

-				Name="VCCustomBuildTool"

-			/>

-			<Tool

-				Name="VCMIDLTool"

-				TargetEnvironment="3"

-				TypeLibraryName=".\Debug/Mconfig.tlb"

-				HeaderFileName=""

-			/>

-			<Tool

-				Name="VCPostBuildEventTool"

-			/>

-		</Configuration>

-		<Configuration

-			Name="Release|x64"

-			OutputDirectory="$(PlatformName)\$(ConfigurationName)"

-			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"

-			ConfigurationType="10"

-			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"

-			UseOfMFC="0"

-			ATLMinimizesCRunTimeLibraryUsage="false"

-			>

-			<Tool

-				Name="VCPreBuildEventTool"

-			/>

-			<Tool

-				Name="VCCustomBuildTool"

-			/>

-			<Tool

-				Name="VCMIDLTool"

-				TargetEnvironment="3"

-				TypeLibraryName=".\Release/Mconfig.tlb"

-				HeaderFileName=""

-			/>

-			<Tool

-				Name="VCPostBuildEventTool"

-			/>

-		</Configuration>

-	</Configurations>

-	<References>

-	</References>

-	<Files>

-		<File

-			RelativePath="include\config_nt.h"

-			>

-			<FileConfiguration

-				Name="Debug|Win32"

-				>

-				<Tool

-					Name="VCCustomBuildTool"

-					Description="Copying $(InputPath) to config.h..."

-					CommandLine="copy &quot;$(InputPath)&quot; &quot;$(InputDir)&quot;config.h&#x0D;&#x0A;"

-					Outputs="$(InputDir)config.h"

-				/>

-			</FileConfiguration>

-			<FileConfiguration

-				Name="Release|Win32"

-				>

-				<Tool

-					Name="VCCustomBuildTool"

-					Description="Copying $(InputPath) to config.h..."

-					CommandLine="copy &quot;$(InputPath)&quot; &quot;$(InputDir)&quot;config.h&#x0D;&#x0A;"

-					Outputs="$(InputDir)config.h"

-				/>

-			</FileConfiguration>

-			<FileConfiguration

-				Name="Debug|x64"

-				>

-				<Tool

-					Name="VCCustomBuildTool"

-					Description="Copying $(InputPath) to config.h..."

-					CommandLine="copy &quot;$(InputPath)&quot; &quot;$(InputDir)&quot;config.h&#x0D;&#x0A;"

-					Outputs="$(InputDir)config.h"

-				/>

-			</FileConfiguration>

-			<FileConfiguration

-				Name="Release|x64"

-				>

-				<Tool

-					Name="VCCustomBuildTool"

-					Description="Copying $(InputPath) to config.h..."

-					CommandLine="copy &quot;$(InputPath)&quot; &quot;$(InputDir)&quot;config.h&#x0D;&#x0A;"

-					Outputs="$(InputDir)config.h"

-				/>

-			</FileConfiguration>

-		</File>

-	</Files>

-	<Globals>

-	</Globals>

-</VisualStudioProject>


-----------------------------------------------------------------------

Summary of changes:
 M.vcxproj                  |   2 +-
 Mconfig.vcproj             | 171 ---------------------------------------------
 src/gui/ClickURL.cpp       |   5 +-
 src/modules/HtmlViewer.cpp |   8 +--
 4 files changed, 6 insertions(+), 180 deletions(-)
 delete mode 100644 Mconfig.vcproj


hooks/post-receive
-- 
Mahogany sources repository.