[NEW_FEATURE] Star up without plugins.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@40 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2007-09-20 17:21:31 +00:00
parent f146088344
commit 4398b312de
4 changed files with 31 additions and 15 deletions

View File

@ -38,20 +38,29 @@ SET(projIncludDir ../../scintilla/include/
./MISC/RegExt/
./MISC/SysMsg/
./TinyXml/)
set(parameters ./Parameters.h ./Parameters.cpp)
set(scintilla ./ScitillaComponent/ScintillaEditView.h ./ScitillaComponent/ScintillaEditView.cpp)
set(buffer ./ScitillaComponent/ScintillaEditView.h ./ScitillaComponent/ScintillaEditView.cpp)
set(tinystr ./TinyXml/tinystr.h ./TinyXml/tinystr.cpp)
set(tinyxml ./TinyXml/tinyxml.h ./TinyXml/tinyxml.cpp)
set(tinyxmlerror ./TinyXml/tinyxmlerror.cpp)
set(tinyxmlparser ./TinyXml/tinyxmlparser.cpp)
SET (tinyxmlObjs ${tinystr} ${tinyxml} ${tinyxmlerror} ${tinyxmlparser})
SET(objs ./winmain.cpp
./Notepad_plus.cpp
./Notepad_plus.h
./Parameters.cpp
./Parameters.h
./UniConversion.cpp
./UniConversion.h
./Utf8_16.cpp
./Utf8_16.h
./ScitillaComponent/Buffer.cpp
./ScitillaComponent/Buffer.h
./ScitillaComponent/ScintillaEditView.cpp
./ScitillaComponent/ScintillaEditView.h
./ScitillaComponent/DocTabView.cpp
./ScitillaComponent/DocTabView.h
./ScitillaComponent/FindReplaceDlg.cpp
@ -135,14 +144,11 @@ SET(objs ./winmain.cpp
./MISC/RegExt/regExtDlg.h
./MISC/SysMsg/SysMsg.cpp
./MISC/SysMsg/SysMsg.h
./TinyXml/tinystr.cpp
./TinyXml/tinystr.h
./TinyXml/tinyxml.cpp
./TinyXml/tinyxml.h
./TinyXml/tinyxmlerror.cpp
./TinyXml/tinyxmlparser.cpp
${tinyxmlObjs}
)
SET(rcFiles ./Notepad_plus.rc
./ScitillaComponent/FindReplaceDlg.rc
./ScitillaComponent/UserDefineDialog.rc

View File

@ -5672,7 +5672,10 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
nppData._scintillaSecondHandle = _subEditView.getHSelf();
_pluginsManager.init(nppData);
_pluginsManager.loadPlugins();
if (!pNppParam->isNoPlugin())
_pluginsManager.loadPlugins();
const char *appDataNpp = pNppParam->getAppDataNppDir();
if (appDataNpp[0])
_pluginsManager.loadPlugins(appDataNpp);

View File

@ -885,6 +885,9 @@ public:
void setLineNumber2go(int ln) {_lineNumber2Go = ln;};
int getLineNumber2go() const {return _lineNumber2Go;};
void setIsNoPlugin(bool noPlugin) {_noPlugin = noPlugin;};
bool isNoPlugin() const {return _noPlugin;};
bool isRemappingShortcut() const {return _shortcuts.size() != 0;};
vector<CommandShortcut> & getUserShortcuts() {return _shortcuts;};
@ -958,6 +961,7 @@ private:
LangType _defLangType;
int _lineNumber2Go;
bool _noPlugin;
// All Styles (colours & fonts)
LexerStylerArray _lexerStylerArray;

View File

@ -182,6 +182,7 @@ static int getLn2GoFromParam(char *list2Clean) {
};
const char FLAG_MULTI_INSTANCE[] = "-multiInst";
const char FLAG_NO_PLUGIN[] = "-noPlugin";
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdShow)
{
@ -193,9 +194,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh
TheFirstOne = false;
bool multiInstance = isInList(FLAG_MULTI_INSTANCE, lpszCmdLine);
bool noPlugin = isInList(FLAG_NO_PLUGIN, lpszCmdLine);
LangType langType = getLangTypeFromParam(lpszCmdLine);
int lineNumber = getLn2GoFromParam(lpszCmdLine);
NppParameters *pNppParameters = NppParameters::getInstance();
if ((!multiInstance) && (!TheFirstOne))
@ -264,6 +266,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh
}
pNppParameters->setDefLang(langType);
pNppParameters->setLineNumber2go(lineNumber);
pNppParameters->setIsNoPlugin(noPlugin);
notepad_plus_plus.init(hInstance, NULL, pPathNames);