[NEW_FEATURE] Add "-notabbar" flag to hide the tab bar (ie. Notepad style).

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@85 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2007-12-15 13:18:26 +00:00
parent c67df4644b
commit 6d1521e995
3 changed files with 10 additions and 8 deletions

View File

@ -287,6 +287,11 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi
_pluginsManager.notify(&scnN); _pluginsManager.notify(&scnN);
::ShowWindow(_hSelf, nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW); ::ShowWindow(_hSelf, nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW);
if (cmdLineParams->_isNoTab)
{
//::MessageBox(_hSelf, "bingo", "", MB_OK);
::SendMessage(_hSelf, NPPM_HIDETABBAR, 0, TRUE);
}
} }

View File

@ -126,6 +126,7 @@ struct CmdLineParams {
bool _isNoPlugin; bool _isNoPlugin;
bool _isReadOnly; bool _isReadOnly;
bool _isNoSession; bool _isNoSession;
bool _isNoTab;
int _line2go; int _line2go;
LangType _langType; LangType _langType;
@ -906,14 +907,8 @@ public:
::SetWindowLong(hwnd, GWL_EXSTYLE, ::GetWindowLong(hwnd, GWL_EXSTYLE) & ~/*WS_EX_LAYERED*/0x00080000); ::SetWindowLong(hwnd, GWL_EXSTYLE, ::GetWindowLong(hwnd, GWL_EXSTYLE) & ~/*WS_EX_LAYERED*/0x00080000);
}; };
//void setDefLang(LangType langType) {_defLangType = langType;}; void setCmdlineParam(const CmdLineParams & cmdLineParams) {
//LangType getDefLang() const {return _defLangType;}; _cmdLineParams = cmdLineParams;
//void setLineNumber2go(int ln) {_lineNumber2Go = ln;};
//int getLineNumber2go() const {return _lineNumber2Go;};
void setCmdlineParam(const CmdLineParams & cmdLineParams) {_cmdLineParams = cmdLineParams;
//::MessageBox(NULL, "", _cmdLineParams._isReadOnly?"Param:RO":"Param:RW", MB_OK);
}; };
CmdLineParams & getCmdLineParams() {return _cmdLineParams;}; CmdLineParams & getCmdLineParams() {return _cmdLineParams;};

View File

@ -137,6 +137,7 @@ const char FLAG_MULTI_INSTANCE[] = "-multiInst";
const char FLAG_NO_PLUGIN[] = "-noPlugin"; const char FLAG_NO_PLUGIN[] = "-noPlugin";
const char FLAG_READONLY[] = "-ro"; const char FLAG_READONLY[] = "-ro";
const char FLAG_NOSESSION[] = "-nosession"; const char FLAG_NOSESSION[] = "-nosession";
const char FLAG_NOTABBAR[] = "-notabbar";
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdShow) int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdShow)
{ {
@ -149,6 +150,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh
CmdLineParams cmdLineParams; CmdLineParams cmdLineParams;
bool isMultiInst = isInList(FLAG_MULTI_INSTANCE, lpszCmdLine); bool isMultiInst = isInList(FLAG_MULTI_INSTANCE, lpszCmdLine);
cmdLineParams._isNoTab = isInList(FLAG_NOTABBAR, lpszCmdLine);
cmdLineParams._isNoPlugin = isInList(FLAG_NO_PLUGIN, lpszCmdLine); cmdLineParams._isNoPlugin = isInList(FLAG_NO_PLUGIN, lpszCmdLine);
cmdLineParams._isReadOnly = isInList(FLAG_READONLY, lpszCmdLine); cmdLineParams._isReadOnly = isInList(FLAG_READONLY, lpszCmdLine);
cmdLineParams._isNoSession = isInList(FLAG_NOSESSION, lpszCmdLine); cmdLineParams._isNoSession = isInList(FLAG_NOSESSION, lpszCmdLine);