this, SLOT(on_alert(std::auto_ptr<Alert>)));
LoadPlugins();
+ RestoreSettings();
}
}
+void MainWindow::RestoreSettings()
+{
+ btSession_.setUploadRateLimit(settings_.value("network/uploadRate").toInt());
+ btSession_.setUploadRateLimit(settings_.value("network/downloadRate").toInt());
+}
+
// Opens torrent information from buffer data and adds torrent to session
void MainWindow::StartTorrentFromBufferData(char const* data, int size)
void MainWindow::on_preferencesAction_clicked()
{
if (!preferencesDialog_) {
- preferencesDialog_ = new PreferencesDialog(this);
+ preferencesDialog_ = new PreferencesDialog(this, NULL, &btSession_);
}
+
preferencesDialog_->show();
preferencesDialog_->raise();
preferencesDialog_->activateWindow();