Simplify way to change pages
parent
62d3dc2d3f
commit
180737f305
|
@ -203,14 +203,8 @@ class ManjaroHello():
|
|||
|
||||
def on_action_btn_clicked(self, btn):
|
||||
name = btn.get_name()
|
||||
if name == "home":
|
||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object("welcomepage"))
|
||||
elif name == "readme":
|
||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object("readmepage"))
|
||||
elif name == "release":
|
||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object("releasepage"))
|
||||
elif name == "involved":
|
||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object("involvedpage"))
|
||||
if name in ("welcome", "readme", "release", "involved"):
|
||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object(name + "page"))
|
||||
elif name == "installgui":
|
||||
subprocess.call(["sudo", "-E", "calamares"])
|
||||
elif name == "installcli":
|
||||
|
|
|
@ -572,8 +572,8 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
|||
<property name="title">Manjaro Hello</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="home">
|
||||
<property name="name">home</property>
|
||||
<object class="GtkButton" id="welcome">
|
||||
<property name="name">welcome</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
|
|
Loading…
Reference in New Issue