mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
Make function naming more explicite
This commit is contained in:
parent
7e8218f735
commit
fe62ff989b
@ -1820,8 +1820,8 @@ void Notepad_plus::checkDocState()
|
|||||||
enableCommand(IDM_FILE_DELETE, isFileExisting, MENU);
|
enableCommand(IDM_FILE_DELETE, isFileExisting, MENU);
|
||||||
enableCommand(IDM_FILE_RENAME, isFileExisting, MENU);
|
enableCommand(IDM_FILE_RENAME, isFileExisting, MENU);
|
||||||
|
|
||||||
enableConvertMenuItems(curBuf->getFormat());
|
enableConvertMenuItems(curBuf->getEolFormat());
|
||||||
checkUnicodeMenuItems(/*curBuf->getUnicodeMode()*/);
|
checkUnicodeMenuItems();
|
||||||
checkLangsMenu(-1);
|
checkLangsMenu(-1);
|
||||||
|
|
||||||
if (_pAnsiCharPanel)
|
if (_pAnsiCharPanel)
|
||||||
@ -3498,7 +3498,7 @@ void Notepad_plus::staticCheckMenuAndTB() const
|
|||||||
void Notepad_plus::dynamicCheckMenuAndTB() const
|
void Notepad_plus::dynamicCheckMenuAndTB() const
|
||||||
{
|
{
|
||||||
//Format conversion
|
//Format conversion
|
||||||
enableConvertMenuItems(_pEditView->getCurrentBuffer()->getFormat());
|
enableConvertMenuItems(_pEditView->getCurrentBuffer()->getEolFormat());
|
||||||
checkUnicodeMenuItems();
|
checkUnicodeMenuItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4720,8 +4720,8 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
|
|||||||
updateStatusBar();
|
updateStatusBar();
|
||||||
checkUnicodeMenuItems(/*buffer->getUnicodeMode()*/);
|
checkUnicodeMenuItems(/*buffer->getUnicodeMode()*/);
|
||||||
setUniModeText();
|
setUniModeText();
|
||||||
setDisplayFormat(buffer->getFormat());
|
setDisplayFormat(buffer->getEolFormat());
|
||||||
enableConvertMenuItems(buffer->getFormat());
|
enableConvertMenuItems(buffer->getEolFormat());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4749,8 +4749,8 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
|
|||||||
updateStatusBar();
|
updateStatusBar();
|
||||||
checkUnicodeMenuItems(/*buf->getUnicodeMode()*/);
|
checkUnicodeMenuItems(/*buf->getUnicodeMode()*/);
|
||||||
setUniModeText();
|
setUniModeText();
|
||||||
setDisplayFormat(buf->getFormat());
|
setDisplayFormat(buf->getEolFormat());
|
||||||
enableConvertMenuItems(buf->getFormat());
|
enableConvertMenuItems(buf->getEolFormat());
|
||||||
generic_string dir(buf->getFullPathName());
|
generic_string dir(buf->getFullPathName());
|
||||||
PathRemoveFileSpec(dir);
|
PathRemoveFileSpec(dir);
|
||||||
setWorkingDir(dir.c_str());
|
setWorkingDir(dir.c_str());
|
||||||
|
@ -318,7 +318,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
return -1;
|
return -1;
|
||||||
BufferID id = (BufferID)wParam;
|
BufferID id = (BufferID)wParam;
|
||||||
Buffer * b = MainFileManager->getBufferByID(id);
|
Buffer * b = MainFileManager->getBufferByID(id);
|
||||||
return static_cast<LRESULT>(b->getFormat());
|
return static_cast<LRESULT>(b->getEolFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_SETBUFFERFORMAT:
|
case NPPM_SETBUFFERFORMAT:
|
||||||
@ -335,7 +335,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||||||
|
|
||||||
BufferID id = (BufferID)wParam;
|
BufferID id = (BufferID)wParam;
|
||||||
Buffer * b = MainFileManager->getBufferByID(id);
|
Buffer * b = MainFileManager->getBufferByID(id);
|
||||||
b->setFormat(newFormat);
|
b->setEolFormat(newFormat);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1709,8 +1709,8 @@ void Notepad_plus::command(int id)
|
|||||||
: (id == IDM_FORMAT_TOUNIX) ? EolType::unix : EolType::macos;
|
: (id == IDM_FORMAT_TOUNIX) ? EolType::unix : EolType::macos;
|
||||||
|
|
||||||
Buffer* buf = _pEditView->getCurrentBuffer();
|
Buffer* buf = _pEditView->getCurrentBuffer();
|
||||||
buf->setFormat(newFormat);
|
buf->setEolFormat(newFormat);
|
||||||
_pEditView->execute(SCI_CONVERTEOLS, static_cast<int>(buf->getFormat()));
|
_pEditView->execute(SCI_CONVERTEOLS, static_cast<int>(buf->getEolFormat()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
|||||||
{
|
{
|
||||||
const NewDocDefaultSettings & ndds = (NppParameters::getInstance()->getNppGUI()).getNewDocDefaultSettings();
|
const NewDocDefaultSettings & ndds = (NppParameters::getInstance()->getNppGUI()).getNewDocDefaultSettings();
|
||||||
buf->setEncoding(ndds._codepage);
|
buf->setEncoding(ndds._codepage);
|
||||||
buf->setFormat(ndds._format);
|
buf->setEolFormat(ndds._format);
|
||||||
buf->setUnicodeMode(ndds._unicodeMode);
|
buf->setUnicodeMode(ndds._unicodeMode);
|
||||||
buf->setLangType(ndds._lang);
|
buf->setLangType(ndds._lang);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ Buffer::Buffer(FileManager * pManager, BufferID id, Document doc, DocFileStatus
|
|||||||
NppParameters* pNppParamInst = NppParameters::getInstance();
|
NppParameters* pNppParamInst = NppParameters::getInstance();
|
||||||
const NewDocDefaultSettings& ndds = (pNppParamInst->getNppGUI()).getNewDocDefaultSettings();
|
const NewDocDefaultSettings& ndds = (pNppParamInst->getNppGUI()).getNewDocDefaultSettings();
|
||||||
|
|
||||||
_format = ndds._format;
|
_eolFormat = ndds._format;
|
||||||
_unicodeMode = ndds._unicodeMode;
|
_unicodeMode = ndds._unicodeMode;
|
||||||
_encoding = ndds._codepage;
|
_encoding = ndds._codepage;
|
||||||
if (_encoding != -1)
|
if (_encoding != -1)
|
||||||
@ -640,7 +640,7 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc, int encodin
|
|||||||
buf->setUnicodeMode(uniCookie);
|
buf->setUnicodeMode(uniCookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
buf->setFormat(bkformat);
|
buf->setEolFormat(bkformat);
|
||||||
|
|
||||||
//determine buffer properties
|
//determine buffer properties
|
||||||
++_nextBufferID;
|
++_nextBufferID;
|
||||||
|
@ -196,12 +196,12 @@ public:
|
|||||||
doNotify(BufferChangeReadonly);
|
doNotify(BufferChangeReadonly);
|
||||||
}
|
}
|
||||||
|
|
||||||
EolType getFormat() const {
|
EolType getEolFormat() const {
|
||||||
return _format;
|
return _eolFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFormat(EolType format) {
|
void setEolFormat(EolType format) {
|
||||||
_format = format;
|
_eolFormat = format;
|
||||||
doNotify(BufferChangeFormat);
|
doNotify(BufferChangeFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ private:
|
|||||||
LangType _lang;
|
LangType _lang;
|
||||||
generic_string _userLangExt; // it's useful if only (_lang == L_USER)
|
generic_string _userLangExt; // it's useful if only (_lang == L_USER)
|
||||||
bool _isDirty = false;
|
bool _isDirty = false;
|
||||||
EolType _format = EolType::osdefault;
|
EolType _eolFormat = EolType::osdefault;
|
||||||
UniMode _unicodeMode;
|
UniMode _unicodeMode;
|
||||||
int _encoding = -1;
|
int _encoding = -1;
|
||||||
bool _isUserReadOnly = false;
|
bool _isUserReadOnly = false;
|
||||||
|
@ -1696,7 +1696,7 @@ void ScintillaEditView::bufferUpdated(Buffer * buffer, int mask)
|
|||||||
|
|
||||||
if (mask & BufferChangeFormat)
|
if (mask & BufferChangeFormat)
|
||||||
{
|
{
|
||||||
execute(SCI_SETEOLMODE, static_cast<int>(_currentBuffer->getFormat()));
|
execute(SCI_SETEOLMODE, static_cast<int>(_currentBuffer->getEolFormat()));
|
||||||
}
|
}
|
||||||
if (mask & BufferChangeReadonly)
|
if (mask & BufferChangeReadonly)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user