From: David ‘Bombe’ Roden Date: Tue, 22 Dec 2009 19:54:32 +0000 (+0100) Subject: When no directory was chosen, abort setting custom temp directory. X-Git-Tag: 0.8~15 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ee8e1f3612f91b37af8cf38b5293e12d7c57c722;p=jSite.git When no directory was chosen, abort setting custom temp directory. --- diff --git a/src/de/todesbaum/jsite/gui/PreferencesPage.java b/src/de/todesbaum/jsite/gui/PreferencesPage.java index ba34c89..297016d 100644 --- a/src/de/todesbaum/jsite/gui/PreferencesPage.java +++ b/src/de/todesbaum/jsite/gui/PreferencesPage.java @@ -232,6 +232,7 @@ public class PreferencesPage extends TWizardPage { private void selectDefaultTempDirectory() { tempDirectoryTextField.setEnabled(false); chooseTempDirectoryAction.setEnabled(false); + tempDirectory = null; } /** @@ -240,6 +241,12 @@ public class PreferencesPage extends TWizardPage { private void selectCustomTempDirectory() { tempDirectoryTextField.setEnabled(true); chooseTempDirectoryAction.setEnabled(true); + if (tempDirectoryTextField.getText().length() == 0) { + chooseTempDirectory(); + if (tempDirectoryTextField.getText().length() == 0) { + defaultTempDirectory.setSelected(true); + } + } } /**