From db1e793acd0db97c1b15a6ba9d157262519e3dab Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 27 May 2008 19:48:13 +0200 Subject: [PATCH] force user to enter base path on project creation --- src/net/pterodactylus/jsite/gui/MainWindow.java | 5 +++++ src/net/pterodactylus/jsite/i18n/jSite.properties | 3 +++ src/net/pterodactylus/jsite/i18n/jSite_de.properties | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/net/pterodactylus/jsite/gui/MainWindow.java b/src/net/pterodactylus/jsite/gui/MainWindow.java index 4ed06db..7c2795f 100644 --- a/src/net/pterodactylus/jsite/gui/MainWindow.java +++ b/src/net/pterodactylus/jsite/gui/MainWindow.java @@ -41,6 +41,7 @@ import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.JToolBar; @@ -300,6 +301,10 @@ public class MainWindow extends JFrame implements WindowListener, I18nable, Prop project.addPropertyChangeListener(this); if (switchToProject) { projectPane.setSelectedIndex(newTabIndex); + while (project.getBasePath().length() == 0) { + JOptionPane.showMessageDialog(this, I18n.get("mainWindow.information.changeProjectBasePath.message"), I18n.get("mainWindow.information.changeProjectBasePath.title"), JOptionPane.INFORMATION_MESSAGE); + projectPanel.changeBasePath(); + } } } diff --git a/src/net/pterodactylus/jsite/i18n/jSite.properties b/src/net/pterodactylus/jsite/i18n/jSite.properties index b1b897c..1305a77 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite.properties @@ -54,6 +54,9 @@ mainWindow.error.hostnameUnresolvable.message: The hostname \u201c{0}\u201d can mainWindow.question.deleteNode.title: Really Remove Node? mainWindow.question.deleteNode.message: You are about to remove the node \u201c{0}\u201d! Do you want to continue? +mainWindow.information.changeProjectBasePath.title: Please Enter Base Path! +mainWindow.information.changeProjectBasePath.message: You have created a new project. Please enter a base path
to read the files for the project from in the next dialog! + mainWindow.statusBar.coreLoaded: Core loaded. mainWindow.statusBar.coreStopped: Core stopped. mainWindow.statusBar.projectLoadingDone: Projects loaded. diff --git a/src/net/pterodactylus/jsite/i18n/jSite_de.properties b/src/net/pterodactylus/jsite/i18n/jSite_de.properties index 097d21a..a1c9b02 100644 --- a/src/net/pterodactylus/jsite/i18n/jSite_de.properties +++ b/src/net/pterodactylus/jsite/i18n/jSite_de.properties @@ -54,6 +54,9 @@ mainWindow.error.hostnameUnresolvable.message: Der Hostname \u201e{0}\u201e kann mainWindow.question.deleteNode.title: Node wirklich l\u00f6schen? mainWindow.question.deleteNode.message: Den Node \u201e{0}\u201c wirklich l\u00f6schen? +mainWindow.information.changeProjectBasePath.title: Bitte Basispfad angeben! +mainWindow.information.changeProjectBasePath.message: Ein neues Projekt wurde erstellt. Bitte im
n\u00e4chsten Dialog einen Basispfad f\u00fcr die Dateien angeben! + mainWindow.statusBar.coreLoaded: Kern geladen. mainWindow.statusBar.coreStopped: Kern angehalten. mainWindow.statusBar.projectLoadingDone: Projekte geladen. @@ -188,7 +191,7 @@ projectPanel.label.basePath.name: Basispfad projectPanel.label.basePath.mnemonic: VK_B projectPanel.basePathInformation.scanning: Durchsuche den Basispfad\u2026 -projectPanel.basePathInformation.fileCount: {0} Datei{0,choice,0#en|1#|2#en} gefunden. +projectPanel.basePathInformation.fileCount: {0} Datei{0,choice,0#en|1#|2#en} gefunden. projectPanel.button.changeBasePath.name: \u00c4ndern projectPanel.button.changeBasePath.mnemonic: VK_N -- 2.7.4