mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +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
|
@ -6,6 +6,9 @@
|
|||
* Attempt to register as the default magnet uri handler in GNOME on startup
|
||||
* Properly show 100.00% and reduce number of progress bar updates during a torrent creation
|
||||
* 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) ===
|
||||
==== Core ====
|
||||
|
|
|
@ -156,7 +156,8 @@ class AddDialog(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",
|
||||
"apply_move_completed", "move_completed", "is_auto_managed", "auto_add"]
|
||||
|
||||
|
@ -197,7 +198,7 @@ class OptionsDialog(object):
|
|||
def load_options(self, options):
|
||||
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])
|
||||
for id in self.chk_ids:
|
||||
self.glade.get_widget(id).set_active(bool(options[id]))
|
||||
|
@ -221,6 +222,8 @@ class OptionsDialog(object):
|
|||
|
||||
for id in self.spin_ids:
|
||||
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:
|
||||
options[id] = self.glade.get_widget(id).get_active()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue