-
Notifications
You must be signed in to change notification settings - Fork 17
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
Make some changes to Natlink's message window #214
Open
drmfinlay
wants to merge
10
commits into
dictation-toolbox:master
Choose a base branch
from
drmfinlay:feat/decouple-message-window
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Make some changes to Natlink's message window #214
drmfinlay
wants to merge
10
commits into
dictation-toolbox:master
from
drmfinlay:feat/decouple-message-window
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Re: dictation-toolbox#184. The message window's pop-up menu is now loaded from the executable resource data. It is easier to change now.
Re: dictation-toolbox#213. This item is grayed out (disabled) by default, for now. I've added a separator between it and the File>Reload item.
Re: dictation-toolbox#184. That is, use boolean flags and a dedicated user window message to convey updates to the output window. This makes it easier to update the pop-up menu later down the line, if desired, by adding and hand- ling new flags.
Re: dictation-toolbox#213. The new function is setMessageWindow(). I have documented it in the NatlinkSource/natlink.txt file. It is now necessary to call this function with a Python callback to enable the message window. The default callback will soon reside in the natlinkcore code and be set from appsupp.cpp. Since it is related, this changeset includes modifications to the message window's File>Reload logic, re: dictation-toolbox#28. The default callback will do a narrower reloading of user modules.
This changes the CDragonCode::makeCallback() method to hold Python's GIL regardless of whether Natlink thread safety is enabled. A crash occurs if this is not done.
- Show the message window before natConnect(). - Remove the now unused reloadPython() method.
This can cause inconsistent state in user/library code.
drmfinlay
force-pushed
the
feat/decouple-message-window
branch
from
November 2, 2024 21:55
16bf4eb
to
299ea3f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Re: #28, #184, #213.
This PR mostly changes the message window. There are a few minor, unrelated changes.
The message window may now be controlled by a new
setMessageWindow()
function, though it is still started automatically in appsupp.cpp. I have included documentation for this new function in NatlinkSource/natlink.txt.The window may now also be displayed before
natConnect()
and the pop-up menu is easier to change.I have also fixed the reload button. It now reloads user modules, via the new callback, instead of the Python interpreter.
This is to be merged in conjunction with a natlinkcore pull request I'll make shortly. To test: build and run an installer, then install my branch of natlinkcore with
pip install -e
.