force user to enter base path on project creation
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 27 May 2008 17:48:13 +0000 (19:48 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 27 May 2008 17:48:13 +0000 (19:48 +0200)
src/net/pterodactylus/jsite/gui/MainWindow.java
src/net/pterodactylus/jsite/i18n/jSite.properties
src/net/pterodactylus/jsite/i18n/jSite_de.properties

index 4ed06db..7c2795f 100644 (file)
@@ -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();
+                       }
                }
        }
 
index b1b897c..1305a77 100644 (file)
@@ -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: <html>You have created a new project. Please enter a base path<br>to read the files for the project from in the next dialog!</html>
+
 mainWindow.statusBar.coreLoaded: Core loaded.
 mainWindow.statusBar.coreStopped: Core stopped.
 mainWindow.statusBar.projectLoadingDone: Projects loaded.
index 097d21a..a1c9b02 100644 (file)
@@ -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: <html>Ein neues Projekt wurde erstellt. Bitte im<br>n\u00e4chsten Dialog einen Basispfad f\u00fcr die Dateien angeben!</html>
+
 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