Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
notmithun committed Oct 16, 2024
1 parent d11fa3b commit ba40f58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "appearance_mode": 2, "start_up_txt": true }
{ "appearance_mode": 1, "start_up_txt": false }
6 changes: 4 additions & 2 deletions src/light_notepad.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def set_txt(filename: str="test.txt"):
read_file.close()

def save(information: str="Text....", fn: str="test.txt"):
global IS_FILE_SAVED
if fn == '':
mbox.showerror("Cannot save.", "Error code: 3\n\nFilename is empty. Either use save as or make a new document.")
return 1
Expand All @@ -112,6 +113,7 @@ def save(information: str="Text....", fn: str="test.txt"):
mbox.showerror("Error: FileNotFoundError", f"Error message: {fnfe}.\n\n Please recheck that the file is there")
txt_saved.writelines(information)
txt_saved.close()
IS_FILE_SAVED = True
mbox.showinfo("Successfully saved", "Successfully saved to " + fn)

print(f"Version: {VERSION}")
Expand Down Expand Up @@ -181,8 +183,8 @@ def save(information: str="Text....", fn: str="test.txt"):
help_menu.add_separator()
help_menu.add_cascade(label="About Light Notepad", command=lambda: mbox.showinfo("Light Notepad - Created by Mithun", ABOUT_TXT))

txt_box = ctk.CTkTextbox(app)
txt_box.pack()
txt_box = ctk.CTkTextbox(app, width=600, height=600)
txt_box.pack(expand=True, fill='both')
txt_box.place(relx=0.5, rely=0.5, anchor=CENTER)

app.mainloop()

0 comments on commit ba40f58

Please sign in to comment.