diff libgui/src/settings-dialog.cc @ 18156: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
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc	Thu Dec 19 17:32:38 2013 -0800
+++ b/libgui/src/settings-dialog.cc	Fri Dec 20 16:13:20 2013 +0100
@@ -168,6 +168,8 @@
     settings->value ("terminal/cursorBlinking",true).toBool ());
   ui->terminal_cursorUseForegroundColor->setChecked (
     settings->value ("terminal/cursorUseForegroundColor",true).toBool ());
+  ui->terminal_focus_command->setChecked (
+    settings->value ("terminal/focus_after_command",false).toBool ());
 
   QString cursorType
     = settings->value ("terminal/cursorType", "ibeam").toString ();
@@ -537,6 +539,8 @@
                       ui->terminal_cursorBlinking->isChecked ());
   settings->setValue ("terminal/cursorUseForegroundColor",
                       ui->terminal_cursorUseForegroundColor->isChecked ());
+  settings->setValue ("terminal/focus_after_command",
+                      ui->terminal_focus_command->isChecked ());
 
   // the cursor
   QString cursorType;