From 9d1522c87a0c4736655e4dc686ddd9250ca0db98 Mon Sep 17 00:00:00 2001 From: Hugo Posnic Date: Thu, 25 May 2017 16:28:05 +0200 Subject: [PATCH] Simplify way to load social icons --- src/manjaro_hello.py | 5 +++-- ui/manjaro-hello.glade | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/manjaro_hello.py b/src/manjaro_hello.py index 5498713..473dacd 100644 --- a/src/manjaro_hello.py +++ b/src/manjaro_hello.py @@ -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") diff --git a/ui/manjaro-hello.glade b/ui/manjaro-hello.glade index 914c2e7..0f18755 100644 --- a/ui/manjaro-hello.glade +++ b/ui/manjaro-hello.glade @@ -271,7 +271,7 @@ We, the Manjaro Developers, hope that you will enjoy using Manjaro as much as we True 10 - + True False 5