Disabled file association buttons in non-Windows environments

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@334 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Jared Gould 2006-11-09 01:00:08 +00:00
parent 162be2f54c
commit 1d9798cf1d
1 changed files with 10 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import java.awt.Dimension;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.util.StringTokenizer;
import javax.swing.JColorChooser;
import javax.swing.JFrame;
@ -40,6 +41,15 @@ public class SettingsForm extends JFrame implements MouseListener {
btnRemoveAssocs.addMouseListener(this);
tableClickCount.setBackground(Color.WHITE);
// disable file assocation buttons if user is not in Windows
StringTokenizer osName = new StringTokenizer(System.getProperties().getProperty("os.name"));
if (!osName.nextToken().equalsIgnoreCase("windows")) {
btnAddAssocs.setEnabled(false);
btnRemoveAssocs.setEnabled(false);
extensionHex.setEnabled(false);
extensionBin.setEnabled(false);
}
}