Rename data folder and method

merge-requests/64/head
Huluti 2016-12-05 19:32:15 +01:00
parent 498e083b0d
commit 045ad8c811
4 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ class ManjaroHello(Gtk.Window):
# Initialize pages # Initialize pages
for page in ("readme", "release", "involved"): for page in ("readme", "release", "involved"):
self.builder.get_object(page + "text").set_markup(self.read_data(page)) self.builder.get_object(page + "text").set_markup(self.read_page(page))
# Set switcher state # Set switcher state
self.builder.get_object("autostart").set_active(self.preferences["autostart"]) self.builder.get_object("autostart").set_active(self.preferences["autostart"])
@ -94,10 +94,10 @@ class ManjaroHello(Gtk.Window):
except OSError as e: except OSError as e:
return None return None
def read_data(self, name): def read_page(self, name):
filename = "data/{}/{}".format(self.language, name) filename = "pages/{}/{}".format(self.language, name)
if not os.path.isfile(filename): if not os.path.isfile(filename):
filename = "data/{}/{}".format(self.default_language, name) filename = "pages/{}/{}".format(self.default_language, name)
try: try:
with open(filename, "r") as f: with open(filename, "r") as f: