From: David ‘Bombe’ Roden Date: Sat, 17 May 2008 17:49:28 +0000 (+0000) Subject: add projects to tab when loading done X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=33a459c11335d0798655aa84f9cdde2386df68bb;p=jSite2.git add projects to tab when loading done initialize new project with proper values git-svn-id: http://trooper/svn/projects/jSite/trunk@908 c3eda9e8-030b-0410-8277-bc7414b0a119 --- diff --git a/src/net/pterodactylus/jsite/gui/SwingInterface.java b/src/net/pterodactylus/jsite/gui/SwingInterface.java index 45e98ac..49913ce 100644 --- a/src/net/pterodactylus/jsite/gui/SwingInterface.java +++ b/src/net/pterodactylus/jsite/gui/SwingInterface.java @@ -26,6 +26,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -819,10 +820,9 @@ public class SwingInterface implements CoreListener, LoggingListener { private void addProject() { try { Project project = core.createProject(); - project.setName(I18n.get("")); /* TODO - i18n */ - project.setDescription(I18n.get("")); /* TODO - i18n */ - System.out.println("private: " + project.getPrivateKey() + ", public: " + project.getPublicKey()); mainWindow.addProject(project); + project.setName(I18n.get("general.newProject.name")); + project.setDescription(I18n.get("general.newProject.description", new Date())); } catch (NoNodeException nne1) { /* TODO - add i18n */ JOptionPane.showMessageDialog(mainWindow, I18n.get(""), I18n.get(""), JOptionPane.ERROR_MESSAGE); @@ -855,6 +855,9 @@ public class SwingInterface implements CoreListener, LoggingListener { */ public void loadingProjectsDone(String directory) { mainWindow.setStatusBarText(I18n.get("mainWindow.statusBar.projectLoadingDone")); + for (Project project: core.getProjects()) { + mainWindow.addProject(project); + } } /**