diff options
author | Simon Rettberg | 2019-04-29 12:05:43 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-04-29 12:05:43 +0200 |
commit | c92c01893c7553410dd29420aca8267b8a1d48ed (patch) | |
tree | 9a1444edcee2b54fda0368fe75b029d4649b4f8e /dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java | |
parent | [server] Reword log message (diff) | |
download | tutor-module-c92c01893c7553410dd29420aca8267b8a1d48ed.tar.gz tutor-module-c92c01893c7553410dd29420aca8267b8a1d48ed.tar.xz tutor-module-c92c01893c7553410dd29420aca8267b8a1d48ed.zip |
[client] Cancel transfers when exiting app
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java index 2f2d73d0..b7f5370c 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/ImageUpdateWizard.java @@ -8,6 +8,7 @@ import org.openslx.bwlp.thrift.iface.ImageDetailsRead; import org.openslx.bwlp.thrift.iface.ImageVersionWrite; import org.openslx.dozmod.gui.Gui; import org.openslx.dozmod.gui.helper.MessageType; +import org.openslx.dozmod.gui.helper.QuitNotification; import org.openslx.dozmod.gui.helper.UiFeedback; import org.openslx.dozmod.gui.wizard.page.ImageUploadPage; import org.openslx.dozmod.gui.wizard.page.ImageUploadSummaryPage; @@ -18,7 +19,7 @@ import org.openslx.util.QuickTimer; import org.openslx.util.QuickTimer.Task; @SuppressWarnings("serial") -public class ImageUpdateWizard extends Wizard implements UiFeedback { +public class ImageUpdateWizard extends Wizard implements UiFeedback, QuitNotification { private final static Logger LOGGER = Logger.getLogger(ImageCreationWizard.class); private final UploadWizardState state = new UploadWizardState(); @@ -97,4 +98,11 @@ public class ImageUpdateWizard extends Wizard implements UiFeedback { return "Neue VM-Version"; } + @Override + public void onApplicationQuit() { + if (state != null && state.upload != null) { + state.upload.cancelError(); + } + } + } |