From 9194c4500128ee9d624c9a185770093c8620696a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 4 Jun 2015 15:07:41 +0100 Subject: [PATCH] JAL-1747 close all windows on Quit (+small bug fix) --- src/jalview/gui/Desktop.java | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index 1228965..e8d7ffd 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -20,22 +20,6 @@ */ package jalview.gui; -import jalview.api.AlignViewportI; -import jalview.api.AlignmentViewPanel; -import jalview.bin.Cache; -import jalview.io.FileLoader; -import jalview.io.FormatAdapter; -import jalview.io.IdentifyFile; -import jalview.io.JalviewFileChooser; -import jalview.io.JalviewFileView; -import jalview.jbgui.GSplitFrame; -import jalview.jbgui.GStructureViewer; -import jalview.structure.StructureSelectionManager; -import jalview.util.ImageMaker; -import jalview.util.MessageManager; -import jalview.viewmodel.AlignmentViewport; -import jalview.ws.params.ParamManager; - import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; @@ -100,6 +84,22 @@ import javax.swing.event.HyperlinkEvent.EventType; import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; +import jalview.api.AlignViewportI; +import jalview.api.AlignmentViewPanel; +import jalview.bin.Cache; +import jalview.io.FileLoader; +import jalview.io.FormatAdapter; +import jalview.io.IdentifyFile; +import jalview.io.JalviewFileChooser; +import jalview.io.JalviewFileView; +import jalview.jbgui.GSplitFrame; +import jalview.jbgui.GStructureViewer; +import jalview.structure.StructureSelectionManager; +import jalview.util.ImageMaker; +import jalview.util.MessageManager; +import jalview.viewmodel.AlignmentViewport; +import jalview.ws.params.ParamManager; + /** * Jalview Desktop * @@ -1166,7 +1166,7 @@ public class Desktop extends jalview.jbgui.GDesktop implements { dialogExecutor.shutdownNow(); } - + closeAll_actionPerformed(null); System.exit(0); } @@ -2522,7 +2522,8 @@ public class Desktop extends jalview.jbgui.GDesktop implements public void registerHandler(final long id, final IProgressIndicatorHandler handler) { - if (progressBarHandlers == null || !progressBars.contains(new Long(id))) + if (progressBarHandlers == null + || !progressBars.containsKey(new Long(id))) { throw new Error( MessageManager -- 1.7.10.2