mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-16 23:22:31 +00:00
* Unlink the tied file when a torrent is erased.
* Remove torrents that are already tied from the expanded paths. * Move the loop counter to Control. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@618 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -152,7 +152,7 @@ Manager::schedule_update() {
|
||||
if (!m_taskUpdate.is_queued() || m_taskUpdate.time() > m_scheduler.top()->time()) {
|
||||
rak::priority_queue_erase(&taskScheduler, &m_taskUpdate);
|
||||
rak::priority_queue_insert(&taskScheduler, &m_taskUpdate,
|
||||
std::max(m_scheduler.top()->time(), m_timeLastUpdate + 100000));
|
||||
std::max(m_scheduler.top()->time(), m_timeLastUpdate + 50000));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,19 +39,16 @@
|
||||
#include <torrent/rate.h>
|
||||
#include <torrent/torrent.h>
|
||||
|
||||
#include "core/manager.h"
|
||||
|
||||
#include "control.h"
|
||||
#include "canvas.h"
|
||||
#include "window_statusbar.h"
|
||||
|
||||
extern uint32_t countTicks;
|
||||
|
||||
namespace display {
|
||||
|
||||
WindowStatusbar::WindowStatusbar(core::Manager* c) :
|
||||
WindowStatusbar::WindowStatusbar(Control* c) :
|
||||
Window(new Canvas, false, 1),
|
||||
m_counter(0),
|
||||
m_core(c) {
|
||||
m_lastTick(0),
|
||||
m_control(c) {
|
||||
}
|
||||
|
||||
void
|
||||
@@ -86,7 +83,7 @@ WindowStatusbar::redraw() {
|
||||
pos = snprintf(buf, 128, "[U %i/%i][S %i/%i/%i][F %i/%i]",
|
||||
#else
|
||||
pos = snprintf(buf, 128, "%i [U %i/%i][S %i/%i/%i][F %i/%i]",
|
||||
countTicks,
|
||||
(int)(m_control->tick() - m_lastTick),
|
||||
#endif
|
||||
torrent::currently_unchoked(),
|
||||
torrent::max_unchoked(),
|
||||
@@ -96,9 +93,9 @@ WindowStatusbar::redraw() {
|
||||
torrent::open_files(),
|
||||
torrent::max_open_files());
|
||||
|
||||
countTicks = 0;
|
||||
|
||||
m_canvas->print(m_canvas->get_width() - pos, 0, "%s", buf);
|
||||
|
||||
m_lastTick = m_control->tick();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,23 +37,23 @@
|
||||
#ifndef RTORRENT_DISPLAY_WINDOW_STATUSBAR_H
|
||||
#define RTORRENT_DISPLAY_WINDOW_STATUSBAR_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "window.h"
|
||||
|
||||
namespace core {
|
||||
class Manager;
|
||||
}
|
||||
class Control;
|
||||
|
||||
namespace display {
|
||||
|
||||
class WindowStatusbar : public Window {
|
||||
public:
|
||||
WindowStatusbar(core::Manager* c);
|
||||
WindowStatusbar(Control* c);
|
||||
|
||||
virtual void redraw();
|
||||
virtual void redraw();
|
||||
|
||||
private:
|
||||
int m_counter;
|
||||
core::Manager* m_core;
|
||||
uint64_t m_lastTick;
|
||||
Control* m_control;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user