Mercurial > octave-nkf
comparison libgui/src/settings-dialog.cc @ 18155:14acb08d75fa gui-release
gui: optionally set focus to console when a command is run from another widget
* settings-dialog.ui: new checkbox for focus switching to console
* settings-dialog.cc (constructor): read new setting and init check box,
(write_changed_settings): write state from check box into settings file
* main-window.cc (focus_console_after_command): new functions checking
settings file for new settings,
(execute_command_in_terminal): focus console if desired,
(run_file_in_terminal): focus console if desired
* main-window.h: new function focus_console_after_command
author | Torsten <ttl@justmail.de> |
---|---|
date | Fri, 20 Dec 2013 16:13:20 +0100 |
parents | d62570cfbab9 |
children | b3838cedfe04 |
comparison
equal
deleted
inserted
replaced
18153:5971c8f515a7 | 18155:14acb08d75fa |
---|---|
166 ui->proxyHostName->setText (settings->value ("proxyHostName").toString ()); | 166 ui->proxyHostName->setText (settings->value ("proxyHostName").toString ()); |
167 ui->terminal_cursorBlinking->setChecked ( | 167 ui->terminal_cursorBlinking->setChecked ( |
168 settings->value ("terminal/cursorBlinking",true).toBool ()); | 168 settings->value ("terminal/cursorBlinking",true).toBool ()); |
169 ui->terminal_cursorUseForegroundColor->setChecked ( | 169 ui->terminal_cursorUseForegroundColor->setChecked ( |
170 settings->value ("terminal/cursorUseForegroundColor",true).toBool ()); | 170 settings->value ("terminal/cursorUseForegroundColor",true).toBool ()); |
171 ui->terminal_focus_command->setChecked ( | |
172 settings->value ("terminal/focus_after_command",false).toBool ()); | |
171 | 173 |
172 QString cursorType | 174 QString cursorType |
173 = settings->value ("terminal/cursorType", "ibeam").toString (); | 175 = settings->value ("terminal/cursorType", "ibeam").toString (); |
174 | 176 |
175 QStringList items; | 177 QStringList items; |
535 settings->setValue ("proxyPassword", ui->proxyPassword->text ()); | 537 settings->setValue ("proxyPassword", ui->proxyPassword->text ()); |
536 settings->setValue ("terminal/cursorBlinking", | 538 settings->setValue ("terminal/cursorBlinking", |
537 ui->terminal_cursorBlinking->isChecked ()); | 539 ui->terminal_cursorBlinking->isChecked ()); |
538 settings->setValue ("terminal/cursorUseForegroundColor", | 540 settings->setValue ("terminal/cursorUseForegroundColor", |
539 ui->terminal_cursorUseForegroundColor->isChecked ()); | 541 ui->terminal_cursorUseForegroundColor->isChecked ()); |
542 settings->setValue ("terminal/focus_after_command", | |
543 ui->terminal_focus_command->isChecked ()); | |
540 | 544 |
541 // the cursor | 545 // the cursor |
542 QString cursorType; | 546 QString cursorType; |
543 switch (ui->terminal_cursorType->currentIndex ()) | 547 switch (ui->terminal_cursorType->currentIndex ()) |
544 { | 548 { |