mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 22:22:31 +00:00
Hide/show input and status bar depending on whetever input has focus.
Added removal of downloads. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@283 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -15,7 +15,6 @@ DownloadList::insert(std::istream* str) {
|
||||
torrent::Download d = torrent::download_create(str);
|
||||
|
||||
iterator itr = Base::insert(end(), Download());
|
||||
|
||||
itr->set_download(d);
|
||||
|
||||
return itr;
|
||||
@@ -26,7 +25,6 @@ DownloadList::erase(iterator itr) {
|
||||
itr->release_download();
|
||||
|
||||
torrent::download_remove(itr->get_hash());
|
||||
|
||||
Base::erase(itr);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <istream>
|
||||
@@ -37,6 +38,17 @@ Manager::insert(const std::string& uri) {
|
||||
create_http(uri);
|
||||
}
|
||||
|
||||
void
|
||||
Manager::erase(DownloadList::iterator itr) {
|
||||
if (itr->get_download().is_active())
|
||||
throw std::logic_error("core::Manager::erase(...) called on an active download");
|
||||
|
||||
if (itr->get_download().is_open())
|
||||
itr->close();
|
||||
|
||||
m_downloadList.erase(itr);
|
||||
}
|
||||
|
||||
void
|
||||
Manager::start(Download* d) {
|
||||
if (d->get_download().is_active())
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
void cleanup();
|
||||
|
||||
void insert(const std::string& uri);
|
||||
void erase(DownloadList::iterator itr);
|
||||
|
||||
void start(Download* d);
|
||||
void stop(Download* d);
|
||||
|
||||
Reference in New Issue
Block a user