Disable home button when welcome page is active

This commit is contained in:
Hugo Posnic 2016-12-26 19:25:39 +01:00
parent 01cf0e9208
commit f3cfa690a2
2 changed files with 7 additions and 1 deletions

View File

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

View File

@ -485,6 +485,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
<object class="GtkButton" id="welcome">
<property name="name">welcome</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">homeicon</property>