X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fmain%2FMain.java;h=38a234791ec96c80b72f04d3571590e266fa40f7;hb=45153cb94d13f27f9ffc1e3cc9eff870054c201b;hp=9f21042209dc04b57aa5d7c8f2546ad0533040cd;hpb=fad38a57b56eb42e7fd46dc16ceb47f38c9b1324;p=jSite.git diff --git a/src/de/todesbaum/jsite/main/Main.java b/src/de/todesbaum/jsite/main/Main.java index 9f21042..38a2347 100644 --- a/src/de/todesbaum/jsite/main/Main.java +++ b/src/de/todesbaum/jsite/main/Main.java @@ -24,8 +24,10 @@ import java.awt.event.ActionListener; import java.io.File; import java.io.IOException; import java.text.MessageFormat; +import java.util.Arrays; import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; @@ -219,7 +221,6 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen /** * {@inheritDoc} */ - @Override @SuppressWarnings("synthetic-access") public void actionPerformed(ActionEvent actionEvent) { optionsPreferences(); @@ -530,7 +531,8 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen return; } } - if (hasIndexFile && !project.getFileOption(indexFile).getMimeType().equals("text/html")) { + List allowedIndexContentTypes = Arrays.asList("text/html", "application/xhtml+xml"); + if (hasIndexFile && !allowedIndexContentTypes.contains(project.getFileOption(indexFile).getMimeType())) { if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.project-files.index-not-html"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.OK_OPTION) { return; } @@ -590,6 +592,9 @@ public class Main implements ActionListener, ListSelectionListener, WizardListen * {@inheritDoc} */ public void wizardQuitPressed(TWizard wizard) { + if (((ProjectPage) pages.get(PageType.PAGE_PROJECTS)).wasUriCopied() || ((ProjectInsertPage) pages.get(PageType.PAGE_INSERT_PROJECT)).wasUriCopied()) { + JOptionPane.showMessageDialog(wizard, I18n.getMessage("jsite.project.warning.use-clipboard-now")); + } if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.quit.question"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION) { if (saveConfiguration()) { System.exit(0);