Updated to not error out on Linux GTK look and feel.

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@230 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Tgui 2006-08-14 23:59:20 +00:00
parent f82d73d4fc
commit 100eaa7d8d
1 changed files with 12 additions and 2 deletions

View File

@ -60,9 +60,19 @@ public class ECUEditor extends JFrame implements WindowListener, PropertyChangeL
public ECUEditor() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
String osName = System.getProperties().getProperty("os.name");
//Currently linux has issues with the gtk look and feel themes. If linux is detected, ignore UIManager detail.
//TODO Don't just ignore in the future, Tgui
if(!osName.equalsIgnoreCase("linux")){
String lookAndFeel = UIManager.getSystemLookAndFeelClassName();
UIManager.setLookAndFeel(lookAndFeel);
}
} catch (Exception ex) { }
} catch (Exception ex) {
System.err.println("Error loading system look and feel.\n"+ ex);
}
// get settings from xml
try {