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
Show notification after running macro #3269
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3269 +/- ##
============================================
- Coverage 37.84% 37.84% -0.01%
Complexity 16895 16895
============================================
Files 2054 2054
Lines 125490 125494 +4
Branches 21227 21228 +1
============================================
+ Hits 47495 47496 +1
- Misses 72142 72145 +3
Partials 5853 5853
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
I just tried this PR on Windows 10. For some reason the notification only appears in the notification center, not on the screen. Making this whole feature almost completely useless... |
On my Windows 11 machine, it looks fine:
|
I have checked this out and it appears the only way is to remove that text completely. That is what I've done in my latest commit. It should still show the icon though.
The MacOS version is ready for testing now. |
I did some quick tests with different desktop environments. Seems to look fine everywhere. I added the screenshots in the PR description. |
key.core/src/main/java/de/uka/ilkd/key/macros/ProofMacroFinishedInfo.java
Outdated
Show resolved
Hide resolved
key.core/src/main/java/de/uka/ilkd/key/macros/ProofMacroFinishedInfo.java
Show resolved
Hide resolved
key.ui/src/main/java/de/uka/ilkd/key/gui/WindowUserInterfaceControl.java
Outdated
Show resolved
Hide resolved
key.ui/src/main/java/org/key_project/util/java/CheckedProcessBuilder.java
Show resolved
Hide resolved
@unp1 Could you please check that displaying a notification works on macOS? I think that nobody else has a Mac and can test it. |
Just checked it. The setting is on always, but notifications do show up. We can look at it together in/after the KeY meeting. |
key.ui/src/main/java/de/uka/ilkd/key/gui/WindowUserInterfaceControl.java
Outdated
Show resolved
Hide resolved
OK, first good news it works (it does not show a notification if the macro managed to close the proof, which makes sense). One problem is that macOS thinks the notification comes from its ScriptEditor. This has two minor issues (1) the user thinks it comes from a different program and (2) if the ScriptEditor is not allowed to send notification, the user will not see them for KeY either. In principle it seems to be possible (according to apples documentation) to pass an icon to osascript, but as there are several discussions that say it is not possible, I assume it has been added lately. I suggest we live with the Script Editor icon for the moment. Alternatively, the provided Java only alternative works as well with the following drawbacks:
|
Almost the same problem applies to the Windows notification, which comes from the "OpenJDK Platform Binary". At least we can set the icon on Windows. I have changed the default to "when KeY is not focused" as discussed. |
This PR adds a notification that will show up after a macro is done. Depending on the settings it will always / when the KeY window is not focused / never show up.
The view settings panel has also been restructured.