Simplify way to change pages
parent
62d3dc2d3f
commit
180737f305
|
@ -203,14 +203,8 @@ class ManjaroHello():
|
||||||
|
|
||||||
def on_action_btn_clicked(self, btn):
|
def on_action_btn_clicked(self, btn):
|
||||||
name = btn.get_name()
|
name = btn.get_name()
|
||||||
if name == "home":
|
if name in ("welcome", "readme", "release", "involved"):
|
||||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object("welcomepage"))
|
self.builder.get_object("stack").set_visible_child(self.builder.get_object(name + "page"))
|
||||||
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"))
|
|
||||||
elif name == "installgui":
|
elif name == "installgui":
|
||||||
subprocess.call(["sudo", "-E", "calamares"])
|
subprocess.call(["sudo", "-E", "calamares"])
|
||||||
elif name == "installcli":
|
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="title">Manjaro Hello</property>
|
||||||
<property name="show_close_button">True</property>
|
<property name="show_close_button">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="home">
|
<object class="GtkButton" id="welcome">
|
||||||
<property name="name">home</property>
|
<property name="name">welcome</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
|
Loading…
Reference in New Issue