comparison libgui/src/settings-dialog.cc @ 15274:c5d09a57ceb2

provide buttons for the settings dialog (bug #36981) * settings-dialog.ui: Add Ok and Cancel buttons. * settings-dialog.h, settings-dialog.cc (settings_dialog::write_changed_settings): New method. * main-window.cc: Call it.
author Torsten <ttl@justmail.de>
date Sun, 02 Sep 2012 22:39:56 +0200
parents 359098ad343e
children ae9079bbc627
comparison
equal deleted inserted replaced
15273:535bb601e7db 15274:c5d09a57ceb2
83 ui->proxyPassword->setText (settings->value ("proxyPassword").toString ()); 83 ui->proxyPassword->setText (settings->value ("proxyPassword").toString ());
84 } 84 }
85 85
86 settings_dialog::~settings_dialog () 86 settings_dialog::~settings_dialog ()
87 { 87 {
88 delete ui;
89 }
90
91 void
92 settings_dialog::write_changed_settings ()
93 {
88 QSettings *settings = resource_manager::get_settings (); 94 QSettings *settings = resource_manager::get_settings ();
89 95
90 // FIXME -- what should happen if settings is 0? 96 // FIXME -- what should happen if settings is 0?
91 97
92 settings->setValue ("useCustomFileEditor", ui->useCustomFileEditor->isChecked ()); 98 settings->setValue ("useCustomFileEditor", ui->useCustomFileEditor->isChecked ());
120 case 1: cursorType = "block"; break; 126 case 1: cursorType = "block"; break;
121 case 2: cursorType = "underline"; break; 127 case 2: cursorType = "underline"; break;
122 } 128 }
123 settings->setValue ("terminal/cursorType", cursorType); 129 settings->setValue ("terminal/cursorType", cursorType);
124 settings->sync (); 130 settings->sync ();
125 delete ui;
126 } 131 }