Ignore:
Timestamp:
07/13/11 21:42:48 (12 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
268d58f
Parents:
6817002
Message:

The cancel button on the settings dialog works now (ticket #14) and the layout of the settings dialog is stable now (ticket #15).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gui/settingsdialog.cpp

    r6817002 ra4ed73e  
    2727{
    2828    setupUi(this);
     29    connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool)));
     30}
    2931
     32
     33void SettingsDialog::loadDialogData()
     34{
    3035    // deserialize dialog data
    3136    address->setText(AppSettings::proxyAddress());
    3237    port->setValue(AppSettings::proxyPort());
    3338    directConnection->setChecked(AppSettings::isDirectConnection());
    34 
    35     connect(buttonBox, SIGNAL(accepted()), SLOT(saveDialogData()));
    36     connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool)));
    37 
    38     if(directConnection->isChecked())
    39         proxyWidget->hide();
     39    proxyWidget->setDisabled(directConnection->isChecked());
    4040}
    4141
    42 void SettingsDialog::connectionTypeChanged(bool aState)
    43 {
    44     aState ? proxyWidget->hide() : proxyWidget->show();
    45 }
    4642
    4743void SettingsDialog::saveDialogData()
     
    5147    AppSettings::setProxyPort(port->value());
    5248    AppSettings::setDirectConnection(directConnection->isChecked());
    53 
    54     close();
    5549}
    5650
     51
     52void SettingsDialog::connectionTypeChanged(bool aState)
     53{
     54    proxyWidget->setDisabled(aState);
     55}
     56
     57
Note: See TracChangeset for help on using the changeset viewer.