From 0fc18d8d6f44366281694e31bc9e227298cd4bc2 Mon Sep 17 00:00:00 2001 From: psadhukhan Date: Fri, 30 Jun 2017 11:03:44 +0530 Subject: [PATCH] 8182402: Tooltip for Desktop button is in English when non-English locale is set Reviewed-by: azvegint --- .../classes/javax/swing/plaf/metal/MetalFileChooserUI.java | 5 ----- .../classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java b/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java index a7b0f52c4..73e49f1e2 100644 --- a/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java +++ b/src/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java @@ -271,11 +271,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI { // Home Button File homeDir = fsv.getHomeDirectory(); String toolTipText = homeFolderToolTipText; - if (fsv.isRoot(homeDir)) { - toolTipText = getFileView(fc).getName(homeDir); // Probably "Desktop". - } - - JButton b = new JButton(homeFolderIcon); diff --git a/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java b/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java index 047952cd6..83751d683 100644 --- a/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java +++ b/src/share/classes/sun/swing/plaf/synth/SynthFileChooserUIImpl.java @@ -259,9 +259,6 @@ public class SynthFileChooserUIImpl extends SynthFileChooserUI { // Home Button File homeDir = fsv.getHomeDirectory(); String toolTipText = homeFolderToolTipText; - if (fsv.isRoot(homeDir)) { - toolTipText = getFileView(fc).getName(homeDir); // Probably "Desktop". - } JButton b = new JButton(homeFolderIcon); b.setToolTipText(toolTipText); -- GitLab