[#2472] [GTKUI] [WebUI] Add anonymous_mode UI prefs
This commit is contained in:
parent
184d6be98d
commit
430f9c01d7
|
@ -35,14 +35,14 @@
|
|||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_spin_downloading">
|
||||
<property name="lower">-1</property>
|
||||
<property name="upper">9999</property>
|
||||
<object class="GtkAdjustment" id="adjustment_spin_daemon_port">
|
||||
<property name="upper">65535</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="adjustment_spin_daemon_port">
|
||||
<property name="upper">65535</property>
|
||||
<object class="GtkAdjustment" id="adjustment_spin_downloading">
|
||||
<property name="lower">-1</property>
|
||||
<property name="upper">9999</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
|
@ -3802,6 +3802,50 @@ the proxy instead of using the local DNS service</property>
|
|||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame_anon_mode">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment_anon_mode">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">5</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="chk_anonymous_mode">
|
||||
<property name="label" translatable="yes">Hide Client Identity</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Attempt to hide client identity and only use proxy for incoming connections.</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label_anon_mode">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Anonymous Mode</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -399,6 +399,7 @@ class Preferences(component.Component):
|
|||
"spin_max_connections_per_second": ("value", "max_connections_per_second"),
|
||||
"chk_ignore_limits_on_local_network": ("active", "ignore_limits_on_local_network"),
|
||||
"chk_rate_limit_ip_overhead": ("active", "rate_limit_ip_overhead"),
|
||||
"chk_anonymous_mode": ("active", "anonymous_mode"),
|
||||
"spin_max_connections_per_torrent": ("value", "max_connections_per_torrent"),
|
||||
"spin_max_upload_slots_per_torrent": ("value", "max_upload_slots_per_torrent"),
|
||||
"spin_max_download_per_torrent": ("value", "max_download_speed_per_torrent"),
|
||||
|
@ -706,6 +707,7 @@ class Preferences(component.Component):
|
|||
new_core_config["i2p_proxy"] = {}
|
||||
new_core_config["i2p_proxy"]["hostname"] = self.builder.get_object("entry_i2p_host").get_text()
|
||||
new_core_config["i2p_proxy"]["port"] = self.builder.get_object("spin_i2p_port").get_value_as_int()
|
||||
new_core_config["anonymous_mode"] = self.builder.get_object("chk_anonymous_mode").get_active()
|
||||
|
||||
## Queue tab ##
|
||||
new_core_config["queue_new_to_top"] = \
|
||||
|
|
|
@ -60,6 +60,23 @@ Deluge.preferences.Proxy = Ext.extend(Ext.form.FormPanel, {
|
|||
name: 'i2p_proxy'
|
||||
}));
|
||||
deluge.preferences.getOptionsManager().bind('i2p_proxy', this.i2p_proxy);
|
||||
|
||||
var fieldset = this.add({
|
||||
xtype: 'fieldset',
|
||||
border: false,
|
||||
title: _('Anonymous Mode'),
|
||||
autoHeight: true,
|
||||
labelWidth: 1,
|
||||
defaultType: 'checkbox'
|
||||
});
|
||||
deluge.preferences.getOptionsManager().bind('anonymous_mode', fieldset.add({
|
||||
fieldLabel: '',
|
||||
labelSeparator: '',
|
||||
height: 20,
|
||||
name: 'anonymous_mode',
|
||||
boxLabel: _('Hide Client Identity')
|
||||
}));
|
||||
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
|
|
Loading…
Reference in New Issue