Ticket #3721: josm-default-laf-setting-linux.patch

File josm-default-laf-setting-linux.patch, 877 bytes (added by mathieu.tl@…, 16 years ago)

default laf to GTK on Linux

  • src/org/openstreetmap/josm/data/Preferences.java

    old new  
    441441
    442442    public final void resetToDefault(){
    443443        properties.clear();
    444         if (System.getProperty("os.name").toUpperCase().indexOf("WINDOWS") == -1) {
    445             put("laf", "javax.swing.plaf.metal.MetalLookAndFeel");
    446         } else {
     444        if (System.getProperty("os.name").toUpperCase().indexOf("WINDOWS") == 0) {
    447445            put("laf", "com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
     446        } else if (System.getProperty("os.name").toUpperCase().indexOf("LINUX") == 0) {
     447            put("laf", "com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
     448        } else {
     449            put("laf", "javax.swing.plaf.metal.MetalLookAndFeel");
    448450        }
    449451    }
    450452