Revision: 234 http://svn.sourceforge.net/cishell/?rev=234&view=rev Author: bh2 Date: 2006-10-02 07:10:08 -0700 (Mon, 02 Oct 2006) Log Message: ----------- Fixed GUIBuilderService so that a show* method that was run within the GUI thread properly created/used a non-null Shell Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGuiBuilderService.java Modified: trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGuiBuilderService.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGuiBuilderService.java 2006-09-30 17:44:55 UTC (rev 233) +++ trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGuiBuilderService.java 2006-10-02 14:10:08 UTC (rev 234) @@ -50,6 +50,7 @@ }}; private Display display; + private Shell lastShell; public SWTGuiBuilderService(Display display) { @@ -97,8 +98,17 @@ guiRun(new Runnable() { public void run() { returner.returnValue = display.getActiveShell(); + + if (returner.returnValue == null) { + if (lastShell != null) { + returner.returnValue = lastShell; + } else { + returner.returnValue = new Shell(); + } + } }}); + lastShell = (Shell) returner.returnValue; return (Shell) returner.returnValue; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |