Simplify way to load social icons

merge-requests/64/head
Hugo Posnic 2017-05-25 16:28:05 +02:00
parent 887ac02046
commit 9d1522c87a
2 changed files with 4 additions and 3 deletions

View File

@ -66,8 +66,9 @@ class Hello():
self.builder.get_object("languages").set_active_id(self.get_best_locale())
# Load images
for img in ("google+", "facebook", "twitter", "reddit"):
self.builder.get_object(img).set_from_file(self.preferences["data_path"] + "img/" + img + ".png")
for btn in self.builder.get_object("social").get_children():
icon_path = self.preferences["data_path"] + "img/" + btn.get_name() + ".png"
self.builder.get_object(btn.get_name()).set_from_file(icon_path)
for btn in ("wiki", "forum", "chat", "mailling", "development", "donate"):
img = Gtk.Image.new_from_file(self.preferences["data_path"] + "img/external-link.png")

View File

@ -271,7 +271,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we
<property name="vexpand">True</property>
<property name="spacing">10</property>
<child>
<object class="GtkBox">
<object class="GtkBox" id="social">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">5</property>