Skip to content

Commit

Permalink
Merge branch 'tf/LH-13v4/nppcr-relabel-components' into next
Browse files Browse the repository at this point in the history
* tf/LH-13v4/nppcr-relabel-components:
  branding: make  about dialog and Help menu CR specific
  resource.h: revert n++ version to keep upstream value
  Notepad_plus.cpp: make window title show Notepad++ CR
  SciLexer.dll: relabel and automate fileversion info

[#13 state:candidate]

Signed-off-by: Thell Fowler <git@tbfowler.name>
  • Loading branch information
Thell Fowler committed Dec 6, 2009
2 parents 29fdbd2 + 81c3ba4 commit 3620099
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 76 deletions.
2 changes: 1 addition & 1 deletion PowerEditor/src/Notepad_plus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5378,7 +5378,7 @@ void Notepad_plus::setTitle()
result += buf->getFullPathName();
}
result += TEXT(" - ");
result += _className;
result += TEXT("Notepad++ CR");
//::SetWindowText(_hSelf, title);
::SendMessage(_hSelf, WM_SETTEXT, 0, (LPARAM)result.c_str());

Expand Down
51 changes: 24 additions & 27 deletions PowerEditor/src/Notepad_plus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -570,39 +570,36 @@ BEGIN
MENUITEM "&Run...", IDM_EXECUTE
END

POPUP "&?"
BEGIN
MENUITEM "Help content", IDM_HELP
MENUITEM SEPARATOR
MENUITEM "Notepad++ Home", IDM_HOMESWEETHOME
MENUITEM "Notepad++ Project Page", IDM_PROJECTPAGE
MENUITEM "NpWiki++ (Online Help)", IDM_ONLINEHELP
//MENUITEM "Wiki FAQ", IDM_WIKIFAQ
MENUITEM "Forum", IDM_FORUM
MENUITEM "Get More Plugins", IDM_PLUGINSHOME
MENUITEM SEPARATOR
MENUITEM "Update Notepad++", IDM_UPDATE_NPP
MENUITEM "About Notepad++", IDM_ABOUT
END
POPUP "&Help"
BEGIN
MENUITEM "Help content", IDM_HELP
MENUITEM SEPARATOR
MENUITEM "NpWiki++ (Online Help)", IDM_ONLINEHELP
MENUITEM "Notepad++ Forum", IDM_FORUM
MENUITEM "Get More Plugins", IDM_PLUGINSHOME
MENUITEM SEPARATOR
MENUITEM "About Notepad++ CR", IDM_ABOUT
END

MENUITEM "X", IDM_FILE_CLOSE, HELP
END

IDD_ABOUTBOX DIALOGEX 0, 0, 271, 240
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_BORDER | WS_SYSMENU
IDD_ABOUTBOX DIALOGEX 0, 0, 220, 120
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About"
FONT 8, TEXT("MS Shell Dlg"), 0, 0, 0x1
BEGIN
LTEXT NOTEPAD_PLUS_VERSION, IDC_STATIC,50,16,100,11
LTEXT UNICODE_ANSI_MODE, IDC_STATIC,135,16,65,11
GROUPBOX "GNU General Public Licence",IDC_STATIC,19,75,231,131,BS_CENTER
DEFPUSHBUTTON "Ok",IDOK,106,215,50,14,BS_FLAT,WS_EX_STATICEDGE
LTEXT "Author :",IDC_STATIC,21,41,31,8
LTEXT "Notepad++ team",IDC_AUTHOR_NAME,78,41,70,8
LTEXT "Home Page :",IDC_STATIC,21,54,47,8
LTEXT "http://notepad-plus.sourceforge.net/",IDC_HOME_ADDR,78,54,126,8
EDITTEXT IDC_LICENCE_EDIT,31,99,209,96,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
EDITTEXT IDC_BUILD_DATETIME,150,2,150,10, ES_READONLY | NOT WS_BORDER
CONTROL "",IDI_M30ICON,"Static",SS_OWNERDRAW,21,10,32,32
CONTROL "",IDI_M30ICON,"Static",SS_OWNERDRAW,21,8,32,32
LTEXT "Notepad++ Community Release",IDC_STATIC,50,4,110,8
LTEXT GEN_VER_VERSION_STRING, IDC_STATIC,50,14,100,8
EDITTEXT IDC_BUILD_DATETIME,49,24,101,8, ES_READONLY | NOT WS_BORDER
LTEXT "Community:",IDC_STATIC,21,40,55,8
LTEXT "Notepad++ CR Members",IDC_AUTHOR_NAME,78,40,80,8
LTEXT "Project Page:",IDC_STATIC,21,52,55,8
LTEXT "http://github.com/npp-community",IDC_HOME_ADDR,78,52,126,8
LTEXT "IRC:",IDC_STATIC,21,64,55,8
LTEXT "irc://irc.freenode.net/#notepad++",IDC_IRC_ADDR,78,64,126,8
DEFPUSHBUTTON "Close",IDOK,160,86,50,14,WS_EX_STATICEDGE
END

IDD_GOLINE DIALOGEX 26, 41, 261, 88
Expand Down
44 changes: 16 additions & 28 deletions PowerEditor/src/WinControls/AboutDlg/AboutDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,12 @@

#include "URLCtrl.h"

#define LICENCE_TXT \
TEXT("This program is free software; you can redistribute it and/or \
modify it under the terms of the GNU General Public License \
as published by the Free Software Foundation; either \
version 2 of the License, or (at your option) any later version.\r\n\
\r\n\
This program is distributed in the hope that it will be useful, \
but WITHOUT ANY WARRANTY; without even the implied warranty of \
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \
GNU General Public License for more details. \r\n\
\r\n\
You should have received a copy of the GNU General Public License \
along with this program; if not, write to the Free Software \
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.")




BOOL CALLBACK AboutDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG :
case WM_INITDIALOG :
{
HWND compileDateHandle = ::GetDlgItem(_hSelf, IDC_BUILD_DATETIME);
generic_string buildTime = TEXT("Build time : ");
Expand All @@ -63,21 +46,18 @@ BOOL CALLBACK AboutDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
::SendMessage(compileDateHandle, WM_SETTEXT, 0, (LPARAM)buildTime.c_str());
::EnableWindow(compileDateHandle, FALSE);

HWND licenceEditHandle = ::GetDlgItem(_hSelf, IDC_LICENCE_EDIT);
::SendMessage(licenceEditHandle, WM_SETTEXT, 0, (LPARAM)LICENCE_TXT);

_emailLink = new URLCtrl();
_pageLink = new URLCtrl();
_ircLink = new URLCtrl();

_emailLink->init(_hInst, _hSelf);
//_emailLink.create(::GetDlgItem(_hSelf, IDC_AUTHOR_NAME), TEXT("mailto:don.h@free.fr"));
_emailLink->create(::GetDlgItem(_hSelf, IDC_AUTHOR_NAME), TEXT("http://sourceforge.net/project/memberlist.php?group_id=95717"));
_emailLink->init(_hInst, _hSelf);
_emailLink->create(::GetDlgItem(_hSelf, IDC_AUTHOR_NAME), TEXT("http://github.com/npp-community/npp-community/network/members"));

_pageLink->init(_hInst, _hSelf);
_pageLink->create(::GetDlgItem(_hSelf, IDC_HOME_ADDR), TEXT("http://notepad-plus.sourceforge.net/"));
_pageLink->init(_hInst, _hSelf);
_pageLink->create(::GetDlgItem(_hSelf, IDC_HOME_ADDR), TEXT("http://github.com/npp-community/npp-community"));

//_onLineHelp.init(_hInst, _hSelf);
//_onLineHelp.create(::GetDlgItem(_hSelf, IDC_ONLINEHELP_ADDR), TEXT("http://notepad-plus.sourceforge.net/uk/generalFAQ.php"));
_ircLink->init(_hInst, _hSelf);
_ircLink->create(::GetDlgItem(_hSelf, IDC_IRC_ADDR), TEXT("irc://irc.freenode.net/#notepad++"));

getClientRect(_rc);

Expand Down Expand Up @@ -155,5 +135,13 @@ void AboutDlg::destroy()
delete _pageLink;
_pageLink = NULL;
}

if (_ircLink)
{
_ircLink->destroy();
delete _ircLink;
_ircLink = NULL;
}

StaticDialog::destroy();
}
7 changes: 4 additions & 3 deletions PowerEditor/src/WinControls/AboutDlg/AboutDlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class URLCtrl;
class AboutDlg : public StaticDialog
{
public :
AboutDlg() : StaticDialog(), _emailLink(NULL), _pageLink(NULL) {}
AboutDlg() : StaticDialog(), _emailLink(NULL), _pageLink(NULL), _ircLink(NULL) {}
~AboutDlg();

void doDialog();
Expand All @@ -37,8 +37,9 @@ protected :
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);

private :
URLCtrl* _emailLink;
URLCtrl* _pageLink;
URLCtrl* _emailLink;
URLCtrl* _pageLink;
URLCtrl* _ircLink;
};

#endif //ABOUT_DLG_H
17 changes: 8 additions & 9 deletions PowerEditor/src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef RESOURCE_H
#define RESOURCE_H

#define NOTEPAD_PLUS_VERSION TEXT("Notepad++CR v5.5")
#define NOTEPAD_PLUS_VERSION TEXT("Notepad++ v5.5")
#define VERSION_VALUE TEXT("5.5") // should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
#define VERSION_DIGITALVALUE 5, 5, 0, 0

Expand Down Expand Up @@ -232,14 +232,13 @@

// #define IDD_FIND_REPLACE_DLG 1600

#define IDD_ABOUTBOX 1700
#define IDC_LICENCE_EDIT 1701
#define IDC_HOME_ADDR 1702
#define IDC_EMAIL_ADDR 1703
#define IDC_ONLINEHELP_ADDR 1704
#define IDC_AUTHOR_NAME 1705
#define IDC_BUILD_DATETIME 1706 //LS: CompileDateInAboutDialog: Automatically insert compile date as additional version info in About-dialog!
//#define IDD_USER_DEFINE_BOX 1800
#define IDD_ABOUTBOX 1700
#define IDC_HOME_ADDR 1701
#define IDC_EMAIL_ADDR 1702
#define IDC_IRC_ADDR 1703
#define IDC_AUTHOR_NAME 1704
#define IDC_BUILD_DATETIME 1705 //LS: CompileDateInAboutDialog: Automatically insert compile date as additional version info in About-dialog!
//#define IDD_USER_DEFINE_BOX 1800

//#define IDD_RUN_DLG 1900

Expand Down
1 change: 1 addition & 0 deletions scintilla/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gen-versioninfo.h
6 changes: 6 additions & 0 deletions scintilla/vcbuild/SciLexer.8.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Notepad++ CR Scintilla Version Generation"
CommandLine="CALL $(SolutionDir)\scripts\GIT-VS-VERSION-GEN.bat &quot;$(IntDir)\&quot; &quot;$(SolutionDir)scintilla\src\gen-versioninfo.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
Expand Down Expand Up @@ -73,6 +75,7 @@
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="0"
AdditionalIncludeDirectories="..\src"
/>
<Tool
Name="VCPreLinkEventTool"
Expand Down Expand Up @@ -130,6 +133,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Notepad++ CR Scintilla Version Generation"
CommandLine="CALL $(SolutionDir)\scripts\GIT-VS-VERSION-GEN.bat &quot;$(IntDir)\&quot; &quot;$(SolutionDir)scintilla\src\gen-versioninfo.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
Expand Down Expand Up @@ -179,6 +184,7 @@
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="0"
AdditionalIncludeDirectories="..\src"
/>
<Tool
Name="VCPreLinkEventTool"
Expand Down
7 changes: 7 additions & 0 deletions scintilla/vcbuild/SciLexer.9.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Notepad++ CR Scintilla Version Generation"
CommandLine="CALL $(SolutionDir)\scripts\GIT-VS-VERSION-GEN.bat &quot;$(IntDir)\&quot; &quot;$(SolutionDir)scintilla\src\gen-versioninfo.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
Expand Down Expand Up @@ -60,6 +62,8 @@
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_VC80_UPGRADE=0x0710, _DEBUG"
AdditionalIncludeDirectories="..\src"
/>
<Tool
Name="VCPreLinkEventTool"
Expand Down Expand Up @@ -111,6 +115,8 @@
>
<Tool
Name="VCPreBuildEventTool"
Description="Notepad++ CR Scintilla Version Generation"
CommandLine="CALL $(SolutionDir)\scripts\GIT-VS-VERSION-GEN.bat &quot;$(IntDir)\&quot; &quot;$(SolutionDir)scintilla\src\gen-versioninfo.h&quot;"
/>
<Tool
Name="VCCustomBuildTool"
Expand Down Expand Up @@ -146,6 +152,7 @@
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="..\src"
/>
<Tool
Name="VCPreLinkEventTool"
Expand Down
28 changes: 20 additions & 8 deletions scintilla/win32/ScintRes.rc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@

#include "PlatformRes.h"

// The following file is generated during pre-build event processing and
// defines the GEN_VER_ values.
#include "gen-versioninfo.h"

#ifndef _DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2, 0, 1, 0
PRODUCTVERSION 2, 0, 1, 0
PRODUCTVERSION GEN_VER_DIGITAL_VERSION
FILEFLAGSMASK 0x3fL
FILEFLAGS 0
FILEFLAGS (VER_DEBUG|GEN_VER_PATCHED_FLAG|GEN_VER_PRERELEASE_FLAG|GEN_VER_PRIVATE_FLAG|VS_FF_SPECIALBUILD)
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
Expand All @@ -25,14 +35,16 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0"
VALUE "FileDescription", "Scintilla.DLL - a Source Editing Component\0"
VALUE "FileVersion", "2.01\0"
VALUE "InternalName", "Scintilla\0"
VALUE "CompanyName", "Neil Hodgson neilh@scintilla.org\0"
VALUE "FileDescription", "Notepad++ CR modified Scintilla.DLL\0"
VALUE "FileVersion", "Modified Scintilla 2.01\0"
VALUE "InternalName", "Scintilla\0"
VALUE "LegalCopyright", "Copyright 1998-2009 by Neil Hodgson\0"
VALUE "OriginalFilename", "Scintilla.DLL\0"
VALUE "ProductName", "Scintilla\0"
VALUE "ProductVersion", "2.01\0"
VALUE "PrivateBuild", GEN_VER_VERSION_STRING
VALUE "ProductName", "Notepad++ Community Release\0"
VALUE "ProductVersion", GEN_VER_VERSION_STRING
VALUE "SpecialBuild", "Modified Scintilla.DLL for Notepad++ Community Release\0"
END
END
END
Expand Down

0 comments on commit 3620099

Please sign in to comment.