Merge on_about_clicked() in on_action_btn_clicked()

This commit is contained in:
Hugo Posnic 2016-12-17 12:08:40 +01:00
parent 849c7e4ad3
commit b3666b9de4
2 changed files with 7 additions and 7 deletions

View File

@ -192,12 +192,6 @@ class ManjaroHello():
self.set_locale(self.preferences["locale"])
self.save_preferences()
def on_about_clicked(self, btn):
dialog = self.builder.get_object("aboutdialog")
dialog.set_transient_for(self.window)
dialog.run()
dialog.hide()
def on_action_btn_clicked(self, btn):
name = btn.get_name()
if name in ("welcome", "readme", "release", "involved"):
@ -206,6 +200,11 @@ class ManjaroHello():
subprocess.call(["sudo", "-E", "calamares"])
elif name == "installcli":
subprocess.call(["sudo cli-installer"])
elif name == "about":
dialog = self.builder.get_object("aboutdialog")
dialog.set_transient_for(self.window)
dialog.run()
dialog.hide()
def on_link_clicked(self, link, _=None):
webbrowser.open_new_tab(self.urls[link.get_name()])

View File

@ -596,11 +596,12 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
</child>
<child>
<object class="GtkButton">
<property name="name">about</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="image">iconabout</property>
<signal name="clicked" handler="on_about_clicked" swapped="no"/>
<signal name="clicked" handler="on_action_btn_clicked" swapped="no"/>
</object>
<packing>
<property name="pack_type">end</property>