From c14f87c4b0e715845da99c26dfc51b599dd19fc4 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 18 Jun 2015 01:34:34 +0200 Subject: [PATCH] [UPDATE] Replace "Forum" command by "Live Support" one. --- .../src/MISC/PluginsManager/Notepad_plus_msgs.h | 2 +- PowerEditor/src/Notepad_plus.cpp | 12 +++++------- PowerEditor/src/Notepad_plus.rc | 3 ++- PowerEditor/src/NppCommands.cpp | 10 ++++++++-- PowerEditor/src/menuCmdID.h | 1 + 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index dc2912a37..8a6de5126 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -46,7 +46,7 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV -//Here you can find how to use these messages : http://notepad-plus.sourceforge.net/uk/plugins-HOWTO.php +//Here you can find how to use these messages : http://docs.notepad-plus-plus.org/index.php/Messages_And_Notifications #define NPPMSG (WM_USER + 1000) #define NPPM_GETCURRENTSCINTILLA (NPPMSG + 4) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 3a0d078c9..a0b636982 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -667,7 +667,7 @@ LRESULT Notepad_plus::init(HWND hwnd) _toolBar.setCheck(IDM_LANG_USER_DLG, uddShow); // - // Initialize the default forground & background color + // Initialize the default foreground & background color // StyleArray & globalStyles = (NppParameters::getInstance())->getGlobalStylers(); int i = globalStyles.getStylerIndexByID(STYLE_DEFAULT); @@ -814,7 +814,7 @@ void Notepad_plus::saveDockingParams() nppGUI._dockingData._topHeight = _dockingManager.getDockedContSize(CONT_TOP); nppGUI._dockingData._bottomHight = _dockingManager.getDockedContSize(CONT_BOTTOM); - // clear the conatainer tab information (active tab) + // clear the container tab information (active tab) nppGUI._dockingData._containerTabInfo.clear(); // create a vector to save the current information @@ -926,7 +926,7 @@ int Notepad_plus::getHtmlXmlEncoding(const TCHAR *fileName) const if ((langT != L_XML) && (langT != L_HTML)) return -1; - // Get the begining of file data + // Get the beginning of file data FILE *f = generic_fopen(fileName, TEXT("rb")); if (!f) return -1; @@ -2240,7 +2240,7 @@ void Notepad_plus::addHotSpot() _pEditView->execute(SCI_STARTSTYLING, start, 0xFF); _pEditView->execute(SCI_SETSTYLING, foundTextLen, fs); } - else // generize a new style and add it into a array + else // generalize a new style and add it into a array { style_hotspot = idStyle | mask; // set "hotspot bit" hotspotPairs.push_back(style_hotspot); @@ -2927,7 +2927,7 @@ size_t Notepad_plus::getCurrentDocCharCount(UniMode u) size_t result = 0; size_t endpos = _pEditView->execute(SCI_GETLENGTH); - unsigned char* buf = (unsigned char*)_pEditView->execute(SCI_GETCHARACTERPOINTER); // Scintilla doc sais the pointer can be invalidated by any other "execute" + unsigned char* buf = (unsigned char*)_pEditView->execute(SCI_GETCHARACTERPOINTER); // Scintilla doc said the pointer can be invalidated by any other "execute" #ifdef _OPENMP // parallel counting of characters with OpenMP if(endpos > 50000) // starting threads takes time; for small files it is better to simply count in one thread @@ -3442,8 +3442,6 @@ void Notepad_plus::docGotoAnotherEditView(FileTransferMode mode) bool Notepad_plus::activateBuffer(BufferID id, int whichOne) { - //scnN.nmhdr.code = NPPN_DOCSWITCHINGOFF; //superseeded by NPPN_BUFFERACTIVATED - bool isSnapshotMode = NppParameters::getInstance()->getNppGUI().isSnapshotMode(); if (isSnapshotMode) { diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index a484f190e..a5a9967fd 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -846,7 +846,8 @@ BEGIN MENUITEM "Notepad++ Home", IDM_HOMESWEETHOME MENUITEM "Notepad++ Project Page", IDM_PROJECTPAGE //MENUITEM "Online Documentation", IDM_ONLINEHELP - MENUITEM "Forum", IDM_FORUM + //MENUITEM "Forum", IDM_FORUM + MENUITEM "Live Support", IDM_ONLINESUPPORT MENUITEM "Get More Plugins", IDM_PLUGINSHOME MENUITEM SEPARATOR MENUITEM "Update Notepad++", IDM_UPDATE_NPP diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index aeee4e2b1..99ce523c6 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2296,10 +2296,16 @@ void Notepad_plus::command(int id) ::MessageBox(NULL, COMMAND_ARG_HELP, TEXT("Notepad++ Command Argument Help"), MB_OK); break; } - + /* case IDM_FORUM: { - ::ShellExecute(NULL, TEXT("open"), TEXT("http://sourceforge.net/forum/?group_id=95717"), NULL, NULL, SW_SHOWNORMAL); + ::ShellExecute(NULL, TEXT("open"), TEXT(""), NULL, NULL, SW_SHOWNORMAL); + break; + } + */ + case IDM_ONLINESUPPORT: + { + ::ShellExecute(NULL, TEXT("open"), TEXT("https://gitter.im/notepad-plus-plus/notepad-plus-plus"), NULL, NULL, SW_SHOWNORMAL); break; } diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 125fcb7bf..533a0188a 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -485,6 +485,7 @@ #define IDM_HELP (IDM_ABOUT + 8) #define IDM_CONFUPDATERPROXY (IDM_ABOUT + 9) #define IDM_CMDLINEARGUMENTS (IDM_ABOUT + 10) + #define IDM_ONLINESUPPORT (IDM_ABOUT + 11) #define IDM_SETTING (IDM + 8000)