-
-
Notifications
You must be signed in to change notification settings - Fork 1
Implement autosave #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Okay so theres the following changes: -Upon startup, the app just loops opens everything it can finds in the saved data folder. If there is nothing it does a new one. It infers from the looping how much unsaved documents we have, so any new window goes from there. -The app has a proper handler to open files (Dont Repeat Yourself), and the AppWindow does that by default with whatever you feed it -If an unsaved document is empty when closed, it just gets deleted. So we avoid having several empty windows showing up. -Testing and having no keyboard shortcut pissed me off, so i added those, and it shows up when hovering the buttons. Only Save As is missing, because i forgor how to do it from AppWindow, and Application doesnt want to call AppWindow custom methods. The code is commented, you can try it. it may be dumb as rocks, but it's not gonna be stupid |
|
Thanks so much for doing this! I'll take a look at the commented code when I have a little more time and see if I can get it working |
Co-authored-by: William Kelso <[email protected]>
Co-authored-by: William Kelso <[email protected]>
|
Alright |
|
(i hope it didnt sound as if i was pushing you) |
|
Not at all 🙂 I was planning to merge before figuring out the save as action because it wasn't blocking anything and could be tested independently |
|
Alright. Please let me know if i am overbearing on your app. I dont want to rob your fun or put any pressure, just contribute until people go "yo that app is cool" I see something cool, and my brain tend to latch on it. Charlie is asleep these days so since we dont share that hobby i may as well do everything at once. Also wont add any buttons or anything to make it more than just a slate :p |
Fixes #3
Still a draft - Doing this during break at work. It is a windows box, and i dont have admin rights for MSYS2, so i am going fully blind with no building, no linter, and no language server to check for errors beyond syntax
First commit is to move lambdas to handlers - Lambdas are handy but confusing and limiting, handlers allow greater control and are cleaner
and theres not yet in latest vala the fix that prevents for good lambdas from being walking memory leaks
If you prefer lambdas i can restore to the previous state/style, but after ive implemented autosave. Else im just gonna be confused and do back and forth