Mercurial > octave-nkf
changeset 16701:ccfbc767ff5a
make case sensitivity of editors auto completion list configurable
* settings-dialog.ui: insert a checkbox for case sensitivity
* settings-dialog.cc(read_settings): read state for new checkbox from settings,
(write_changed_settings): write state of checkbox into settings file
* file-editor-tab.cc(notice-settings): load auto completion case sensitivity
from settings
author | Torsten <ttl@justmail.de> |
---|---|
date | Sat, 25 May 2013 16:36:34 +0200 |
parents | cd7d08b8c928 |
children | 553cfdd5d660 |
files | libgui/src/m-editor/file-editor-tab.cc libgui/src/settings-dialog.cc libgui/src/settings-dialog.ui |
diffstat | 3 files changed, 88 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc Sat May 25 15:00:31 2013 +0200 +++ b/libgui/src/m-editor/file-editor-tab.cc Sat May 25 16:36:34 2013 +0200 @@ -1115,7 +1115,8 @@ _edit_area->setAutoCompletionReplaceWord (settings->value ("editor/codeCompletion_replace",false).toBool ()); - + _edit_area->setAutoCompletionCaseSensitivity + (settings->value ("editor/codeCompletion_case",true).toBool ()); _edit_area->setAutoCompletionThreshold (settings->value ("editor/codeCompletion_threshold",2).toInt ()); }
--- a/libgui/src/settings-dialog.cc Sat May 25 15:00:31 2013 +0200 +++ b/libgui/src/settings-dialog.cc Sat May 25 16:36:34 2013 +0200 @@ -106,6 +106,7 @@ ui->editor_spinbox_ac_threshold->setValue (settings->value ("editor/codeCompletion_threshold",2).toInt ()); ui->editor_checkbox_ac_keywords->setChecked (settings->value ("editor/codeCompletion_keywords",true).toBool ()); ui->editor_checkbox_ac_document->setChecked (settings->value ("editor/codeCompletion_document",false).toBool ()); + ui->editor_checkbox_ac_case->setChecked (settings->value ("editor/codeCompletion_case",true).toBool ()); ui->editor_checkbox_ac_replace->setChecked (settings->value ("editor/codeCompletion_replace",false).toBool ()); ui->editor_longWindowTitle->setChecked (settings->value ("editor/longWindowTitle",false).toBool ()); ui->editor_restoreSession->setChecked (settings->value ("editor/restoreSession",true).toBool ()); @@ -408,6 +409,7 @@ settings->setValue ("editor/codeCompletion_threshold", ui->editor_spinbox_ac_threshold->value ()); settings->setValue ("editor/codeCompletion_keywords", ui->editor_checkbox_ac_keywords->isChecked ()); settings->setValue ("editor/codeCompletion_document", ui->editor_checkbox_ac_document->isChecked ()); + settings->setValue ("editor/codeCompletion_case", ui->editor_checkbox_ac_case->isChecked ()); settings->setValue ("editor/codeCompletion_replace", ui->editor_checkbox_ac_replace->isChecked ()); settings->setValue ("editor/longWindowTitle", ui->editor_longWindowTitle->isChecked()); settings->setValue ("editor/restoreSession", ui->editor_restoreSession->isChecked ());
--- a/libgui/src/settings-dialog.ui Sat May 25 15:00:31 2013 +0200 +++ b/libgui/src/settings-dialog.ui Sat May 25 16:36:34 2013 +0200 @@ -289,6 +289,35 @@ </item> <item> <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QCheckBox" name="editor_codeCompletion"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Code completion</string> + </property> + <property name="checked"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="0" column="1"> + <spacer name="horizontalSpacer_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>0</height> + </size> + </property> + </spacer> + </item> <item row="0" column="2"> <layout class="QHBoxLayout" name="horizontalLayout_2"> <property name="spacing"> @@ -345,21 +374,8 @@ </layout> </item> <item row="1" column="2"> - <layout class="QHBoxLayout" name="horizontalLayout_4"> - <item> - <widget class="QCheckBox" name="editor_checkbox_ac_keywords"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Match keywords</string> - </property> - <property name="checked"> - <bool>true</bool> - </property> - </widget> - </item> - <item> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="0" column="1"> <widget class="QCheckBox" name="editor_checkbox_ac_document"> <property name="enabled"> <bool>false</bool> @@ -369,7 +385,7 @@ </property> </widget> </item> - <item> + <item row="0" column="2"> <spacer name="horizontalSpacer_8"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -382,47 +398,44 @@ </property> </spacer> </item> + <item row="0" column="0"> + <widget class="QCheckBox" name="editor_checkbox_ac_keywords"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Match keywords</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QCheckBox" name="editor_checkbox_ac_case"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Case sensitive</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QCheckBox" name="editor_checkbox_ac_replace"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Replace word by suggested one</string> + </property> + </widget> + </item> </layout> </item> - <item row="0" column="0"> - <widget class="QCheckBox" name="editor_codeCompletion"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Code completion</string> - </property> - <property name="checked"> - <bool>false</bool> - </property> - </widget> - </item> - <item row="0" column="1"> - <spacer name="horizontalSpacer_7"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>0</height> - </size> - </property> - </spacer> - </item> - <item row="2" column="2"> - <widget class="QCheckBox" name="editor_checkbox_ac_replace"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="text"> - <string>Replace the rest of the actual word by suggested word</string> - </property> - </widget> - </item> </layout> </item> </layout> @@ -1235,5 +1248,21 @@ </hint> </hints> </connection> + <connection> + <sender>editor_codeCompletion</sender> + <signal>toggled(bool)</signal> + <receiver>editor_checkbox_ac_case</receiver> + <slot>setEnabled(bool)</slot> + <hints> + <hint type="sourcelabel"> + <x>83</x> + <y>172</y> + </hint> + <hint type="destinationlabel"> + <x>525</x> + <y>203</y> + </hint> + </hints> + </connection> </connections> </ui>