[BUG_FIXED] FIX toolbar bug : make toolbar chevron work.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@515 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
3464682ef6
commit
659a938735
@ -132,4 +132,11 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#if _MSC_VER > 1400 // MS Compiler > VS 2005
|
||||
#define REBARBAND_SIZE REBARBANDINFO_V3_SIZE
|
||||
#else
|
||||
#define REBARBAND_SIZE sizeof(REBARBANDINFO)
|
||||
#endif
|
||||
|
||||
|
||||
#endif //M30_IDE_COMMUN_H
|
||||
|
@ -2749,17 +2749,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
}
|
||||
//Else forward notification to window of rebarband
|
||||
REBARBANDINFO rbBand;
|
||||
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
|
||||
if (winVersion <= WV_W2K)
|
||||
{
|
||||
ZeroMemory(&rbBand, sizeof(REBARBANDINFO));
|
||||
rbBand.cbSize = sizeof(REBARBANDINFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
ZeroMemory(&rbBand, REBARBANDINFO_V3_SIZE);
|
||||
rbBand.cbSize = REBARBANDINFO_V3_SIZE;
|
||||
}
|
||||
ZeroMemory(&rbBand, REBARBAND_SIZE);
|
||||
rbBand.cbSize = REBARBAND_SIZE;
|
||||
|
||||
rbBand.fMask = RBBIM_CHILD;
|
||||
::SendMessage(notifRebar->getHSelf(), RB_GETBANDINFO, lpnm->uBand, (LPARAM)&rbBand);
|
||||
::SendMessage(rbBand.hwndChild, WM_NOTIFY, 0, (LPARAM)lpnm);
|
||||
@ -9766,10 +9758,9 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask) {
|
||||
{
|
||||
checkDocState();
|
||||
setTitle();
|
||||
TCHAR dir[MAX_PATH];
|
||||
lstrcpy(dir, buffer->getFullPathName());
|
||||
PathRemoveFileSpec(dir);
|
||||
setWorkingDir(dir);
|
||||
generic_string dir(buffer->getFullPathName());
|
||||
PathRemoveFileSpec((TCHAR *)dir.c_str());
|
||||
setWorkingDir(dir.c_str());
|
||||
}
|
||||
|
||||
if (mask & (BufferChangeLanguage))
|
||||
@ -9820,10 +9811,9 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view) {
|
||||
setUniModeText(buf->getUnicodeMode());
|
||||
setDisplayFormat(buf->getFormat());
|
||||
enableConvertMenuItems(buf->getFormat());
|
||||
TCHAR dir[MAX_PATH];
|
||||
lstrcpy(dir, buf->getFullPathName());
|
||||
PathRemoveFileSpec(dir);
|
||||
setWorkingDir(dir);
|
||||
generic_string dir(buf->getFullPathName());
|
||||
PathRemoveFileSpec((TCHAR *)dir.c_str());
|
||||
setWorkingDir(dir.c_str());
|
||||
setTitle();
|
||||
//Make sure the colors of the tab controls match
|
||||
::InvalidateRect(_mainDocTab.getHSelf(), NULL, FALSE);
|
||||
|
@ -741,7 +741,7 @@ private:
|
||||
void getMatchedFileNames(const TCHAR *dir, const vector<generic_string> & patterns, vector<generic_string> & fileNames, bool isRecursive, bool isInHiddenDir);
|
||||
|
||||
void doSynScorll(HWND hW);
|
||||
void setWorkingDir(TCHAR *dir) {
|
||||
void setWorkingDir(const TCHAR *dir) {
|
||||
NppParameters * params = NppParameters::getInstance();
|
||||
if (params->getNppGUI()._openSaveDir == dir_last)
|
||||
return;
|
||||
|
@ -413,13 +413,11 @@ bool LocalizationSwitcher::switchToLang(wchar_t *lang2switch) const
|
||||
|
||||
generic_string ThemeSwitcher::getThemeFromXmlFileName(const TCHAR *xmlFullPath) const
|
||||
{
|
||||
if (!xmlFullPath[0])
|
||||
return xmlFullPath;
|
||||
TCHAR fn[MAX_PATH];
|
||||
lstrcpy(fn, ::PathFindFileName(xmlFullPath));
|
||||
PathRemoveExtension(fn);
|
||||
generic_string themeName = fn;
|
||||
return themeName;
|
||||
if (!xmlFullPath || !xmlFullPath[0])
|
||||
return TEXT("");
|
||||
generic_string fn(::PathFindFileName(xmlFullPath));
|
||||
PathRemoveExtension((TCHAR *)fn.c_str());
|
||||
return fn.c_str();
|
||||
}
|
||||
|
||||
typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
|
||||
|
@ -2117,17 +2117,8 @@ void FindIncrementDlg::addToRebar(ReBar * rebar)
|
||||
RECT client;
|
||||
getClientRect(client);
|
||||
|
||||
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
|
||||
if (winVersion <= WV_W2K)
|
||||
{
|
||||
ZeroMemory(&_rbBand, sizeof(REBARBANDINFO));
|
||||
_rbBand.cbSize = sizeof(REBARBANDINFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
ZeroMemory(&_rbBand, REBARBANDINFO_V3_SIZE);
|
||||
_rbBand.cbSize = REBARBANDINFO_V3_SIZE;
|
||||
}
|
||||
ZeroMemory(&_rbBand, REBARBAND_SIZE);
|
||||
_rbBand.cbSize = REBARBAND_SIZE;
|
||||
|
||||
_rbBand.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE |
|
||||
RBBIM_SIZE | RBBIM_ID;
|
||||
|
@ -255,22 +255,14 @@ void ToolBar::doPopop(POINT chevPoint) {
|
||||
}
|
||||
}
|
||||
|
||||
void ToolBar::addToRebar(ReBar * rebar) {
|
||||
void ToolBar::addToRebar(ReBar * rebar)
|
||||
{
|
||||
if (_pRebar)
|
||||
return;
|
||||
_pRebar = rebar;
|
||||
ZeroMemory(&_rbBand, REBARBAND_SIZE);
|
||||
_rbBand.cbSize = REBARBAND_SIZE;
|
||||
|
||||
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
|
||||
if (winVersion <= WV_W2K)
|
||||
{
|
||||
ZeroMemory(&_rbBand, sizeof(REBARBANDINFO));
|
||||
_rbBand.cbSize = sizeof(REBARBANDINFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
ZeroMemory(&_rbBand, REBARBANDINFO_V3_SIZE);
|
||||
_rbBand.cbSize = REBARBANDINFO_V3_SIZE;
|
||||
}
|
||||
|
||||
_rbBand.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE |
|
||||
RBBIM_SIZE | RBBIM_IDEALSIZE | RBBIM_ID;
|
||||
@ -346,17 +338,9 @@ void ReBar::setIDVisible(int id, bool show)
|
||||
return; //error
|
||||
|
||||
REBARBANDINFO rbBand;
|
||||
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
|
||||
if (winVersion <= WV_W2K)
|
||||
{
|
||||
ZeroMemory(&rbBand, sizeof(REBARBANDINFO));
|
||||
rbBand.cbSize = sizeof(REBARBANDINFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
ZeroMemory(&rbBand, REBARBANDINFO_V3_SIZE);
|
||||
rbBand.cbSize = REBARBANDINFO_V3_SIZE;
|
||||
}
|
||||
ZeroMemory(&rbBand, REBARBAND_SIZE);
|
||||
rbBand.cbSize = REBARBAND_SIZE;
|
||||
|
||||
|
||||
rbBand.fMask = RBBIM_STYLE;
|
||||
::SendMessage(_hSelf, RB_GETBANDINFO, (WPARAM)index, (LPARAM)&rbBand);
|
||||
@ -373,17 +357,9 @@ bool ReBar::getIDVisible(int id)
|
||||
if (index == -1 )
|
||||
return false; //error
|
||||
REBARBANDINFO rbBand;
|
||||
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
|
||||
if (winVersion <= WV_W2K)
|
||||
{
|
||||
ZeroMemory(&rbBand, sizeof(REBARBANDINFO));
|
||||
rbBand.cbSize = sizeof(REBARBANDINFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
ZeroMemory(&rbBand, REBARBANDINFO_V3_SIZE);
|
||||
rbBand.cbSize = REBARBANDINFO_V3_SIZE;
|
||||
}
|
||||
ZeroMemory(&rbBand, REBARBAND_SIZE);
|
||||
rbBand.cbSize = REBARBAND_SIZE;
|
||||
|
||||
rbBand.fMask = RBBIM_STYLE;
|
||||
::SendMessage(_hSelf, RB_GETBANDINFO, (WPARAM)index, (LPARAM)&rbBand);
|
||||
return ((rbBand.fStyle & RBBS_HIDDEN) == 0);
|
||||
|
Loading…
Reference in New Issue
Block a user