FEATURE: Added Auto-Shutdown on downloads completion feature (Linux Only for now)

This commit is contained in:
Christophe Dumez 2010-08-16 17:35:32 +00:00
parent 0af44eadb6
commit df677789d2
10 changed files with 74 additions and 1 deletions

View file

@ -187,6 +187,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
actionSearch_engine->setChecked(Preferences::isSearchEnabled());
displaySearchTab(actionSearch_engine->isChecked());
displayRSSTab(actionRSS_Reader->isChecked());
actionShutdown_when_downloads_complete->setChecked(Preferences::shutdownWhenDownloadsComplete());
show();
@ -1066,6 +1067,11 @@ void GUI::on_actionTop_tool_bar_triggered() {
Preferences::setToolbarDisplayed(is_visible);
}
void GUI::on_actionShutdown_when_downloads_complete_triggered() {
bool is_checked = static_cast<QAction*>(sender())->isChecked();
Preferences::setShutdownWhenDownloadsComplete(is_checked);
}
void GUI::on_actionSpeed_in_title_bar_triggered() {
displaySpeedInTitle = static_cast<QAction*>(sender())->isChecked();
Preferences::showSpeedInTitleBar(displaySpeedInTitle);