[NEW_FEATURE] Add Edit ContextMenu feature.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@684 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2010-10-22 21:14:04 +00:00
parent 1549b4f89f
commit 14773572cf
5 changed files with 13 additions and 1 deletions

View File

@ -700,6 +700,7 @@ BEGIN
MENUITEM "Import plugin(s)...", IDM_SETTING_IMPORTPLUGIN
MENUITEM "Import style theme(s)...", IDM_SETTING_IMPORTSTYLETHEMS
END
MENUITEM "Edit Popup ContextMenu", IDM_SETTING_EDITCONTEXTMENU
END
POPUP "Macro"

View File

@ -1643,6 +1643,14 @@ void Notepad_plus::command(int id)
break;
}
case IDM_SETTING_EDITCONTEXTMENU :
{
NppParameters *pNppParams = NppParameters::getInstance();
doOpen((pNppParams->getContextMenuPath()).c_str());
break;
}
case IDM_VIEW_GOTO_ANOTHER_VIEW:
docGotoAnotherEditView(TransferMove);
checkSyncState();

View File

@ -1338,6 +1338,7 @@ public:
ScintillaAccelerator * getScintillaAccelerator() {return _pScintAccelerator;};
generic_string getNppPath() const {return _nppPath;};
generic_string getContextMenuPath() const {return _contextMenuPath;};
const TCHAR * getAppDataNppDir() const {return _appdataNppDir.c_str();};
const TCHAR * getWorkingDir() const {return _currentDirectory.c_str();};
void setWorkingDir(const TCHAR * newPath);

View File

@ -1199,11 +1199,12 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
execute(SCI_STYLECLEARALL);
Buffer * buf = MainFileManager->getBufferByID(_currentBufferID);
if (buf->getEncoding() != NPP_CP_DOS_437)
{
buf->setEncoding(NPP_CP_DOS_437);
::SendMessage(_hParent, WM_COMMAND, IDM_FILE_RELOAD, 0);
}
}
}
break;

View File

@ -391,6 +391,7 @@
#define IDM_SETTING_AUTOCNBCHAR (IDM_SETTING + 15)
#define IDM_SETTING_SHORTCUT_MAPPER_MACRO (IDM_SETTING + 16)
#define IDM_SETTING_SHORTCUT_MAPPER_RUN (IDM_SETTING + 17)
#define IDM_SETTING_EDITCONTEXTMENU (IDM_SETTING + 18)
#define IDM_EXECUTE (IDM + 9000)