From cc97ee86df20327faad3e4d3a65ee1fb529d070e Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 21 May 2010 12:30:57 +0000 Subject: [PATCH] FEATURE: Added "No action" setting for double-click action --- Changelog | 1 + src/options_imp.h | 2 +- src/transferlistwidget.cpp | 5 ++-- src/ui/options.ui | 50 ++++++++++++++++++-------------------- 4 files changed, 28 insertions(+), 30 deletions(-) diff --git a/Changelog b/Changelog index d65344e82..e375c5eda 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ - FEATURE: The user can force listening on a particular network interface - FEATURE: Added cookie support for RSS feeds - FEATURE: User can force tracker reannounce + - FEATURE: Added "No action" setting for double-click action - COSMETIC: Display peers country name in tooltip * Sun Mar 14 2010 - Christophe Dumez - v2.2.0 diff --git a/src/options_imp.h b/src/options_imp.h index cb8a218df..f9639895f 100644 --- a/src/options_imp.h +++ b/src/options_imp.h @@ -37,7 +37,7 @@ enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5}; // actions on double-click on torrents -enum DoubleClickAction {TOGGLE_PAUSE, OPEN_DEST}; +enum DoubleClickAction {TOGGLE_PAUSE, OPEN_DEST, NO_ACTION}; using namespace libtorrent; diff --git a/src/transferlistwidget.cpp b/src/transferlistwidget.cpp index 18c8bd7fc..1d4d8e1c3 100644 --- a/src/transferlistwidget.cpp +++ b/src/transferlistwidget.cpp @@ -568,11 +568,10 @@ void TransferListWidget::torrentDoubleClicked(const QModelIndex& index) { QTorrentHandle h = BTSession->getTorrentHandle(hash); if(!h.is_valid()) return; int action; - QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); if(h.is_seed()) { - action = settings.value(QString::fromUtf8("Preferences/Downloads/DblClOnTorFN"), 0).toInt(); + action = Preferences::getActionOnDblClOnTorrentFn(); } else { - action = settings.value(QString::fromUtf8("Preferences/Downloads/DblClOnTorDl"), 0).toInt(); + action = Preferences::getActionOnDblClOnTorrentDl(); } switch(action) { diff --git a/src/ui/options.ui b/src/ui/options.ui index fb2f576d6..2e63fd99f 100644 --- a/src/ui/options.ui +++ b/src/ui/options.ui @@ -241,7 +241,7 @@ 0 0 - 515 + 506 543 @@ -436,6 +436,11 @@ QGroupBox { Open folder + + + No action + + @@ -470,6 +475,11 @@ QGroupBox { Open folder + + + No action + + @@ -555,8 +565,8 @@ QGroupBox { 0 0 - 658 - 684 + 632 + 686 @@ -729,18 +739,6 @@ QGroupBox { false - - false - - - false - - - true - - - 80 - @@ -1111,8 +1109,8 @@ QGroupBox { 0 0 - 524 - 398 + 447 + 288 @@ -1356,8 +1354,8 @@ QGroupBox { 0 0 - 524 - 406 + 364 + 328 @@ -1771,7 +1769,7 @@ QGroupBox { 0 0 - 482 + 459 407 @@ -2188,7 +2186,7 @@ QGroupBox { 0 0 - 496 + 475 308 @@ -2622,7 +2620,7 @@ QGroupBox { 0 0 - 296 + 287 124 @@ -2719,7 +2717,7 @@ QGroupBox { 0 0 - 226 + 213 221 @@ -2886,7 +2884,7 @@ QGroupBox { 0 0 - 459 + 445 192 @@ -3061,8 +3059,8 @@ QGroupBox { 0 0 - 62 - 18 + 98 + 28