diff libgui/src/settings-dialog.cc @ 18717:f017240310fb gui-release

disabling global shortcuts when terminal has focus as user preference * main-window.h: new flag _prevent_readline__conflicts, new function configure_shortcuts * main-window.cc (constructor): initialize new flag to true; (notice_settings): read value of flag from settings, configure shortcuts; (configure_shortcuts): new function setting all shortcuts from the settings; (construct): configure shortcuts via new function; (set_global_shortcuts): return if global shortcuts should not be disabled when terminal has focus, use new function configure_shortcuts; * settings-dialog.ui: new checkbox in the shortcut tab whether global shortcuts should be desabled when terminal has focus or not * settings-dialog.cc (constructor): read value for checkbox from settings; (write_changed_settings): write value of checkbox to the settings
author Torsten <ttl@justmail.de>
date Fri, 02 May 2014 17:44:44 +0200
parents 7cb98e81ecd1
children 95249367d6fa
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc	Thu May 01 13:24:27 2014 +0200
+++ b/libgui/src/settings-dialog.cc	Fri May 02 17:44:44 2014 +0200
@@ -271,6 +271,10 @@
   // terminal colors
   read_terminal_colors (settings);
 
+  // shortcuts
+  ui->cb_prevent_readline_conflicts->setChecked (
+    settings->value ("shortcuts/prevent_readline_conflicts", true).toBool ());
+
 #ifdef HAVE_QSCINTILLA
   // editor styles: create lexer, read settings, and create dialog elements
   QsciLexer *lexer;
@@ -650,7 +654,6 @@
     case 2: cursorType = "underline";  break;
     }
   settings->setValue ("terminal/cursorType", cursorType);
-  settings->sync ();
 
 #ifdef HAVE_QSCINTILLA
   // editor styles: create lexer, get dialog contents, and write settings
@@ -685,10 +688,15 @@
 
   write_terminal_colors (settings);
 
+  // shortcuts
+  settings->setValue ("shortcuts/prevent_readline_conflicts",
+                      ui->cb_prevent_readline_conflicts->isChecked ());
   shortcut_manager::write_shortcuts ();
 
+  // settings dialog's geometry
   settings->setValue ("settings/last_tab",ui->tabWidget->currentIndex ());
   settings->setValue ("settings/geometry",saveGeometry ());
+
   settings->sync ();
 }