Rename data folder and method

This commit is contained in:
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
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
self.builder.get_object("autostart").set_active(self.preferences["autostart"])
@ -94,10 +94,10 @@ class ManjaroHello(Gtk.Window):
except OSError as e:
return None
def read_data(self, name):
filename = "data/{}/{}".format(self.language, name)
def read_page(self, name):
filename = "pages/{}/{}".format(self.language, name)
if not os.path.isfile(filename):
filename = "data/{}/{}".format(self.default_language, name)
filename = "pages/{}/{}".format(self.default_language, name)
try:
with open(filename, "r") as f: