comparison libgui/src/settings-dialog.cc @ 18767:f6f1f27026bb gui-release

status bars and code folding a user preference (bug #42306) * settings-dialog.ui: new checkboxes for status bars (main window and editor) and code folding * settings-dialog.cc (constructor): init new checkboxes from settings, (write-changed-settings): write boxes check states into settings * file-editor-tab.cc (constructor): do not set code folding here, (notice-settings): set code folding and show/hide status bar depending on settings * main-window.cc (notice-settings): show/hide status bar depending on settings
author Torsten <ttl@justmail.de>
date Tue, 06 May 2014 20:38:50 +0200
parents 95249367d6fa
children dff05c124017 3f6280d0a36b
comparison
equal deleted inserted replaced
18766:0f9ed79fb206 18767:f6f1f27026bb
120 120
121 // prompt on exit 121 // prompt on exit
122 ui->cb_prompt_to_exit->setChecked ( 122 ui->cb_prompt_to_exit->setChecked (
123 settings->value ("prompt_to_exit",false).toBool ()); 123 settings->value ("prompt_to_exit",false).toBool ());
124 124
125 // Main status bar
126 ui->cb_status_bar->setChecked (
127 settings->value ("show_status_bar",true).toBool ());
128
125 // Octave startup 129 // Octave startup
126 ui->cb_restore_octave_dir->setChecked ( 130 ui->cb_restore_octave_dir->setChecked (
127 settings->value ("restore_octave_dir",false).toBool ()); 131 settings->value ("restore_octave_dir",false).toBool ());
128 ui->le_octave_dir->setText ( 132 ui->le_octave_dir->setText (
129 settings->value ("octave_startup_dir").toString ()); 133 settings->value ("octave_startup_dir").toString ());
151 settings->value ("editor/highlightCurrentLine",true).toBool () ); 155 settings->value ("editor/highlightCurrentLine",true).toBool () );
152 ui->editor_long_line_marker->setChecked ( 156 ui->editor_long_line_marker->setChecked (
153 settings->value ("editor/long_line_marker",true).toBool ()); 157 settings->value ("editor/long_line_marker",true).toBool ());
154 ui->editor_long_line_column->setValue ( 158 ui->editor_long_line_column->setValue (
155 settings->value ("editor/long_line_column",80).toInt ()); 159 settings->value ("editor/long_line_column",80).toInt ());
160 ui->cb_edit_status_bar->setChecked (
161 settings->value ("editor/show_edit_status_bar",true).toBool ());
162 ui->cb_code_folding->setChecked (
163 settings->value ("editor/code_folding",true).toBool ());
156 164
157 ui->editor_codeCompletion->setChecked ( 165 ui->editor_codeCompletion->setChecked (
158 settings->value ("editor/codeCompletion", true).toBool () ); 166 settings->value ("editor/codeCompletion", true).toBool () );
159 ui->editor_spinbox_ac_threshold->setValue ( 167 ui->editor_spinbox_ac_threshold->setValue (
160 settings->value ("editor/codeCompletion_threshold",2).toInt ()); 168 settings->value ("editor/codeCompletion_threshold",2).toInt ());
550 settings->setValue ("toolbar_icon_size", ui->toolbar_icon_size->value ()); 558 settings->setValue ("toolbar_icon_size", ui->toolbar_icon_size->value ());
551 559
552 // promp to exit 560 // promp to exit
553 settings->setValue ( "prompt_to_exit", ui->cb_prompt_to_exit->isChecked ()); 561 settings->setValue ( "prompt_to_exit", ui->cb_prompt_to_exit->isChecked ());
554 562
563 // status bar
564 settings->setValue ( "show_status_bar", ui->cb_status_bar->isChecked ());
565
555 // Octave startup 566 // Octave startup
556 settings->setValue ("restore_octave_dir", 567 settings->setValue ("restore_octave_dir",
557 ui->cb_restore_octave_dir->isChecked ()); 568 ui->cb_restore_octave_dir->isChecked ());
558 settings->setValue ("octave_startup_dir", ui->le_octave_dir->text ()); 569 settings->setValue ("octave_startup_dir", ui->le_octave_dir->text ());
559 570
569 _editor_current_line_color->color ()); 580 _editor_current_line_color->color ());
570 settings->setValue ("editor/long_line_marker", 581 settings->setValue ("editor/long_line_marker",
571 ui->editor_long_line_marker->isChecked ()); 582 ui->editor_long_line_marker->isChecked ());
572 settings->setValue ("editor/long_line_column", 583 settings->setValue ("editor/long_line_column",
573 ui->editor_long_line_column->value ()); 584 ui->editor_long_line_column->value ());
585 settings->setValue ("editor/code_folding",
586 ui->cb_code_folding->isChecked ());
587 settings->setValue ("editor/show_edit_status_bar",
588 ui->cb_edit_status_bar->isChecked ());
574 settings->setValue ("editor/codeCompletion", 589 settings->setValue ("editor/codeCompletion",
575 ui->editor_codeCompletion->isChecked ()); 590 ui->editor_codeCompletion->isChecked ());
576 settings->setValue ("editor/codeCompletion_threshold", 591 settings->setValue ("editor/codeCompletion_threshold",
577 ui->editor_spinbox_ac_threshold->value ()); 592 ui->editor_spinbox_ac_threshold->value ());
578 settings->setValue ("editor/codeCompletion_keywords", 593 settings->setValue ("editor/codeCompletion_keywords",