Replace social section by icons in bottom
parent
42abef2e45
commit
a1a1daa2dc
Binary file not shown.
After Width: | Height: | Size: 469 B |
Binary file not shown.
After Width: | Height: | Size: 671 B |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 687 B |
|
@ -94,7 +94,7 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">4</property>
|
<property name="width">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="width">4</property>
|
<property name="width">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -128,7 +128,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="width">4</property>
|
<property name="width">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -173,20 +173,6 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">SOCIAL</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">3</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">Read me</property>
|
<property name="label" translatable="yes">Read me</property>
|
||||||
|
@ -314,59 +300,102 @@ 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="GtkBox">
|
||||||
<property name="label" translatable="yes">Google+</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="valign">end</property>
|
||||||
<property name="relief">none</property>
|
<property name="vexpand">True</property>
|
||||||
<property name="uri">https://plus.google.com/118244873957924966264</property>
|
<property name="spacing">10</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEventBox">
|
||||||
|
<property name="name">google+</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<signal name="button-press-event" handler="on_social_pressed" swapped="no"/>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="pixbuf">img/google+.png</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">3</property>
|
<property name="expand">False</property>
|
||||||
<property name="top_attach">4</property>
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkEventBox">
|
||||||
<property name="label" translatable="yes">Facebook</property>
|
<property name="name">facebook</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<signal name="button-press-event" handler="on_social_pressed" swapped="no"/>
|
||||||
<property name="relief">none</property>
|
<child>
|
||||||
<property name="uri">https://www.facebook.com/ManjaroLinux</property>
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="pixbuf">img/facebook.png</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">3</property>
|
<property name="expand">False</property>
|
||||||
<property name="top_attach">5</property>
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkEventBox">
|
||||||
<property name="label" translatable="yes">Twitter</property>
|
<property name="name">twitter</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<signal name="button-press-event" handler="on_social_pressed" swapped="no"/>
|
||||||
<property name="relief">none</property>
|
<child>
|
||||||
<property name="uri">https://twitter.com/ManjaroLinux</property>
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="pixbuf">img/twitter.png</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">3</property>
|
<property name="expand">False</property>
|
||||||
<property name="top_attach">6</property>
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton">
|
<object class="GtkEventBox">
|
||||||
<property name="label" translatable="yes">Reddit</property>
|
<property name="name">reddit</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="receives_default">True</property>
|
<signal name="button-press-event" handler="on_social_pressed" swapped="no"/>
|
||||||
<property name="relief">none</property>
|
<child>
|
||||||
<property name="uri">https://www.reddit.com/r/ManjaroLinux/</property>
|
<object class="GtkImage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="pixbuf">img/reddit.png</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">3</property>
|
<property name="expand">False</property>
|
||||||
<property name="top_attach">7</property>
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -377,8 +406,9 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<property name="label" translatable="yes">Launch at start</property>
|
<property name="label" translatable="yes">Launch at start</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">2</property>
|
<property name="expand">True</property>
|
||||||
<property name="top_attach">8</property>
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
@ -389,15 +419,17 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
|
||||||
<signal name="notify::active" handler="on_autostart_switched" swapped="no"/>
|
<signal name="notify::active" handler="on_autostart_switched" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">3</property>
|
<property name="expand">False</property>
|
||||||
<property name="top_attach">8</property>
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
</object>
|
||||||
<placeholder/>
|
<packing>
|
||||||
</child>
|
<property name="left_attach">0</property>
|
||||||
<child>
|
<property name="top_attach">8</property>
|
||||||
<placeholder/>
|
<property name="width">3</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
|
|
|
@ -4,8 +4,9 @@ import locale
|
||||||
import gettext
|
import gettext
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import gi
|
|
||||||
import shutil
|
import shutil
|
||||||
|
import webbrowser
|
||||||
|
import gi
|
||||||
gi.require_version("Gtk", "3.0")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
|
@ -31,6 +32,14 @@ class ManjaroHello(Gtk.Window):
|
||||||
|
|
||||||
self.infos = get_infos()
|
self.infos = get_infos()
|
||||||
|
|
||||||
|
# Social urls
|
||||||
|
self.social_urls = {
|
||||||
|
"google+": "https://plus.google.com/118244873957924966264",
|
||||||
|
"facebook": "https://www.facebook.com/ManjaroLinux",
|
||||||
|
"twitter": "https://twitter.com/ManjaroLinux",
|
||||||
|
"reddit": "https://www.reddit.com/r/ManjaroLinux"
|
||||||
|
}
|
||||||
|
|
||||||
# Init language
|
# Init language
|
||||||
locale.setlocale(locale.LC_ALL, "")
|
locale.setlocale(locale.LC_ALL, "")
|
||||||
locale.bindtextdomain(self.app, self.locale_dir)
|
locale.bindtextdomain(self.app, self.locale_dir)
|
||||||
|
@ -115,6 +124,9 @@ class ManjaroHello(Gtk.Window):
|
||||||
self.builder.get_object("stack").set_visible_child(self.builder.get_object("project"))
|
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("project").set_current_page(0)
|
||||||
|
|
||||||
|
def on_social_pressed(self, eventbox, _):
|
||||||
|
webbrowser.open_new_tab(self.social_urls[eventbox.get_name()])
|
||||||
|
|
||||||
def on_autostart_switched(self, switch, _):
|
def on_autostart_switched(self, switch, _):
|
||||||
autostart = True if switch.get_active() else False
|
autostart = True if switch.get_active() else False
|
||||||
self.change_autostart(autostart)
|
self.change_autostart(autostart)
|
||||||
|
|
Loading…
Reference in New Issue