Skip to content

Commit

Permalink
Switch to config file and remove save to Registry code
Browse files Browse the repository at this point in the history
Change program to run to a combo box
Allow manual overwrite in config file to appear in combobox
Add version URL link to Settings dialogue
Update BMP and remove LR_LOADMAP3DCOLORS to get toolbar shading
update About text, menu item names, Alt shortcuts
better version tracking in resources, update About / Settings layout
VS project updates for VS2019
  • Loading branch information
VinsWorldcom committed Oct 26, 2021
2 parents 8b6cc38 + 3d5df68 commit 76b4f89
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 82 deletions.
14 changes: 9 additions & 5 deletions NppConsole.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@
<ProjectGuid>{AAEC59E5-048D-4081-A243-6BCE0859D520}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>NppConsole</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -93,6 +93,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
</ItemDefinitionGroup>
Expand All @@ -108,6 +109,7 @@
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
</ItemDefinitionGroup>
Expand All @@ -127,6 +129,7 @@
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
</ItemDefinitionGroup>
Expand All @@ -146,6 +149,7 @@
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
</Link>
</ItemDefinitionGroup>
Expand Down
13 changes: 12 additions & 1 deletion NppConsole/include/resources.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

// resources.hxx

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)

/* VERSION DEFINITIONS */
#define VER_MAJOR 1
#define VER_MINOR 2
#define VER_RELEASE 5
#define VER_BUILD 1
#define VER_STRING STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_RELEASE) "." STR(VER_BUILD)

#define IDI_APPICON 101
#define IDD_DIALOG_ABOUT 102
#define IDB_TLB_IMG 103

#define IDC_EDIT_ABOUT 1001
#define IDC_EDIT_CMD 1002
#define IDC_EDIT_LINE 1003
#define IDC_BUTTON_APPLY 1004
#define IDC_RADIO_IGN 1005
#define IDC_RADIO_RESTR 1006
#define IDC_RADIO_PROCESS 1007
#define IDC_CBO_COMMAND 1008
#define IDC_STC_VER 1009

#define IDC_STATIC -1
Binary file modified NppConsole/resources/NppConsole.bmp
Binary file not shown.
38 changes: 20 additions & 18 deletions NppConsole/resources/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//

1 VERSIONINFO
FILEVERSION 1,2,4,1
PRODUCTVERSION 1,2,4,1
FILEVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD
PRODUCTVERSION VER_MAJOR,VER_MINOR,VER_RELEASE,VER_BUILD
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -46,12 +46,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Free software"
VALUE "FileDescription", "Notepad++ console plugin."
VALUE "FileVersion", "1.2.4.1"
VALUE "FileVersion", VER_STRING
VALUE "InternalName", "NppConsole"
VALUE "LegalCopyright", "(C)2012 Mykhajlo Pobojnyj"
VALUE "OriginalFilename", "NppConsole.dll"
VALUE "ProductName", "Notepad++ console plugin."
VALUE "ProductVersion", "1.2.4.1"
VALUE "ProductVersion", VER_STRING
END
END
BLOCK "VarFileInfo"
Expand All @@ -71,22 +71,24 @@ IDI_APPICON ICON "NppConsole.ico"
// About Dialog
//

IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 313, 175
STYLE DS_SYSMODAL | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | DS_CENTERMOUSE | WS_CAPTION | WS_SYSMENU
CAPTION "About NppConsole"
IDD_DIALOG_ABOUT DIALOG DISCARDABLE 0, 0, 315, 170
STYLE DS_FIXEDSYS | DS_SETFOREGROUND | DS_CENTER | DS_CENTERMOUSE | WS_CAPTION | WS_SYSMENU
CAPTION "NppConsole Settings"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",IDOK,205,156,50,14
EDITTEXT IDC_EDIT_ABOUT,6,4,302,78,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_EDIT_CMD,136,87,172,12,ES_AUTOHSCROLL
EDITTEXT IDC_EDIT_LINE,136,101,172,12,ES_AUTOHSCROLL
LTEXT "Commad to run: ",IDC_STATIC,8,91,54,8
LTEXT "Line number pattern after file name: ",IDC_STATIC,8,105,117,8
PUSHBUTTON "Apply",IDC_BUTTON_APPLY,258,156,50,14
GROUPBOX "Ctrl+C handling",IDC_STATIC,6,120,302,34
CONTROL "Ignore",IDC_RADIO_IGN,"Button",BS_AUTORADIOBUTTON | WS_GROUP,16,134,39,10
CONTROL "Restart console",IDC_RADIO_RESTR,"Button",BS_AUTORADIOBUTTON,85,134,69,10
CONTROL "Process normally",IDC_RADIO_PROCESS,"Button",BS_AUTORADIOBUTTON,184,134,79,10
DEFPUSHBUTTON "OK",IDOK,205,150,50,14
CONTROL "",IDC_EDIT_ABOUT,"Edit",WS_CHILDWINDOW|WS_VISIBLE|ES_READONLY|ES_AUTOHSCROLL|ES_MULTILINE,6,4,302,67,WS_EX_CLIENTEDGE
LTEXT "Commad to run: ",IDC_STATIC,8,79,54,8
CONTROL "",IDC_CBO_COMMAND,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,75,77,233,12
LTEXT "Line number pattern after file name: ",IDC_STATIC,8,95,117,8
EDITTEXT IDC_EDIT_LINE,136,93,172,12,ES_AUTOHSCROLL
GROUPBOX "Ctrl+C handling",IDC_STATIC,6,112,302,34
CONTROL "Ignore",IDC_RADIO_IGN,"Button",BS_AUTORADIOBUTTON | WS_GROUP,16,126,39,10
CONTROL "Restart console",IDC_RADIO_RESTR,"Button",BS_AUTORADIOBUTTON,85,126,69,10
CONTROL "Process normally",IDC_RADIO_PROCESS,"Button",BS_AUTORADIOBUTTON,184,126,79,10
PUSHBUTTON "Apply",IDC_BUTTON_APPLY,258,150,50,14
CONTROL "Version",IDC_STATIC,"Static",WS_VISIBLE|WS_DISABLED|WS_GROUP,8,150,30,11
CONTROL "<a></a>",IDC_STC_VER,"SysLink",WS_VISIBLE|WS_TABSTOP|LWS_TRANSPARENT,40,150,60,11
END


Expand Down
Loading

0 comments on commit 76b4f89

Please sign in to comment.