mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 05:32:31 +00:00
Cleaned up ui::Root, fixed updating and hiding status bar.
Using displayScheduler for updating windows, much more efficient. Added saving of some parts of the state of torrents. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@482 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -30,10 +30,31 @@ namespace display {
|
||||
|
||||
Window::Slot Window::m_slotAdjust;
|
||||
|
||||
Window::Window(Canvas* c, bool d, int h) :
|
||||
m_canvas(c),
|
||||
m_active(true),
|
||||
m_dynamic(d),
|
||||
m_minHeight(h) {
|
||||
|
||||
m_taskUpdate.set_iterator(utils::displayScheduler.end());
|
||||
m_taskUpdate.set_slot(sigc::mem_fun(*this, &Window::redraw));
|
||||
}
|
||||
|
||||
Window::~Window() {
|
||||
utils::displayScheduler.erase(&m_taskUpdate);
|
||||
delete m_canvas;
|
||||
}
|
||||
|
||||
void
|
||||
Window::set_active(bool a) {
|
||||
if (a)
|
||||
mark_dirty();
|
||||
else
|
||||
utils::displayScheduler.erase(&m_taskUpdate);
|
||||
|
||||
m_active = a;
|
||||
}
|
||||
|
||||
void
|
||||
Window::resize(int x, int y, int w, int h) {
|
||||
if (x < 0 || y < 0)
|
||||
|
||||
Reference in New Issue
Block a user