X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FWsPreferences.java;h=c5b27a0420ef16516b5a7589951a6a86a5350f9b;hb=53b2ec17b88081e402f60deab2723750bc4867d1;hp=850ef21e7238013a12e20d45abee19c683137c20;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git diff --git a/src/jalview/gui/WsPreferences.java b/src/jalview/gui/WsPreferences.java index 850ef21..c5b27a0 100644 --- a/src/jalview/gui/WsPreferences.java +++ b/src/jalview/gui/WsPreferences.java @@ -21,6 +21,7 @@ package jalview.gui; import jalview.bin.Cache; +import jalview.bin.Instance; import jalview.jbgui.GWsPreferences; import jalview.util.MessageManager; import jalview.ws.jws2.Jws2Discoverer; @@ -454,7 +455,7 @@ public class WsPreferences extends GWsPreferences boolean valid = false; int resp = JvOptionPane.CANCEL_OPTION; while (!valid && (resp = JvOptionPane.showInternalConfirmDialog( - Desktop.desktop, panel, title, + Desktop.getDesktopPane(), panel, title, JvOptionPane.OK_CANCEL_OPTION)) == JvOptionPane.OK_OPTION) { try @@ -472,13 +473,13 @@ public class WsPreferences extends GWsPreferences } catch (Exception e) { valid = false; - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.invalid_url")); } } if (valid && resp == JvOptionPane.OK_OPTION) { - int validate = JvOptionPane.showInternalConfirmDialog(Desktop.desktop, + int validate = JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(), MessageManager.getString("info.validate_jabaws_server"), MessageManager.getString("label.test_server"), JvOptionPane.YES_NO_OPTION); @@ -491,7 +492,7 @@ public class WsPreferences extends GWsPreferences } else { - int opt = JvOptionPane.showInternalOptionDialog(Desktop.desktop, + int opt = JvOptionPane.showInternalOptionDialog(Desktop.getDesktopPane(), "The Server '" + foo.toString() + "' failed validation,\ndo you want to add it anyway? ", "Server Validation Failed", JvOptionPane.YES_NO_OPTION, @@ -502,7 +503,7 @@ public class WsPreferences extends GWsPreferences } else { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString( "warn.server_didnt_pass_validation")); } @@ -595,7 +596,7 @@ public class WsPreferences extends GWsPreferences if (lastrefresh != update) { lastrefresh = update; - Desktop.instance.startServiceDiscovery(true); // wait around for all + Instance.getDesktop().startServiceDiscovery(true); // wait around for all // threads to complete updateList(); @@ -616,15 +617,15 @@ public class WsPreferences extends GWsPreferences public void run() { long ct = System.currentTimeMillis(); - Desktop.instance.setProgressBar(MessageManager + Instance.getDesktop().setProgressBar(MessageManager .getString("status.refreshing_web_service_menus"), ct); if (lastrefresh != update) { lastrefresh = update; - Desktop.instance.startServiceDiscovery(true); + Instance.getDesktop().startServiceDiscovery(true); updateList(); } - Desktop.instance.setProgressBar(null, ct); + Instance.getDesktop().setProgressBar(null, ct); } }).start();