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

Method configureTerminalScrollback

src/tools/ecode/terminalmanager.cpp:247–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void TerminalManager::configureTerminalScrollback() {
248 UIMessageBox* msgBox =
249 UIMessageBox::New( UIMessageBox::INPUT, mApp->i18n( "configure_terminal_scrollback",
250 "Configure terminal scrollback:" ) );
251 msgBox->setTitle( mApp->getWindowTitle() );
252 msgBox->setCloseShortcut( { KEY_ESCAPE, 0 } );
253 msgBox->getTextInput()->setAllowOnlyNumbers( true, false );
254 msgBox->getTextInput()->setText( String::toString( mApp->getConfig().term.scrollback ) );
255 msgBox->center();
256 msgBox->showWhenReady();
257 msgBox->on( Event::OnConfirm, [this, msgBox]( const Event* ) {
258 int val;
259 if ( String::fromString( val, msgBox->getTextInput()->getText() ) && val >= 0 ) {
260 mApp->getConfig().term.scrollback = val;
261 msgBox->closeWindow();
262 }
263 } );
264}
265
266void TerminalManager::configureTerminalWorkingDir() {
267 static const auto layout( R"xml(

Callers 1

Calls 15

fromStringFunction · 0.85
setAllowOnlyNumbersMethod · 0.80
getConfigMethod · 0.80
centerMethod · 0.80
showWhenReadyMethod · 0.80
closeWindowMethod · 0.80
NewFunction · 0.50
toStringFunction · 0.50
i18nMethod · 0.45
setTitleMethod · 0.45
setCloseShortcutMethod · 0.45
getTextInputMethod · 0.45

Tested by

no test coverage detected