From 61faf34ef7853cd8b1c0453719c479af5d5826a5 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 25 Sep 2011 12:05:33 +0300 Subject: [PATCH] Correctly hide anonymous settings when using libtorrent < v0.16 --- src/preferences/options.ui | 26 ++++++++++++------------- src/preferences/options_imp.cpp | 1 + src/webui/html/preferences_content.html | 8 ++++---- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/preferences/options.ui b/src/preferences/options.ui index 8c7f4ffb3..736187624 100644 --- a/src/preferences/options.ui +++ b/src/preferences/options.ui @@ -177,8 +177,8 @@ 0 0 - 485 - 632 + 494 + 649 @@ -516,8 +516,8 @@ 0 0 - 488 - 902 + 507 + 930 @@ -976,8 +976,8 @@ 0 0 - 443 - 506 + 494 + 520 @@ -1420,8 +1420,8 @@ 0 0 - 384 - 440 + 494 + 454 @@ -1832,8 +1832,8 @@ 0 0 - 530 - 500 + 556 + 516 @@ -1992,7 +1992,7 @@ - + (<a href="http://sourceforge.net/apps/mediawiki/qbittorrent/index.php?title=Anonymous_mode">More information</a>) @@ -2243,8 +2243,8 @@ 0 0 - 419 - 535 + 453 + 549 diff --git a/src/preferences/options_imp.cpp b/src/preferences/options_imp.cpp index 977bf3d63..aad34b208 100644 --- a/src/preferences/options_imp.cpp +++ b/src/preferences/options_imp.cpp @@ -126,6 +126,7 @@ options_imp::options_imp(QWidget *parent): #endif #if LIBTORRENT_VERSION_MINOR < 16 checkAnonymousMode->setVisible(false); + label_anonymous->setVisible(false); #endif // Connect signals / slots diff --git a/src/webui/html/preferences_content.html b/src/webui/html/preferences_content.html index e47271f6c..c086044ec 100644 --- a/src/webui/html/preferences_content.html +++ b/src/webui/html/preferences_content.html @@ -639,10 +639,10 @@ loadPreferences = function() { $('lsd_checkbox').setProperty('checked', pref.lsd); var encryption = pref.encryption.toInt(); $('encryption_select').getChildren('option')[encryption].setAttribute('selected', ''); - if($defined(pref.anonymous_mode)) { - $('anonymous_mode_checkbox').setProperty('checked', pref.anonymous_mode); - } else { - $('enable_utp_checkbox').addClass('invisible'); + if($defined(pref.anonymous_mode)) { + $('anonymous_mode_checkbox').setProperty('checked', pref.anonymous_mode); + } else { + $('anonymous_mode_checkbox').addClass('invisible'); } // Downloads $("savepath_text").setProperty('value', pref.save_path);