diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 7469bcf3..b5b94d75 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -284,7 +284,7 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi _pluginsManager.notify(&scnN); ::ShowWindow(_hSelf, nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW); - if (cmdLineParams->_isNoTab) + if (cmdLineParams->_isNoTab || (nppGUI._tabStatus & TAB_HIDE)) { ::SendMessage(_hSelf, NPPM_HIDETABBAR, 0, TRUE); } @@ -7236,8 +7236,12 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa bool oldVal = _mainDocTab.setHideTabBarStatus(hide); _subDocTab.setHideTabBarStatus(hide); ::SendMessage(_hSelf, WM_SIZE, 0, 0); - //::ShowWindow(_mainDocTab.getHSelf(), hide?SW_FORCEMINIMIZE:SW_SHOW); - //::ShowWindow(_subDocTab.getHSelf(), hide?SW_FORCEMINIMIZE:SW_SHOW); + + NppGUI & nppGUI = (NppGUI &)((NppParameters::getInstance())->getNppGUI()); + if (hide) + nppGUI._tabStatus |= TAB_HIDE; + else + nppGUI._tabStatus &= ~TAB_HIDE; return oldVal; } diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index a0b536db..26d90be6 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -380,9 +380,9 @@ BEGIN MENUITEM "Clone to another view", IDM_VIEW_CLONE_TO_ANOTHER_VIEW MENUITEM "Synchronize Vertical Scrolling", IDM_VIEW_SYNSCROLLV MENUITEM "Synchronize Horizontal Scrolling", IDM_VIEW_SYNSCROLLH - MENUITEM SEPARATOR - MENUITEM "Veritcal", IDM_VIEW_DRAWTABBAR_VERTICAL - MENUITEM "Multiline", IDM_VIEW_DRAWTABBAR_MULTILINE + //MENUITEM SEPARATOR + //MENUITEM "Veritcal", IDM_VIEW_DRAWTABBAR_VERTICAL + //MENUITEM "Multiline", IDM_VIEW_DRAWTABBAR_MULTILINE END POPUP "For&mat" diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index ece1701e..cdbc517d 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -1791,7 +1791,16 @@ void NppParameters::feedGUIParameters(TiXmlNode *node) else isFailed = true; } - + val = element->Attribute("hide"); + if (val) + { + if (!strcmp(val, "yes")) + _nppGUI._tabStatus |= TAB_HIDE; + else if (!strcmp(val, "no")) + _nppGUI._tabStatus |= 0; + else + isFailed = true; + } if (isFailed) _nppGUI._tabStatus = oldValue; @@ -2649,6 +2658,9 @@ bool NppParameters::writeGUIParams() pStr = (_nppGUI._tabStatus & TAB_MULTILINE)?"yes":"no"; element->SetAttribute("multiLine", pStr); + pStr = (_nppGUI._tabStatus & TAB_HIDE)?"yes":"no"; + element->SetAttribute("hide", pStr); + } else if (!strcmp(nm, "ScintillaViewsSplitter")) { diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index 7a771546..05b4e601 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -43,14 +43,15 @@ const int UDD_DOCKED = 2; // 0000 0010 // 2 : 0000 0010 hide & docked // 3 : 0000 0011 show & docked -const int TAB_DRAWTOPBAR = 1; // 0000 0001 -const int TAB_DRAWINACTIVETAB = 2; // 0000 0010 -const int TAB_DRAGNDROP = 4; // 0000 0100 -const int TAB_REDUCE = 8; // 0000 1000 -const int TAB_CLOSEBUTTON = 16; // 0001 0000 -const int TAB_DBCLK2CLOSE = 32; // 0010 0000 -const int TAB_VERTICAL = 64; // 0100 0000 -const int TAB_MULTILINE = 128; // 1000 0000 +const int TAB_DRAWTOPBAR = 1; // 0000 0001 +const int TAB_DRAWINACTIVETAB = 2; // 0000 0010 +const int TAB_DRAGNDROP = 4; // 0000 0100 +const int TAB_REDUCE = 8; // 0000 1000 +const int TAB_CLOSEBUTTON = 16; // 0001 0000 +const int TAB_DBCLK2CLOSE = 32; // 0010 0000 +const int TAB_VERTICAL = 64; // 0100 0000 +const int TAB_MULTILINE = 128; // 1000 0000 +const int TAB_HIDE = 256; //1 0000 0000 enum formatType {WIN_FORMAT, MAC_FORMAT, UNIX_FORMAT}; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 3c0d4f64..b0ae5813 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -145,6 +145,7 @@ BOOL CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) ::SendDlgItemMessage(_hSelf, IDC_CHECK_DBCLICK2CLOSE, BM_SETCHECK, tabBarStatus & TAB_DBCLK2CLOSE, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_TAB_VERTICAL, BM_SETCHECK, tabBarStatus & TAB_VERTICAL, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_TAB_MULTILINE, BM_SETCHECK, tabBarStatus & TAB_MULTILINE, 0); + ::SendDlgItemMessage(_hSelf, IDC_CHECK_TAB_HIDE, BM_SETCHECK, tabBarStatus & TAB_HIDE, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_SHOWSTATUSBAR, BM_SETCHECK, showStatus, 0); diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 831162b0..82cf2fad 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -145,8 +145,8 @@ #define IDM_VIEW_REFRESHTABAR (IDM_VIEW + 40) #define IDM_VIEW_WRAP_SYMBOL (IDM_VIEW + 41) #define IDM_VIEW_HIDELINES (IDM_VIEW + 42) - #define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43) - #define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44) + //#define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43) + //#define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44) //#define (IDM_VIEW + 45) #define IDM_VIEW_FOLD (IDM_VIEW + 50)