Work in progress on highlighter tickets #259
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is not ready to merge, by a long shot, but creating a PR for review purposes.
I'm working on #43 and #42, both of which share a couple of characteristics:
I have the fundamentals working (tested at least on Mac, so far - testing on Win/Linux is pending):
My observations so far:
On startup, the preference is read; if it's False, then the callback is run only one time (due to the fact all callbacks are run on startup) but it doesn't do anything and it doesn't run again. But if True on startup, it will do exactly what it should: it runs, and it runs again every 2000ms (as designed).
If I change the preference, it turns the callback on and off like it should.
So far so good - all of this seems proper. The one thing is that, if the app starts with the pref as False, and I then turn it on, it starts to call the callback twice per interval, not once. This is in contrast to when the pref is True on startup. In that case, it calls the callback only once per interval (which is the desired behavior).
Any advice is appreciated. And for @windymilla specifically I'd like to hear if any of this works at all on Windows, as it's not tested there. (I will test on Ubuntu at some point myself, but I haven't yet.)
For now I am just trying to get the infrastructure in place for a repeating callback to run, controlled by a boolean preference. Obviously later this will be calling real code to do real work.