projects
/
jSite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Show a warning when the user wants to quit and copied an URI before that.
[jSite.git]
/
src
/
de
/
todesbaum
/
jsite
/
gui
/
ProjectInsertPage.java
diff --git
a/src/de/todesbaum/jsite/gui/ProjectInsertPage.java
b/src/de/todesbaum/jsite/gui/ProjectInsertPage.java
index
3b852a9
..
2cedd5b
100644
(file)
--- a/
src/de/todesbaum/jsite/gui/ProjectInsertPage.java
+++ b/
src/de/todesbaum/jsite/gui/ProjectInsertPage.java
@@
-83,6
+83,9
@@
public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
/** The number of inserted blocks. */
private volatile int insertedBlocks;
/** The number of inserted blocks. */
private volatile int insertedBlocks;
+ /** Whether the “copy URI to clipboard” button was used. */
+ private boolean uriCopied;
+
/**
* Creates a new progress insert wizard page.
*
/**
* Creates a new progress insert wizard page.
*
@@
-250,6
+253,16
@@
public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
projectInserter.setTempDirectory(tempDirectory);
}
projectInserter.setTempDirectory(tempDirectory);
}
+ /**
+ * Returns whether the “copy URI to clipboard” button was used.
+ *
+ * @return {@code true} if an URI was copied to clipboard, {@code false}
+ * otherwise
+ */
+ public boolean wasUriCopied() {
+ return uriCopied;
+ }
+
//
// INTERFACE InsertListener
//
//
// INTERFACE InsertListener
//
@@
-352,6
+365,7
@@
public class ProjectInsertPage extends TWizardPage implements InsertListener, Cl
* Copies the request URI of the project to the clipboard.
*/
private void actionCopyURI() {
* Copies the request URI of the project to the clipboard.
*/
private void actionCopyURI() {
+ uriCopied = true;
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(new StringSelection(requestURITextField.getText()), this);
}
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(new StringSelection(requestURITextField.getText()), this);
}