Signal handler with cleaner shutdown.

Window title and stuff.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@248 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-01-30 23:10:25 +00:00
parent 3357b5caab
commit c3a4a7d554
14 changed files with 235 additions and 48 deletions
+25
View File
@@ -0,0 +1,25 @@
#include "config.h"
#include <torrent/torrent.h>
#include "canvas.h"
#include "window_title.h"
namespace display {
WindowTitle::WindowTitle() :
Window(new Canvas, false, 1) {
m_title += "rtorrent " VERSION " - ";
m_title += torrent::get(torrent::LIBRARY_NAME);
}
void
WindowTitle::redraw() {
m_canvas->erase();
m_canvas->print(std::max(0, (m_canvas->get_width() - (int)m_title.size()) / 2 - 4), 0,
"*** %s ***", m_title.c_str());
}
}