From 76ab5f6a2d1a08b6942309c6158c6db7da2773e4 Mon Sep 17 00:00:00 2001 From: myk Date: Tue, 12 Mar 2013 19:31:14 +0000 Subject: [PATCH] don't enable choose directory button in migrate mode --- src/main/java/forge/gui/DialogMigrateProfile.java | 8 +++++--- .../java/forge/gui/home/settings/VSubmenuDownloaders.java | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/forge/gui/DialogMigrateProfile.java b/src/main/java/forge/gui/DialogMigrateProfile.java index 543ca7f2cfa..e7f1818898f 100644 --- a/src/main/java/forge/gui/DialogMigrateProfile.java +++ b/src/main/java/forge/gui/DialogMigrateProfile.java @@ -76,7 +76,7 @@ public class DialogMigrateProfile { p.setOpaque(false); p.setBackgroundTexture(FSkin.getIcon(FSkin.Backgrounds.BG_TEXTURE)); - boolean isMigration = !StringUtils.isEmpty(forcedSrcDir); + final boolean isMigration = !StringUtils.isEmpty(forcedSrcDir); // header p.add(new FLabel.Builder().text((isMigration ? "Migrate" : "Import") + " profile data").fontSize(15).build(), "center"); @@ -177,7 +177,9 @@ public class DialogMigrateProfile { analyzer.execute(); _analyzerActive = true; } - _btnChooseDir.setEnabled(true); + if (!isMigration) { + _btnChooseDir.setEnabled(true); + } } }; analyzerStarter.execute(); @@ -428,7 +430,7 @@ public class DialogMigrateProfile { MigrationSourceAnalyzer.AnalysisCallback cb = new MigrationSourceAnalyzer.AnalysisCallback() { @Override - public boolean checkCancel() { try{Thread.sleep(1);}catch(InterruptedException e) {} return _cancel; } + public boolean checkCancel() { return _cancel; } @Override public void addOp(OpType type, File src, File dest) { diff --git a/src/main/java/forge/gui/home/settings/VSubmenuDownloaders.java b/src/main/java/forge/gui/home/settings/VSubmenuDownloaders.java index 9a6c54cbfb2..02d7df676bd 100644 --- a/src/main/java/forge/gui/home/settings/VSubmenuDownloaders.java +++ b/src/main/java/forge/gui/home/settings/VSubmenuDownloaders.java @@ -52,7 +52,7 @@ public enum VSubmenuDownloaders implements IVSubmenu { private final FLabel btnDownloadPics = _makeButton("Download LQ Card Pictures"); private final FLabel btnDownloadQuestImages = _makeButton("Download Quest Images"); private final FLabel btnReportBug = _makeButton("Report a Bug"); - private final FLabel btnImportPictures = _makeButton("Import Pictures"); + private final FLabel btnImportPictures = _makeButton("Import Data"); private final FLabel btnHowToPlay = _makeButton("How To Play"); private final FLabel btnDownloadPrices = _makeButton("Download Card Prices"); private final FLabel btnLicensing = _makeButton("License Details"); @@ -79,7 +79,7 @@ public enum VSubmenuDownloaders implements IVSubmenu { pnlContent.add(_makeLabel("Download up-to-date price list for in-game card shops."), constraintsLBL); pnlContent.add(btnImportPictures, constraintsBTN); - pnlContent.add(_makeLabel("Import card pictures from a local version of Forge."), constraintsLBL); + pnlContent.add(_makeLabel("Import data from a local directory."), constraintsLBL); pnlContent.add(btnReportBug, constraintsBTN); pnlContent.add(_makeLabel("Something broken?"), constraintsLBL); @@ -88,7 +88,7 @@ public enum VSubmenuDownloaders implements IVSubmenu { pnlContent.add(_makeLabel("Rules of the Game."), constraintsLBL); pnlContent.add(btnLicensing, constraintsBTN); - pnlContent.add(_makeLabel("About Forge"), constraintsLBL); + pnlContent.add(_makeLabel("Forge legalese."), constraintsLBL); scrContent.setBorder(null); }