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
/
ProjectPage.java
diff --git
a/src/de/todesbaum/jsite/gui/ProjectPage.java
b/src/de/todesbaum/jsite/gui/ProjectPage.java
index
c24f7bf
..
756c450
100644
(file)
--- a/
src/de/todesbaum/jsite/gui/ProjectPage.java
+++ b/
src/de/todesbaum/jsite/gui/ProjectPage.java
@@
-131,6
+131,9
@@
public class ProjectPage extends TWizardPage implements ListSelectionListener, D
/** The project path textfield. */
private JTextField projectPathTextField;
/** The project path textfield. */
private JTextField projectPathTextField;
+ /** Whether the “copy URI to clipboard” action was used. */
+ private boolean uriCopied;
+
/**
* Creates a new project page.
*
/**
* Creates a new project page.
*
@@
-473,6
+476,16
@@
public class ProjectPage extends TWizardPage implements ListSelectionListener, D
}
/**
}
/**
+ * Returns whether the “copy URI to clipboard” button was used.
+ *
+ * @return {@code true} if the “copy URI to clipboard” button was used,
+ * {@code false} otherwise
+ */
+ public boolean wasUriCopied() {
+ return uriCopied;
+ }
+
+ /**
* Updates the currently selected project with changed information from a
* textfield.
*
* Updates the currently selected project with changed information from a
* textfield.
*
@@
-591,6
+604,7
@@
public class ProjectPage extends TWizardPage implements ListSelectionListener, D
Project selectedProject = (Project) projectList.getSelectedValue();
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(new StringSelection(selectedProject.getFinalRequestURI(0)), this);
Project selectedProject = (Project) projectList.getSelectedValue();
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(new StringSelection(selectedProject.getFinalRequestURI(0)), this);
+ uriCopied = true;
}
}
}
}