disable the OS X export button on Windows and Linux (fixes 2642)

This commit is contained in:
Ben Fry
2014-07-30 11:58:45 -04:00
parent 72cc3dd54d
commit 47125c9797
2 changed files with 14 additions and 1 deletions

View File

@@ -283,6 +283,11 @@ public class JavaEditor extends Editor {
}
});
// Only possible to export OS X applications on OS X
if (!Base.isMacOS()) {
// Make sure they don't have a previous 'true' setting for this
Preferences.setBoolean("export.application.platform.macosx", false);
}
final JCheckBox macosxButton = new JCheckBox("Mac OS X");
macosxButton.setSelected(Preferences.getBoolean("export.application.platform.macosx"));
macosxButton.addItemListener(new ItemListener() {
@@ -290,6 +295,10 @@ public class JavaEditor extends Editor {
Preferences.setBoolean("export.application.platform.macosx", macosxButton.isSelected());
}
});
if (!Base.isMacOS()) {
macosxButton.setEnabled(false);
macosxButton.setToolTipText("Mac OS X export is only available on Mac OS X");
}
final JCheckBox linuxButton = new JCheckBox("Linux");
//linuxButton.setMnemonic(KeyEvent.VK_L);