~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 16:17:15 UTC
  • Revision ID: admin@quickmediasolutions.com-20120628161715-hot2y9wx30m0ezw9
Added tr() where appropriate to facilitate translations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
void CSettingsDialog::OnBrowse()
51
51
{
52
 
    QString dir = QFileDialog::getExistingDirectory(this, "Select a Directory",
 
52
    QString dir = QFileDialog::getExistingDirectory(this, tr("Select a Directory"),
53
53
                                                    ui->ReceivedFilesDirectory->text());
54
54
    if(!dir.isEmpty())
55
55
        ui->ReceivedFilesDirectory->setText(dir);
75
75
    else                                       ui->AcceptNone->setChecked(true);
76
76
    ui->AcceptRegEx->setText(Settings::Get("Security/IncomingPattern").toString());
77
77
 
78
 
    // Find the current network interface in the list
 
78
    /* Find the current network interface in the list. */
79
79
    QString interface = Settings::Get("Network/Interface").toString();
80
80
    int index = ui->InterfaceList->findData(interface);
81
81
    if(index != -1)
101
101
                                   interface.name());
102
102
    }
103
103
 
104
 
    // If there weren't any interfaces, disable the combo box
 
104
    /* If there weren't any interfaces, disable the combo box. */
105
105
    if(!ui->InterfaceList->count())
106
106
        ui->InterfaceList->setEnabled(false);
107
107
}
110
110
{
111
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
 
       QMessageBox::warning(this, "Warning:", "Broadcast intervals less than 2 seconds are strongly discouraged "
114
 
                                              "and will have a very negative impact on performance.\n\nAre you "
115
 
                                              "sure you want to continue?",
 
113
       QMessageBox::warning(this, tr("Warning:"),
 
114
                            tr("Broadcast intervals less than 2 seconds are strongly discouraged "
 
115
                               "and will have a very negative impact on performance.\n\nAre you "
 
116
                               "sure you want to continue?"),
116
117
                            QMessageBox::Yes, QMessageBox::No) == QMessageBox::No)
117
118
        return;
118
119