# HG changeset patch # User Torsten # Date 1415296225 -3600 # Node ID 5fb4505b84ff566c4f3044ec3afae1c6aa0f165a # Parent 735bc47d18af954cd30eafe6d642bdca91ffd9e5 provide option for using tabs for indentations in the editor * settings-dialog.ui: add new checkbox for using tabs for indentations * settings-dialog.cc (constructor): init new checkbox from the settings file; (write_changed_settings): write state of new checkbox into the settings file * file-editor-tab.cc (notice-settings): read from settings file whether to use tabs for indentations or not diff -r 735bc47d18af -r 5fb4505b84ff libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Wed Sep 17 16:28:41 2014 -0400 +++ b/libgui/src/m-editor/file-editor-tab.cc Thu Nov 06 18:50:25 2014 +0100 @@ -1881,6 +1881,8 @@ (settings->value ("editor/backspace_unindents_line",false).toBool ()); _edit_area->setIndentationGuides (settings->value ("editor/show_indent_guides",false).toBool ()); + _edit_area->setIndentationsUseTabs + (settings->value ("editor/indent_uses_tabs",false).toBool ()); _edit_area->setTabWidth (settings->value ("editor/tab_width",2).toInt ()); diff -r 735bc47d18af -r 5fb4505b84ff libgui/src/settings-dialog.cc --- a/libgui/src/settings-dialog.cc Wed Sep 17 16:28:41 2014 -0400 +++ b/libgui/src/settings-dialog.cc Thu Nov 06 18:50:25 2014 +0100 @@ -210,6 +210,8 @@ settings->value ("editor/show_indent_guides",false).toBool ()); ui->editor_ind_width_spinbox->setValue ( settings->value ("editor/indent_width", 2).toInt ()); + ui->editor_ind_uses_tabs_checkbox->setChecked ( + settings->value ("editor/indent_uses_tabs", false).toBool ()); ui->editor_tab_width_spinbox->setValue ( settings->value ("editor/tab_width", 2).toInt ()); ui->editor_longWindowTitle->setChecked ( @@ -663,6 +665,8 @@ ui->editor_ind_guides_checkbox->isChecked ()); settings->setValue ("editor/indent_width", ui->editor_ind_width_spinbox->value ()); + settings->setValue ("editor/indent_uses_tabs", + ui->editor_ind_uses_tabs_checkbox->isChecked ()); settings->setValue ("editor/tab_width", ui->editor_tab_width_spinbox->value ()); settings->setValue ("editor/longWindowTitle", diff -r 735bc47d18af -r 5fb4505b84ff libgui/src/settings-dialog.ui --- a/libgui/src/settings-dialog.ui Wed Sep 17 16:28:41 2014 -0400 +++ b/libgui/src/settings-dialog.ui Thu Nov 06 18:50:25 2014 +0100 @@ -52,8 +52,8 @@ 0 0 - 560 - 353 + 678 + 378 @@ -404,9 +404,9 @@ 0 - 0 + -256 662 - 613 + 634 @@ -755,13 +755,6 @@ - - - - Tab indents line - - - @@ -778,6 +771,13 @@ + + + + Tab indents line + + + @@ -871,6 +871,13 @@ + + + + Indentation uses tabs + + + @@ -1280,8 +1287,8 @@ 0 0 - 488 - 262 + 678 + 378 @@ -1545,8 +1552,8 @@ 0 0 - 474 - 318 + 678 + 378 @@ -1709,8 +1716,8 @@ 0 0 - 203 - 134 + 678 + 378 @@ -1784,8 +1791,8 @@ 0 0 - 368 - 244 + 678 + 378 @@ -2047,8 +2054,8 @@ 0 0 - 529 - 204 + 678 + 378