diff --git a/src/data/img/facebook.png b/data/img/facebook.png similarity index 100% rename from src/data/img/facebook.png rename to data/img/facebook.png diff --git a/src/data/img/google+.png b/data/img/google+.png similarity index 100% rename from src/data/img/google+.png rename to data/img/google+.png diff --git a/src/manjaro-hello.png b/data/img/manjaro-hello.png similarity index 100% rename from src/manjaro-hello.png rename to data/img/manjaro-hello.png diff --git a/src/data/img/reddit.png b/data/img/reddit.png similarity index 100% rename from src/data/img/reddit.png rename to data/img/reddit.png diff --git a/src/data/img/twitter.png b/data/img/twitter.png similarity index 100% rename from src/data/img/twitter.png rename to data/img/twitter.png diff --git a/src/data/pages/en_US/involved b/data/pages/en_US/involved similarity index 100% rename from src/data/pages/en_US/involved rename to data/pages/en_US/involved diff --git a/src/data/pages/en_US/readme b/data/pages/en_US/readme similarity index 100% rename from src/data/pages/en_US/readme rename to data/pages/en_US/readme diff --git a/src/data/pages/en_US/release b/data/pages/en_US/release similarity index 100% rename from src/data/pages/en_US/release rename to data/pages/en_US/release diff --git a/src/manjaro-hello.desktop b/manjaro-hello.desktop similarity index 100% rename from src/manjaro-hello.desktop rename to manjaro-hello.desktop diff --git a/src/manjaro-hello.pot b/po/manjaro-hello.pot similarity index 100% rename from src/manjaro-hello.pot rename to po/manjaro-hello.pot diff --git a/reminder.txt b/reminder.txt deleted file mode 100644 index 2c48e54..0000000 --- a/reminder.txt +++ /dev/null @@ -1,2 +0,0 @@ -Generate main translation file: - xgettext -k_ -kN_ -L Glade -o manjaro-hello.pot *.glade diff --git a/src/manjaro-hello.py b/src/manjaro-hello.py index 5f77957..03d3967 100644 --- a/src/manjaro-hello.py +++ b/src/manjaro-hello.py @@ -9,7 +9,7 @@ import subprocess import sys import webbrowser gi.require_version("Gtk", "3.0") -from gi.repository import Gtk +from gi.repository import Gtk, GdkPixbuf class ManjaroHello(): def __init__(self): @@ -35,13 +35,18 @@ class ManjaroHello(): if self.current_folder == "/usr/bin/": self.data_path = "/usr/share/" + self.app + "/data/" self.locale_path = "/usr/share/locale/" + self.ui_path = "/usr/share/" + self.app + "/ui/" + self.desktop_path = "/usr/share/applications/" + self.app + ".desktop" else: - self.data_path = self.current_folder + "data/" + self.data_path = "../data/" self.locale_path = "locale/" + self.ui_path = "../ui/" + self.desktop_path = self.current_folder[:-4] + self.app + ".desktop" + self.config_path = os.path.expanduser("~") + "/.config/" self.preferences_path = self.config_path + self.app + ".json" - self.desktop_path = self.current_folder + self.app + ".desktop" self.autostart_path = self.config_path + "autostart/" + self.app + ".desktop" + self.logo_path = self.data_path + "img/manjaro-hello.png" # Load preferences self.preferences = self.get_preferences() @@ -51,10 +56,15 @@ class ManjaroHello(): # Init window self.builder = Gtk.Builder() - self.builder.add_from_file("manjaro-hello.glade") + self.builder.add_from_file(self.ui_path + "manjaro-hello.glade") self.builder.connect_signals(self) self.window = self.builder.get_object("window") + # Load logos + self.window.set_icon_from_file(self.logo_path) + self.builder.get_object("manjaroicon").set_from_file(self.logo_path) + self.builder.get_object("aboutdialog").set_logo(GdkPixbuf.Pixbuf.new_from_file(self.logo_path)) + # Init translation self.default_locale = "en_US" self.sys_locale = locale.getdefaultlocale()[0] diff --git a/src/manjaro-hello.glade b/ui/manjaro-hello.glade similarity index 99% rename from src/manjaro-hello.glade rename to ui/manjaro-hello.glade index 647466f..cd1a713 100644 --- a/src/manjaro-hello.glade +++ b/ui/manjaro-hello.glade @@ -6,7 +6,6 @@ False About True - manjaro-hello.png dialog Manjaro Hello git @@ -14,7 +13,7 @@ https://github.com/Huluti/manjaro-hello Github Hugo Posnic - manjaro-hello.png + gpl-3-0 @@ -55,7 +54,6 @@ 800 False center - manjaro-hello.png True @@ -89,10 +87,9 @@ 20 10 - + True False - manjaro-hello.png 0