From 6363a6f5355700aea01514c2558f670470dcda82 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Jan 2010 22:32:54 +0100 Subject: [PATCH] =?utf8?q?Add=20new=20non-editable=20textfield=20and=20mov?= =?utf8?q?e=20=E2=80=9Ccopy=20to=20clipboard=E2=80=9D=20button=20next=20to?= =?utf8?q?=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/de/todesbaum/jsite/gui/ProjectPage.java | 19 ++++++++++++++++--- src/de/todesbaum/jsite/i18n/jSite.properties | 1 + src/de/todesbaum/jsite/i18n/jSite_de.properties | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/de/todesbaum/jsite/gui/ProjectPage.java b/src/de/todesbaum/jsite/gui/ProjectPage.java index 4089364..c24f7bf 100644 --- a/src/de/todesbaum/jsite/gui/ProjectPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectPage.java @@ -119,6 +119,9 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D /** The local path textfield. */ private JTextField projectLocalPathTextField; + /** The textfield for the complete URI. */ + private JTextField projectCompleteUriTextField; + /** The public key textfield. */ private JTextField projectPublicKeyTextField; @@ -318,7 +321,6 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D functionButtons.add(new JButton(projectAddAction)); functionButtons.add(new JButton(projectDeleteAction)); functionButtons.add(new JButton(projectCloneAction)); - functionButtons.add(new JButton(projectCopyURIAction)); informationPanel.add(functionButtons, BorderLayout.PAGE_START); informationPanel.add(informationTable, BorderLayout.CENTER); @@ -401,6 +403,16 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectPathTextField.setEnabled(false); final TLabel projectPathLabel = new TLabel(I18n.getMessage("jsite.project.project.path") + ":", KeyEvent.VK_P, projectPathTextField); + informationTable.add(projectPathLabel, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0)); + informationTable.add(projectPathTextField, new GridBagConstraints(1, 7, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); + + projectCompleteUriTextField = new JTextField(); + projectCompleteUriTextField.setEditable(false); + final TLabel projectUriLabel = new TLabel(I18n.getMessage("jsite.project.project.uri") + ":", KeyEvent.VK_U, projectCompleteUriTextField); + informationTable.add(projectUriLabel, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0)); + informationTable.add(projectCompleteUriTextField, new GridBagConstraints(1, 8, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); + informationTable.add(new JButton(projectCopyURIAction), new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); + I18nContainer.getInstance().registerRunnable(new Runnable() { public void run() { @@ -412,10 +424,9 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectPublicKeyLabel.setText(I18n.getMessage("jsite.project.project.public-key") + ":"); projectPrivateKeyLabel.setText(I18n.getMessage("jsite.project.project.private-key") + ":"); projectPathLabel.setText(I18n.getMessage("jsite.project.project.path") + ":"); + projectUriLabel.setText(I18n.getMessage("jsite.project.project.uri") + ":"); } }); - informationTable.add(projectPathLabel, new GridBagConstraints(0, 7, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0)); - informationTable.add(projectPathTextField, new GridBagConstraints(1, 7, 2, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); return informationPanel; } @@ -650,6 +661,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectPublicKeyTextField.setText(selectedProject.getRequestURI()); projectPrivateKeyTextField.setText(selectedProject.getInsertURI()); projectPathTextField.setText(selectedProject.getPath()); + projectCompleteUriTextField.setText("freenet:" + selectedProject.getFinalRequestURI(0)); } else { projectNameTextField.setText(""); projectDescriptionTextField.setText(""); @@ -657,6 +669,7 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D projectPublicKeyTextField.setText(""); projectPrivateKeyTextField.setText(""); projectPathTextField.setText(""); + projectCompleteUriTextField.setText(""); } } diff --git a/src/de/todesbaum/jsite/i18n/jSite.properties b/src/de/todesbaum/jsite/i18n/jSite.properties index d341ff2..d5e16e2 100644 --- a/src/de/todesbaum/jsite/i18n/jSite.properties +++ b/src/de/todesbaum/jsite/i18n/jSite.properties @@ -119,6 +119,7 @@ jsite.project.project.public-key=Public Key jsite.project.project.private-key=Private Key jsite.project.project.path=Freesite Path jsite.project.project.edition=Edition +jsite.project.project.uri=URI jsite.project.keygen.io-error=Node communication failure

Communication with the node failed
with the following error message:

{0}

Please make sure that you have entered
the correct host name and port number
on the "Node Settings" page. jsite.project.warning.no-local-path=No local path

You did not specify a local path for the files to insert.
It is not possible to continue without one. jsite.project.warning.no-path=No freesite path

You did not specify a freesite path.
It is not possible to continue without one. diff --git a/src/de/todesbaum/jsite/i18n/jSite_de.properties b/src/de/todesbaum/jsite/i18n/jSite_de.properties index 1e9e88e..033ef06 100644 --- a/src/de/todesbaum/jsite/i18n/jSite_de.properties +++ b/src/de/todesbaum/jsite/i18n/jSite_de.properties @@ -119,6 +119,7 @@ jsite.project.project.public-key=\u00d6ffentlicher Schl\u00fcssel jsite.project.project.private-key=Privater Schl\u00fcssel jsite.project.project.path=Seitenpfad jsite.project.project.edition=Edition +jsite.project.project.uri=Anfrage-URI jsite.project.keygen.io-error=Kommunikation fehlgeschlagen

Die Kommunikation mit dem Freenet Node
ergab folgende Fehlermeldung:

{0}

Bitte vergewissern Sie sich, dass der Node l\u00e4uft und dass Sie
den korrekten Hostnamen und die korrekte Portnummer auf der
\u201eNode Einstellungen\u201c Seite eingegeben haben. jsite.project.warning.no-local-path=Kein lokaler Pfad

Sie haben keinen lokalen Pfad f\u00fcr die einzuf\u00fcgenden Dateien angegeben.
Es ist nicht m\u00f6glich, ohne lokalen Pfad weiter zu machen. jsite.project.warning.no-path=Kein Freesite-Pfad

Sie haben keinen Pfad f\u00fcr die Freesite angegeben.
Es ist nicht m\u00f6glich, ohne einen Freesite-Pfad weiter zu machen. -- 2.7.4