From: David ‘Bombe’ Roden Date: Wed, 13 Jan 2010 21:32:54 +0000 (+0100) Subject: Add new non-editable textfield and move “copy to clipboard” button next to it. X-Git-Tag: 0.9~34 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6363a6f5355700aea01514c2558f670470dcda82;p=jSite.git Add new non-editable textfield and move “copy to clipboard” button next to it. --- 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.