Remove duplicate card image settings from general preferences dialog.
parent
a7fe88d9f2
commit
bbbb96b03b
|
@ -6,7 +6,6 @@ import javax.swing.JPanel;
|
|||
import magic.data.GeneralConfig;
|
||||
import magic.translate.MText;
|
||||
import magic.ui.FontsAndBorders;
|
||||
import magic.ui.screen.images.download.DirectoryChooser;
|
||||
import magic.ui.widget.M.MCheckBox;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
|
||||
|
@ -14,8 +13,6 @@ import net.miginfocom.swing.MigLayout;
|
|||
class GeneralPanel extends JPanel {
|
||||
|
||||
// translatable strings.
|
||||
private static final String _S1 = "Download images on demand.";
|
||||
private static final String _S2 = "Only downloads card images as needed. Switch off if you want to download all images in one go, use proxy frames with cropped images or download non-English card images.";
|
||||
private static final String _S56 = "Restart required. Only applies to the general UI, it does not affect card data.";
|
||||
private static final String _S57 = "Deck Editor split view.";
|
||||
private static final String _S58 = "Use the old style split view in the Deck Editor instead of the new tabbed view. This option is provided for convenience, any new features will only be added to the tabbed view.";
|
||||
|
@ -23,7 +20,6 @@ class GeneralPanel extends JPanel {
|
|||
private static final String _S60 = "By default, as you move the mouse cursor over a card entry it will display the image. If you find this a bit too sensitive then this setting will only change the image when the card entry is selected.";
|
||||
private static final String _S63 = "User Interface";
|
||||
private static final String _S64 = "Card Explorer & Deck Editor";
|
||||
private static final String _S83 = "Card images";
|
||||
private static final String _S10 = "Save game statistics.";
|
||||
private static final String _S11 = "Keeps a record of each game played to generate Played/Won/Lost totals and play history for each deck. The data is stored in \\Magarena\\stats.";
|
||||
|
||||
|
@ -32,9 +28,6 @@ class GeneralPanel extends JPanel {
|
|||
private final TranslationPanel langPanel;
|
||||
private final MCheckBox splitViewDeckEditorCheckBox;
|
||||
private final MCheckBox previewCardOnSelectCheckBox;
|
||||
private final PreferredSizePanel preferredSizePanel;
|
||||
private final DirectoryChooser imagesFolderChooser;
|
||||
private final MCheckBox imagesOnDemandCheckbox;
|
||||
private final MCheckBox gameStatsCheckbox;
|
||||
|
||||
GeneralPanel(MouseListener aListener) {
|
||||
|
@ -44,18 +37,6 @@ class GeneralPanel extends JPanel {
|
|||
langPanel.setFocusable(false);
|
||||
langPanel.addMouseListener(aListener);
|
||||
|
||||
imagesFolderChooser = new DirectoryChooser(config.getCardImagesPath());
|
||||
imagesFolderChooser.setFocusable(false);
|
||||
imagesFolderChooser.addMouseListener(aListener);
|
||||
|
||||
preferredSizePanel = new PreferredSizePanel(aListener);
|
||||
preferredSizePanel.setFocusable(false);
|
||||
|
||||
imagesOnDemandCheckbox = new MCheckBox(MText.get(_S1), config.getImagesOnDemand());
|
||||
imagesOnDemandCheckbox.setToolTipText(MText.get(_S2));
|
||||
imagesOnDemandCheckbox.setFocusable(false);
|
||||
imagesOnDemandCheckbox.addMouseListener(aListener);
|
||||
|
||||
splitViewDeckEditorCheckBox = new MCheckBox(MText.get(_S57), config.isSplitViewDeckEditor());
|
||||
splitViewDeckEditorCheckBox.setToolTipText(MText.get(_S58));
|
||||
splitViewDeckEditorCheckBox.setFocusable(false);
|
||||
|
@ -76,11 +57,6 @@ class GeneralPanel extends JPanel {
|
|||
// lang
|
||||
add(getCaptionLabel(MText.get(_S63)));
|
||||
add(langPanel, "w 100%");
|
||||
// images
|
||||
add(getCaptionLabel(MText.get(MText.get(_S83))), "gaptop 10");
|
||||
add(imagesFolderChooser, "w 100%");
|
||||
add(preferredSizePanel, "w 100%");
|
||||
add(imagesOnDemandCheckbox.component());
|
||||
// explorer & editor
|
||||
add(getCaptionLabel(MText.get(_S64)), "gaptop 10");
|
||||
add(splitViewDeckEditorCheckBox.component());
|
||||
|
@ -90,12 +66,9 @@ class GeneralPanel extends JPanel {
|
|||
}
|
||||
|
||||
void saveSettings() {
|
||||
preferredSizePanel.saveSettings();
|
||||
config.setCardImagesPath(imagesFolderChooser.getPath());
|
||||
config.setTranslation(langPanel.getSelectedLanguage());
|
||||
config.setIsSplitViewDeckEditor(splitViewDeckEditorCheckBox.isSelected());
|
||||
config.setPreviewCardOnSelect(previewCardOnSelectCheckBox.isSelected());
|
||||
config.setImagesOnDemand(imagesOnDemandCheckbox.isSelected());
|
||||
config.setGameStatsEnabled(gameStatsCheckbox.isSelected());
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ class SettingsMenuContentPanel extends MenuScreenContentPanel {
|
|||
private static final String _S13 = "Reset & Restart";
|
||||
private static final String _S14 = "Yes";
|
||||
private static final String _S15 = "No";
|
||||
private static final String _S16 = "Please switch off the 'Download images on demand' setting in preferences first.";
|
||||
|
||||
private static FiremindWorkerDialog firemindWorkerDialog;
|
||||
|
||||
|
@ -43,11 +42,7 @@ class SettingsMenuContentPanel extends MenuScreenContentPanel {
|
|||
}
|
||||
|
||||
private void showDowloadImagesDialog() {
|
||||
if (GeneralConfig.getInstance().getImagesOnDemand()) {
|
||||
ScreenController.showInfoMessage(MText.get(_S16));
|
||||
} else {
|
||||
ScreenController.showDownloadImagesScreen();
|
||||
}
|
||||
ScreenController.showDownloadImagesScreen();
|
||||
}
|
||||
|
||||
private void showFiremindWorkerDialog() {
|
||||
|
|
Loading…
Reference in New Issue