mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 06:39:23 +00:00
Removed all dependencies on sigc++.
This commit is contained in:
@@ -48,18 +48,27 @@
|
||||
|
||||
namespace display {
|
||||
|
||||
WindowDownloadList::WindowDownloadList() :
|
||||
Window(new Canvas, 0, 120, 1, extent_full, extent_full),
|
||||
m_view(NULL) {
|
||||
}
|
||||
|
||||
WindowDownloadList::~WindowDownloadList() {
|
||||
m_connChanged.disconnect();
|
||||
if (m_view != NULL)
|
||||
m_view->signal_changed().erase(m_changed_itr);
|
||||
|
||||
m_view = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
WindowDownloadList::set_view(core::View* l) {
|
||||
if (m_view != NULL)
|
||||
m_view->signal_changed().erase(m_changed_itr);
|
||||
|
||||
m_view = l;
|
||||
|
||||
m_connChanged.disconnect();
|
||||
|
||||
if (m_view != NULL)
|
||||
m_connChanged = m_view->signal_changed().connect(sigc::mem_fun(*this, &Window::mark_dirty));
|
||||
m_changed_itr = m_view->signal_changed().insert(m_view->signal_changed().begin(), std::tr1::bind(&Window::mark_dirty, this));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -37,23 +37,18 @@
|
||||
#ifndef RTORRENT_DISPLAY_WINDOW_DOWNLOAD_LIST_H
|
||||
#define RTORRENT_DISPLAY_WINDOW_DOWNLOAD_LIST_H
|
||||
|
||||
#include <sigc++/connection.h>
|
||||
|
||||
#include "window.h"
|
||||
|
||||
#include "core/download_list.h"
|
||||
|
||||
namespace core {
|
||||
class View;
|
||||
}
|
||||
#include "core/view.h"
|
||||
|
||||
namespace display {
|
||||
|
||||
class WindowDownloadList : public Window {
|
||||
public:
|
||||
WindowDownloadList() :
|
||||
Window(new Canvas, 0, 120, 1, extent_full, extent_full),
|
||||
m_view(NULL) {}
|
||||
typedef core::View::signal_void::iterator signal_void_itr;
|
||||
|
||||
WindowDownloadList();
|
||||
~WindowDownloadList();
|
||||
|
||||
virtual void redraw();
|
||||
@@ -63,7 +58,7 @@ public:
|
||||
private:
|
||||
core::View* m_view;
|
||||
|
||||
sigc::connection m_connChanged;
|
||||
signal_void_itr m_changed_itr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user