Skip to content

Commit

Permalink
config.xml is generated by notepad++
Browse files Browse the repository at this point in the history
No more config.model.xml. config.xml is generated by notepad++ directly.
  • Loading branch information
donho committed Oct 23, 2016
1 parent 76bc03f commit 0746d1f
Show file tree
Hide file tree
Showing 7 changed files with 333 additions and 812 deletions.
11 changes: 5 additions & 6 deletions PowerEditor/src/Notepad_plus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion PowerEditor/src/Notepad_plus.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ friend class FileManager;
bool isFileSession(const TCHAR * filename);
bool isFileWorkspace(const TCHAR * filename);
void filePrint(bool showDialog);
bool saveScintillaParams();
void saveScintillasZoom();

bool saveGUIParams();
bool saveProjectPanelsParams();
Expand Down
5 changes: 3 additions & 2 deletions PowerEditor/src/NppBigSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
//
Expand Down
Loading

0 comments on commit 0746d1f

Please sign in to comment.