MCPcopy Create free account
hub / github.com/SpartanJ/eepp / saveDoc

Method saveDoc

src/tools/ecode/ecode.cpp:133–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void App::saveDoc() {
134 if ( !mSplitter->curEditorExistsAndFocused() )
135 return;
136
137 if ( mSplitter->getCurEditor()->getDocument().hasFilepath() ) {
138 if ( mSplitter->getCurEditor()->save() ) {
139 updateEditorState();
140 } else {
141 UIMessageBox* msgBox = errorMsgBox(
142 i18n( "could_not_write_file",
143 "Could not write file to disk.\nPlease check if the file "
144 "is read-only or if ecode does not have permissions to write to that file.\n"
145 "File path is: " ) +
146 mSplitter->getCurEditor()->getDocument().getFilePath() );
147
148 setFocusEditorOnClose( msgBox );
149 }
150 } else {
151 saveFileDialog( mSplitter->getCurEditor() );
152 }
153}
154
155void App::saveAllProcess() {
156 if ( mTmpDocs.empty() )

Callers

nothing calls this directly

Calls 6

hasFilepathMethod · 0.80
getDocumentMethod · 0.80
getCurEditorMethod · 0.80
getFilePathMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected