- Fixed downloadFromUrl() (still have to do some checking with the thread)

This commit is contained in:
Christophe Dumez 2007-03-08 17:00:12 +00:00
parent aa6f6161c3
commit 524540e63d
4 changed files with 14 additions and 0 deletions

View file

@ -130,6 +130,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
connect(&BTSession, SIGNAL(trackerAuthenticationRequired(torrent_handle&)), this, SLOT(trackerAuthenticationRequired(torrent_handle&)));
connect(&BTSession, SIGNAL(scanDirFoundTorrents(const QStringList&)), this, SLOT(processScannedFiles(const QStringList&)));
connect(&BTSession, SIGNAL(newDownloadedTorrent(const QString&, const QString&)), this, SLOT(processDownloadedFiles(const QString&, const QString&)));
connect(&BTSession, SIGNAL(aboutToDownloadFromUrl(const QString&)), this, SLOT(displayDownloadingUrlInfos(const QString&)));
// creating options
options = new options_imp(this);
connect(options, SIGNAL(status_changed(const QString&)), this, SLOT(OptionsSaved(const QString&)));
@ -1812,6 +1813,14 @@ int GUI::getRowFromHash(const QString& hash) const{
return -1;
}
void GUI::downloadFromURLList(const QStringList& urls){
BTSession.downloadFromURLList(urls);
}
void GUI::displayDownloadingUrlInfos(const QString& url){
setInfoBar(tr("Downloading", "Example: Downloading www.example.com/test.torrent")+" '"+url+"', "+tr("Please wait..."), "black");
}
/*****************************************************
* *
* Options *
@ -1848,4 +1857,5 @@ void GUI::OptionsSaved(const QString& info){
// an url
void GUI::askForTorrentUrl(){
downloadFromURLDialog = new downloadFromURL(this);
connect(downloadFromURLDialog, SIGNAL(downloadFinished(QString, QString, int, QString)), &BTSession, SLOT(processDownloadedFile(QString, QString, int, QString)));
}