float/int tweaks

This commit is contained in:
Marcos Pinto 2007-07-24 20:30:34 +00:00
parent 98f38f3e71
commit a5082fda82
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ class PreferencesDlg:
self.glade.get_widget("spin_port_min").set_value(self.preferences.get("listen_on")[0])
self.glade.get_widget("spin_port_max").set_value(self.preferences.get("listen_on")[1])
self.glade.get_widget("spin_max_upload").set_value(self.preferences.get("max_upload_speed"))
self.glade.get_widget("spin_num_upload").set_value(self.preferences.get("max_number_uploads"))
self.glade.get_widget("spin_num_upload").set_value(float(self.preferences.get("max_number_uploads")))
self.glade.get_widget("spin_max_download").set_value(self.preferences.get("max_download_speed"))
self.glade.get_widget("spin_max_connections").set_value(self.preferences.get("max_connections"))
self.glade.get_widget("spin_proxy_port").set_value(self.preferences.get("proxy_port"))
@ -155,7 +155,7 @@ class PreferencesDlg:
self.preferences.set("use_compact_storage", self.glade.get_widget("chk_compact").get_active())
self.preferences.set("listen_on", [self.glade.get_widget("spin_port_min").get_value(), self.glade.get_widget("spin_port_max").get_value()])
self.preferences.set("max_upload_speed", self.glade.get_widget("spin_max_upload").get_value())
self.preferences.set("max_number_uploads", self.glade.get_widget("spin_num_upload").get_value())
self.preferences.set("max_number_uploads", int(self.glade.get_widget("spin_num_upload").get_value()))
self.preferences.set("max_download_speed", self.glade.get_widget("spin_max_download").get_value())
self.preferences.set("proxy_port", self.glade.get_widget("spin_proxy_port").get_value())
self.preferences.set("max_connections", int(self.glade.get_widget("spin_max_connections").get_value()))

View File

@ -68,7 +68,7 @@ DEFAULT_PREFS = {
"max_number_uploads" : -1,
"max_upload_speed" : -1,
"max_upload_speed_bps" : -1,
"max_number_uploads" : -1,
"max_number_uploads" : 4,
"pref_rc4" : True,
"prioritize_first_last_pieces" : False,
"proxy_type" : common.ProxyType.none,