[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/RegExt/
./MISC/SysMsg/ ./MISC/SysMsg/
./TinyXml/) ./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 SET(objs ./winmain.cpp
./Notepad_plus.cpp ./Notepad_plus.cpp
./Notepad_plus.h ./Notepad_plus.h
./Parameters.cpp
./Parameters.h
./UniConversion.cpp ./UniConversion.cpp
./UniConversion.h ./UniConversion.h
./Utf8_16.cpp ./Utf8_16.cpp
./Utf8_16.h ./Utf8_16.h
./ScitillaComponent/Buffer.cpp
./ScitillaComponent/Buffer.h
./ScitillaComponent/ScintillaEditView.cpp
./ScitillaComponent/ScintillaEditView.h
./ScitillaComponent/DocTabView.cpp ./ScitillaComponent/DocTabView.cpp
./ScitillaComponent/DocTabView.h ./ScitillaComponent/DocTabView.h
./ScitillaComponent/FindReplaceDlg.cpp ./ScitillaComponent/FindReplaceDlg.cpp
@ -135,14 +144,11 @@ SET(objs ./winmain.cpp
./MISC/RegExt/regExtDlg.h ./MISC/RegExt/regExtDlg.h
./MISC/SysMsg/SysMsg.cpp ./MISC/SysMsg/SysMsg.cpp
./MISC/SysMsg/SysMsg.h ./MISC/SysMsg/SysMsg.h
./TinyXml/tinystr.cpp ${tinyxmlObjs}
./TinyXml/tinystr.h
./TinyXml/tinyxml.cpp
./TinyXml/tinyxml.h
./TinyXml/tinyxmlerror.cpp
./TinyXml/tinyxmlparser.cpp
) )
SET(rcFiles ./Notepad_plus.rc SET(rcFiles ./Notepad_plus.rc
./ScitillaComponent/FindReplaceDlg.rc ./ScitillaComponent/FindReplaceDlg.rc
./ScitillaComponent/UserDefineDialog.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(); nppData._scintillaSecondHandle = _subEditView.getHSelf();
_pluginsManager.init(nppData); _pluginsManager.init(nppData);
_pluginsManager.loadPlugins();
if (!pNppParam->isNoPlugin())
_pluginsManager.loadPlugins();
const char *appDataNpp = pNppParam->getAppDataNppDir(); const char *appDataNpp = pNppParam->getAppDataNppDir();
if (appDataNpp[0]) if (appDataNpp[0])
_pluginsManager.loadPlugins(appDataNpp); _pluginsManager.loadPlugins(appDataNpp);

View File

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

View File

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