comparison libgui/src/settings-dialog.cc @ 18678:6113e0c6920b

maint: Clean up extra spaces before/after parentheses.
author Rik <rik@octave.org>
date Fri, 25 Apr 2014 13:25:25 -0700
parents 7cb98e81ecd1
children dff05c124017
comparison
equal deleted inserted replaced
18677:f684f7075aee 18678:6113e0c6920b
134 ui->useCustomFileEditor->setChecked (settings->value ("useCustomFileEditor", 134 ui->useCustomFileEditor->setChecked (settings->value ("useCustomFileEditor",
135 false).toBool ()); 135 false).toBool ());
136 ui->customFileEditor->setText ( 136 ui->customFileEditor->setText (
137 settings->value ("customFileEditor").toString ()); 137 settings->value ("customFileEditor").toString ());
138 ui->editor_showLineNumbers->setChecked ( 138 ui->editor_showLineNumbers->setChecked (
139 settings->value ("editor/showLineNumbers",true).toBool () ); 139 settings->value ("editor/showLineNumbers",true).toBool ());
140 140
141 default_var = QColor (240, 240, 240); 141 default_var = QColor (240, 240, 240);
142 QColor setting_color = settings->value ("editor/highlight_current_line_color", 142 QColor setting_color = settings->value ("editor/highlight_current_line_color",
143 default_var).value<QColor> (); 143 default_var).value<QColor> ();
144 _editor_current_line_color = new color_picker (setting_color); 144 _editor_current_line_color = new color_picker (setting_color);
146 _editor_current_line_color->setMinimumSize (50,10); 146 _editor_current_line_color->setMinimumSize (50,10);
147 _editor_current_line_color->setEnabled (false); 147 _editor_current_line_color->setEnabled (false);
148 connect (ui->editor_highlightCurrentLine, SIGNAL (toggled (bool)), 148 connect (ui->editor_highlightCurrentLine, SIGNAL (toggled (bool)),
149 _editor_current_line_color, SLOT (setEnabled (bool))); 149 _editor_current_line_color, SLOT (setEnabled (bool)));
150 ui->editor_highlightCurrentLine->setChecked ( 150 ui->editor_highlightCurrentLine->setChecked (
151 settings->value ("editor/highlightCurrentLine",true).toBool () ); 151 settings->value ("editor/highlightCurrentLine",true).toBool ());
152 ui->editor_long_line_marker->setChecked ( 152 ui->editor_long_line_marker->setChecked (
153 settings->value ("editor/long_line_marker",true).toBool ()); 153 settings->value ("editor/long_line_marker",true).toBool ());
154 ui->editor_long_line_column->setValue ( 154 ui->editor_long_line_column->setValue (
155 settings->value ("editor/long_line_column",80).toInt ()); 155 settings->value ("editor/long_line_column",80).toInt ());
156 156
157 ui->editor_codeCompletion->setChecked ( 157 ui->editor_codeCompletion->setChecked (
158 settings->value ("editor/codeCompletion", true).toBool () ); 158 settings->value ("editor/codeCompletion", true).toBool ());
159 ui->editor_spinbox_ac_threshold->setValue ( 159 ui->editor_spinbox_ac_threshold->setValue (
160 settings->value ("editor/codeCompletion_threshold",2).toInt ()); 160 settings->value ("editor/codeCompletion_threshold",2).toInt ());
161 ui->editor_checkbox_ac_keywords->setChecked ( 161 ui->editor_checkbox_ac_keywords->setChecked (
162 settings->value ("editor/codeCompletion_keywords",true).toBool ()); 162 settings->value ("editor/codeCompletion_keywords",true).toBool ());
163 ui->editor_checkbox_ac_document->setChecked ( 163 ui->editor_checkbox_ac_document->setChecked (
193 ui->editor_create_new_file->setChecked ( 193 ui->editor_create_new_file->setChecked (
194 settings->value ("editor/create_new_file",false).toBool ()); 194 settings->value ("editor/create_new_file",false).toBool ());
195 195
196 // terminal 196 // terminal
197 ui->terminal_fontName->setCurrentFont (QFont ( 197 ui->terminal_fontName->setCurrentFont (QFont (
198 settings->value ("terminal/fontName","Courier New").toString ()) ); 198 settings->value ("terminal/fontName","Courier New").toString ()));
199 ui->terminal_fontSize->setValue ( 199 ui->terminal_fontSize->setValue (
200 settings->value ("terminal/fontSize", 10).toInt ()); 200 settings->value ("terminal/fontSize", 10).toInt ());
201 ui->terminal_history_buffer->setValue ( 201 ui->terminal_history_buffer->setValue (
202 settings->value ("terminal/history_buffer",1000).toInt ()); 202 settings->value ("terminal/history_buffer",1000).toInt ());
203 203
252 else if (cursorType == "underline") 252 else if (cursorType == "underline")
253 ui->terminal_cursorType->setCurrentIndex (2); 253 ui->terminal_cursorType->setCurrentIndex (2);
254 254
255 int currentIndex = 0; 255 int currentIndex = 0;
256 QString proxyTypeString = settings->value ("proxyType").toString (); 256 QString proxyTypeString = settings->value ("proxyType").toString ();
257 while ( (currentIndex < ui->proxyType->count ()) 257 while ((currentIndex < ui->proxyType->count ())
258 && (ui->proxyType->currentText () != proxyTypeString)) 258 && (ui->proxyType->currentText () != proxyTypeString))
259 { 259 {
260 currentIndex++; 260 currentIndex++;
261 ui->proxyType->setCurrentIndex (currentIndex); 261 ui->proxyType->setCurrentIndex (currentIndex);
262 } 262 }
541 541
542 // icon size 542 // icon size
543 settings->setValue ("toolbar_icon_size", ui->toolbar_icon_size->value ()); 543 settings->setValue ("toolbar_icon_size", ui->toolbar_icon_size->value ());
544 544
545 // promp to exit 545 // promp to exit
546 settings->setValue ( "prompt_to_exit", ui->cb_prompt_to_exit->isChecked ()); 546 settings->setValue ("prompt_to_exit", ui->cb_prompt_to_exit->isChecked ());
547 547
548 // Octave startup 548 // Octave startup
549 settings->setValue ("restore_octave_dir", 549 settings->setValue ("restore_octave_dir",
550 ui->cb_restore_octave_dir->isChecked ()); 550 ui->cb_restore_octave_dir->isChecked ());
551 settings->setValue ("octave_startup_dir", ui->le_octave_dir->text ()); 551 settings->setValue ("octave_startup_dir", ui->le_octave_dir->text ());
637 settings->setValue ("terminal/cursorUseForegroundColor", 637 settings->setValue ("terminal/cursorUseForegroundColor",
638 ui->terminal_cursorUseForegroundColor->isChecked ()); 638 ui->terminal_cursorUseForegroundColor->isChecked ());
639 settings->setValue ("terminal/focus_after_command", 639 settings->setValue ("terminal/focus_after_command",
640 ui->terminal_focus_command->isChecked ()); 640 ui->terminal_focus_command->isChecked ());
641 settings->setValue ("terminal/history_buffer", 641 settings->setValue ("terminal/history_buffer",
642 ui->terminal_history_buffer->value() ); 642 ui->terminal_history_buffer->value ());
643 643
644 // the cursor 644 // the cursor
645 QString cursorType; 645 QString cursorType;
646 switch (ui->terminal_cursorType->currentIndex ()) 646 switch (ui->terminal_cursorType->currentIndex ())
647 { 647 {