From 26b23678336216231faaf3034697cc53a8caafab Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 20 Jan 2010 08:37:53 +0000 Subject: [PATCH] Add in pause settings can be ignored from torrent addition dialog --- Changelog | 1 + src/bittorrent.cpp | 6 +++--- src/torrentadditiondlg.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index 7de348053..83fa02385 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ - BUGFIX: Nox version no longer requires libQtXml - BUGFIX: Configure file now checks for pkg-config executable which is required - BUGFIX: Torrents added from magnet links were not remembered on restart + - BUGFIX: "Add in pause" setting can be ignored from torrent addition dialog * Mon Jan 18 2010 - Christophe Dumez - v2.1.0 - FEATURE: Graphical User Interface can be disabled at compilation time (headless running) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 1bdd7c594..648f165f0 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -802,7 +802,7 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) { else p.storage_mode = storage_mode_sparse; // Start in pause - p.paused = false; + p.paused = true; p.duplicate_is_error = false; // Already checked p.auto_managed = false; // Because it is added in paused state // Adding torrent to Bittorrent session @@ -853,7 +853,7 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) { TorrentPersistentData::saveSavePath(hash, savePath); } } - if(!addInPause && !fastResume) { + if(!fastResume && (!addInPause || Preferences::useAdditionDialog())) { // Start torrent because it was added in paused state h.resume(); } @@ -1056,7 +1056,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr // Copy it to torrentBackup directory QFile::copy(file, newFile); } - if(!addInPause && !fastResume) { + if(!fastResume && (!addInPause || Preferences::useAdditionDialog())) { // Start torrent because it was added in paused state h.resume(); } diff --git a/src/torrentadditiondlg.h b/src/torrentadditiondlg.h index f477c069c..6361a1bc0 100644 --- a/src/torrentadditiondlg.h +++ b/src/torrentadditiondlg.h @@ -95,7 +95,7 @@ public: savePathTxt->setText(Preferences::getSavePath()); if(Preferences::addTorrentsInPause()) { addInPause->setChecked(true); - addInPause->setEnabled(false); + //addInPause->setEnabled(false); } #ifndef LIBTORRENT_0_15 addInSeed->setVisible(false);