Mercurial > hg > octave-lyh
diff libgui/src/settings-dialog.cc @ 16703:5cf19370011d
add more settings concerning tabs and indentation to the editor settings
* settings-dialog.ui: insert input widget for tabs and indentation
* settings-dialog.cc(constructor): read state for input widgets from settings,
(write_changed_settings): write state of input widgets into settings file
* file-editor-tab.cc(notice-settings): load tab width and indentation options
from settings
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 26 May 2013 22:16:21 +0200 |
parents | 553cfdd5d660 |
children | 28a58b06e4ff |
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc +++ b/libgui/src/settings-dialog.cc @@ -110,6 +110,12 @@ ui->editor_checkbox_ac_replace->setChecked (settings->value ("editor/codeCompletion_replace",false).toBool ()); ui->editor_ws_checkbox->setChecked (settings->value ("editor/show_white_space",false).toBool ()); ui->editor_ws_indent_checkbox->setChecked (settings->value ("editor/show_white_space_indent",false).toBool ()); + ui->editor_auto_ind_checkbox->setChecked (settings->value ("editor/auto_indent",true).toBool ()); + ui->editor_tab_ind_checkbox->setChecked (settings->value ("editor/tab_indents_line",false).toBool ()); + ui->editor_bs_unind_checkbox->setChecked (settings->value ("editor/backspace_unindents_line",false).toBool ()); + ui->editor_ind_guides_checkbox->setChecked (settings->value ("editor/show_indent_guides",false).toBool ()); + ui->editor_ind_width_spinbox->setValue (settings->value ("editor/indent_width",2).toInt ()); + ui->editor_tab_width_spinbox->setValue (settings->value ("editor/tab_width",2).toInt ()); ui->editor_longWindowTitle->setChecked (settings->value ("editor/longWindowTitle",false).toBool ()); ui->editor_restoreSession->setChecked (settings->value ("editor/restoreSession",true).toBool ()); ui->terminal_fontName->setCurrentFont (QFont (settings->value ("terminal/fontName","Courier New").toString()) ); @@ -415,6 +421,12 @@ settings->setValue ("editor/codeCompletion_replace", ui->editor_checkbox_ac_replace->isChecked ()); settings->setValue ("editor/show_white_space", ui->editor_ws_checkbox->isChecked ()); settings->setValue ("editor/show_white_space_indent", ui->editor_ws_indent_checkbox->isChecked ()); + settings->setValue ("editor/auto_indent", ui->editor_auto_ind_checkbox->isChecked ()); + settings->setValue ("editor/tab_indents_line", ui->editor_tab_ind_checkbox->isChecked ()); + settings->setValue ("editor/backspace_unindents_line", ui->editor_bs_unind_checkbox->isChecked ()); + settings->setValue ("editor/show_indent_guides", ui->editor_ind_guides_checkbox->isChecked ()); + settings->setValue ("editor/indent_width", ui->editor_ind_width_spinbox->value ()); + settings->setValue ("editor/tab_width", ui->editor_tab_width_spinbox->value ()); settings->setValue ("editor/longWindowTitle", ui->editor_longWindowTitle->isChecked()); settings->setValue ("editor/restoreSession", ui->editor_restoreSession->isChecked ()); settings->setValue ("terminal/fontSize", ui->terminal_fontSize->value());