config.xml is generated by notepad++

No more config.model.xml. config.xml is generated by notepad++ directly.
pull/2465/merge
Don Ho 8 years ago
parent 76bc03fc92
commit 0746d1f4f7

@ -782,8 +782,8 @@ bool Notepad_plus::saveGUIParams()
nppGUI._isMaximized = ((IsZoomed(_pPublicInterface->getHSelf()) != 0) || (posInfo.flags & WPF_RESTORETOMAXIMIZED));
saveDockingParams();
return (NppParameters::getInstance())->writeGUIParams();
(NppParameters::getInstance())->createXmlTreeFromGUIParams();
return true;
}
bool Notepad_plus::saveProjectPanelsParams()
@ -4218,13 +4218,12 @@ bool Notepad_plus::doStreamComment()
return true;
}
bool Notepad_plus::saveScintillaParams()
void Notepad_plus::saveScintillasZoom()
{
NppParameters * pNppParam = NppParameters::getInstance();
ScintillaViewParams & svp = (ScintillaViewParams &)pNppParam->getSVP();
svp._zoom = int(_mainEditView.execute(SCI_GETZOOM));
svp._zoom2 = int(_subEditView.execute(SCI_GETZOOM));
return (NppParameters::getInstance())->writeScintillaParams(svp);
svp._zoom = static_cast<int>(_mainEditView.execute(SCI_GETZOOM));
svp._zoom2 = static_cast<int>(_subEditView.execute(SCI_GETZOOM));
}
bool Notepad_plus::addCurrentMacro()

@ -250,7 +250,7 @@ public:
bool isFileSession(const TCHAR * filename);
bool isFileWorkspace(const TCHAR * filename);
void filePrint(bool showDialog);
bool saveScintillaParams();
void saveScintillasZoom();
bool saveGUIParams();
bool saveProjectPanelsParams();

@ -1683,10 +1683,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
scnN.nmhdr.code = NPPN_SHUTDOWN;
_pluginsManager.notify(&scnN);
saveScintillasZoom();
saveGUIParams(); //writeGUIParams writeScintillaParams
saveFindHistory(); //writeFindHistory
_lastRecentFileList.saveLRFL(); //writeRecentFileHistorySettings, writeHistory
saveScintillaParams(); //writeScintillaParams
saveGUIParams(); //writeGUIParams
saveProjectPanelsParams(); //writeProjectPanelsSettings
saveFileBrowserParam();
//

File diff suppressed because it is too large Load Diff

@ -704,14 +704,14 @@ struct NppGUI final
{
_appPos.left = 0;
_appPos.top = 0;
_appPos.right = 700;
_appPos.bottom = 500;
_appPos.right = 1100;
_appPos.bottom = 700;
_defaultDir[0] = 0;
_defaultDirExp[0] = 0;
}
toolBarStatusType _toolBarStatus = TB_LARGE;
toolBarStatusType _toolBarStatus = TB_STANDARD;
bool _toolbarShow = true;
bool _statusBarShow = true;
bool _menuBarShow = true;
@ -724,17 +724,17 @@ struct NppGUI final
// 6th bit : enable multiline
// 0:don't draw; 1:draw top bar 2:draw inactive tabs 3:draw both 7:draw both+drag&drop
int _tabStatus = (TAB_DRAWTOPBAR | TAB_DRAWINACTIVETAB | TAB_DRAGNDROP);
int _tabStatus = (TAB_DRAWTOPBAR | TAB_DRAWINACTIVETAB | TAB_DRAGNDROP | TAB_REDUCE | TAB_CLOSEBUTTON);
bool _splitterPos = POS_HORIZOTAL;
bool _splitterPos = POS_VERTICAL;
int _userDefineDlgStatus = UDD_DOCKED;
int _tabSize = 8;
int _tabSize = 4;
bool _tabReplacedBySpace = false;
ChangeDetect _fileAutoDetection = cdEnabled;
ChangeDetect _fileAutoDetectionOriginalValue = cdEnabled;
bool _checkHistoryFiles = true;
bool _checkHistoryFiles = false;
RECT _appPos;
@ -793,10 +793,10 @@ struct NppGUI final
struct AutoUpdateOptions
{
bool _doAutoUpdate;
int _intervalDays;
bool _doAutoUpdate = true;
int _intervalDays = 15;
Date _nextUpdateDate;
AutoUpdateOptions(): _doAutoUpdate(true), _intervalDays(15), _nextUpdateDate(Date()) {};
AutoUpdateOptions(): _nextUpdateDate(Date()) {};
}
_autoUpdateOpt;
@ -1011,7 +1011,6 @@ public:
return *this;
}
// int getNbKeywordList() {return SCE_USER_KWLIST_TOTAL;};
const TCHAR * getName() {return _name.c_str();};
const TCHAR * getExtention() {return _ext.c_str();};
const TCHAR * getUdlVersion() {return _udlVersion.c_str();};
@ -1022,7 +1021,6 @@ private:
generic_string _ext;
generic_string _udlVersion;
//TCHAR _keywordLists[nbKeywodList][max_char];
TCHAR _keywordLists[SCE_USER_KWLIST_TOTAL][max_char];
bool _isPrefix[SCE_USER_TOTAL_KEYWORD_GROUPS];
@ -1231,11 +1229,11 @@ public:
bool load();
bool reloadLang();
bool reloadStylers(TCHAR *stylePath = NULL);
bool reloadStylers(TCHAR *stylePath = nullptr);
void destroyInstance();
generic_string getSettingsFolder();
bool _isTaskListRBUTTONUP_Active;
bool _isTaskListRBUTTONUP_Active = false;
int L_END;
const NppGUI & getNppGUI() const {
@ -1326,9 +1324,8 @@ public:
TiXmlNode* getChildElementByAttribut(TiXmlNode *pere, const TCHAR *childName, const TCHAR *attributName, const TCHAR *attributVal) const;
bool writeScintillaParams(const ScintillaViewParams & svp);
bool writeGUIParams();
bool writeScintillaParams();
void createXmlTreeFromGUIParams();
void writeStyles(LexerStylerArray & lexersStylers, StyleArray & globalStylers);
bool insertTabInfo(const TCHAR *langName, int tabInfo);
@ -1478,7 +1475,7 @@ public:
winVer getWinVersion() const {return _winVersion;};
generic_string getWinVersionStr() const;
FindHistory & getFindHistory() {return _findHistory;};
bool _isFindReplacing; // an on the fly variable for find/replace functions
bool _isFindReplacing = false; // an on the fly variable for find/replace functions
void safeWow64EnableWow64FsRedirection(BOOL Wow64FsEnableRedirection);
LocalizationSwitcher & getLocalizationSwitcher() {
@ -1558,42 +1555,51 @@ private:
static NppParameters *_pSelf;
TiXmlDocument *_pXmlDoc, *_pXmlUserDoc, *_pXmlUserStylerDoc, *_pXmlUserLangDoc,\
*_pXmlToolIconsDoc, *_pXmlShortcutDoc, *_pXmlSessionDoc,\
*_pXmlBlacklistDoc;
TiXmlDocument *_pXmlDoc = nullptr;
TiXmlDocument *_pXmlUserDoc = nullptr;
TiXmlDocument *_pXmlUserStylerDoc = nullptr;
TiXmlDocument *_pXmlUserLangDoc = nullptr;
TiXmlDocument *_pXmlToolIconsDoc = nullptr;
TiXmlDocument *_pXmlShortcutDoc = nullptr;
TiXmlDocument *_pXmlSessionDoc = nullptr;
TiXmlDocument *_pXmlBlacklistDoc = nullptr;
TiXmlDocument *_importedULD[NB_MAX_IMPORTED_UDL];
TiXmlDocumentA *_pXmlNativeLangDocA = nullptr;
TiXmlDocumentA *_pXmlContextMenuDocA = nullptr;
int _nbImportedULD;
TiXmlDocumentA *_pXmlNativeLangDocA, *_pXmlContextMenuDocA;
std::vector<TiXmlDocument *> _pXmlExternalLexerDoc;
NppGUI _nppGUI;
ScintillaViewParams _svp;
Lang *_langList[NB_LANG];
int _nbLang;
int _nbLang = 0;
// Recent File History
generic_string *_LRFileList[NB_MAX_LRF_FILE];
int _nbRecentFile;
int _nbMaxRecentFile;
bool _putRecentFileInSubMenu;
int _recentFileCustomLength; // <0: Full File Path Name
// =0: Only File Name
// >0: Custom Entry Length
int _nbRecentFile = 0;
int _nbMaxRecentFile = 10;
bool _putRecentFileInSubMenu = false;
int _recentFileCustomLength = RECENTFILES_SHOWFULLPATH; // <0: Full File Path Name
// =0: Only File Name
// >0: Custom Entry Length
FindHistory _findHistory;
UserLangContainer *_userLangArray[NB_MAX_USER_LANG];
int _nbUserLang;
int _nbUserLang = 0;
generic_string _userDefineLangPath;
ExternalLangContainer *_externalLangArray[NB_MAX_EXTERNAL_LANG];
int _nbExternalLang;
int _nbExternalLang = 0;
CmdLineParams _cmdLineParams;
int _fileSaveDlgFilterIndex;
int _fileSaveDlgFilterIndex = -1;
// All Styles (colours & fonts)
LexerStylerArray _lexerStylerArray;
@ -1603,10 +1609,10 @@ private:
std::vector<generic_string> _blacklist;
PluginList _pluginList;
HMODULE _hUXTheme;
HMODULE _hUXTheme = nullptr;
WNDPROC _transparentFuncAddr;
WNDPROC _enableThemeDialogTextureFuncAddr;
WNDPROC _transparentFuncAddr = nullptr;
WNDPROC _enableThemeDialogTextureFuncAddr = nullptr;
bool _isLocal;
bool _isx64 = false; // by default 32-bit
@ -1650,11 +1656,11 @@ private:
ScintillaAccelerator * _pScintAccelerator;
FindDlgTabTitiles _findDlgTabTitiles;
bool _asNotepadStyle;
bool _asNotepadStyle = false;
winVer _winVersion;
NativeLangSpeaker *_pNativeLangSpeaker;
NativeLangSpeaker *_pNativeLangSpeaker = nullptr;
COLORREF _currentDefaultBgColor;
COLORREF _currentDefaultFgColor;

@ -1,83 +0,0 @@
<?xml version="1.0" encoding="Windows-1252" ?>
<NotepadPlus>
<GUIConfigs>
<!-- 3 status : "large", "small" or "hide"-->
<GUIConfig name="ToolBar">standard</GUIConfig>
<!-- 2 status : "show" or "hide"-->
<GUIConfig name="StatusBar">show</GUIConfig>
<!-- For all attributs, 2 status : "yes" or "no"-->
<GUIConfig name="TabBar" dragAndDrop="yes" drawTopBar="yes" drawInactiveTab="yes" reduce="yes" closeButton="yes" doubleClick2Close="no" vertical="no" multiLine="no" hide="no" quitOnEmpty="no"/>
<!-- 2 positions : "horizontal" or "vertical"-->
<GUIConfig name="ScintillaViewsSplitter">vertical</GUIConfig>
<!-- For the attribut of position, 2 status : docked or undocked ; 2 status : "show" or "hide" -->
<GUIConfig name="UserDefineDlg" position="undocked">hide</GUIConfig>
<GUIConfig name="TabSetting" size="4" replaceBySpace="no" />
<!--App position-->
<GUIConfig name="AppPosition" x="30" y="27" width="955" height="659" isMaximized="no" />
<!-- For the primary scintilla view,
2 status for Attribut lineNumberMargin, bookMarkMargin, indentGuideLine and currentLineHilitingShow: "show" or "hide"
4 status for Attribut folderMarkStyle : "simple", "arrow", "circle" and "box" -->
<GUIConfig name="ScintillaPrimaryView" lineNumberMargin="show" bookMarkMargin="show" folderMarkStyle="box" indentGuideLine="show" currentLineHilitingShow="show" Wrap="no" edge="no" edgeNbColumn="100" wrapSymbolShow="hide" zoom="0" whiteSpaceShow="hide" eolShow="hide" />
<!-- For the secodary scintilla view,
2 status for Attribut lineNumberMargin, bookMarkMargin, indentGuideLine and currentLineHilitingShow: "show" or "hide"
4 status for Attribut folderMarkStyle : "simple", "arrow", "circle" and "box" -->
<GUIConfig name="Auto-detection">yes</GUIConfig>
<GUIConfig name="CheckHistoryFiles">no</GUIConfig>
<GUIConfig name="TrayIcon">no</GUIConfig>
<GUIConfig name="RememberLastSession">yes</GUIConfig>
<!--
New Document default settings :
format = 0/1/2 -> win/unix/mac
encoding = 0/1/2/3/4/5 -> ANSI/UCS2Big/UCS2small/UTF8/UTF8-BOM
defaultLang = 0/1/2/..
Note 1 : UTF8-BOM -> UTF8 without BOM
Note 2 : for defaultLang :
0 -> L_TXT
1 -> L_PHP
... (see source file)
-->
<GUIConfig name="NewDocDefaultSettings" format="0" encoding="4" lang="0" codepage="-1" openAnsiAsUTF8="yes" />
<GUIConfig name="langsExcluded" gr0="0" gr1="0" gr2="0" gr3="0" gr4="0" gr5="0" gr6="0" gr7="0" langMenuCompact="yes"/>
<!--
printOption is print colour setting, the following values are possible :
0 : WYSIWYG
1 : Invert colour
2 : B & W
3 : WYSIWYG but without background colour
-->
<GUIConfig name="Print" lineNumber="no" printOption="3" headerLeft="$(FULL_CURRENT_PATH)" headerMiddle="" headerRight="$(LONG_DATE) $(TIME)" headerFontName="IBMPC" headerFontStyle="1" headerFontSize="8" footerLeft="" footerMiddle="-$(CURRENT_PRINTING_PAGE)-" footerRight="" footerFontName="" footerFontStyle="0" footerFontSize="9" margeLeft="0" margeTop="0" margeRight="0" margeBottom="0" />
<!--
Backup Setting :
0 : non backup
1 : simple backup
2 : verbose backup
-->
<GUIConfig name="Backup" action="0" useCustumDir="no" dir="" />
<GUIConfig name="TaskList">yes</GUIConfig>
<!--
value 0 for the folloing parameters means invisible :
leftWidth, topHight, rightWidth, bottomHight
position value for the PluginDlg:
0 : left
1 : right
2 : top
3 : bottom
>= 4 : undocked -> FloatingWindow id
-->
<GUIConfig name="noUpdate">no</GUIConfig>
<GUIConfig name="MaitainIndent">yes</GUIConfig>
<GUIConfig name="MRU">yes</GUIConfig>
<GUIConfig name="URL">2</GUIConfig>
<GUIConfig name="globalOverride" fg="no" bg="no" font="no" fontSize="no" bold="no" italic="no" underline="no" />
<GUIConfig name="auto-completion" autoCAction="3" triggerFromNbChar="1" funcParams="yes" />
<GUIConfig name="auto-insert" parentheses="yes" brackets="yes" curlyBrackets="yes" quotes="no" doubleQuotes="yes" htmlXmlTag="no" />
<GUIConfig name="multiInst" setting="0" />
<GUIConfig name="sessionExt"></GUIConfig>
<GUIConfig name="SmartHighLight" matchCase="no" wholeWordOnly="yes" useFindSettings="no">yes</GUIConfig>
</GUIConfigs>
<!-- The History of opened files list -->
<History nbMaxFile="15" />
</NotepadPlus>

@ -200,8 +200,7 @@
<AdditionalManifestFiles>..\src\dpiAware.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
<Command>copy ..\src\config.model.xml ..\bin\config.model.xml
copy ..\src\langs.model.xml ..\bin\langs.model.xml
<Command>copy ..\src\langs.model.xml ..\bin\langs.model.xml
copy ..\src\stylers.model.xml ..\bin\stylers.model.xml
copy ..\src\shortcuts.xml ..\bin\shortcuts.xml
copy ..\src\functionList.xml ..\bin\functionList.xml
@ -249,8 +248,7 @@ copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
<AdditionalManifestFiles>..\src\dpiAware.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
<Command>copy ..\src\config.model.xml ..\bin64\config.model.xml
copy ..\src\langs.model.xml ..\bin64\langs.model.xml
<Command>copy ..\src\langs.model.xml ..\bin64\langs.model.xml
copy ..\src\stylers.model.xml ..\bin64\stylers.model.xml
copy ..\src\shortcuts.xml ..\bin64\shortcuts.xml
copy ..\src\functionList.xml ..\bin64\functionList.xml

Loading…
Cancel
Save