Excise additional samskivert code.
This commit is contained in:
@@ -21,8 +21,8 @@ import javax.swing.JPanel;
|
||||
import com.samskivert.swing.GroupLayout;
|
||||
import com.samskivert.swing.Spacer;
|
||||
import com.samskivert.swing.VGroupLayout;
|
||||
import com.samskivert.text.MessageUtil;
|
||||
|
||||
import com.threerings.getdown.util.MessageUtil;
|
||||
import static com.threerings.getdown.Log.log;
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,9 +41,6 @@ import ca.beq.util.win32.registry.RegistryValue;
|
||||
import ca.beq.util.win32.registry.RootKey;
|
||||
|
||||
import com.samskivert.swing.util.SwingUtil;
|
||||
import com.samskivert.text.MessageUtil;
|
||||
import com.samskivert.util.RunAnywhere;
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.getdown.data.Application.UpdateInterface.Step;
|
||||
import com.threerings.getdown.data.Application;
|
||||
@@ -57,8 +54,10 @@ import com.threerings.getdown.util.Config;
|
||||
import com.threerings.getdown.util.ConnectionUtil;
|
||||
import com.threerings.getdown.util.FileUtil;
|
||||
import com.threerings.getdown.util.LaunchUtil;
|
||||
import com.threerings.getdown.util.MessageUtil;
|
||||
import com.threerings.getdown.util.ProgressAggregator;
|
||||
import com.threerings.getdown.util.ProgressObserver;
|
||||
import com.threerings.getdown.util.StringUtil;
|
||||
import com.threerings.getdown.util.VersionUtil;
|
||||
|
||||
import static com.threerings.getdown.Log.log;
|
||||
@@ -239,7 +238,7 @@ public abstract class Getdown extends Thread
|
||||
}
|
||||
|
||||
// look in the Vinders registry
|
||||
if (RunAnywhere.isWindows()) {
|
||||
if (LaunchUtil.isWindows()) {
|
||||
try {
|
||||
String host = null, port = null;
|
||||
boolean enabled = false;
|
||||
|
||||
@@ -29,11 +29,9 @@ import javax.swing.JFrame;
|
||||
import javax.swing.WindowConstants;
|
||||
|
||||
import com.samskivert.swing.util.SwingUtil;
|
||||
import com.samskivert.util.ArrayUtil;
|
||||
import com.samskivert.util.RunAnywhere;
|
||||
|
||||
import com.threerings.getdown.data.Digest;
|
||||
import com.threerings.getdown.data.SysProps;
|
||||
import com.threerings.getdown.util.LaunchUtil;
|
||||
import com.threerings.getdown.util.StringUtil;
|
||||
import static com.threerings.getdown.Log.log;
|
||||
|
||||
@@ -79,7 +77,7 @@ public class GetdownApp
|
||||
|
||||
// pass along anything after that as app args
|
||||
String[] appArgs = (aidx >= args.size()) ? null :
|
||||
args.subList(aidx, args.size()).toArray(ArrayUtil.EMPTY_STRING);
|
||||
args.subList(aidx, args.size()).toArray(new String[0]);
|
||||
|
||||
// ensure a valid directory was supplied
|
||||
File appDir = new File(adarg);
|
||||
@@ -200,7 +198,7 @@ public class GetdownApp
|
||||
return;
|
||||
}
|
||||
String[] cmdarray;
|
||||
if (RunAnywhere.isWindows()) {
|
||||
if (LaunchUtil.isWindows()) {
|
||||
String osName = System.getProperty("os.name", "");
|
||||
if (osName.indexOf("9") != -1 || osName.indexOf("Me") != -1) {
|
||||
cmdarray = new String[] {
|
||||
@@ -209,7 +207,7 @@ public class GetdownApp
|
||||
cmdarray = new String[] {
|
||||
"cmd.exe", "/c", "start", "\"\"", "\"" + url + "\"" };
|
||||
}
|
||||
} else if (RunAnywhere.isMacOS()) {
|
||||
} else if (LaunchUtil.isMacOS()) {
|
||||
cmdarray = new String[] { "open", url };
|
||||
} else { // Linux, Solaris, etc.
|
||||
cmdarray = new String[] { "firefox", url };
|
||||
|
||||
@@ -22,8 +22,8 @@ import javax.swing.JTextField;
|
||||
import com.samskivert.swing.GroupLayout;
|
||||
import com.samskivert.swing.Spacer;
|
||||
import com.samskivert.swing.VGroupLayout;
|
||||
import com.samskivert.text.MessageUtil;
|
||||
|
||||
import com.threerings.getdown.util.MessageUtil;
|
||||
import static com.threerings.getdown.Log.log;
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.ImageObserver;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
@@ -24,12 +25,12 @@ import javax.swing.Timer;
|
||||
import com.samskivert.swing.Label;
|
||||
import com.samskivert.swing.LabelStyleConstants;
|
||||
import com.samskivert.swing.util.SwingUtil;
|
||||
import com.samskivert.text.MessageUtil;
|
||||
import com.samskivert.util.StringUtil;
|
||||
import com.samskivert.util.Throttle;
|
||||
|
||||
import com.threerings.getdown.data.Application.UpdateInterface;
|
||||
import com.threerings.getdown.util.MessageUtil;
|
||||
import com.threerings.getdown.util.Rectangle;
|
||||
import com.threerings.getdown.util.StringUtil;
|
||||
|
||||
import static com.threerings.getdown.Log.log;
|
||||
|
||||
@@ -323,7 +324,7 @@ public final class StatusPanel extends JComponent
|
||||
} else {
|
||||
String key = compoundKey.substring(0, tidx);
|
||||
String argstr = compoundKey.substring(tidx+1);
|
||||
String[] args = StringUtil.split(argstr, "|");
|
||||
String[] args = argstr.split("\\|");
|
||||
// unescape and translate the arguments
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
// if the argument is tainted, do no further translation
|
||||
@@ -339,12 +340,11 @@ public final class StatusPanel extends JComponent
|
||||
}
|
||||
|
||||
/** Used by {@link #setStatus}. */
|
||||
protected String get (String key, Object[] args)
|
||||
protected String get (String key, String[] args)
|
||||
{
|
||||
String msg = get(key);
|
||||
return (msg != null) ?
|
||||
MessageFormat.format(MessageUtil.escape(msg), args)
|
||||
: (key + StringUtil.toString(args));
|
||||
if (msg != null) return MessageFormat.format(MessageUtil.escape(msg), (Object[])args);
|
||||
return key + String.valueOf(Arrays.asList(args));
|
||||
}
|
||||
|
||||
/** Used by {@link #setStatus}, and {@link #setProgress}. */
|
||||
|
||||
Reference in New Issue
Block a user