added logic to account for starting without the pickled settings
This commit is contained in:
5
main.py
5
main.py
@@ -20,12 +20,15 @@ class MangaReader:
|
||||
master.title("Manga Reader")
|
||||
|
||||
#Load settings
|
||||
try:
|
||||
settingLoad = pickle.load(open('manga.p', 'rb'))
|
||||
self.dir = settingLoad['directory']
|
||||
self.nextKey = settingLoad['nextKey']
|
||||
self.backKey = settingLoad['backKey']
|
||||
self.quitKey = settingLoad['quitKey']
|
||||
self.openKey = settingLoad['openKey']
|
||||
except:
|
||||
pass
|
||||
|
||||
# tk window size and allow resize
|
||||
master.geometry("700x900")
|
||||
@@ -54,7 +57,7 @@ class MangaReader:
|
||||
|
||||
# page counter
|
||||
self.pgcount = Label(self.buttonFrame, text= str(self.page) + " of " + str(self.total))
|
||||
self.pgcount.grid(row=1, columns=1, columnspan=2)
|
||||
self.pgcount.grid(row=1, column=1, columnspan=2, pady=(20,20))
|
||||
|
||||
self.mangaTitle = Label(self.buttonFrame, text=os.path.basename(self.file))
|
||||
self.mangaTitle.grid(row=0, column=1)
|
||||
|
||||
Reference in New Issue
Block a user