} catch (java.beans.PropertyVetoException ve)
{
}
+ catch (java.lang.ClassCastException cex)
+ {
+ Cache.log.warn("Squashed a possible GUI implementation error. If you can recreate this, please look at http://issues.jalview.org/browse/JAL-869",cex);
+ }
}
public void lostOwnership(Clipboard clipboard, Transferable contents)
if (value == JalviewFileChooser.APPROVE_OPTION)
{
- java.io.File choice = chooser.getSelectedFile();
+ final Desktop me = this;
+ final java.io.File choice = chooser.getSelectedFile();
+ new Thread(new Runnable()
+ {
+ public void run()
+ {
+
setProgressBar("Saving jalview project " + choice.getName(),
choice.hashCode());
jalview.bin.Cache.setProperty("LAST_DIRECTORY", choice.getParent());
// TODO catch and handle errors for savestate
+ // TODO prevent user from messing with the Desktop whilst we're saving
try
{
new Jalview2XML().SaveState(choice);
Cache.log
.error("Problems whilst trying to save to "
+ choice.getName(), ex);
- JOptionPane.showMessageDialog(this,
+ JOptionPane.showMessageDialog(me,
"Error whilst saving current state to " + choice.getName(),
"Couldn't save project", JOptionPane.WARNING_MESSAGE);
}
setProgressBar(null, choice.hashCode());
-
+ }
+ }).start();
}
}