*/
package jalview.gui;
+import static jalview.util.UrlConstants.EMBLEBI_STRING;
+
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.Cache;
{
if (Cache.getDefault("CHECKURLLINKS", true))
{
+ // check what the actual links are - if it's just the default don't
+ // bother with the warning
+ Vector<String> links = Preferences.sequenceURLLinks;
+ if (links == null || links.size() < 1)
+ {
+ // there are no links
+ return;
+ }
+ else if ((links.size() == 1)
+ && links.get(0).equals(EMBLEBI_STRING))
+ {
+ // the only link is the default EMBL-EBI link
+ return;
+ }
+
// check in case URL links use old style tokens ($SEQUENCE_ID$ for
// sequence id _or_ accession id)
JPanel msgPanel = new JPanel();
});
msgPanel.add(jcb);
- JOptionPane.showMessageDialog(null, msgPanel, MessageManager
- .getString("label.SEQUENCE_ID_no_longer_used"),
+ JOptionPane.showMessageDialog(Desktop.desktop, msgPanel,
+ MessageManager
+ .getString("label.SEQUENCE_ID_no_longer_used"),
JOptionPane.WARNING_MESSAGE);
+
}
}
});