From b2a95b33e43c9f7d34474f6b842e3b0a891c68cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 28 Dec 2009 22:28:54 +0100 Subject: [PATCH] Let the user choose to copy the URI when the insert finishes. --- src/de/todesbaum/jsite/gui/ProjectInsertPage.java | 6 +++++- src/de/todesbaum/jsite/i18n/jSite.properties | 3 +++ src/de/todesbaum/jsite/i18n/jSite_de.properties | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java index 32fd2f1..04241c2 100644 --- a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java @@ -316,7 +316,11 @@ public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl */ public void projectInsertFinished(Project project, boolean success, Throwable cause) { if (success) { - JOptionPane.showMessageDialog(this, I18n.getMessage("jsite.insert.inserted"), null, JOptionPane.INFORMATION_MESSAGE); + String copyURILabel = I18n.getMessage("jsite.insert.okay-copy-uri"); + String selectedValue = (String) JOptionPane.showInputDialog(this, I18n.getMessage("jsite.insert.inserted"), I18n.getMessage("jsite.insert.done.title"), JOptionPane.INFORMATION_MESSAGE, null, new Object[] { I18n.getMessage("jsite.insert.okay"), copyURILabel }, copyURILabel); + if (copyURILabel.equals(selectedValue)) { + actionCopyURI(); + } } else { if (cause == null) { JOptionPane.showMessageDialog(this, I18n.getMessage("jsite.insert.insert-failed"), null, JOptionPane.ERROR_MESSAGE); diff --git a/src/de/todesbaum/jsite/i18n/jSite.properties b/src/de/todesbaum/jsite/i18n/jSite.properties index 8d4f8f9..174a25b 100644 --- a/src/de/todesbaum/jsite/i18n/jSite.properties +++ b/src/de/todesbaum/jsite/i18n/jSite.properties @@ -79,11 +79,14 @@ jsite.insert.request-uri=Freesite jsite.insert.start-time=Start time jsite.insert.starting=Starting\u2026 jsite.insert.done=Done. +jsite.insert.done.title=Insert done jsite.insert.progress=Progress jsite.insert.k-per-s=KB/s jsite.insert.insert-failed=Insert failed

The insert of the project failed.
Some files could not be inserted. jsite.insert.insert-failed-with-cause=Insert failed

The insert of the project failed.
Some files could not be inserted.
The following error occured:

{0} jsite.insert.inserted=Project inserted

Your project was inserted successfully. +jsite.insert.okay=OK +jsite.insert.okay-copy-uri=Copy URI to Clipboard jsite.file-scanner.can-not-read-directory=Can not read directory diff --git a/src/de/todesbaum/jsite/i18n/jSite_de.properties b/src/de/todesbaum/jsite/i18n/jSite_de.properties index 18dbd70..7ff35a7 100644 --- a/src/de/todesbaum/jsite/i18n/jSite_de.properties +++ b/src/de/todesbaum/jsite/i18n/jSite_de.properties @@ -79,11 +79,14 @@ jsite.insert.request-uri=Freesite jsite.insert.start-time=Beginn jsite.insert.starting=Beginne\u2026 jsite.insert.done=Fertig. +jsite.insert.done.title=Einf\u00fcgen abgeschlossen jsite.insert.progress=Fortschritt jsite.insert.k-per-s=KB/s jsite.insert.insert-failed=Einf\u00fcgen fehlgeschlagen

Das Einf\u00fcgen des Projektes ist fehlgeschlagen, da
einige Dateien nicht eingef\u00fcgt werden konnten. jsite.insert.insert-failed-with-cause=Einf\u00fcgen fehlgeschlagen

Das Einf\u00fcgen des Projektes ist fehlgeschlagen, da
einige Dateien nicht eingef\u00fcgt werden konnten.
Folgender Fehler trat auf:

{0} jsite.insert.inserted=Projekt eingef\u00fcgt

Ihr Projekt wurde erfolgreich eingef\u00fcgt. +jsite.insert.okay=OK +jsite.insert.okay-copy-uri=URI kopieren jsite.file-scanner.can-not-read-directory=Kann Verzeichnis nicht lesen -- 2.7.4