Remove tabs

This commit is contained in:
Hugo Posnic 2016-12-16 23:59:10 +01:00
parent 10f0f7946c
commit 62d3dc2d3f
2 changed files with 41 additions and 140 deletions

View File

@ -99,7 +99,7 @@ class ManjaroHello():
# Load pages
for page in ("readme", "release", "involved"):
self.builder.get_object(page + "text").set_markup(self.read_page(page))
self.builder.get_object(page + "label").set_markup(self.read_page(page))
# Set autostart switcher state
self.builder.get_object("autostart").set_active(self.preferences["autostart"])
@ -125,10 +125,6 @@ class ManjaroHello():
# TODO: Find a better solution
elts = {
"welcometitle": "label",
"welcomelabel": "label",
"readmelabel": "label",
"releaselabel": "label",
"involvedlabel": "label",
"firstcategory": "label",
"secondcategory": "label",
"thirdcategory": "label",
@ -152,11 +148,6 @@ class ManjaroHello():
self.default_texts[elt] = getattr(self.builder.get_object(elt), "get_" + elts[elt])()
getattr(self.builder.get_object(elt), "set_" + elts[elt])(_(self.default_texts[elt]))
for stack in ("welcome", "documentation", "project"):
if stack not in self.default_texts:
self.default_texts[stack] = self.builder.get_object("stack").child_get_property(self.builder.get_object(stack), "title")
self.builder.get_object("stack").child_set_property(self.builder.get_object(stack), "title", _(self.default_texts[stack]))
def change_autostart(self, state):
if state and not os.path.isfile(self.autostart_path):
try:
@ -213,16 +204,13 @@ 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("welcome"))
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("documentation"))
self.builder.get_object("documentation").set_current_page(0)
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("documentation"))
self.builder.get_object("documentation").set_current_page(1)
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("project"))
self.builder.get_object("project").set_current_page(0)
self.builder.get_object("stack").set_visible_child(self.builder.get_object("involvedpage"))
elif name == "installgui":
subprocess.call(["sudo", "-E", "calamares"])
elif name == "installcli":

View File

@ -71,7 +71,7 @@
<property name="hexpand">True</property>
<property name="transition_type">crossfade</property>
<child>
<object class="GtkGrid" id="welcome">
<object class="GtkGrid" id="welcomepage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">20</property>
@ -486,94 +486,21 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
</packing>
</child>
<child>
<object class="GtkNotebook" id="documentation">
<object class="GtkScrolledWindow" id="readmepage">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkScrolledWindow">
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<property name="can_focus">False</property>
<child>
<object class="GtkViewport">
<object class="GtkLabel" id="readmelabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkLabel" id="readmetext">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_top">10</property>
<property name="margin_bottom">10</property>
<property name="wrap">True</property>
</object>
</child>
<property name="wrap">True</property>
</object>
</child>
</object>
<packing>
<property name="tab_expand">True</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="readmelabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Read me</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkLabel" id="releasetext">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_top">10</property>
<property name="margin_bottom">10</property>
<property name="wrap">True</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
<property name="tab_expand">True</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="releaselabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Release info</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<placeholder/>
</child>
</object>
<packing>
@ -583,67 +510,53 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
</packing>
</child>
<child>
<object class="GtkNotebook" id="project">
<object class="GtkScrolledWindow" id="releasepage">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkScrolledWindow">
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<property name="can_focus">False</property>
<child>
<object class="GtkViewport">
<object class="GtkLabel" id="releaselabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkLabel" id="involvedtext">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">start</property>
<property name="margin_left">10</property>
<property name="margin_right">10</property>
<property name="margin_top">10</property>
<property name="margin_bottom">10</property>
<property name="wrap">True</property>
</object>
</child>
<property name="wrap">True</property>
</object>
</child>
</object>
<packing>
<property name="tab_expand">True</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="involvedlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Get involved</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<placeholder/>
</child>
</object>
<packing>
<property name="name">page2</property>
<property name="title" translatable="yes">Project</property>
<property name="title" translatable="yes">page2</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="involvedpage">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="involvedlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="wrap">True</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="name">page3</property>
<property name="title" translatable="yes">page3</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>