mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 07:02:30 +00:00
Added man pages.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@475 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -76,7 +76,7 @@ DownloadList::DownloadList(Control* c) :
|
||||
}
|
||||
|
||||
DownloadList::~DownloadList() {
|
||||
if (m_window != m_control->get_display().end())
|
||||
if (is_active())
|
||||
throw std::logic_error("ui::DownloadList::~DownloadList() called on an active object");
|
||||
|
||||
std::for_each(m_uiArray, m_uiArray + DISPLAY_MAX_SIZE, rak::call_delete<ElementBase>());
|
||||
@@ -93,7 +93,7 @@ DownloadList::~DownloadList() {
|
||||
|
||||
void
|
||||
DownloadList::activate() {
|
||||
if (m_window != m_control->get_display().end())
|
||||
if (is_active())
|
||||
throw std::logic_error("ui::Download::activate() called on an already activated object");
|
||||
|
||||
utils::taskScheduler.insert(&m_taskUpdate, utils::Timer::cache() + 1000000);
|
||||
@@ -115,7 +115,7 @@ DownloadList::activate() {
|
||||
|
||||
void
|
||||
DownloadList::disable() {
|
||||
if (m_window == m_control->get_display().end())
|
||||
if (!is_active())
|
||||
throw std::logic_error("ui::Download::disable() called on an already disabled object");
|
||||
|
||||
disable_display();
|
||||
@@ -141,7 +141,7 @@ DownloadList::disable() {
|
||||
|
||||
void
|
||||
DownloadList::activate_display(Display d) {
|
||||
if (m_window == m_control->get_display().end())
|
||||
if (!is_active())
|
||||
throw std::logic_error("ui::DownloadList::activate_display(...) could not find previous display iterator");
|
||||
|
||||
if (d >= DISPLAY_MAX_SIZE)
|
||||
|
||||
@@ -77,6 +77,8 @@ public:
|
||||
|
||||
input::Bindings& get_bindings() { return *m_bindings; }
|
||||
|
||||
bool is_active() const { return m_window != m_control->get_display().end(); }
|
||||
|
||||
void activate();
|
||||
void disable();
|
||||
|
||||
|
||||
@@ -43,6 +43,9 @@ Root::init() {
|
||||
|
||||
void
|
||||
Root::cleanup() {
|
||||
if (m_downloadList->is_active())
|
||||
m_downloadList->disable();
|
||||
|
||||
delete m_downloadList;
|
||||
|
||||
m_control->get_input().erase(&m_bindings);
|
||||
|
||||
Reference in New Issue
Block a user