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:
rakshasa
2005-02-16 20:03:40 +00:00
parent ab065e598b
commit e3a0730b33
7 changed files with 66 additions and 37 deletions
+11 -8
View File
@@ -46,18 +46,21 @@ set_shutdown() {
void
do_shutdown(ui::Control* c) {
if (is_shutting_down)
// Be quick about it...
return;
if (!is_shutting_down) {
is_shutting_down = true;
is_shutting_down = true;
torrent::listen_close();
torrent::listen_close();
std::for_each(c->get_core().get_download_list().begin(), c->get_core().get_download_list().end(),
std::mem_fun_ref(&core::Download::stop));
// TODO: Set display to a safe mode.
} else {
// Close all torrents, this will stop all tracker connections and cause
// a quick shutdown.
std::for_each(c->get_core().get_download_list().begin(), c->get_core().get_download_list().end(),
std::mem_fun_ref(&core::Download::close));
std::for_each(c->get_core().get_download_list().begin(), c->get_core().get_download_list().end(),
std::mem_fun_ref(&core::Download::stop));
}
}
void