diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-12-03 18:10:46 +0100 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-12-03 18:10:46 +0100 |
commit | 8e56cd2c9a300f7f9251263d6aceb2b00453324b (patch) | |
tree | 3bef62c79d46a87324634402d0d44b14691129c4 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow | |
parent | 942b27169ce8b38f780a9a2de912b2efec94ebea (diff) | |
download | mocca-8e56cd2c9a300f7f9251263d6aceb2b00453324b.tar.gz mocca-8e56cd2c9a300f7f9251263d6aceb2b00453324b.tar.bz2 mocca-8e56cd2c9a300f7f9251263d6aceb2b00453324b.zip |
Add cancel button to Mobile BKU dialogs
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java index 4a825d17..1df8f755 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java @@ -223,13 +223,19 @@ public class MobileBKUState extends State { getStateMachine().getGUIProvider().display(ui); Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay(); - while (!ui.isUserAck()) { + while (!ui.isUserAck() && !ui.isUserCancel()) { if (!display.readAndDispatch()) { display.sleep(); } } } + if (ui.isUserCancel()) { + ui.setUserCancel(false); + mobileStatus.setErrorMessage("cancel"); //$NON-NLS-1$ + return; + } + // user hit ok ui.setUserAck(false); @@ -272,13 +278,19 @@ public class MobileBKUState extends State { getStateMachine().getGUIProvider().display(tan); Display display = getStateMachine().getGUIProvider().getMainShell().getDisplay(); - while (!tan.isUserAck()) { + while (!tan.isUserAck() && !tan.isUserCancel()) { if (!display.readAndDispatch()) { display.sleep(); } } } + if (tan.isUserCancel()) { + tan.setUserCancel(false); + mobileStatus.setErrorMessage("cancel"); //$NON-NLS-1$ + return; + } + // user hit ok! tan.setUserAck(false); |