FEATURE: Added feature to shutdown qbittorrent on torrents completion

This commit is contained in:
Christophe Dumez 2010-10-09 14:57:41 +00:00
parent 38c56a2b5f
commit 86fb4a323a
6 changed files with 50 additions and 18 deletions

View file

@ -202,6 +202,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
displaySearchTab(actionSearch_engine->isChecked());
displayRSSTab(actionRSS_Reader->isChecked());
actionShutdown_when_downloads_complete->setChecked(Preferences::shutdownWhenDownloadsComplete());
actionShutdown_qBittorrent_when_downloads_complete->setChecked(Preferences::shutdownqBTWhenDownloadsComplete());
show();
@ -1178,6 +1179,11 @@ void GUI::on_actionShutdown_when_downloads_complete_triggered() {
Preferences::setShutdownWhenDownloadsComplete(is_checked);
}
void GUI::on_actionShutdown_qBittorrent_when_downloads_complete_triggered() {
bool is_checked = static_cast<QAction*>(sender())->isChecked();
Preferences::setShutdownqBTWhenDownloadsComplete(is_checked);
}
void GUI::on_actionSpeed_in_title_bar_triggered() {
displaySpeedInTitle = static_cast<QAction*>(sender())->isChecked();
Preferences::showSpeedInTitleBar(displaySpeedInTitle);