[hg] main-silver: don't offer l&f switch when using --laf comman...

  • From: "S. Aubrecht" < >
  • To:
  • Subject: [hg] main-silver: don't offer l&f switch when using --laf comman...
  • Date: Thu, 18 Jul 2013 07:57:21 -0700

changeset 5127ed24b51a in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/5127ed24b51a
description:
        don't offer l&f switch when using --laf command line option

diffstat:

 
options.editor/src/org/netbeans/modules/options/colors/FontAndColorsPanel.java
 |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (25 lines):

diff --git 
a/options.editor/src/org/netbeans/modules/options/colors/FontAndColorsPanel.java
 
b/options.editor/src/org/netbeans/modules/options/colors/FontAndColorsPanel.java
--- 
a/options.editor/src/org/netbeans/modules/options/colors/FontAndColorsPanel.java
+++ 
b/options.editor/src/org/netbeans/modules/options/colors/FontAndColorsPanel.java
@@ -366,7 +366,7 @@
     private void showDarkLaFNotification( String profileName ) {
         if( null != previousProfileName && !previousProfileName.equals( 
profileName ) ) { //NOI18N
             if( DARK_COLOR_PROFILE_NAME.equals( profileName ) ) {
-                if( !isDarkLaF() && null == changeLaFNotification ) {
+                if( !isDarkLaF() && null == changeLaFNotification && 
!isForcedLaF() ) {
                     changeLaFNotification = 
NotificationDisplayer.getDefault().notify( 
NbBundle.getMessage(FontAndColorsPanel.class, "Title_DarkLaF"),
                             ImageUtilities.loadImageIcon( 
"org/netbeans/modules/options/colors/darklaf.png", true), //NOI18N
                             NbBundle.getMessage(FontAndColorsPanel.class, 
"Hint_DarkLaF"), new ActionListener() {
@@ -390,6 +390,11 @@
     private static boolean isDarkLaF() {
         Preferences prefs = NbPreferences.root().node( "laf" ); //NOI18N
         return prefs.getBoolean( "theme.dark", false ) && 
(MetalLookAndFeel.class.getName().equals( prefs.get( "laf", "" ))
-                                                        || 
NimbusLookAndFeel.class.getName().equals( prefs.get( "laf", "" )) ); //NOI18N
+                                                        || 
NimbusLookAndFeel.class.getName().equals( prefs.get( "laf", "" ))
+                                                        || 
com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel.class.getName().equals( 
prefs.get( "laf", "" )) ); //NOI18N
     }
+
+    private boolean isForcedLaF() {
+        return null != System.getProperty( "nb.laf.forced" ); //NOI18N
 }
+}

[hg] main-silver: don't offer l&f switch when using --laf comman...

S. Aubrecht 07/18/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close