Improved the http progress display, includes truncated names, download

progress and 10 second delay on hiding.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@286 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-17 21:20:18 +00:00
parent f9975ae9f2
commit 78d3d78ef3
14 changed files with 254 additions and 29 deletions
+8 -3
View File
@@ -2,6 +2,7 @@
#include <memory>
#include <sstream>
#include <functional.h>
#include <sigc++/bind.h>
#include <sigc++/hide.h>
#include <torrent/http.h>
@@ -14,7 +15,7 @@ namespace core {
HttpQueue::iterator
HttpQueue::insert(const std::string& url) {
std::auto_ptr<torrent::Http> h(m_slotFactory());
std::auto_ptr<CurlGet> h(m_slotFactory());
std::auto_ptr<std::stringstream> s(new std::stringstream);
h->set_url(url);
@@ -31,11 +32,15 @@ HttpQueue::insert(const std::string& url) {
h.release();
s.release();
m_signalInsert.emit(*itr);
return itr;
}
void
HttpQueue::erase(iterator itr) {
m_signalErase.emit(*itr);
delete (*itr)->get_stream();
delete *itr;
@@ -44,8 +49,8 @@ HttpQueue::erase(iterator itr) {
void
HttpQueue::clear() {
std::for_each(begin(), end(), func::on(func::call_delete(), std::mem_fun(&CurlGet::get_stream)));
std::for_each(begin(), end(), func::call_delete());
while (!empty())
erase(begin());
Base::clear();
}