jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimirsitni...@apache.org
Subject [jmeter] 02/02: Hide File -> Exit menu item when JMeter menu is integrated with macOS system one
Date Wed, 09 Oct 2019 08:59:19 GMT
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit c2b09342847bd41e83e43b6f77c7d46f710fd96b
Author: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
AuthorDate: Wed Oct 9 11:59:02 2019 +0300

    Hide File -> Exit menu item when JMeter menu is integrated with macOS system one
    
    macOS generates the default JMeter -> Quit menu item, so there's no need in File ->
Exit
---
 .../src/main/java/org/apache/jmeter/gui/util/JMeterMenuBar.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/core/src/main/java/org/apache/jmeter/gui/util/JMeterMenuBar.java b/src/core/src/main/java/org/apache/jmeter/gui/util/JMeterMenuBar.java
index cc877b2..e388ce6 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/util/JMeterMenuBar.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/util/JMeterMenuBar.java
@@ -524,7 +524,11 @@ public class JMeterMenuBar extends JMenuBar implements LocaleChangeListener
{
 
         addPluginsMenuItems(fileMenu, menuCreators, MENU_LOCATION.FILE);
 
-        fileMenu.add(fileExit);
+        // When JMeter menu is integrated with macOS system menu, there's no need in extra
"exit"
+        // macOS creates the default "Quit" item which is consistently located for all the
apps
+        if (!Boolean.getBoolean("apple.laf.useScreenMenuBar")) {
+            fileMenu.add(fileExit);
+        }
     }
 
     private void makeSearchMenu() {


Mime
View raw message