native menu for ubuntu
authorKonstantin Bulenkov <kb@jetbrains.com>
Fri, 2 Aug 2013 11:24:38 +0000 (13:24 +0200)
committerKonstantin Bulenkov <kb@jetbrains.com>
Fri, 2 Aug 2013 11:24:38 +0000 (13:24 +0200)
build/scripts/libLicenses.gant
lib/jayatana-1.2.4.jar [new file with mode: 0644]
license/jayatana_license.txt [new file with mode: 0644]
platform/platform-impl/platform-impl.iml
platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java
platform/platform-resources-en/src/misc/registry.properties

index d50efad5a0d5947007e56133e3c56a5a6bff06da..c6b526f85d73ca217e2a82d1b3ce6722c5c5288e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2012 JetBrains s.r.o.
+ * Copyright 2000-2013 JetBrains s.r.o.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -266,6 +266,7 @@ libraryLicense(name: "bouncy-castle", version: "1.48", license: "MIT License", u
 libraryLicense(name: "kXML2", libraryName: "kxml2", version: "2.3.0", license: "BSD", url: "http://sourceforge.net/projects/kxml/")
 libraryLicense(name: "Lombok AST", libraryName: "lombok-ast", version: "0.2.1", license: "MIT", url: "http://projectlombok.org/", licenseUrl: "http://opensource.org/licenses/mit-license.php")
 libraryLicense(name: "fxg-utils", libraryName: "fxg-utils", version: "4.9.1", license: "Apache 2.0", url: "http://flex.apache.org", licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0")
+libraryLicense(name: "jayatana", libraryName: "jayatana", version: "1.2.4", license: "MIT License", url: "https://code.google.com/p/java-swing-ayatana/", licenseUrl: "http://opensource.org/licenses/mit-license.php")
 jetbrainsLibrary("JPS")
 jetbrainsLibrary("Maven Embedder")
 jetbrainsLibrary("tcServiceMessages")
diff --git a/lib/jayatana-1.2.4.jar b/lib/jayatana-1.2.4.jar
new file mode 100644 (file)
index 0000000..2cb4766
Binary files /dev/null and b/lib/jayatana-1.2.4.jar differ
diff --git a/license/jayatana_license.txt b/license/jayatana_license.txt
new file mode 100644 (file)
index 0000000..ef82e46
--- /dev/null
@@ -0,0 +1,23 @@
+Copyright (c) 2012 Jared Gonz├ílez
+
+Permission is hereby granted, free of charge, to any
+person obtaining a copy of this software and associated
+documentation files (the "Software"), to deal in the
+Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions of
+the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
index 085849048137f834101b8e8ecbf166d05097e69a..6cc1c8ad3ed525712654f82108ef7744d0a863be 100644 (file)
@@ -37,6 +37,7 @@
     <orderEntry type="library" name="Guava" level="project" />
     <orderEntry type="module" module-name="jps-model-impl" />
     <orderEntry type="module" module-name="analysis-impl" />
+    <orderEntry type="library" name="jayatana" level="project" />
   </component>
 </module>
 
index 216f6a7f6fca55cc988224c5a1edc90829a36be5..232b0c3afeb6a501fcb0b053e563a3c118af54ce 100644 (file)
@@ -52,6 +52,7 @@ import com.intellij.openapi.wm.impl.status.*;
 import com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame;
 import com.intellij.ui.*;
 import com.intellij.util.ui.UIUtil;
+import org.java.ayatana.ApplicationMenu;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -132,6 +133,13 @@ public class IdeFrameImpl extends JFrame implements IdeFrameEx, DataProvider {
         updateBorder();
       }
     });
+    if (SystemInfo.isLinux && Registry.is("linux.native.menu")) {
+      SwingUtilities.invokeLater(new Runnable() {
+        public void run() {
+          ApplicationMenu.tryInstall(IdeFrameImpl.this);
+        }
+      });
+    }
   }
 
   private void updateBorder() {
index 95e87f88fb134301c47222dcf7f7c72f77edd7b5..e47727594891d7ace805f46d4d0b7f179e0357f9 100644 (file)
@@ -305,3 +305,5 @@ completion.enable.relevant.method.chain.suggestions=false
 ide.mac.message.sheets.java.emulation=false
 # suppress inspection "UnusedProperty"
 ide.mac.message.sheets.java.emulation.description=Use Java message sheets instead of native ones
+linux.native.menu=false
+linux.native.menu.description=Enables native menu on Ubuntu