Skip to content
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

Refactor the registry-relevant functions. #2490

Merged
merged 5 commits into from
Apr 23, 2024
Merged

Conversation

InfyniteHeap
Copy link
Contributor

@InfyniteHeap InfyniteHeap commented Apr 19, 2024

The right click menu register functions are refactored with windows and windows-registry crates. The refactored code seems simpler and easier to be read and maintained.

What kind of change does this PR introduce?

  • Refactor

Did this PR introduce a breaking change?

  • No

The right click menu register functions are refactored with `windows` crate. The refactored code seems simpler and easier to be read and maintained.
@InfyniteHeap
Copy link
Contributor Author

I think this commit could be a good start to migrate from winapi to windows, as what I mentioned in issue #2488.

Copy link

github-actions bot commented Apr 20, 2024

Test Results

  6 files  ±0    6 suites  ±0   14s ⏱️ -1s
110 tests ±0  110 ✅ ±0  0 💤 ±0  0 ❌ ±0 
644 runs  ±0  644 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit a44d9f7. ± Comparison against base commit a06ee8e.

♻️ This comment has been updated with latest results.

src/windows_utils.rs Outdated Show resolved Hide resolved
src/windows_utils.rs Outdated Show resolved Hide resolved
src/windows_utils.rs Outdated Show resolved Hide resolved
src/windows_utils.rs Outdated Show resolved Hide resolved
src/windows_utils.rs Outdated Show resolved Hide resolved
src/windows_utils.rs Outdated Show resolved Hide resolved
src/windows_utils.rs Show resolved Hide resolved
src/windows_utils.rs Outdated Show resolved Hide resolved
src/windows_utils.rs Outdated Show resolved Hide resolved
@fredizzimo
Copy link
Member

I think it would be worth having another go trying the windows-registry, since it deals with the null terminating and wide characters properly.

It's new, so there's a small possibility that it is broken, but I don't see any bug reports about it, so I think that chance is very low. It's not very widely used, but still there's 2000 downloads the past 90 days, so I would think that someone else has encountered issues.

@InfyniteHeap
Copy link
Contributor Author

Hi @fredizzimo , I've finished changing the logics.

src/windows_utils.rs Outdated Show resolved Hide resolved
@fredizzimo fredizzimo merged commit fad98fc into neovide:main Apr 23, 2024
12 checks passed
@fredizzimo
Copy link
Member

Thank you, this did indeed simplify the code a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants