Skip to content

Commit 96e2285

Browse files
authored
Update realppl.py
V1.1.1
1 parent bad2510 commit 96e2285

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

realppl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,6 @@ def show_message(self, title, message):
612612
dialog.geometry("300x100")
613613
dialog.resizable(False, False)
614614

615-
# Center the dialog on screen
616615
dialog.update()
617616
x = (dialog.winfo_screenwidth() - dialog.winfo_width()) // 2
618617
y = (dialog.winfo_screenheight() - dialog.winfo_height()) // 2
@@ -625,6 +624,8 @@ def show_message(self, title, message):
625624
dialog.grab_set()
626625

627626
def save_settings(self):
627+
if not os.path.exists(".settings"):
628+
os.makedirs(".settings")
628629
with open(".settings/settings.json", "w") as f:
629630
json.dump({
630631
"auto_refresh": int(self.auto_refresh_enabled),
@@ -634,6 +635,8 @@ def save_settings(self):
634635

635636
def load_settings(self):
636637
try:
638+
if not os.path.exists(".settings/settings.json"):
639+
self.save_settings()
637640
with open(".settings/settings.json", "r") as f:
638641
settings = json.load(f)
639642
self.auto_refresh_enabled = bool(settings.get("auto_refresh", True))

0 commit comments

Comments
 (0)