~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to src/dialogs/CSettingsDialog.cpp

  • Committer: Nathan Osman
  • Date: 2012-06-28 03:33:35 UTC
  • Revision ID: admin@quickmediasolutions.com-20120628033335-w6t0h1ltwr21fv6b
Implemented progress of individual file transfers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
{
32
32
    ui->setupUi(this);
33
33
 
34
 
    // Set the validator for the intervals
 
34
    /* Set the validator for the intervals. */
35
35
    ui->BroadcastInterval->setValidator(new QIntValidator(this));
36
36
    ui->TimeoutInterval->setValidator(new QIntValidator(this));
37
37
 
38
 
    // Refresh the network interface list
 
38
    /* Refresh the network interface list. */
39
39
    RefreshNetworkInterfaces();
40
40
 
41
 
    // Load the settings
 
41
    /* Load the settings. */
42
42
    LoadSettings();
43
43
}
44
44
 
108
108
 
109
109
void CSettingsDialog::accept()
110
110
{
111
 
    // Make sure the user doesn't try to set a really low value
 
111
    /* Make sure the user doesn't try to set a really low value for the broadcast interval. */
112
112
    if(ui->BroadcastInterval->text().toInt() < 2000 &&
113
113
       QMessageBox::warning(this, "Warning:", "Broadcast intervals less than 2 seconds are strongly discouraged "
114
114
                                              "and will have a very negative impact on performance.\n\nAre you "
116
116
                            QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
117
117
        return;
118
118
 
119
 
    // The dialog was accepted, so store the settings
 
119
    /* The dialog was accepted, so store the settings. */
120
120
    Settings::Set("General/MachineName",            ui->MachineName->text());
121
121
    Settings::Set("General/ReceivedFilesDirectory", ui->ReceivedFilesDirectory->text());
122
122
    Settings::SetLoadAtStartup(ui->LoadAtStartup->isChecked());