| 245 | } |
| 246 | |
| 247 | void 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 | |
| 266 | void TerminalManager::configureTerminalWorkingDir() { |
| 267 | static const auto layout( R"xml( |
no test coverage detected