Fix minor error

pull/11943/head
Don Ho 2 years ago
parent f85a9c45e9
commit 13350a3d29

@ -602,7 +602,7 @@ bool Notepad_plus::doSave(BufferID id, const TCHAR * filename, bool isCopy)
// it returns an error value that indicates the cause of the failure.
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%29.aspx
if (shellExecRes < 32)
if (shellExecRes <= 32)
{
_nativeLangSpeaker.messageBox("OpenInAdminModeFailed",
_pPublicInterface->getHSelf(),
@ -646,7 +646,7 @@ bool Notepad_plus::doSave(BufferID id, const TCHAR * filename, bool isCopy)
// it returns an error value that indicates the cause of the failure.
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb762153%28v=vs.85%29.aspx
if (shellExecRes < 32)
if (shellExecRes <= 32)
{
_nativeLangSpeaker.messageBox("OpenInAdminModeFailed",
_pPublicInterface->getHSelf(),

@ -1,142 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="NppShell" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="win32">
<Option output="..\bin\NppShell" prefix_auto="1" extension_auto="1" />
<Option object_output="obj\" />
<Option type="3" />
<Option compiler="gcc" />
<Compiler>
<Add option="-fexpensive-optimizations" />
<Add option="-Os" />
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
<Target title="win32_D">
<Option output="..\bin\NppShell_D" prefix_auto="1" extension_auto="1" />
<Option object_output="obj_D\" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="..\bin\Notepad++\notepad++.exe" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-g" />
</Compiler>
<ExtraCommands>
<Add after='cmd /c copy &quot;$(TARGET_OUTPUT_FILE)&quot; &quot;..\bin\\Notepad++&quot;' />
</ExtraCommands>
</Target>
<Target title="win64">
<Option output="..\bin\NppShell64" prefix_auto="1" extension_auto="1" />
<Option object_output="obj_x64\" />
<Option type="3" />
<Option compiler="gnu_gcc_compiler_x64" />
<Compiler>
<Add option="-fexpensive-optimizations" />
<Add option="-Os" />
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
<Target title="win64_D">
<Option output="..\bin\NppShell64_D" prefix_auto="1" extension_auto="1" />
<Option object_output="obj_x64_D\" />
<Option type="3" />
<Option compiler="gnu_gcc_compiler_x64" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="win32_A">
<Option output="..\bin\NppShellA" prefix_auto="1" extension_auto="1" />
<Option object_output="obj_A\" />
<Option type="3" />
<Option compiler="gcc" />
<Option projectCompilerOptionsRelation="1" />
<Compiler>
<Add option="-fexpensive-optimizations" />
<Add option="-Os" />
<Add option="-O3" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-D_WIN32_WINNT=0x600" />
<Add option="-DWIN32_LEAN_AND_MEAN" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
<Target title="win32_AD">
<Option output="..\bin\NppShellA_D" prefix_auto="1" extension_auto="1" />
<Option object_output="obj_AD\" />
<Option type="3" />
<Option compiler="gcc" />
<Option projectCompilerOptionsRelation="1" />
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-D_WIN32_WINNT=0x600" />
<Add option="-DWIN32_LEAN_AND_MEAN" />
</Compiler>
</Target>
</Build>
<Compiler>
<Add option="-Wshadow" />
<Add option="-Winit-self" />
<Add option="-Wredundant-decls" />
<Add option="-Wcast-align" />
<Add option="-Wundef" />
<Add option="-Wfloat-equal" />
<Add option="-Winline" />
<Add option="-Wunreachable-code" />
<Add option="-Wmissing-declarations" />
<Add option="-Wmissing-include-dirs" />
<Add option="-Wswitch-enum" />
<Add option="-Wswitch-default" />
<Add option="-Weffc++" />
<Add option="-pedantic" />
<Add option="-Wextra" />
<Add option="-Wall" />
<Add option="-fno-exceptions" />
<Add option="-fno-rtti" />
<Add option="-D_WIN32_WINNT=0x600" />
<Add option="-DWIN32_LEAN_AND_MEAN" />
<Add option="-DUNICODE" />
<Add option="-D_UNICODE" />
</Compiler>
<Linker>
<Add option="--output-def ../src/export.def" />
<Add option="--enable-stdcall-fixup" />
<Add option="-static" />
<Add library="gdi32" />
<Add library="shlwapi" />
<Add library="ole32" />
<Add library="uuid" />
<Add library="msimg32" />
</Linker>
<Unit filename="..\src\Bitmap.cpp" />
<Unit filename="..\src\Bitmap.h" />
<Unit filename="..\src\NppShell.cpp" />
<Unit filename="..\src\NppShell.h" />
<Unit filename="..\src\NppShell.rc">
<Option compilerVar="WINDRES" />
</Unit>
<Unit filename="..\src\export.def" />
<Unit filename="..\src\resource.h" />
<Extensions>
<code_completion />
<debugger />
<envvars />
</Extensions>
</Project>
</CodeBlocks_project_file>

@ -30,40 +30,40 @@
<ProjectGuid>{509B95C6-043E-4389-8351-77BDB042A6F9}</ProjectGuid>
<RootNamespace>NppShell</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

Loading…
Cancel
Save