Setting options for the Queueing stuff now works in preferences.
This commit is contained in:
parent
e031c4b3ee
commit
eb15b5da37
|
@ -86,7 +86,14 @@ DEFAULT_PREFS = {
|
|||
"autoadd_location": "",
|
||||
"autoadd_enable": False,
|
||||
"add_paused": False,
|
||||
"default_private": False
|
||||
"default_private": False,
|
||||
"max_active_seeding": -1,
|
||||
"max_active_downloading": -1,
|
||||
"queue_new_to_top": False,
|
||||
"queue_finished_to_bottom": False,
|
||||
"stop_seed_at_ratio": False,
|
||||
"remove_seed_at_ratio": False,
|
||||
"stop_seed_ratio": 1.00
|
||||
}
|
||||
|
||||
class Core(
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -63,7 +63,7 @@ class Preferences(component.Component):
|
|||
# Add the default categories
|
||||
i = 0
|
||||
for category in ["Downloads", "Network", "Bandwidth", "Interface",
|
||||
"Other", "Daemon", "Plugins", "Queue"]:
|
||||
"Other", "Daemon", "Queue", "Plugins"]:
|
||||
self.liststore.append([i, category])
|
||||
i += 1
|
||||
|
||||
|
@ -225,7 +225,14 @@ class Preferences(component.Component):
|
|||
"spin_daemon_port": \
|
||||
("value", self.core_config["daemon_port"]),
|
||||
"chk_allow_remote_connections": \
|
||||
("active", self.core_config["allow_remote"])
|
||||
("active", self.core_config["allow_remote"]),
|
||||
"spin_seeding": ("value", self.core_config["max_active_seeding"]),
|
||||
"spin_downloading": ("value", self.core_config["max_active_downloading"]),
|
||||
"chk_queue_new_top": ("active", self.core_config["queue_new_to_top"]),
|
||||
"chk_finished_bottom": ("active", self.core_config["queue_finished_to_bottom"]),
|
||||
"chk_seed_ratio": ("active", self.core_config["stop_seed_at_ratio"]),
|
||||
"spin_share_ratio": ("value", self.core_config["stop_seed_ratio"]),
|
||||
"chk_remove_ratio": ("active", self.core_config["remove_seed_at_ratio"])
|
||||
}
|
||||
|
||||
# Update the widgets accordingly
|
||||
|
@ -280,7 +287,14 @@ class Preferences(component.Component):
|
|||
"spin_max_download_per_torrent",
|
||||
"spin_max_upload_per_torrent",
|
||||
"spin_daemon_port",
|
||||
"chk_allow_remote_connections"
|
||||
"chk_allow_remote_connections",
|
||||
"spin_seeding",
|
||||
"spin_downloading",
|
||||
"chk_queue_new_top",
|
||||
"chk_finished_bottom",
|
||||
"chk_seed_ratio",
|
||||
"spin_share_ratio",
|
||||
"chk_remove_ratio"
|
||||
]
|
||||
# We don't appear to be connected to a daemon
|
||||
for key in core_widget_list:
|
||||
|
@ -458,6 +472,22 @@ class Preferences(component.Component):
|
|||
new_core_config["allow_remote"] = \
|
||||
self.glade.get_widget("chk_allow_remote_connections").get_active()
|
||||
|
||||
## Queue tab ##
|
||||
new_core_config["queue_new_to_top"] = \
|
||||
self.glade.get_widget("chk_queue_new_top").get_active()
|
||||
new_core_config["max_active_seeding"] = \
|
||||
self.glade.get_widget("spin_seeding").get_value_as_int()
|
||||
new_core_config["max_active_downloading"] = \
|
||||
self.glade.get_widget("spin_downloading").get_value_as_int()
|
||||
new_core_config["queue_finished_to_bottom"] = \
|
||||
self.glade.get_widget("chk_finished_bottom").get_active()
|
||||
new_core_config["stop_seed_at_ratio"] = \
|
||||
self.glade.get_widget("chk_seed_ratio").get_active()
|
||||
new_core_config["remove_seed_at_ratio"] = \
|
||||
self.glade.get_widget("chk_remove_ratio").get_active()
|
||||
new_core_config["stop_seed_ratio"] = \
|
||||
self.glade.get_widget("spin_share_ratio").get_value()
|
||||
|
||||
# GtkUI
|
||||
for key in new_gtkui_config.keys():
|
||||
# The values do not match so this needs to be updated
|
||||
|
|
Loading…
Reference in New Issue