//hc.setModal(true);
hc.update();
}
else if((e.getSource() == localNfsCon) && (!jftp.uiBlocked))
{
NfsHostChooser hc = new NfsHostChooser(null, true);
hc.toFront();
//hc.setModal(true);
hc.update();
}
else if((e.getSource() == localWebdavCon) && (!jftp.uiBlocked))
{
WebdavHostChooser hc = new WebdavHostChooser(null, true);
hc.toFront();
//hc.setModal(true);
hc.update();
}
else if(e.getSource() == closeLocalCon)
{
JFtp.statusP.jftp.closeCurrentLocalTab();
}
else if(e.getSource() == clear)
{
jftp.clearLog();
}
else if(e.getSource() == spider)
{
jftp.addToDesktop("Http recursive download",
new HttpSpider(jftp.localDir.getPath() +
"_httpdownload/"), 440, 250);
}
else if(e.getSource() == hp)
{
HttpBrowser h = new HttpBrowser("http://j-ftp.sourceforge.net");
JFtp.desktop.add(h, new Integer(Integer.MAX_VALUE - 10));
}
else if(e.getSource() == raw)
{
RawConnection c = new RawConnection();
}
else if(e.getSource() == readme)
{
show(Settings.readme);
}
else if(e.getSource() == changelog)
{
show(Settings.changelog);
}
else if(e.getSource() == todo)
{
show(Settings.todo);
}
else if(e.getSource() == shell)
{
UIUtils.runCommand("/bin/bash");
}
else if(e.getSource() == loadAudio)
{
try
{
JFileChooser f = new JFileChooser();
f.showOpenDialog(jftp);
File file = f.getSelectedFile();
Player p = new Player(new FileInputStream(file));
p.play();
}
catch(Exception ex)
{
ex.printStackTrace();
Log.debug("Error: (" + ex + ")");
}
}
else if(e.getSource() == exit)
{
jftp.windowClosing(null); // handles everything
}
else if(e.getSource() == close)
{
JFtp.statusP.jftp.closeCurrentTab();
/*
jftp.safeDisconnect();
FilesystemConnection con = new FilesystemConnection();
jftp.remoteDir.setCon(con);
con.addConnectionListener((ConnectionListener)jftp.remoteDir);
if(!con.chdir("/")) con.chdir("C:\\");
*/
}
else if((e.getSource() == ftpCon) && (!jftp.uiBlocked))
{
//jftp.safeDisconnect();
HostChooser hc = new HostChooser();
hc.toFront();
//hc.setModal(true);
hc.update();
}
else if((e.getSource() == smbCon) && (!jftp.uiBlocked))
{
//jftp.safeDisconnect();
SmbHostChooser hc = new SmbHostChooser();
hc.toFront();
//hc.setModal(true);
hc.update();
}
else if((e.getSource() == sftpCon) && (!jftp.uiBlocked))
{
//jftp.safeDisconnect();
SftpHostChooser hc = new SftpHostChooser();
hc.toFront();
//hc.setModal(true);
hc.update();
}
else if((e.getSource() == nfsCon) && (!jftp.uiBlocked))
{
// jftp.safeDisconnect();
NfsHostChooser hc = new NfsHostChooser();
hc.toFront();
//hc.setModal(true);
hc.update();
}
else if(e.getSource() == resuming)
{
boolean res = resuming.getState();
Settings.enableResuming = res;