Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Further improvements to _check_box_toggled method
Browse files Browse the repository at this point in the history
  • Loading branch information
Slavek Kabrda committed Feb 28, 2014
1 parent 33e4649 commit c005019
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions devassistant/gui/path_window.py
Expand Up @@ -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):
Expand Down

0 comments on commit c005019

Please sign in to comment.