| 180 | } |
| 181 | |
| 182 | void SettingsActions::setCursorBlinkingTime() { |
| 183 | UIMessageBox* msgBox = UIMessageBox::New( |
| 184 | UIMessageBox::INPUT, |
| 185 | i18n( "set_cursor_blinking_time", "Set Cursor Blinking Time:\nSet 0 to disable it.\n" ) |
| 186 | .unescape() ); |
| 187 | msgBox->setTitle( mApp->getWindowTitle() ); |
| 188 | msgBox->setCloseShortcut( { KEY_ESCAPE, 0 } ); |
| 189 | msgBox->getTextInput()->setText( mApp->getConfig().editor.cursorBlinkingTime.toString() ); |
| 190 | msgBox->showWhenReady(); |
| 191 | msgBox->on( Event::OnConfirm, [this, msgBox]( const Event* ) { |
| 192 | mApp->getConfig().editor.cursorBlinkingTime = |
| 193 | Time::fromString( msgBox->getTextInput()->getText().toUtf8() ); |
| 194 | mApp->getSplitter()->forEachEditor( [this]( UICodeEditor* editor ) { |
| 195 | editor->setCursorBlinkTime( mApp->getConfig().editor.cursorBlinkingTime ); |
| 196 | } ); |
| 197 | msgBox->closeWindow(); |
| 198 | } ); |
| 199 | mApp->setFocusEditorOnClose( msgBox ); |
| 200 | } |
| 201 | |
| 202 | void SettingsActions::setIndentTabCharacter() { |
| 203 | UIMessageBox* msgBox = UIMessageBox::New( |
no test coverage detected