mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
[#1294] [GTKUI] [WebUI] Add Skip File Hash Check
* Altered the core code so that seed_mode is now a torrent option. * Made some minor improvments to the Add Dialog
This commit is contained in:
parent
d108091511
commit
66ae8bdd5c
6 changed files with 184 additions and 143 deletions
|
@ -218,18 +218,15 @@ class Core(component.Component):
|
||||||
# Exported Methods
|
# Exported Methods
|
||||||
@export
|
@export
|
||||||
def add_torrent_file(self, filename, filedump, options):
|
def add_torrent_file(self, filename, filedump, options):
|
||||||
"""
|
"""Adds a torrent file to the session.
|
||||||
Adds a torrent file to the session.
|
|
||||||
|
|
||||||
:param filename: the filename of the torrent
|
Args:
|
||||||
:type filename: string
|
filename (str): the filename of the torrent
|
||||||
:param filedump: a base64 encoded string of the torrent file contents
|
filedump (str): A base64 encoded string of the torrent file contents
|
||||||
:type filedump: string
|
options (dict): The options to apply to the torrent on add
|
||||||
:param options: the options to apply to the torrent on add
|
|
||||||
:type options: dict
|
|
||||||
|
|
||||||
:returns: the torrent_id as a str or None
|
Returns:
|
||||||
:rtype: string
|
str: The torrent_id or None
|
||||||
|
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
|
@ -867,11 +864,11 @@ class Core(component.Component):
|
||||||
def on_get_page(result):
|
def on_get_page(result):
|
||||||
return bool(int(result))
|
return bool(int(result))
|
||||||
|
|
||||||
def logError(failure):
|
def on_error(failure):
|
||||||
log.warning("Error testing listen port: %s", failure)
|
log.warning("Error testing listen port: %s", failure)
|
||||||
|
|
||||||
d.addCallback(on_get_page)
|
d.addCallback(on_get_page)
|
||||||
d.addErrback(logError)
|
d.addErrback(on_error)
|
||||||
|
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,7 @@ class TorrentOptions(dict):
|
||||||
mapped_files (dict): A mapping of the renamed filenames in 'index:filename' pairs.
|
mapped_files (dict): A mapping of the renamed filenames in 'index:filename' pairs.
|
||||||
owner (str): The user this torrent belongs to.
|
owner (str): The user this torrent belongs to.
|
||||||
name (str): The display name of the torrent.
|
name (str): The display name of the torrent.
|
||||||
|
seed_mode (bool): Assume that all files are present for this torrent (Only used when adding a torent).
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(TorrentOptions, self).__init__()
|
super(TorrentOptions, self).__init__()
|
||||||
|
@ -148,6 +149,7 @@ class TorrentOptions(dict):
|
||||||
self["mapped_files"] = {}
|
self["mapped_files"] = {}
|
||||||
self["owner"] = ""
|
self["owner"] = ""
|
||||||
self["name"] = ""
|
self["name"] = ""
|
||||||
|
self["seed_mode"] = False
|
||||||
|
|
||||||
|
|
||||||
class Torrent(object):
|
class Torrent(object):
|
||||||
|
|
|
@ -288,7 +288,7 @@ class TorrentManager(component.Component):
|
||||||
return torrent_info
|
return torrent_info
|
||||||
|
|
||||||
def add(self, torrent_info=None, state=None, options=None, save_state=True,
|
def add(self, torrent_info=None, state=None, options=None, save_state=True,
|
||||||
filedump=None, filename=None, magnet=None, resume_data=None, seed_mode=False):
|
filedump=None, filename=None, magnet=None, resume_data=None):
|
||||||
"""Adds a torrent to the torrent manager.
|
"""Adds a torrent to the torrent manager.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -300,8 +300,6 @@ class TorrentManager(component.Component):
|
||||||
filename (str, optional): The filename of the torrent file.
|
filename (str, optional): The filename of the torrent file.
|
||||||
magnet (str, optional): The magnet uri.
|
magnet (str, optional): The magnet uri.
|
||||||
resume_data (lt.entry, optional): libtorrent fast resume data.
|
resume_data (lt.entry, optional): libtorrent fast resume data.
|
||||||
seed_mode (bool, optional): If True will assume that all files are present.
|
|
||||||
for this torrent, defaults to False.
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
str: The torrent_id of the added torrent.
|
str: The torrent_id of the added torrent.
|
||||||
|
@ -451,7 +449,7 @@ class TorrentManager(component.Component):
|
||||||
add_torrent_params["flags"] = ((default_flags
|
add_torrent_params["flags"] = ((default_flags
|
||||||
| lt.add_torrent_params_flags_t.flag_duplicate_is_error)
|
| lt.add_torrent_params_flags_t.flag_duplicate_is_error)
|
||||||
^ lt.add_torrent_params_flags_t.flag_auto_managed)
|
^ lt.add_torrent_params_flags_t.flag_auto_managed)
|
||||||
if seed_mode:
|
if options["seed_mode"]:
|
||||||
add_torrent_params["flags"] |= lt.add_torrent_params_flags_t.flag_seed_mode
|
add_torrent_params["flags"] |= lt.add_torrent_params_flags_t.flag_seed_mode
|
||||||
|
|
||||||
if magnet:
|
if magnet:
|
||||||
|
|
|
@ -449,6 +449,7 @@ class AddTorrentDialog(component.Component):
|
||||||
self.builder.get_object("chk_sequential_download").get_active() or False
|
self.builder.get_object("chk_sequential_download").get_active() or False
|
||||||
options["move_completed"] = \
|
options["move_completed"] = \
|
||||||
self.builder.get_object("chk_move_completed").get_active()
|
self.builder.get_object("chk_move_completed").get_active()
|
||||||
|
options["seed_mode"] = self.builder.get_object("chk_seed_mode").get_active()
|
||||||
|
|
||||||
self.options[torrent_id] = options
|
self.options[torrent_id] = options
|
||||||
|
|
||||||
|
@ -491,6 +492,7 @@ class AddTorrentDialog(component.Component):
|
||||||
self.core_config["sequential_download"])
|
self.core_config["sequential_download"])
|
||||||
self.builder.get_object("chk_move_completed").set_active(
|
self.builder.get_object("chk_move_completed").set_active(
|
||||||
self.core_config["move_completed"])
|
self.core_config["move_completed"])
|
||||||
|
self.builder.get_object("chk_seed_mode").set_active(False)
|
||||||
|
|
||||||
def get_file_priorities(self, torrent_id):
|
def get_file_priorities(self, torrent_id):
|
||||||
# A list of priorities
|
# A list of priorities
|
||||||
|
@ -762,7 +764,8 @@ class AddTorrentDialog(component.Component):
|
||||||
client.core.add_torrent_file(
|
client.core.add_torrent_file(
|
||||||
os.path.split(filename)[-1],
|
os.path.split(filename)[-1],
|
||||||
base64.encodestring(self.infos[torrent_id]),
|
base64.encodestring(self.infos[torrent_id]),
|
||||||
options)
|
options
|
||||||
|
)
|
||||||
|
|
||||||
row = self.torrent_liststore.iter_next(row)
|
row = self.torrent_liststore.iter_next(row)
|
||||||
self.hide()
|
self.hide()
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
<property name="layout_style">center</property>
|
<property name="layout_style">center</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_file">
|
<object class="GtkButton" id="button_file">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
@ -135,6 +136,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_url">
|
<object class="GtkButton" id="button_url">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
@ -182,6 +184,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_hash">
|
<object class="GtkButton" id="button_hash">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
@ -229,6 +232,7 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_remove">
|
<object class="GtkButton" id="button_remove">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
@ -423,6 +427,7 @@
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="chk_move_completed">
|
<object class="GtkCheckButton" id="chk_move_completed">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">False</property>
|
<property name="receives_default">False</property>
|
||||||
|
@ -464,6 +469,129 @@
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="spacing">10</property>
|
<property name="spacing">10</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="frame6">
|
||||||
|
<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="alignment6">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="top_padding">5</property>
|
||||||
|
<property name="left_padding">7</property>
|
||||||
|
<property name="right_padding">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkVBox" id="vbox5">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_paused">
|
||||||
|
<property name="label" translatable="yes">Add In _Paused State</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="use_underline">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_prioritize">
|
||||||
|
<property name="label" translatable="yes">Prioritize First/Last Pieces</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="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_sequential_download">
|
||||||
|
<property name="label" translatable="yes">Sequential Download</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="has_tooltip">True</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">When enabled, the piece picker will pick pieces in
|
||||||
|
sequence instead of rarest first.
|
||||||
|
|
||||||
|
Enabling sequential download will affect the piece
|
||||||
|
distribution negatively in the swarm. It should be
|
||||||
|
used sparingly.</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_seed_mode">
|
||||||
|
<property name="label" translatable="yes">Skip File Hash Check</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_markup">Useful if adding a complete torrent for seeding.</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="chk_pre_alloc">
|
||||||
|
<property name="label" translatable="yes">Preallocate Disk Space</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">Preallocate the disk space for the torrent files</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel" id="label15">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">General</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame" id="frame5">
|
<object class="GtkFrame" id="frame5">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -497,62 +625,66 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="x_options"/>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label11">
|
<object class="GtkLabel" id="label11">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Maximum torrent download speed</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Max Down Speed:</property>
|
<property name="label" translatable="yes">Down Speed:</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label12">
|
<object class="GtkLabel" id="label12">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Maximum torrent upload speed</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Max Up Speed:</property>
|
<property name="label" translatable="yes">Up Speed:</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="bottom_attach">2</property>
|
<property name="bottom_attach">2</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label13">
|
<object class="GtkLabel" id="label13">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Maximum torrent connections</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Max Connections:</property>
|
<property name="label" translatable="yes">Connections:</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="bottom_attach">3</property>
|
<property name="bottom_attach">3</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label14">
|
<object class="GtkLabel" id="label14">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="tooltip_text" translatable="yes">Maximum torrent upload slots</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Max Upload Slots:</property>
|
<property name="label" translatable="yes">Upload Slots:</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="bottom_attach">4</property>
|
<property name="bottom_attach">4</property>
|
||||||
<property name="x_options">GTK_FILL</property>
|
<property name="x_options">GTK_FILL</property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -572,8 +704,8 @@
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="bottom_attach">2</property>
|
<property name="bottom_attach">2</property>
|
||||||
<property name="x_options"/>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -592,8 +724,8 @@
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="bottom_attach">3</property>
|
<property name="bottom_attach">3</property>
|
||||||
<property name="x_options"/>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -612,8 +744,8 @@
|
||||||
<property name="right_attach">2</property>
|
<property name="right_attach">2</property>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="bottom_attach">4</property>
|
<property name="bottom_attach">4</property>
|
||||||
<property name="x_options"/>
|
<property name="x_options"></property>
|
||||||
<property name="y_options"/>
|
<property name="y_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@ -637,108 +769,6 @@
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkFrame" id="frame6">
|
|
||||||
<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="alignment6">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="top_padding">5</property>
|
|
||||||
<property name="left_padding">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkVBox" id="vbox5">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="chk_prioritize">
|
|
||||||
<property name="label" translatable="yes">Prioritize First/Last Pieces</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="chk_sequential_download">
|
|
||||||
<property name="label" translatable="yes">Sequential Download</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="has_tooltip">True</property>
|
|
||||||
<property name="tooltip_text" translatable="yes">When enabled, the piece picker will pick pieces in
|
|
||||||
sequence instead of rarest first.
|
|
||||||
|
|
||||||
Enabling sequential download will affect the piece
|
|
||||||
distribution negatively in the swarm. It should be
|
|
||||||
used sparingly.</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="chk_paused">
|
|
||||||
<property name="label" translatable="yes">Add In _Paused State</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="chk_pre_alloc">
|
|
||||||
<property name="label" translatable="yes">Pre-allocate disk space</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="tooltip_text" translatable="yes">Pre-allocate the disk space for the torrent files</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child type="label">
|
|
||||||
<object class="GtkLabel" id="label15">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">General</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -757,6 +787,7 @@ used sparingly.</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_apply">
|
<object class="GtkButton" id="button_apply">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
@ -810,6 +841,7 @@ used sparingly.</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_revert">
|
<object class="GtkButton" id="button_revert">
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
@ -924,6 +956,7 @@ used sparingly.</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_cancel">
|
<object class="GtkButton" id="button_cancel">
|
||||||
<property name="label">gtk-cancel</property>
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
@ -939,6 +972,7 @@ used sparingly.</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button_add">
|
<object class="GtkButton" id="button_add">
|
||||||
<property name="label">gtk-add</property>
|
<property name="label">gtk-add</property>
|
||||||
|
<property name="use_action_appearance">False</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
|
|
@ -63,7 +63,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
this.optionsManager.bind('download_location', fieldset.add({
|
this.optionsManager.bind('download_location', fieldset.add({
|
||||||
fieldLabel: '',
|
fieldLabel: '',
|
||||||
name: 'download_location',
|
name: 'download_location',
|
||||||
width: 400,
|
anchor:'95%',
|
||||||
labelSeparator: ''
|
labelSeparator: ''
|
||||||
}));
|
}));
|
||||||
var fieldset = this.add({
|
var fieldset = this.add({
|
||||||
|
@ -79,7 +79,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
var field = fieldset.add({
|
var field = fieldset.add({
|
||||||
fieldLabel: '',
|
fieldLabel: '',
|
||||||
name: 'move_completed_path',
|
name: 'move_completed_path',
|
||||||
width: 425
|
anchor:'98%'
|
||||||
});
|
});
|
||||||
this.optionsManager.bind('move_completed', field.toggle)
|
this.optionsManager.bind('move_completed', field.toggle)
|
||||||
this.optionsManager.bind('move_completed_path', field.input)
|
this.optionsManager.bind('move_completed_path', field.input)
|
||||||
|
@ -126,6 +126,12 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
autoHeight: true,
|
autoHeight: true,
|
||||||
defaultType: 'checkbox'
|
defaultType: 'checkbox'
|
||||||
});
|
});
|
||||||
|
this.optionsManager.bind('add_paused', fieldset.add({
|
||||||
|
name: 'add_paused',
|
||||||
|
boxLabel: _('Add In Paused State'),
|
||||||
|
fieldLabel: '',
|
||||||
|
labelSeparator: ''
|
||||||
|
}));
|
||||||
this.optionsManager.bind('prioritize_first_last_pieces', fieldset.add({
|
this.optionsManager.bind('prioritize_first_last_pieces', fieldset.add({
|
||||||
name: 'prioritize_first_last_pieces',
|
name: 'prioritize_first_last_pieces',
|
||||||
boxLabel: _('Prioritize First/Last Pieces'),
|
boxLabel: _('Prioritize First/Last Pieces'),
|
||||||
|
@ -134,19 +140,19 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
}));
|
}));
|
||||||
this.optionsManager.bind('sequential_download', fieldset.add({
|
this.optionsManager.bind('sequential_download', fieldset.add({
|
||||||
name: 'sequential_download',
|
name: 'sequential_download',
|
||||||
boxLabel: _('Sequential download'),
|
boxLabel: _('Sequential Download'),
|
||||||
fieldLabel: '',
|
fieldLabel: '',
|
||||||
labelSeparator: ''
|
labelSeparator: ''
|
||||||
}));
|
}));
|
||||||
this.optionsManager.bind('add_paused', fieldset.add({
|
this.optionsManager.bind('seed_mode', fieldset.add({
|
||||||
name: 'add_paused',
|
name: 'seed_mode',
|
||||||
boxLabel: _('Add In Paused State'),
|
boxLabel: _('Skip File Hash Check'),
|
||||||
fieldLabel: '',
|
fieldLabel: '',
|
||||||
labelSeparator: ''
|
labelSeparator: ''
|
||||||
}));
|
}));
|
||||||
this.optionsManager.bind('pre_allocate_storage', fieldset.add({
|
this.optionsManager.bind('pre_allocate_storage', fieldset.add({
|
||||||
name: 'pre_allocate_storage',
|
name: 'pre_allocate_storage',
|
||||||
boxLabel: _('Pre-allocate disk space'),
|
boxLabel: _('Preallocate Disk Space'),
|
||||||
fieldLabel: '',
|
fieldLabel: '',
|
||||||
labelSeparator: ''
|
labelSeparator: ''
|
||||||
}));
|
}));
|
||||||
|
@ -173,7 +179,8 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
'max_download_speed': config.max_download_speed_per_torrent,
|
'max_download_speed': config.max_download_speed_per_torrent,
|
||||||
'max_upload_slots': config.max_upload_slots_per_torrent,
|
'max_upload_slots': config.max_upload_slots_per_torrent,
|
||||||
'max_upload_speed': config.max_upload_speed_per_torrent,
|
'max_upload_speed': config.max_upload_speed_per_torrent,
|
||||||
'prioritize_first_last_pieces': config.prioritize_first_last_pieces
|
'prioritize_first_last_pieces': config.prioritize_first_last_pieces,
|
||||||
|
'seed_mode': false
|
||||||
}
|
}
|
||||||
this.optionsManager.options = options;
|
this.optionsManager.options = options;
|
||||||
this.optionsManager.resetAll();
|
this.optionsManager.resetAll();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue