comparison 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
comparison
equal deleted inserted replaced
18711:9ef65c422f53 18717:f017240310fb
268 // qorkspace colors 268 // qorkspace colors
269 read_workspace_colors (settings); 269 read_workspace_colors (settings);
270 270
271 // terminal colors 271 // terminal colors
272 read_terminal_colors (settings); 272 read_terminal_colors (settings);
273
274 // shortcuts
275 ui->cb_prevent_readline_conflicts->setChecked (
276 settings->value ("shortcuts/prevent_readline_conflicts", true).toBool ());
273 277
274 #ifdef HAVE_QSCINTILLA 278 #ifdef HAVE_QSCINTILLA
275 // editor styles: create lexer, read settings, and create dialog elements 279 // editor styles: create lexer, read settings, and create dialog elements
276 QsciLexer *lexer; 280 QsciLexer *lexer;
277 #if defined (HAVE_LEXER_OCTAVE) 281 #if defined (HAVE_LEXER_OCTAVE)
648 case 0: cursorType = "ibeam"; break; 652 case 0: cursorType = "ibeam"; break;
649 case 1: cursorType = "block"; break; 653 case 1: cursorType = "block"; break;
650 case 2: cursorType = "underline"; break; 654 case 2: cursorType = "underline"; break;
651 } 655 }
652 settings->setValue ("terminal/cursorType", cursorType); 656 settings->setValue ("terminal/cursorType", cursorType);
653 settings->sync ();
654 657
655 #ifdef HAVE_QSCINTILLA 658 #ifdef HAVE_QSCINTILLA
656 // editor styles: create lexer, get dialog contents, and write settings 659 // editor styles: create lexer, get dialog contents, and write settings
657 QsciLexer *lexer; 660 QsciLexer *lexer;
658 #if defined (HAVE_LEXER_OCTAVE) 661 #if defined (HAVE_LEXER_OCTAVE)
683 686
684 write_workspace_colors (settings); 687 write_workspace_colors (settings);
685 688
686 write_terminal_colors (settings); 689 write_terminal_colors (settings);
687 690
691 // shortcuts
692 settings->setValue ("shortcuts/prevent_readline_conflicts",
693 ui->cb_prevent_readline_conflicts->isChecked ());
688 shortcut_manager::write_shortcuts (); 694 shortcut_manager::write_shortcuts ();
689 695
696 // settings dialog's geometry
690 settings->setValue ("settings/last_tab",ui->tabWidget->currentIndex ()); 697 settings->setValue ("settings/last_tab",ui->tabWidget->currentIndex ());
691 settings->setValue ("settings/geometry",saveGeometry ()); 698 settings->setValue ("settings/geometry",saveGeometry ());
699
692 settings->sync (); 700 settings->sync ();
693 } 701 }
694 702
695 #ifdef HAVE_QSCINTILLA 703 #ifdef HAVE_QSCINTILLA
696 void 704 void