On Fri, 5 Jul 2024 11:12:50 GMT, Abhishek Kumar <[email protected]> wrote:

>> In GTK LAF, the menu mnemonics are always displayed which is different from 
>> the native behavior. In native application **(tested with gedit for normal 
>> buttons and tested with libreoffice for menu**), the menu mnemonics toggle 
>> on press of `ALT` key. Menu mnemonics are hidden initially and then toggles 
>> between show/hide on `ALT` press. 
>> Proposed fix is to handle the `ALT` key press for GTK LAF and mimic the 
>> native behavior. Fix is similar to the `ALT` key processing in  Windows LAF. 
>> Automated test case is added to verify the fix and tested in Ubuntu and 
>> Oracle linux.
>> 
>> CI testing is green and link attached in JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Javadoc style comment, unused import removed

Marked as reviewed by aivanov (Reviewer).

src/java.desktop/share/classes/sun/swing/MnemonicHandler.java line 1:

> 1: /*

Git identifies this class as rename from `AquaMnemonicHandler` to 
`MnemonicHandler`.

Indeed, the files are very similar. Shall we preserve the original copyright 
year: `(c) 2011, 2024`?

test/jdk/javax/swing/JMenuBar/TestMenuMnemonicLinuxAndMac.java line 59:

> 57:                 UIManager.getInstalledLookAndFeels()) {
> 58:             if (laf.getName().contains("GTK") || 
> laf.getName().contains("Aqua")) {
> 59:                 System.out.println("Testing: "+laf.getName());

Suggestion:

                System.out.println("Testing: " + laf.getName());

Spaces around the binary operator `+`.

-------------

PR Review: https://git.openjdk.org/jdk/pull/18992#pullrequestreview-2160915917
PR Review Comment: https://git.openjdk.org/jdk/pull/18992#discussion_r1666923069
PR Review Comment: https://git.openjdk.org/jdk/pull/18992#discussion_r1666925212

Reply via email to