parent
50a6cf2981
commit
bb278b26fc
File diff suppressed because it is too large
Load Diff
|
@ -815,7 +815,7 @@ bool PluginsManager::allocateCmdID(int numberRequired, int *start)
|
||||||
|
|
||||||
*start = _dynamicIDAlloc.allocate(numberRequired);
|
*start = _dynamicIDAlloc.allocate(numberRequired);
|
||||||
|
|
||||||
if (-1 == *start)
|
if (*start == -1)
|
||||||
{
|
{
|
||||||
*start = 0;
|
*start = 0;
|
||||||
retVal = false;
|
retVal = false;
|
||||||
|
|
|
@ -682,7 +682,8 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
BufferID id = MainFileManager.getBufferFromName(longNameFullpath);
|
BufferID id = MainFileManager.getBufferFromName(longNameFullpath);
|
||||||
if (id != BUFFER_INVALID)
|
if (id != BUFFER_INVALID)
|
||||||
doReload(id, wParam != 0);
|
doReload(id, wParam != 0);
|
||||||
break;
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_SWITCHTOFILE :
|
case NPPM_SWITCHTOFILE :
|
||||||
|
@ -1157,7 +1158,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
else if (_pEditView == &_subEditView)
|
else if (_pEditView == &_subEditView)
|
||||||
*id = SUB_VIEW;
|
*id = SUB_VIEW;
|
||||||
else
|
else
|
||||||
*id = -1;
|
*id = -1; // cannot happen
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1667,7 +1668,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_DESTROYSCINTILLAHANDLE:
|
case NPPM_DESTROYSCINTILLAHANDLE_DEPRECATED:
|
||||||
{
|
{
|
||||||
//return _scintillaCtrls4Plugins.destroyScintilla(reinterpret_cast<HWND>(lParam));
|
//return _scintillaCtrls4Plugins.destroyScintilla(reinterpret_cast<HWND>(lParam));
|
||||||
|
|
||||||
|
@ -2068,7 +2069,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (lParam == SUB_VIEW)
|
if (lParam == SUB_VIEW) // priorityView is sub view, so we search in sub view firstly
|
||||||
{
|
{
|
||||||
if ((i = _subDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
if ((i = _subDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
||||||
{
|
{
|
||||||
|
@ -2076,6 +2077,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
view <<= 30;
|
view <<= 30;
|
||||||
return view|i;
|
return view|i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((i = _mainDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
if ((i = _mainDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
||||||
{
|
{
|
||||||
long view = MAIN_VIEW;
|
long view = MAIN_VIEW;
|
||||||
|
@ -2083,7 +2085,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
return view|i;
|
return view|i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else // (lParam == SUB_VIEW): priorityView is main view, so we search in main view firstly
|
||||||
{
|
{
|
||||||
if ((i = _mainDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
if ((i = _mainDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
||||||
{
|
{
|
||||||
|
@ -2091,6 +2093,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
view <<= 30;
|
view <<= 30;
|
||||||
return view|i;
|
return view|i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((i = _subDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
if ((i = _subDocTab.getIndexByBuffer((BufferID)wParam)) != -1)
|
||||||
{
|
{
|
||||||
long view = SUB_VIEW;
|
long view = SUB_VIEW;
|
||||||
|
@ -2913,7 +2916,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
return _pluginsManager.relayPluginMessages(message, wParam, lParam);
|
return _pluginsManager.relayPluginMessages(message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_ALLOCATESUPPORTED:
|
case NPPM_ALLOCATESUPPORTED_DEPRECATED:
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,17 @@ EolType convertIntToFormatType(int value, EolType defvalue = EolType::osdefault)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum UniMode {uni8Bit=0, uniUTF8=1, uni16BE=2, uni16LE=3, uniCookie=4, uni7Bit=5, uni16BE_NoBOM=6, uni16LE_NoBOM=7, uniEnd};
|
enum UniMode {
|
||||||
|
uni8Bit = 0, // ANSI
|
||||||
|
uniUTF8 = 1, // UTF-8 with BOM
|
||||||
|
uni16BE = 2, // UTF-16 Big Ending with BOM
|
||||||
|
uni16LE = 3, // UTF-16 Little Ending with BOM
|
||||||
|
uniCookie = 4, // UTF-8 without BOM
|
||||||
|
uni7Bit = 5, //
|
||||||
|
uni16BE_NoBOM = 6, // UTF-16 Big Ending without BOM
|
||||||
|
uni16LE_NoBOM = 7, // UTF-16 Little Ending without BOM
|
||||||
|
uniEnd};
|
||||||
|
|
||||||
enum ChangeDetect { cdDisabled = 0x0, cdEnabledOld = 0x01, cdEnabledNew = 0x02, cdAutoUpdate = 0x04, cdGo2end = 0x08 };
|
enum ChangeDetect { cdDisabled = 0x0, cdEnabledOld = 0x01, cdEnabledNew = 0x02, cdAutoUpdate = 0x04, cdGo2end = 0x08 };
|
||||||
enum BackupFeature {bak_none = 0, bak_simple = 1, bak_verbose = 2};
|
enum BackupFeature {bak_none = 0, bak_simple = 1, bak_verbose = 2};
|
||||||
enum OpenSaveDirSetting {dir_followCurrent = 0, dir_last = 1, dir_userDef = 2};
|
enum OpenSaveDirSetting {dir_followCurrent = 0, dir_last = 1, dir_userDef = 2};
|
||||||
|
|
|
@ -1244,10 +1244,10 @@ SavingStatus FileManager::saveBuffer(BufferID id, const TCHAR* filename, bool is
|
||||||
if (isHiddenOrSys)
|
if (isHiddenOrSys)
|
||||||
::SetFileAttributes(fullpath, attrib);
|
::SetFileAttributes(fullpath, attrib);
|
||||||
|
|
||||||
if (isCopy) // Save As command
|
if (isCopy) // "Save a Copy As..." command
|
||||||
{
|
{
|
||||||
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
|
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
|
||||||
return SavingStatus::SaveOK; //all done
|
return SavingStatus::SaveOK; //all done - we don't change the current buffer's path to "fullpath", since it's "Save a Copy As..." action.
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer->setFileName(fullpath);
|
buffer->setFileName(fullpath);
|
||||||
|
@ -1373,7 +1373,7 @@ BufferID FileManager::newPlaceholderDocument(const TCHAR* missingFilename, int w
|
||||||
"FileInaccessibleUserSession",
|
"FileInaccessibleUserSession",
|
||||||
_pNotepadPlus->_pEditView->getHSelf(),
|
_pNotepadPlus->_pEditView->getHSelf(),
|
||||||
L"Some files from your manually-saved session \"$STR_REPLACE$\" are inaccessible. They can be opened as empty and read-only documents as placeholders.\n\nWould you like to create those placeholders?\n\nNOTE: Choosing not to create the placeholders or closing them later, your manually-saved session will NOT be modified on exit.",
|
L"Some files from your manually-saved session \"$STR_REPLACE$\" are inaccessible. They can be opened as empty and read-only documents as placeholders.\n\nWould you like to create those placeholders?\n\nNOTE: Choosing not to create the placeholders or closing them later, your manually-saved session will NOT be modified on exit.",
|
||||||
L"File inaccessinble",
|
L"File inaccessible",
|
||||||
MB_YESNO | MB_APPLMODAL,
|
MB_YESNO | MB_APPLMODAL,
|
||||||
0,
|
0,
|
||||||
userCreatedSessionName);
|
userCreatedSessionName);
|
||||||
|
@ -1384,7 +1384,7 @@ BufferID FileManager::newPlaceholderDocument(const TCHAR* missingFilename, int w
|
||||||
"FileInaccessibleDefaultSessionXml",
|
"FileInaccessibleDefaultSessionXml",
|
||||||
_pNotepadPlus->_pEditView->getHSelf(),
|
_pNotepadPlus->_pEditView->getHSelf(),
|
||||||
L"Some files from your past session are inaccessible. They can be opened as empty and read-only documents as placeholders.\n\nWould you like to create those placeholders?\n\nNOTE: Choosing not to create the placeholders or closing them later, your session WILL BE MODIFIED ON EXIT! We suggest you backup your \"session.xml\" now.",
|
L"Some files from your past session are inaccessible. They can be opened as empty and read-only documents as placeholders.\n\nWould you like to create those placeholders?\n\nNOTE: Choosing not to create the placeholders or closing them later, your session WILL BE MODIFIED ON EXIT! We suggest you backup your \"session.xml\" now.",
|
||||||
L"File inaccessinble",
|
L"File inaccessible",
|
||||||
MB_YESNO | MB_APPLMODAL);
|
MB_YESNO | MB_APPLMODAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,14 +58,14 @@ struct tTbData {
|
||||||
const TCHAR* pszAddInfo = nullptr; // for plugin to display additional informations
|
const TCHAR* pszAddInfo = nullptr; // for plugin to display additional informations
|
||||||
|
|
||||||
// internal data, do not use !!!
|
// internal data, do not use !!!
|
||||||
RECT rcFloat = {}; // floating position
|
RECT rcFloat = {}; // floating position
|
||||||
int iPrevCont = 0; // stores the privious container (toggling between float and dock)
|
int iPrevCont = 0; // stores the privious container (toggling between float and dock)
|
||||||
const TCHAR* pszModuleName = nullptr; // it's the plugin file name. It's used to identify the plugin
|
const TCHAR* pszModuleName = nullptr; // it's the plugin file name. It's used to identify the plugin
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct tDockMgr {
|
struct tDockMgr {
|
||||||
HWND hWnd = nullptr; // the docking manager wnd
|
HWND hWnd = nullptr; // the docking manager wnd
|
||||||
RECT rcRegion[DOCKCONT_MAX] = {{}}; // position of docked dialogs
|
RECT rcRegion[DOCKCONT_MAX] = {{}}; // position of docked dialogs
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue