diff options
| author | 2007-01-27 18:53:44 +0000 | |
|---|---|---|
| committer | 2007-01-27 18:53:44 +0000 | |
| commit | f4568dc8bc6ff948830d5718648564d6b219f2e9 (patch) | |
| tree | 5616fbc6ba9f9ebf1dc6908c2765a9c1b43e7083 /src/modules/torrent/tc_statusbarapplet.cpp | |
| parent | implemented missing functions. added config support. (diff) | |
| download | KVIrc-f4568dc8bc6ff948830d5718648564d6b219f2e9.tar.gz KVIrc-f4568dc8bc6ff948830d5718648564d6b219f2e9.tar.bz2 KVIrc-f4568dc8bc6ff948830d5718648564d6b219f2e9.zip | |
some cleanup / fixes.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@276 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/torrent/tc_statusbarapplet.cpp')
| -rw-r--r-- | src/modules/torrent/tc_statusbarapplet.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/modules/torrent/tc_statusbarapplet.cpp b/src/modules/torrent/tc_statusbarapplet.cpp index ed029dab0..5d23a299d 100644 --- a/src/modules/torrent/tc_statusbarapplet.cpp +++ b/src/modules/torrent/tc_statusbarapplet.cpp @@ -4,9 +4,6 @@ #include "tc_interface.h" #include "tc_statusbarapplet.h" -// from libkvitorrent.cpp -extern KviTorrentInterface *g_pTcInterface; - KviTorrentStatusBarApplet::KviTorrentStatusBarApplet(KviStatusBar *parent, KviStatusBarAppletDescriptor *desc) : KviStatusBarApplet(parent, desc) { @@ -52,20 +49,14 @@ QString formatSize(float sz) void KviTorrentStatusBarApplet::update() { - if (g_pTcInterface) + if (KviTorrentInterface::selected()) { QString msg = QString("up: %1 K/s (%2), dn: %3 K/s (%4)") - .arg(g_pTcInterface->speedUp(), 2) - .arg(formatSize(g_pTcInterface->trafficUp())) - .arg(g_pTcInterface->speedDown(), 2) - .arg(formatSize(g_pTcInterface->trafficDown())); + .arg(KviTorrentInterface::selected()->speedUp(), 2) + .arg(formatSize(KviTorrentInterface::selected()->trafficUp())) + .arg(KviTorrentInterface::selected()->speedDown(), 2) + .arg(formatSize(KviTorrentInterface::selected()->trafficDown())); -// msg << __tr2qs_ctx("up: ", "torrent") << g_pTcInterface->speedUp() -// << __tr2qs_ctx("dn: ", "torrent") << g_pTcInterface->speedDown(); -// msg << __tr2qs_ctx("up: ", "torrent") << g_pTcInterface->trafficUp() -// << __tr2qs_ctx("dn: ", "torrent") << g_pTcInterface->trafficDown(); -// KviQString::sprintf(msg, __tr2qs_ctx("up: %.2f, dn: %.2f", "torrent"), g_pTcInterface->speedUp(), g_pTcInterface->speedDown()); -// KviQString::sprintf(msg, __tr2qs_ctx("up: %d, dn: %d", "torrent"), g_pTcInterface->trafficUp(), g_pTcInterface->trafficDown()); setText(msg); } else |
