Comments (9)
thanks for the suggestions. I'll implement saving in multiple files.
I'm not sure about saving on every keystroke as it may not be desirable for SSDs (limited writes), but the limitations are too high so I'll implement it anyways...
from sticky.
It doesn't have to be on every keystroke. It could be when focus is lost. Or debounced.
from sticky.
how to i detect when focus is lost?
from sticky.
I would use this https://docs.gtk.org/gtk4/method.TextBuffer.set_modified.html
This is what Workbench uses in case you're looking for an example.
from sticky.
oh okay!
so in short, when I save the note, I'll set the modified
bit to false
, then when it's changed it'll emit the modified-changed
signal?
from sticky.
yes! this will save on every change but wait for the async save operation to be done before calling the next one
This is what Text Editor and Builder are doing too IIRC
from sticky.
there is also a way to make Gio use a backup file before replacing
If you assign me to a PR I can have a quick look / review if you like
from sticky.
well I can definitely put up something like tomorrow. but if you want/can, you can create a PR
from sticky.
The app saves data on quit. This is problematic because if it crashes or if it is terminated unexpected (by user or system) - notes/changes won't be saved. My suggestion is to save changes as they happen.
Thank you for this analysis, now at least I know why I lost everything from my first day of use: I shut down my computer without manually quitting the application. Since I have a lot of applications open, the system probably terminated it.
from sticky.
Related Issues (20)
- Can't change to another language HOT 1
- Checklists, please! HOT 1
- The color changes of the notes are lost if you don't exit the application yourself HOT 3
- add a copy button HOT 6
- A way to sync notes across computers HOT 6
- Notes don't honor (Linux) workspaces HOT 1
- plasma-discover Failed to find service "com.vixalien.sticky.desktop" HOT 1
- Add "Post-It" to .desktop keywords HOT 2
- Do not show in the dock or in alt+tab view HOT 1
- Keep text cursor in view in sticky note HOT 2
- Feature request: Save note window sizes and positions HOT 2
- Feature request: Larger main windows get a grid view of the notes
- Feature request: Clicking on the eye icon should close the note
- Feature request: Custom context menu for main app window
- UX: Warn when closing multiple notes at once
- Feedback: Remember open notes
- Feature request: could i have an option to change default color? please
- feature request: typeface preferences (+some ideas)
- Dark-colored notes? HOT 3
- Feature request: add a 'New Note' entry to Desktop's context menu HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sticky.