From 1dff2bcfbe56f2d5a372839a454f617c8fa06ea9 Mon Sep 17 00:00:00 2001 From: Lyubomir Marinov Date: Tue, 7 Oct 2008 11:34:31 +0000 Subject: [PATCH] When selecting the application LookAndFeel, tries to be less explicit and relies on UIManager.getSystemLookAndFeelClassName() which has more advanced logic and tries to differentiate between Gnome and KDE. --- .../communicator/impl/gui/UIServiceImpl.java | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java index 791ade237..1a32b4149 100644 --- a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java +++ b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java @@ -710,23 +710,12 @@ private void setDefaultThemePack() * Attempt to use the OS-native LookAndFeel instead of * SIPCommLookAndFeel. */ - String laf; + String laf = UIManager.getSystemLookAndFeelClassName(); boolean lafIsSet = false; - if (osName.contains("Windows")) - { - laf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; - } - else if (osName.contains("Linux")) - { - laf = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"; - } - else - { - laf = null; - } - - if (laf != null) + if ((laf != null) + && !laf + .equals(UIManager.getCrossPlatformLookAndFeelClassName())) { try {