Replace GtkLinkButton by GtkButton
parent
b99c0aabf1
commit
b5e3704d05
|
@ -179,7 +179,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<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>
|
||||||
<signal name="clicked" handler="on_welcome_btn_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_action_btn_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
|
@ -193,7 +193,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<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>
|
||||||
<signal name="clicked" handler="on_welcome_btn_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_action_btn_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
|
@ -201,13 +201,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">Wiki</property>
|
<property name="label" translatable="yes">Wiki</property>
|
||||||
|
<property name="name">wikibtn</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">False</property>
|
||||||
<property name="relief">none</property>
|
<signal name="clicked" handler="on_link_btn_clicked" swapped="no"/>
|
||||||
<property name="uri">https://wiki.manjaro.org</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
|
@ -221,7 +221,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<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>
|
||||||
<signal name="clicked" handler="on_welcome_btn_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_action_btn_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">2</property>
|
||||||
|
@ -229,13 +229,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">Forums</property>
|
<property name="label" translatable="yes">Forums</property>
|
||||||
|
<property name="name">forumsbtn</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="relief">none</property>
|
<signal name="clicked" handler="on_link_btn_clicked" swapped="no"/>
|
||||||
<property name="uri">https://forum.manjaro.org</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
|
@ -243,13 +243,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">Chat room</property>
|
<property name="label" translatable="yes">Chat room</property>
|
||||||
|
<property name="name">chatbtn</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="relief">none</property>
|
<signal name="clicked" handler="on_link_btn_clicked" swapped="no"/>
|
||||||
<property name="uri">https://kiwiirc.com/client/irc.freenode.net/?nick=manjaro-web|?#manjaro</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
|
@ -257,13 +257,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">Mailling lists</property>
|
<property name="label" translatable="yes">Mailling lists</property>
|
||||||
|
<property name="name">maillingbtn</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="relief">none</property>
|
<signal name="clicked" handler="on_link_btn_clicked" swapped="no"/>
|
||||||
<property name="uri">https://lists.manjaro.org/cgi-bin/mailman/listinfo</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
|
@ -271,13 +271,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">Build Manjaro</property>
|
<property name="label" translatable="yes">Build Manjaro</property>
|
||||||
|
<property name="name">buildbtn</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="relief">none</property>
|
<signal name="clicked" handler="on_link_btn_clicked" swapped="no"/>
|
||||||
<property name="uri">https://github.com/manjaro</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">2</property>
|
||||||
|
@ -285,13 +285,13 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">Donate</property>
|
<property name="label" translatable="yes">Donate</property>
|
||||||
|
<property name="name">donatebtn</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="relief">none</property>
|
<signal name="clicked" handler="on_link_btn_clicked" swapped="no"/>
|
||||||
<property name="uri">https://manjaro.org/donate</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="left_attach">2</property>
|
||||||
|
@ -443,7 +443,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="name">installgui</property>
|
<property name="name">installgui</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>
|
||||||
<signal name="clicked" handler="on_welcome_btn_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_action_btn_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
@ -457,7 +457,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="name">installcli</property>
|
<property name="name">installcli</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>
|
||||||
<signal name="clicked" handler="on_welcome_btn_clicked" swapped="no"/>
|
<signal name="clicked" handler="on_action_btn_clicked" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
@ -707,4 +707,9 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="GtkImage" id="inapp">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="icon_name">document-new</property>
|
||||||
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
|
|
@ -17,6 +17,14 @@ class ManjaroHello():
|
||||||
self.app = "manjaro-hello"
|
self.app = "manjaro-hello"
|
||||||
self.default_locale = "en_US"
|
self.default_locale = "en_US"
|
||||||
self.sys_locale = locale.getdefaultlocale()[0]
|
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 = {
|
self.social_urls = {
|
||||||
"google+": "https://plus.google.com/118244873957924966264",
|
"google+": "https://plus.google.com/118244873957924966264",
|
||||||
"facebook": "https://www.facebook.com/ManjaroLinux",
|
"facebook": "https://www.facebook.com/ManjaroLinux",
|
||||||
|
@ -147,7 +155,7 @@ class ManjaroHello():
|
||||||
dialog.run()
|
dialog.run()
|
||||||
dialog.hide()
|
dialog.hide()
|
||||||
|
|
||||||
def on_welcome_btn_clicked(self, btn):
|
def on_action_btn_clicked(self, btn):
|
||||||
name = btn.get_name()
|
name = btn.get_name()
|
||||||
if name == "readmebtn":
|
if name == "readmebtn":
|
||||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object("documentation"))
|
self.builder.get_object("stack").set_visible_child(self.builder.get_object("documentation"))
|
||||||
|
@ -163,6 +171,9 @@ class ManjaroHello():
|
||||||
elif name == "installcli":
|
elif name == "installcli":
|
||||||
subprocess.call(["sudo cli-installer"])
|
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, _):
|
def on_social_pressed(self, eventbox, _):
|
||||||
webbrowser.open_new_tab(self.social_urls[eventbox.get_name()])
|
webbrowser.open_new_tab(self.social_urls[eventbox.get_name()])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue