Browse Source

Correctly hide anonymous settings when using libtorrent < v0.16

adaptive-webui-19844
Christophe Dumez 13 years ago
parent
commit
61faf34ef7
  1. 26
      src/preferences/options.ui
  2. 1
      src/preferences/options_imp.cpp
  3. 2
      src/webui/html/preferences_content.html

26
src/preferences/options.ui

@ -177,8 +177,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>485</width> <width>494</width>
<height>632</height> <height>649</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="verticalLayout_9">
@ -516,8 +516,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>488</width> <width>507</width>
<height>902</height> <height>930</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -976,8 +976,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>443</width> <width>494</width>
<height>506</height> <height>520</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_20"> <layout class="QVBoxLayout" name="verticalLayout_20">
@ -1420,8 +1420,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>384</width> <width>494</width>
<height>440</height> <height>454</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_33"> <layout class="QVBoxLayout" name="verticalLayout_33">
@ -1832,8 +1832,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>530</width> <width>556</width>
<height>500</height> <height>516</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7"> <layout class="QVBoxLayout" name="verticalLayout_7">
@ -1992,7 +1992,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_23"> <widget class="QLabel" name="label_anonymous">
<property name="text"> <property name="text">
<string> (&lt;a href=&quot;http://sourceforge.net/apps/mediawiki/qbittorrent/index.php?title=Anonymous_mode&quot;&gt;More information&lt;/a&gt;)</string> <string> (&lt;a href=&quot;http://sourceforge.net/apps/mediawiki/qbittorrent/index.php?title=Anonymous_mode&quot;&gt;More information&lt;/a&gt;)</string>
</property> </property>
@ -2243,8 +2243,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>419</width> <width>453</width>
<height>535</height> <height>549</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_23"> <layout class="QVBoxLayout" name="verticalLayout_23">

1
src/preferences/options_imp.cpp

@ -126,6 +126,7 @@ options_imp::options_imp(QWidget *parent):
#endif #endif
#if LIBTORRENT_VERSION_MINOR < 16 #if LIBTORRENT_VERSION_MINOR < 16
checkAnonymousMode->setVisible(false); checkAnonymousMode->setVisible(false);
label_anonymous->setVisible(false);
#endif #endif
// Connect signals / slots // Connect signals / slots

2
src/webui/html/preferences_content.html

@ -642,7 +642,7 @@ loadPreferences = function() {
if($defined(pref.anonymous_mode)) { if($defined(pref.anonymous_mode)) {
$('anonymous_mode_checkbox').setProperty('checked', pref.anonymous_mode); $('anonymous_mode_checkbox').setProperty('checked', pref.anonymous_mode);
} else { } else {
$('enable_utp_checkbox').addClass('invisible'); $('anonymous_mode_checkbox').addClass('invisible');
} }
// Downloads // Downloads
$("savepath_text").setProperty('value', pref.save_path); $("savepath_text").setProperty('value', pref.save_path);

Loading…
Cancel
Save