Merge on_about_clicked() in on_action_btn_clicked()

merge-requests/64/head
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.set_locale(self.preferences["locale"])
self.save_preferences() 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): def on_action_btn_clicked(self, btn):
name = btn.get_name() name = btn.get_name()
if name in ("welcome", "readme", "release", "involved"): if name in ("welcome", "readme", "release", "involved"):
@ -206,6 +200,11 @@ class ManjaroHello():
subprocess.call(["sudo", "-E", "calamares"]) subprocess.call(["sudo", "-E", "calamares"])
elif name == "installcli": elif name == "installcli":
subprocess.call(["sudo cli-installer"]) 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): def on_link_clicked(self, link, _=None):
webbrowser.open_new_tab(self.urls[link.get_name()]) 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>
<child> <child>
<object class="GtkButton"> <object class="GtkButton">
<property name="name">about</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>
<property name="image">iconabout</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> </object>
<packing> <packing>
<property name="pack_type">end</property> <property name="pack_type">end</property>