Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Further improvements to _check_box_toggled method

  • Loading branch information...
commit c005019683f4683ad2a7d54b60ebbb46126f938f 1 parent 33e4649
@bkabrda authored
Showing with 8 additions and 9 deletions.
  1. +8 −9 devassistant/gui/path_window.py
View
17 devassistant/gui/path_window.py
@@ -188,15 +188,14 @@ def open_window(self, widget, data=None):
def _check_box_toggled(self, widget, data=None):
active = widget.get_active()
label = widget.get_label()
- for entry in filter( lambda x: x == label, self.entries):
- entry = self.entries[label]
- browse_btn = self.browse_btns.get(label)
- if active:
- entry.set_sensitive(True)
- if browse_btn: browse_btn.set_sensitive(True)
- else:
- entry.set_sensitive(False)
- if browse_btn: browse_btn.set_sensitive(False)
+
+ browse_btn = self.browse_btns.get(label)
+ if browse_btn:
+ browse_btn.set_sensitive(active)
+
+ for _, entry in filter(lambda x: x[0] == label, self.entries.items()):
+ entry.set_sensitive(active)
+
self.path_window.show_all()
def _deps_only_toggled(self, widget, data=None):
Please sign in to comment.
Something went wrong with that request. Please try again.