qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

Wrong setMnemonic in ConfirmDialog and GatewayDialog initComponents() #120

Closed ChaosNemesis closed 8 years ago

ChaosNemesis commented 8 years ago

Seems to be the wrong setMnemonic, probably copy paste. Suggested fix:

@@ -59,11 +59,11 @@ public class GatewayDialog extends JDialog {

         optionsPanel = new JPanel();
         allowButton = new JButton("Allow", iconCache.getIcon(IconCache.Icon.ALLOW_ICON));
         allowButton.setMnemonic(KeyEvent.VK_A);
         blockButton = new JButton("Block", iconCache.getIcon(IconCache.Icon.BLOCK_ICON));
-        allowButton.setMnemonic(KeyEvent.VK_B);
+        blockButton.setMnemonic(KeyEvent.VK_B);
         allowButton.addActionListener(buttonAction);
         blockButton.addActionListener(buttonAction);

         certInfoLabel = new LinkLabel();
         certTable = new CertificateTable(cert, iconCache);

@@ -46,11 +46,11 @@ public class ConfirmDialog extends JDialog {

         optionsPanel = new JPanel();
         yesButton = new JButton("OK", iconCache.getIcon(IconCache.Icon.ALLOW_ICON));
         yesButton.setMnemonic(KeyEvent.VK_K);
         noButton = new JButton("Cancel", iconCache.getIcon(IconCache.Icon.BLOCK_ICON));
-        yesButton.setMnemonic(KeyEvent.VK_C);
+        noButton.setMnemonic(KeyEvent.VK_C);
         yesButton.addActionListener(buttonAction);
         noButton.addActionListener(buttonAction);

         optionsPanel.add(yesButton);
         optionsPanel.add(noButton);
tresf commented 8 years ago

@ChaosNemesis :+1: thanks. Fixed via 7fa8a68 (and def2661 in 2.0 branch)