Woohoo! My first Spark commit! Only show the "Exit" menu item if we're not on the mac platform. Otherwise, showing this is redundant.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@5972 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Bill Lynch
2006-11-07 08:07:41 +00:00
committed by bill
parent ccebc3e717
commit 9f1214cbe3

View File

@ -364,9 +364,15 @@ public final class MainWindow extends JFrame implements ActionListener {
connectMenu.add(logoutWithStatus);
}
connectMenu.addSeparator();
connectMenu.add(exitMenuItem);
// Only add a separator and an "exit" menu item if we're not on the mac platform
try {
boolean isMacPlatform = Class.forName("com.apple.eawt.Application") == null;
if (!isMacPlatform) {
connectMenu.addSeparator();
connectMenu.add(exitMenuItem);
}
}
catch (ClassNotFoundException ignored) { Log.debug(ignored.getMessage()); }
Action showTrafficAction = new AbstractAction() {
public void actionPerformed(ActionEvent actionEvent) {