From b5e3704d05dcc8386818a6ae9d92ccb1f7fcac1a Mon Sep 17 00:00:00 2001 From: Huluti Date: Sat, 10 Dec 2016 01:00:05 +0100 Subject: [PATCH] Replace GtkLinkButton by GtkButton --- src/manjaro-hello.glade | 53 ++++++++++++++++++++++------------------- src/manjaro-hello.py | 13 +++++++++- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/manjaro-hello.glade b/src/manjaro-hello.glade index cdd742a..1857fd5 100644 --- a/src/manjaro-hello.glade +++ b/src/manjaro-hello.glade @@ -179,7 +179,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we True True True - + 0 @@ -193,7 +193,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we True True True - + 0 @@ -201,13 +201,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we - + Wiki + wikibtn True True - True - none - https://wiki.manjaro.org + False + 0 @@ -221,7 +221,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we True True True - + 2 @@ -229,13 +229,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we - + Forums + forumsbtn True True True - none - https://forum.manjaro.org + 1 @@ -243,13 +243,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we - + Chat room + chatbtn True True True - none - https://kiwiirc.com/client/irc.freenode.net/?nick=manjaro-web|?#manjaro + 1 @@ -257,13 +257,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we - + Mailling lists + maillingbtn True True True - none - https://lists.manjaro.org/cgi-bin/mailman/listinfo + 1 @@ -271,13 +271,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we - + Build Manjaro + buildbtn True True True - none - https://github.com/manjaro + 2 @@ -285,13 +285,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we - + Donate + donatebtn True True True - none - https://manjaro.org/donate + 2 @@ -443,7 +443,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we installgui True True - + True @@ -457,7 +457,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we installcli True True - + True @@ -707,4 +707,9 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we + + True + False + document-new + diff --git a/src/manjaro-hello.py b/src/manjaro-hello.py index 1fb8323..0fa4d88 100644 --- a/src/manjaro-hello.py +++ b/src/manjaro-hello.py @@ -17,6 +17,14 @@ class ManjaroHello(): self.app = "manjaro-hello" self.default_locale = "en_US" self.sys_locale = locale.getdefaultlocale()[0] + self.welcome_urls = { + "wiki": "https://wiki.manjaro.org", + "forums": "https://forum.manjaro.org", + "chat": "https://kiwiirc.com/client/irc.freenode.net/?nick=manjaro-web|?#manjaro", + "mailling": "https://lists.manjaro.org/cgi-bin/mailman/listinfo", + "build": "https://github.com/manjaro", + "donate": "https://manjaro.org/donate" + } self.social_urls = { "google+": "https://plus.google.com/118244873957924966264", "facebook": "https://www.facebook.com/ManjaroLinux", @@ -147,7 +155,7 @@ class ManjaroHello(): dialog.run() dialog.hide() - def on_welcome_btn_clicked(self, btn): + def on_action_btn_clicked(self, btn): name = btn.get_name() if name == "readmebtn": self.builder.get_object("stack").set_visible_child(self.builder.get_object("documentation")) @@ -163,6 +171,9 @@ class ManjaroHello(): elif name == "installcli": subprocess.call(["sudo cli-installer"]) + def on_link_btn_clicked(self, btn): + webbrowser.open_new_tab(self.welcome_urls[btn.get_name()[:-3]]) + def on_social_pressed(self, eventbox, _): webbrowser.open_new_tab(self.social_urls[eventbox.get_name()])