/***************************************************************************
- * Copyright (C) 2009 by Lassi Väätämöinen *
- * lassi.vaatamoinen@ixonos.com *
+ * Copyright (C) 2010 by Ixonos Plc *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
+ * the Free Software Foundation; version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
this, SLOT(on_alert(std::auto_ptr<Alert>)));
LoadPlugins();
+ RestoreSettings();
}
}
+void MainWindow::RestoreSettings()
+{
+ btSession_.setUploadRateLimit(settings_.value("network/uploadRate").toInt());
+ btSession_.setDownloadRateLimit(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();