From 0d301c9a7c35ba922eea58dcb410b1f13c7a6dd1 Mon Sep 17 00:00:00 2001 From: slapshot5 Date: Tue, 27 Dec 2011 02:16:43 +0000 Subject: [PATCH] remove Old GUI checkbox option. It no longer works, and we will only be using/supporting the new UI. --- .../forge/control/home/ControlSettings.java | 8 ------- .../forge/properties/ForgePreferences.java | 24 ------------------- .../java/forge/view/home/ViewSettings.java | 14 +---------- .../forge/view/swing/ApplicationView.java | 1 - .../java/forge/view/swing/OldGuiNewGame.java | 1 - 5 files changed, 1 insertion(+), 47 deletions(-) diff --git a/src/main/java/forge/control/home/ControlSettings.java b/src/main/java/forge/control/home/ControlSettings.java index b9450bd66bb..5642f688321 100644 --- a/src/main/java/forge/control/home/ControlSettings.java +++ b/src/main/java/forge/control/home/ControlSettings.java @@ -100,14 +100,6 @@ public class ControlSettings { } }); - this.view.getCbOldUI().addActionListener(new ActionListener() { - @Override - public void actionPerformed(final ActionEvent arg0) { - prefs.setOldGui(ControlSettings.this.view.getCbOldUI().isSelected()); - try { prefs.save(); } catch (Exception e) { e.printStackTrace(); } - } - }); - this.view.getCbUploadDraft().addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent arg0) { diff --git a/src/main/java/forge/properties/ForgePreferences.java b/src/main/java/forge/properties/ForgePreferences.java index ac583bc341a..726753494c8 100644 --- a/src/main/java/forge/properties/ForgePreferences.java +++ b/src/main/java/forge/properties/ForgePreferences.java @@ -37,9 +37,6 @@ import java.util.Map; */ public class ForgePreferences extends Preferences { - /** Old gui checkbox toggle. */ - private boolean oldGui; - /** Play for ante checkbox toggle. */ private boolean playForAnte; @@ -146,7 +143,6 @@ public class ForgePreferences extends Preferences { throw new Exception("Error reading \"" + fileName + "\".", ex); } - this.oldGui = this.getBoolean("gui.old", true); this.setPlayForAnte(this.getBoolean("play.for.ante", false)); this.setUILayout(this.get("gui.layout", "")); this.setStackAiLand(this.getBoolean("AI.stack.land", false)); @@ -223,7 +219,6 @@ public class ForgePreferences extends Preferences { */ public final void save() throws Exception { this.set("gui.layout", this.getUILayout()); - this.set("gui.old", this.oldGui); this.set("gui.skin", this.getSkin()); this.set("play.for.ante", this.isPlayForAnte()); @@ -330,25 +325,6 @@ public class ForgePreferences extends Preferences { this.stackAiLand = b0; } - /** - * Checks if old gui is to be used. - * - * @return boolean - */ - public boolean isOldGui() { - return this.oldGui; - } - - /** - * Sets if old gui is to be used. - * - * @param b0 - *   boolean - */ - public void setOldGui(final boolean b0) { - this.oldGui = b0; - } - /** * Checks if we are playing for ante. * diff --git a/src/main/java/forge/view/home/ViewSettings.java b/src/main/java/forge/view/home/ViewSettings.java index 1c15209d259..45c5dc9c0fa 100644 --- a/src/main/java/forge/view/home/ViewSettings.java +++ b/src/main/java/forge/view/home/ViewSettings.java @@ -37,8 +37,7 @@ public class ViewSettings extends JScrollPane { private String spacer; private JCheckBox cbAnte, cbScaleLarger, cbDevMode, cbRemoveSmall, cbRemoveArtifacts, - cbOldUI, cbUploadDraft, cbStackLand, cbRandomFoil, cbTextMana, - cbSingletons; + cbUploadDraft, cbStackLand, cbRandomFoil, cbTextMana, cbSingletons; //private JRadioButton radStack3, radStack4, radStack5, radStack6, radStack7, // radStack8, radStack9, radStack10, radStack11, radStack12; @@ -104,12 +103,6 @@ public class ViewSettings extends JScrollPane { lblTitleUI.setForeground(skin.getColor("text")); viewport.add(lblTitleUI, constraints2); - cbOldUI = new OptionsCheckBox("Old UI"); - cbOldUI.setSelected(Singletons.getModel().getPreferences().isOldGui()); - JLabel lblOldUI = new NoteLabel("Use the user interface from Beta 1.1.9."); - viewport.add(cbOldUI, constraints); - viewport.add(lblOldUI, constraints2); - cbAnte = new OptionsCheckBox("Play for Ante"); cbAnte.setSelected(Singletons.getModel().getPreferences().isPlayForAnte()); NoteLabel lblAnte = new NoteLabel("Determines whether or not the game is played for ante."); @@ -432,11 +425,6 @@ public class ViewSettings extends JScrollPane { return cbRemoveArtifacts; } - /** @return JCheckBox */ - public JCheckBox getCbOldUI() { - return cbOldUI; - } - /** @return JCheckBox */ public JCheckBox getCbUploadDraft() { return cbUploadDraft; diff --git a/src/main/java/forge/view/swing/ApplicationView.java b/src/main/java/forge/view/swing/ApplicationView.java index 5d3582704d9..e2ae78d4fd0 100644 --- a/src/main/java/forge/view/swing/ApplicationView.java +++ b/src/main/java/forge/view/swing/ApplicationView.java @@ -116,7 +116,6 @@ public class ApplicationView implements FView { final ForgePreferences preferences = model.getPreferences(); - OldGuiNewGame.getOldGuiCheckBox().setSelected(preferences.isOldGui()); OldGuiNewGame.getSmoothLandCheckBox().setSelected(preferences.isStackAiLand()); OldGuiNewGame.getDevModeCheckBox().setSelected(preferences.isDeveloperMode()); OldGuiNewGame.getCardOverlay().setSelected(preferences.isCardOverlay()); diff --git a/src/main/java/forge/view/swing/OldGuiNewGame.java b/src/main/java/forge/view/swing/OldGuiNewGame.java index 42e1d42b2ec..d834a9cb25b 100644 --- a/src/main/java/forge/view/swing/OldGuiNewGame.java +++ b/src/main/java/forge/view/swing/OldGuiNewGame.java @@ -1625,7 +1625,6 @@ public class OldGuiNewGame extends JFrame { try { final ForgePreferences preferences = Singletons.getModel().getPreferences(); preferences.setSkin(AllZone.getSkin().getName()); - preferences.setOldGui(OldGuiNewGame.oldGuiCheckBox.isSelected()); preferences.setStackAiLand(OldGuiNewGame.getSmoothLandCheckBox().isSelected()); preferences.setMillingLossCondition(Constant.Runtime.MILL[0]); preferences.setDeveloperMode(Constant.Runtime.DEV_MODE[0]);