Commit 72b93666 authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Fixed small launcher bug.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1096 b35dd754-fafc-0310-a699-88a17e54d16e
parent adf06900
...@@ -76,7 +76,7 @@ public class Launcher { ...@@ -76,7 +76,7 @@ public class Launcher {
frame = new DroppableFrame() { frame = new DroppableFrame() {
public void fileDropped(File file) { public void fileDropped(File file) {
String fileName = file.getName(); String fileName = file.getName();
if (fileName.endsWith("*.jar")) { if (fileName.endsWith(".jar")) {
installPlugin(file); installPlugin(file);
} }
} }
...@@ -360,12 +360,15 @@ public class Launcher { ...@@ -360,12 +360,15 @@ public class Launcher {
// Copy Plugin into Dir. // Copy Plugin into Dir.
try { try {
// Just for fun. Show no matter what for two seconds.
Thread.sleep(2000);
WebManager.copy(plugin.toURL(), tempPluginsFile); WebManager.copy(plugin.toURL(), tempPluginsFile);
// If successfull, rename to real plugin name. // If successfull, rename to real plugin name.
tempPluginsFile.renameTo(realPluginsFile); tempPluginsFile.renameTo(realPluginsFile);
} }
catch (IOException e) { catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return realPluginsFile; return realPluginsFile;
...@@ -379,6 +382,8 @@ public class Launcher { ...@@ -379,6 +382,8 @@ public class Launcher {
// Start installation // Start installation
installerThread.start(); installerThread.start();
dialog.setLocationRelativeTo(frame);
dialog.setVisible(true);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment