mirror of
https://github.com/correl/mage.git
synced 2025-01-11 11:05:23 +00:00
Fixed test mode (Issue 35): now uses server test mode state.
This commit is contained in:
parent
9306d94ad2
commit
cb3e454002
2 changed files with 3 additions and 8 deletions
|
@ -97,7 +97,6 @@ public class MageFrame extends javax.swing.JFrame {
|
|||
private static Preferences prefs = Preferences.userNodeForPackage(MageFrame.class);
|
||||
private JLabel title;
|
||||
private Rectangle titleRectangle;
|
||||
public final static String testModeArg = "-testMode=";
|
||||
|
||||
/**
|
||||
* @return the session
|
||||
|
@ -555,12 +554,6 @@ public class MageFrame extends javax.swing.JFrame {
|
|||
splash.update();
|
||||
}
|
||||
|
||||
for (String arg: args) {
|
||||
if (arg.startsWith(testModeArg)) {
|
||||
System.setProperty(testModeArg, "true");
|
||||
}
|
||||
}
|
||||
|
||||
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||
public void uncaughtException(Thread t, Throwable e) {
|
||||
logger.log(Level.SEVERE, null, e);
|
||||
|
|
|
@ -152,7 +152,9 @@ public class TablesPanel extends javax.swing.JPanel implements Observer {
|
|||
|
||||
this.roomId = roomId;
|
||||
session = MageFrame.getSession();
|
||||
btnQuickStart.setVisible(System.getProperty(MageFrame.testModeArg) != null);
|
||||
if (session != null) {
|
||||
btnQuickStart.setVisible(session.isTestMode());
|
||||
}
|
||||
if (newTableDialog == null) {
|
||||
newTableDialog = new NewTableDialog();
|
||||
MageFrame.getDesktop().add(newTableDialog);
|
||||
|
|
Loading…
Reference in a new issue