Fix #303 make port spinners insensitive if random ports is enabled

This commit is contained in:
Andrew Resch 2008-06-27 05:37:38 +00:00
parent f45badc34d
commit 0b590bfcda
1 changed files with 9 additions and 1 deletions

View File

@ -311,6 +311,11 @@ class Preferences(component.Component):
widget.set_value(value)
elif modifier == "text":
widget.set_text(value)
for key in core_widgets.keys():
widget = self.glade.get_widget(key)
# Update the toggle status if necessary
self.on_toggle(widget)
else:
core_widget_list = [
"download_path_button",
@ -589,7 +594,10 @@ class Preferences(component.Component):
def on_toggle(self, widget):
"""Handles widget sensitivity based on radio/check button values."""
try:
value = widget.get_active()
except:
return
# Disable the focus dialog checkbox if the show dialog isn't active.
if widget == self.glade.get_widget("chk_show_dialog"):