changeset 3240:8554f062d23d

Add new backports for issues to be fixed in 1.13.10. S7169111, PR2757: Unreadable menu bar with Ambiance theme in GTK L&F S8140620, PR2711: Find and load default.sf2 as the default soundbank on Linux 2016-01-19 Andrew John Hughes <gnu.andrew@redhat.com> * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * NEWS: Updated. * patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch, * patches/openjdk/8140620-pr2711-find_default.sf2.patch: New backports for issues to be fixed in 1.13.10.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Thu, 21 Jan 2016 01:22:57 +0000
parents cf929b8fdebc
children 680136982d3c
files ChangeLog Makefile.am NEWS patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch patches/openjdk/8140620-pr2711-find_default.sf2.patch
diffstat 5 files changed, 123 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Nov 18 03:11:24 2015 +0000
+++ b/ChangeLog	Thu Jan 21 01:22:57 2016 +0000
@@ -1,3 +1,12 @@
+2016-01-19  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patches.
+	* NEWS: Updated.
+	* patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch,
+	* patches/openjdk/8140620-pr2711-find_default.sf2.patch:
+	New backports for issues to be fixed in 1.13.10.
+
 2015-11-17  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	* NEWS: Add 1.13.10 section.
--- a/Makefile.am	Wed Nov 18 03:11:24 2015 +0000
+++ b/Makefile.am	Thu Jan 21 01:22:57 2016 +0000
@@ -639,7 +639,9 @@
 	patches/openjdk/6763122-no_zipfile_ctor_exception.patch \
 	patches/openjdk/6599383-pr363-large_zip_files.patch \
 	patches/openjdk/6929479-pr363-disable_mmap_zip.patch \
-	patches/pr2513-layoutengine_reset.patch
+	patches/pr2513-layoutengine_reset.patch \
+	patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch \
+	patches/openjdk/8140620-pr2711-find_default.sf2.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
--- a/NEWS	Wed Nov 18 03:11:24 2015 +0000
+++ b/NEWS	Thu Jan 21 01:22:57 2016 +0000
@@ -14,6 +14,10 @@
 
 New in release 1.13.10 (2016-01-XX):
 
+* Backports
+  - S7169111, PR2757: Unreadable menu bar with Ambiance theme in GTK L&F
+  - S8140620, PR2711: Find and load default.sf2 as the default soundbank on Linux
+
 New in release 1.13.9 (2015-11-13):
 
 * Security fixes
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7169111-pr2757-unreadable_menu_bar_with_ambiance_theme.patch	Thu Jan 21 01:22:57 2016 +0000
@@ -0,0 +1,54 @@
+# HG changeset patch
+# User rupashka
+# Date 1342090033 -14400
+#      Thu Jul 12 14:47:13 2012 +0400
+# Node ID 05c69338ee73c1e454aa632ced5cbc057420b404
+# Parent  0039f5c7fb512e1ec2e22bceb69ee324426a684f
+7169111, PR2757: Unreadable menu bar with Ambiance theme in GTK L&F
+Reviewed-by: kizune
+
+diff -r 0039f5c7fb51 -r 05c69338ee73 src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java
+--- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Wed Jul 11 16:19:41 2012 -0700
++++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKLookAndFeel.java	Thu Jul 12 14:47:13 2012 +0400
+@@ -796,9 +796,10 @@
+             "Menu.margin", zeroInsets,
+             "Menu.cancelMode", "hideMenuTree",
+             "Menu.alignAcceleratorText", Boolean.FALSE,
++            "Menu.useMenuBarForTopLevelMenus", Boolean.TRUE,
+ 
+ 
+-            "MenuBar.windowBindings", new Object[] {
++                "MenuBar.windowBindings", new Object[] {
+                 "F10", "takeFocus" },
+             "MenuBar.font", new FontLazyValue(Region.MENU_BAR),
+ 
+diff -r 0039f5c7fb51 -r 05c69338ee73 src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java
+--- openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java	Wed Jul 11 16:19:41 2012 -0700
++++ openjdk/jdk/src/share/classes/com/sun/java/swing/plaf/gtk/GTKStyleFactory.java	Thu Jul 12 14:47:13 2012 +0400
+@@ -92,7 +92,13 @@
+                 boolean defaultCapable = btn.isDefaultCapable();
+                 key = new ComplexKey(wt, toolButton, defaultCapable);
+             }
++        } else if (id == Region.MENU) {
++            if (c instanceof JMenu && ((JMenu) c).isTopLevelMenu() &&
++                    UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus")) {
++                wt = WidgetType.MENU_BAR;
++            }
+         }
++
+         if (key == null) {
+             // Otherwise, just use the WidgetType as the key.
+             key = wt;
+diff -r 0039f5c7fb51 -r 05c69338ee73 src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java
+--- openjdk/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Wed Jul 11 16:19:41 2012 -0700
++++ openjdk/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Thu Jul 12 14:47:13 2012 +0400
+@@ -299,7 +299,8 @@
+      */
+     @Override
+     public void propertyChange(PropertyChangeEvent e) {
+-        if (SynthLookAndFeel.shouldUpdateStyle(e)) {
++        if (SynthLookAndFeel.shouldUpdateStyle(e) ||
++                (e.getPropertyName().equals("ancestor") && UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus"))) {
+             updateStyle((JMenu)e.getSource());
+         }
+     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/8140620-pr2711-find_default.sf2.patch	Thu Jan 21 01:22:57 2016 +0000
@@ -0,0 +1,53 @@
+# HG changeset patch
+# User omajid
+# Date 1445973555 14400
+#      Tue Oct 27 15:19:15 2015 -0400
+# Node ID 79e4644bd40482ec3ae557f086137e2869b3f50a
+# Parent  09c2cc84d4517af288f26607a39ff0515a05e771
+8140620, PR2711: Find and load default.sf2 as the default soundbank on Linux
+Reviewed-by: serb
+
+diff -r 09c2cc84d451 -r 79e4644bd404 src/share/classes/com/sun/media/sound/SoftSynthesizer.java
+--- openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java	Fri Nov 13 05:11:53 2015 +0000
++++ openjdk/jdk/src/share/classes/com/sun/media/sound/SoftSynthesizer.java	Tue Oct 27 15:19:15 2015 -0400
+@@ -668,6 +668,40 @@
+             actions.add(new PrivilegedAction<InputStream>() {
+                 public InputStream run() {
+                     if (System.getProperties().getProperty("os.name")
++                            .startsWith("Linux")) {
++
++                        File[] systemSoundFontsDir = new File[] {
++                            /* Arch, Fedora, Mageia */
++                            new File("/usr/share/soundfonts/"),
++                            new File("/usr/local/share/soundfonts/"),
++                            /* Debian, Gentoo, OpenSUSE, Ubuntu */
++                            new File("/usr/share/sounds/sf2/"),
++                            new File("/usr/local/share/sounds/sf2/"),
++                        };
++
++                        /*
++                         * Look for a default.sf2
++                         */
++                        for (File systemSoundFontDir : systemSoundFontsDir) {
++                            if (systemSoundFontDir.exists()) {
++                                File defaultSoundFont = new File(systemSoundFontDir, "default.sf2");
++                                if (defaultSoundFont.exists()) {
++                                    try {
++                                        return new FileInputStream(defaultSoundFont);
++                                    } catch (IOException e) {
++                                        // continue with lookup
++                                    }
++                                }
++                            }
++                        }
++                    }
++                    return null;
++                }
++            });
++
++            actions.add(new PrivilegedAction<InputStream>() {
++                public InputStream run() {
++                    if (System.getProperties().getProperty("os.name")
+                             .startsWith("Windows")) {
+                         File gm_dls = new File(System.getenv("SystemRoot")
+                                 + "\\system32\\drivers\\gm.dls");