Simplify a condition

merge-requests/64/head
Hugo Posnic 2016-12-26 21:05:38 +01:00
parent d08a88931d
commit 5d6143e626
1 changed files with 1 additions and 4 deletions

View File

@ -256,10 +256,7 @@ class ManjaroHello():
def on_btn_clicked(self, btn):
"""Event for clicked button."""
name = btn.get_name()
if name == "home":
self.builder.get_object("home").set_sensitive(False)
else:
self.builder.get_object("home").set_sensitive(True)
self.builder.get_object("home").set_sensitive(not name == "home")
self.builder.get_object("stack").set_visible_child_name(name + "page")
def on_link_clicked(self, link, _=None):