From d8d7b804743b5bf82e0e11cf62e73b63e7a2cec8 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 18 May 2015 15:41:26 +0000 Subject: [PATCH] * enable menu bar only if jayatanaag agent is setup --- source/net/filebot/Main.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/net/filebot/Main.java b/source/net/filebot/Main.java index 34949c3b..3335daf7 100644 --- a/source/net/filebot/Main.java +++ b/source/net/filebot/Main.java @@ -274,8 +274,11 @@ public class Main { MacAppUtilities.setDefaultMenuBar(FileBotMenuBar.createHelp()); } else if (isUbuntuApp()) { // Ubuntu specific configuration + String options = System.getenv("JAVA_TOOL_OPTIONS"); + if (options != null && options.contains("jayatanaag.jar")) { + frame.setJMenuBar(FileBotMenuBar.createHelp()); // menu should be rendered via JAyatana on Ubuntu 15.04 and higher + } frame.setIconImages(ResourceManager.getApplicationIcons()); - frame.setJMenuBar(FileBotMenuBar.createHelp()); // menu should be rendered via JAyatana on Ubuntu 15.04 and higher } else { // Windows / Linux specific configuration frame.setIconImages(ResourceManager.getApplicationIcons());