mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
Fix #1085 only use ints for specific options to prevent unhandled exception
This commit is contained in:
parent
a317fdec48
commit
7a91b96183
2 changed files with 8 additions and 2 deletions
|
@ -7,6 +7,9 @@
|
||||||
* Properly show 100.00% and reduce number of progress bar updates during a torrent creation
|
* Properly show 100.00% and reduce number of progress bar updates during a torrent creation
|
||||||
* Fix crash in Windows when creating a torrent
|
* Fix crash in Windows when creating a torrent
|
||||||
|
|
||||||
|
==== Label ====
|
||||||
|
* Fix #1085 only use ints for specific options to prevent unhandled exception
|
||||||
|
|
||||||
=== Deluge 1.2.0_rc4 (24 November 2009) ===
|
=== Deluge 1.2.0_rc4 (24 November 2009) ===
|
||||||
==== Core ====
|
==== Core ====
|
||||||
* Fix deleting old .fastresume files with fresh configs
|
* Fix deleting old .fastresume files with fresh configs
|
||||||
|
|
|
@ -156,7 +156,8 @@ class AddDialog(object):
|
||||||
|
|
||||||
|
|
||||||
class OptionsDialog(object):
|
class OptionsDialog(object):
|
||||||
spin_ids = ["max_download_speed", "max_upload_speed", "max_upload_slots", "max_connections", "stop_ratio"]
|
spin_ids = ["max_download_speed", "max_upload_speed", "stop_ratio"]
|
||||||
|
spin_int_ids = ["max_upload_slots", "max_connections"]
|
||||||
chk_ids = ["apply_max", "apply_queue", "stop_at_ratio", "apply_queue", "remove_at_ratio",
|
chk_ids = ["apply_max", "apply_queue", "stop_at_ratio", "apply_queue", "remove_at_ratio",
|
||||||
"apply_move_completed", "move_completed", "is_auto_managed", "auto_add"]
|
"apply_move_completed", "move_completed", "is_auto_managed", "auto_add"]
|
||||||
|
|
||||||
|
@ -197,7 +198,7 @@ class OptionsDialog(object):
|
||||||
def load_options(self, options):
|
def load_options(self, options):
|
||||||
log.debug(options.keys())
|
log.debug(options.keys())
|
||||||
|
|
||||||
for id in self.spin_ids:
|
for id in self.spin_ids + self.spin_int_ids:
|
||||||
self.glade.get_widget(id).set_value(options[id])
|
self.glade.get_widget(id).set_value(options[id])
|
||||||
for id in self.chk_ids:
|
for id in self.chk_ids:
|
||||||
self.glade.get_widget(id).set_active(bool(options[id]))
|
self.glade.get_widget(id).set_active(bool(options[id]))
|
||||||
|
@ -221,6 +222,8 @@ class OptionsDialog(object):
|
||||||
|
|
||||||
for id in self.spin_ids:
|
for id in self.spin_ids:
|
||||||
options[id] = self.glade.get_widget(id).get_value()
|
options[id] = self.glade.get_widget(id).get_value()
|
||||||
|
for id in self.spin_int_ids:
|
||||||
|
options[id] = self.glade.get_widget(id).get_value_as_int()
|
||||||
for id in self.chk_ids:
|
for id in self.chk_ids:
|
||||||
options[id] = self.glade.get_widget(id).get_active()
|
options[id] = self.glade.get_widget(id).get_active()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue