You are not logged in.
Pages: 1
hi, I have been working on just another rtorrent ui mod, it's mainly inspired from rtorrent-mod by karabaja4 - thanks to him :-)
I am sorry, I haven't made any package yet (need to study for it as never done before). I am attaching a patch for now, apply it from src directory like below.
highlights:
1 - colored more elements (tracker lists, chunks, files list, transferring chunks list etc)
2 - a bit different ui
3 - almost everything done lowercase (I like it like that, sorry if you don't like it)
pwd should be rtorrent/src/rtorrent-0.9.3/src
patch -p1 < ui-rtorrent-mod.patch
Patch:
diff -rupN src/display/canvas.cc src-custom/display/canvas.cc
--- src/display/canvas.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/canvas.cc 2013-06-06 01:54:59.338119016 +0530
@@ -5,12 +5,12 @@
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
-//
+//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -95,10 +95,21 @@ void
Canvas::initialize() {
if (m_isInitialized)
return;
-
+
m_isInitialized = true;
initscr();
+
+ /* colors */
+ start_color();
+ use_default_colors();
+ init_pair(1, COLOR_RED, -1);
+ init_pair(2, COLOR_YELLOW, -1);
+ init_pair(3, COLOR_GREEN, -1);
+ init_pair(4, COLOR_BLUE, -1);
+ init_pair(5, COLOR_MAGENTA, -1);
+ init_pair(6, COLOR_CYAN, -1);
+
raw();
noecho();
nodelay(stdscr, TRUE);
@@ -110,7 +121,7 @@ void
Canvas::cleanup() {
if (!m_isInitialized)
return;
-
+
m_isInitialized = false;
noraw();
diff -rupN src/display/utils.cc src-custom/display/utils.cc
--- src/display/utils.cc 2012-02-14 09:02:01.000000000 +0530
+++ src-custom/display/utils.cc 2013-06-06 01:54:59.338119016 +0530
@@ -53,6 +53,8 @@
#include <torrent/data/file_manager.h>
#include <torrent/download/resource_manager.h>
#include <torrent/peer/client_info.h>
+#include <torrent/peer/connection_list.h>
+#include <torrent/peer/peer_list.h>
#include "core/download.h"
#include "core/manager.h"
@@ -98,9 +100,9 @@ print_hhmmss_local(char* first, char* la
char*
print_ddhhmm(char* first, char* last, time_t t) {
if (t / (24 * 3600) < 100)
- return print_buffer(first, last, "%2id %2i:%02i", (int)t / (24 * 3600), ((int)t / 3600) % 24, ((int)t / 60) % 60);
+ return print_buffer(first, last, "%2id %2i:%02i |", (int)t / (24 * 3600), ((int)t / 3600) % 24, ((int)t / 60) % 60);
else
- return print_buffer(first, last, "--d --:--");
+ return print_buffer(first, last, "--d --:-- |");
}
char*
@@ -129,26 +131,53 @@ print_address(char* first, char* last, c
char*
print_download_title(char* first, char* last, core::Download* d) {
- return print_buffer(first, last, " %s", d->info()->name().c_str());
+ first = print_buffer(first, last, "%s ", d->info()->name().c_str());
+
+ return first;
+}
+
+char *
+print_download_title_extra(char* first, char* last, core::Download* d) {
+ if (d->is_hash_checking()) {
+ first = print_buffer(first, last, "| checking hash %3i%%",
+ (d->download()->chunks_hashed() * 100) / d->download()->file_list()->size_chunks());
+ } else if (d->tracker_list()->has_active_not_scrape()) {
+ torrent::TrackerList::iterator itr =
+ std::find_if(d->tracker_list()->begin(), d->tracker_list()->end(),
+ std::mem_fun(&torrent::Tracker::is_busy_not_scrape));
+ char status[128];
+
+ (*itr)->get_status(status, sizeof(status));
+ first = print_buffer(first, last, "| connecting to %s %s",
+ (*itr)->url().c_str(), status);
+ } else if (!d->message().empty()) {
+ first = print_buffer(first, last, "| %s", d->message().c_str());
+ } else {
+ *first = '\0';
+ }
+
+ return first;
}
char*
print_download_info(char* first, char* last, core::Download* d) {
if (!d->download()->info()->is_open())
- first = print_buffer(first, last, "[CLOSED] ");
+ first = print_buffer(first, last, "stop | ");
else if (!d->download()->info()->is_active())
- first = print_buffer(first, last, "[OPEN] ");
+ first = print_buffer(first, last, "open | ");
+ else if (!d->is_done())
+ first = print_buffer(first, last, "load | ");
else
- first = print_buffer(first, last, " ");
+ first = print_buffer(first, last, "---- | ");
if (d->is_done())
- first = print_buffer(first, last, "done %10.1f MB", (double)d->download()->file_list()->size_bytes() / (double)(1 << 20));
+ first = print_buffer(first, last, "done %8.1f mb", (double)d->download()->file_list()->size_bytes() / (double)(1 << 20));
else
- first = print_buffer(first, last, "%6.1f / %6.1f MB",
+ first = print_buffer(first, last, "%6.1f/%6.1f mb",
(double)d->download()->bytes_done() / (double)(1 << 20),
(double)d->download()->file_list()->size_bytes() / (double)(1 << 20));
- first = print_buffer(first, last, " Rate: %5.1f / %5.1f KB Uploaded: %7.1f MB",
+ first = print_buffer(first, last, " | rate: %4.1f/%5.1f kb | uploaded: %5.1f mb |",
(double)d->info()->up_rate()->rate() / (1 << 10),
(double)d->info()->down_rate()->rate() / (1 << 10),
(double)d->info()->up_rate()->total() / (1 << 20));
@@ -157,24 +186,19 @@ print_download_info(char* first, char* l
first = print_buffer(first, last, " ");
first = print_download_percentage_done(first, last, d);
- first = print_buffer(first, last, " ");
+ first = print_buffer(first, last, " | ");
first = print_download_time_left(first, last, d);
- } else {
- first = print_buffer(first, last, " ");
- }
- first = print_buffer(first, last, " [%c%c R: %4.2f",
- rpc::call_command_string("d.tied_to_file", rpc::make_target(d)).empty() ? ' ' : 'T',
- rpc::call_command_value("d.ignore_commands", rpc::make_target(d)) == 0 ? ' ' : 'I',
- (double)rpc::call_command_value("d.ratio", rpc::make_target(d)) / 1000.0);
+ first = print_buffer(first, last, " peers: %i(%i)",
+ (int)d->download()->connection_list()->size(),
+ (int)d->download()->peer_list()->available_list_size());
if (d->priority() != 2)
- first = print_buffer(first, last, " %s", rpc::call_command_string("d.priority_str", rpc::make_target(d)).c_str());
+ first = print_buffer(first, last, " | %s", rpc::call_command_string("d.priority_str", rpc::make_target(d)).c_str());
+ }
if (!d->bencode()->get_key("rtorrent").get_key_string("throttle_name").empty())
- first = print_buffer(first, last , " %s", rpc::call_command_string("d.throttle_name", rpc::make_target(d)).c_str());
-
- first = print_buffer(first, last , "]");
+ first = print_buffer(first, last , " | %s", rpc::call_command_string("d.throttle_name", rpc::make_target(d)).c_str());
if (first > last)
throw torrent::internal_error("print_download_info(...) wrote past end of the buffer.");
@@ -182,48 +206,48 @@ print_download_info(char* first, char* l
return first;
}
-char*
-print_download_status(char* first, char* last, core::Download* d) {
- if (d->is_active())
- ;
- else if (rpc::call_command_value("d.hashing", rpc::make_target(d)) != 0)
- first = print_buffer(first, last, "Hashing: ");
- else if (!d->is_active())
- first = print_buffer(first, last, "Inactive: ");
-
- if (d->is_hash_checking()) {
- first = print_buffer(first, last, "Checking hash [%2i%%]",
- (d->download()->chunks_hashed() * 100) / d->download()->file_list()->size_chunks());
-
- } else if (d->tracker_list()->has_active_not_scrape()) {
- torrent::TrackerList::iterator itr =
- std::find_if(d->tracker_list()->begin(), d->tracker_list()->end(),
- std::mem_fun(&torrent::Tracker::is_busy_not_scrape));
- char status[128];
-
- (*itr)->get_status(status, sizeof(status));
- first = print_buffer(first, last, "Tracker[%i:%i]: Connecting to %s %s",
- (*itr)->group(), std::distance(d->tracker_list()->begin(), itr), (*itr)->url().c_str(), status);
-
- } else if (!d->message().empty()) {
- first = print_buffer(first, last, "%s", d->message().c_str());
-
- } else {
- *first = '\0';
- }
-
- if (first > last)
- throw torrent::internal_error("print_download_status(...) wrote past end of the buffer.");
-
- return first;
-}
+char*
+print_download_status(char* first, char* last, core::Download* d) {
+ if (d->is_active())
+ ;
+ else if (rpc::call_command_value("d.hashing", rpc::make_target(d)) != 0)
+ first = print_buffer(first, last, "hashing: ");
+ else if (!d->is_active())
+ first = print_buffer(first, last, "inactive: ");
+
+ if (d->is_hash_checking()) {
+ first = print_buffer(first, last, "checking hash [%2i%%]",
+ (d->download()->chunks_hashed() * 100) / d->download()->file_list()->size_chunks());
+
+ } else if (d->tracker_list()->has_active_not_scrape()) {
+ torrent::TrackerList::iterator itr =
+ std::find_if(d->tracker_list()->begin(), d->tracker_list()->end(),
+ std::mem_fun(&torrent::Tracker::is_busy_not_scrape));
+ char status[128];
+
+ (*itr)->get_status(status, sizeof(status));
+ first = print_buffer(first, last, "tracker[%i:%i]: connecting to %s %s",
+ (*itr)->group(), std::distance(d->tracker_list()->begin(), itr), (*itr)->url().c_str(), status);
+
+ } else if (!d->message().empty()) {
+ first = print_buffer(first, last, "%s", d->message().c_str());
+
+ } else {
+ *first = '\0';
+ }
+
+ if (first > last)
+ throw torrent::internal_error("print_download_status(...) wrote past end of the buffer.");
+
+ return first;
+}
char*
print_download_time_left(char* first, char* last, core::Download* d) {
uint32_t rate = d->info()->down_rate()->rate();
if (rate < 512)
- return print_buffer(first, last, "--d --:--");
+ return print_buffer(first, last, "--d --:-- |");
time_t remaining = (d->download()->file_list()->size_bytes() - d->download()->bytes_done()) / (rate & ~(uint32_t)(512 - 1));
@@ -233,10 +257,9 @@ print_download_time_left(char* first, ch
char*
print_download_percentage_done(char* first, char* last, core::Download* d) {
if (!d->is_open() || d->is_done())
- //return print_buffer(first, last, "[--%%]");
- return print_buffer(first, last, " ");
+ return print_buffer(first, last, " ");
else
- return print_buffer(first, last, "[%2u%%]", (d->download()->file_list()->completed_chunks() * 100) / d->download()->file_list()->size_chunks());
+ return print_buffer(first, last, "%2u%%", (d->download()->file_list()->completed_chunks() * 100) / d->download()->file_list()->size_chunks());
}
char*
@@ -260,23 +283,23 @@ print_client_version(char* first, char*
char*
print_status_info(char* first, char* last) {
if (!torrent::up_throttle_global()->is_throttled())
- first = print_buffer(first, last, "[Throttle off");
+ first = print_buffer(first, last, "[throttle off");
else
- first = print_buffer(first, last, "[Throttle %3i", torrent::up_throttle_global()->max_rate() / 1024);
+ first = print_buffer(first, last, "[throttle %3i", torrent::up_throttle_global()->max_rate() / 1024);
if (!torrent::down_throttle_global()->is_throttled())
- first = print_buffer(first, last, "/off KB]");
+ first = print_buffer(first, last, "/off kb]");
else
- first = print_buffer(first, last, "/%3i KB]", torrent::down_throttle_global()->max_rate() / 1024);
+ first = print_buffer(first, last, "/%3i kb]", torrent::down_throttle_global()->max_rate() / 1024);
- first = print_buffer(first, last, " [Rate %5.1f/%5.1f KB]",
+ first = print_buffer(first, last, " [rate %4.1f/%5.1f kb]",
(double)torrent::up_rate()->rate() / 1024.0,
(double)torrent::down_rate()->rate() / 1024.0);
- first = print_buffer(first, last, " [Port: %i]", (unsigned int)torrent::connection_manager()->listen_port());
+ first = print_buffer(first, last, " [port: %i]", (unsigned int)torrent::connection_manager()->listen_port());
if (!rak::socket_address::cast_from(torrent::connection_manager()->local_address())->is_address_any()) {
- first = print_buffer(first, last, " [Local ");
+ first = print_buffer(first, last, " [local ");
first = print_address(first, last, torrent::connection_manager()->local_address());
first = print_buffer(first, last, "]");
}
@@ -285,7 +308,7 @@ print_status_info(char* first, char* las
throw torrent::internal_error("print_status_info(...) wrote past end of the buffer.");
if (!rak::socket_address::cast_from(torrent::connection_manager()->bind_address())->is_address_any()) {
- first = print_buffer(first, last, " [Bind ");
+ first = print_buffer(first, last, " [bind ");
first = print_address(first, last, torrent::connection_manager()->bind_address());
first = print_buffer(first, last, "]");
}
@@ -295,24 +318,24 @@ print_status_info(char* first, char* las
char*
print_status_extra(char* first, char* last) {
- first = print_buffer(first, last, " [U %i/%i]",
+ first = print_buffer(first, last, " [u %i/%i]",
torrent::resource_manager()->currently_upload_unchoked(),
torrent::resource_manager()->max_upload_unchoked());
- first = print_buffer(first, last, " [D %i/%i]",
+ first = print_buffer(first, last, " [d %i/%i]",
torrent::resource_manager()->currently_download_unchoked(),
torrent::resource_manager()->max_download_unchoked());
- first = print_buffer(first, last, " [H %u/%u]",
+ first = print_buffer(first, last, " [h %u/%u]",
control->core()->http_stack()->active(),
control->core()->http_stack()->max_active());
- first = print_buffer(first, last, " [S %i/%i/%i]",
+ first = print_buffer(first, last, " [s %i/%i/%i]",
torrent::total_handshakes(),
torrent::connection_manager()->size(),
torrent::connection_manager()->max_size());
- first = print_buffer(first, last, " [F %i/%i]",
+ first = print_buffer(first, last, " [f %i/%i]",
torrent::file_manager()->open_files(),
torrent::file_manager()->max_open_files());
diff -rupN src/display/utils.h src-custom/display/utils.h
--- src/display/utils.h 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/utils.h 2013-06-06 01:54:59.331452368 +0530
@@ -66,6 +66,7 @@ char* print_ddhhmm(char* first, ch
char* print_ddmmyyyy(char* first, char* last, time_t t);
char* print_download_title(char* first, char* last, core::Download* d);
+char* print_download_title_extra(char* first, char* last, core::Download* d);
char* print_download_info(char* first, char* last, core::Download* d);
char* print_download_status(char* first, char* last, core::Download* d);
char* print_download_time_left(char* first, char* last, core::Download* d);
diff -rupN src/display/window_download_chunks_seen.cc src-custom/display/window_download_chunks_seen.cc
--- src/display/window_download_chunks_seen.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/window_download_chunks_seen.cc 2013-06-06 02:04:03.243342326 +0530
@@ -66,7 +66,7 @@ WindowDownloadChunksSeen::redraw() {
if (m_canvas->height() < 3 || m_canvas->width() < 18)
return;
- m_canvas->print(2, 0, "Chunks seen: [C/A/D %i/%i/%.2f]",
+ m_canvas->print(2, 0, "chunks seen: [c/a/d %i/%i/%.2f]",
(int)m_download->download()->peers_complete() + m_download->download()->file_list()->is_done(),
(int)m_download->download()->peers_accounted(),
std::floor(m_download->distributed_copies() * 100.0f) / 100.0f);
@@ -74,15 +74,16 @@ WindowDownloadChunksSeen::redraw() {
const uint8_t* seen = m_download->download()->chunks_seen();
if (seen == NULL || m_download->download()->file_list()->bitfield()->empty()) {
- m_canvas->print(2, 2, "Not available.");
+ m_canvas->print(2, 2, "not available.");
return;
}
if (!m_download->is_done()) {
- m_canvas->print(36, 0, "X downloaded missing queued downloading");
- m_canvas->print_char(50, 0, 'X' | A_BOLD);
- m_canvas->print_char(61, 0, 'X' | A_BOLD | A_UNDERLINE);
- m_canvas->print_char(71, 0, 'X' | A_REVERSE);
+ m_canvas->print(36, 0, " downloaded missing queued downloading");
+ m_canvas->print_char(36, 0, 'x' | COLOR_PAIR(3));
+ m_canvas->print_char(50, 0, 'x' | COLOR_PAIR(1));
+ m_canvas->print_char(61, 0, 'x' | A_UNDERLINE);
+ m_canvas->print_char(71, 0, 'x' | COLOR_PAIR(6));
}
*m_focus = std::min(*m_focus, max_focus());
@@ -109,15 +110,15 @@ WindowDownloadChunksSeen::redraw() {
chtype attr;
if (bitfield->get(chunk - seen)) {
- attr = A_NORMAL;
+ attr = COLOR_PAIR(3);
} else if (itrTransfer != transferChunks.end() && (uint32_t)(chunk - seen) == (*itrTransfer)->index()) {
if (std::find_if((*itrTransfer)->begin(), (*itrTransfer)->end(), std::mem_fun_ref(&torrent::Block::is_transfering)) != (*itrTransfer)->end())
- attr = A_REVERSE;
+ attr = COLOR_PAIR(1);
else
- attr = A_BOLD | A_UNDERLINE;
+ attr = A_UNDERLINE;
itrTransfer++;
} else {
- attr = A_BOLD;
+ attr = COLOR_PAIR(6);
}
m_canvas->print_char(attr | rak::value_to_hexchar<0>(std::min<uint8_t>(*chunk, 0xF)));
diff -rupN src/display/window_download_list.cc src-custom/display/window_download_list.cc
--- src/display/window_download_list.cc 2012-02-14 09:02:01.000000000 +0530
+++ src-custom/display/window_download_list.cc 2013-06-06 01:54:59.331452368 +0530
@@ -71,7 +71,7 @@ WindowDownloadList::redraw() {
if (m_view == NULL)
return;
- m_canvas->print(0, 0, "%s", ("[View: " + m_view->name() + "]").c_str());
+ m_canvas->print(0, 0, "%s", ("[view: " + m_view->name() + "]").c_str());
if (m_view->empty_visible() || m_canvas->width() < 5 || m_canvas->height() < 2)
return;
@@ -81,7 +81,7 @@ WindowDownloadList::redraw() {
Range range = rak::advance_bidirectional(m_view->begin_visible(),
m_view->focus() != m_view->end_visible() ? m_view->focus() : m_view->begin_visible(),
m_view->end_visible(),
- m_canvas->height() / 3);
+ (m_canvas->height() - 1) / 3);
// Make sure we properly fill out the last lines so it looks like
// there are more torrents, yet don't hide it if we got the last one
@@ -89,21 +89,54 @@ WindowDownloadList::redraw() {
if (range.second != m_view->end_visible())
++range.second;
- int pos = 1;
+ int pos = 2;
while (range.first != range.second) {
char buffer[m_canvas->width() + 1];
char* last = buffer + m_canvas->width() - 2 + 1;
+ int title_length;
+ //do not print on last lines if cannot show whole torrent
+ if (pos >= (m_canvas->height() - 1))
+ break;
+
+ // print title
print_download_title(buffer, last, *range.first);
- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
-
- print_download_info(buffer, last, *range.first);
- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
+ m_canvas->print(0, pos, "%c %s", range.first == m_view->focus() ? '>' : ' ', buffer);
+ title_length = strlen(buffer);
+ if ((*range.first)->is_done()) {
+ m_canvas->set_attr(2, pos, (title_length), A_BOLD, 3);
+ } else {
+ m_canvas->set_attr(2, pos, (title_length), A_BOLD, 2);
+ }
+ //print title extra
+ print_download_title_extra(buffer, last, *range.first);
+
+ //do not let title extra get off screen
+ buffer[m_canvas->width() - title_length - 2] = '\0';
+ m_canvas->print((title_length + 2), pos++, "%s", buffer);
- print_download_status(buffer, last, *range.first);
- m_canvas->print(0, pos++, "%c %s", range.first == m_view->focus() ? '*' : ' ', buffer);
+ print_download_info(buffer, last, *range.first);
+ m_canvas->print(0, pos, " %s", buffer);
+ if (!(*range.first)->info()->is_open()) {
+ //closed
+ m_canvas->set_attr(2, pos, 4, A_BOLD, 1);
+ } else if (!(*range.first)->info()->is_active()) {
+ //paused
+ m_canvas->set_attr(2, pos, 4, A_BOLD, 2);
+ } else {
+ //active
+ m_canvas->set_attr(2, pos, 4, A_BOLD, 3);
+ }
+
+ if ((*range.first)->is_done()) {
+ //finished
+ m_canvas->set_attr(9, pos, 16, A_BOLD, 3);
+ }
+ m_canvas->set_attr(28, pos, (strlen(buffer) - 26), A_NORMAL, 6);
+ pos++;
+ pos++;
++range.first;
}
}
diff -rupN src/display/window_download_statusbar.cc src-custom/display/window_download_statusbar.cc
--- src/display/window_download_statusbar.cc 2012-02-14 09:02:01.000000000 +0530
+++ src-custom/display/window_download_statusbar.cc 2013-06-06 01:54:59.328119043 +0530
@@ -68,7 +68,7 @@ WindowDownloadStatusbar::redraw() {
print_download_info(buffer, last, m_download);
m_canvas->print(0, 0, "%s", buffer);
- snprintf(buffer, last - buffer, "Peers: %i(%i) Min/Max: %i/%i Slots: U:%i/%i D:%i/%i U/I/C/A: %i/%i/%i/%i Unchoked: %u/%u Failed: %i",
+ snprintf(buffer, last - buffer, "peers: %i(%i) min/max: %i/%i slots: u:%i/%i d:%i/%i u/i/c/a: %i/%i/%i/%i unchoked: %u/%u failed: %i",
(int)m_download->download()->connection_list()->size(),
(int)m_download->download()->peer_list()->available_list_size(),
(int)m_download->download()->connection_list()->min_size(),
diff -rupN src/display/window_download_transfer_list.cc src-custom/display/window_download_transfer_list.cc
--- src/display/window_download_transfer_list.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/window_download_transfer_list.cc 2013-06-06 01:54:59.331452368 +0530
@@ -65,7 +65,7 @@ WindowDownloadTransferList::redraw() {
const torrent::TransferList* transfers = m_download->download()->transfer_list();
- m_canvas->print(2, 0, "Transfer list: [Size %i]", transfers->size());
+ m_canvas->print(2, 0, "transfer list: [size %i]", transfers->size());
torrent::TransferList::const_iterator itr = transfers->begin();
@@ -74,7 +74,7 @@ WindowDownloadTransferList::redraw() {
// prettify this. (This is a very subtle hint)
for (unsigned int y = 1; y < m_canvas->height() && itr != transfers->end(); ++y, ++itr) {
- m_canvas->print(0, y, "%5u [P: %u F: %u]", (*itr)->index(), (*itr)->priority(), (*itr)->failed());
+ m_canvas->print(0, y, "%5u [p: %u f: %u]", (*itr)->index(), (*itr)->priority(), (*itr)->failed());
// Handle window size.
for (torrent::BlockList::const_iterator bItr = (*itr)->begin(), bLast = (*itr)->end(); bItr != bLast; ++bItr) {
@@ -89,7 +89,7 @@ WindowDownloadTransferList::redraw() {
chtype attr = A_NORMAL;
if (bItr->is_finished()) {
- attr = A_REVERSE;
+ attr = COLOR_PAIR(3);
id = key_id(bItr->leader()->const_peer_info());
} else if (bItr->is_transfering()) {
diff -rupN src/display/window_file_list.cc src-custom/display/window_file_list.cc
--- src/display/window_file_list.cc 2012-02-14 09:02:01.000000000 +0530
+++ src-custom/display/window_file_list.cc 2013-06-06 01:54:59.338119016 +0530
@@ -154,9 +154,9 @@ WindowFileList::redraw() {
}
unsigned int pos = 0;
- int filenameWidth = m_canvas->width() - 16;
+ int filenameWidth = m_canvas->width() - 18;
- m_canvas->print(0, pos++, "Cmp Pri Size Filename");
+ m_canvas->print(0, pos++, "cmp pri size filename");
while (pos != m_canvas->height()) {
iterator itr = entries[first];
@@ -164,17 +164,17 @@ WindowFileList::redraw() {
if (itr == iterator(fl->end()))
break;
- m_canvas->set_default_attributes(itr == m_element->selected() ? is_focused() ? A_REVERSE : A_BOLD : A_NORMAL);
+ m_canvas->set_default_attributes(itr == m_element->selected() ? is_focused() ? COLOR_PAIR(3) : A_NORMAL : A_NORMAL);
if (itr.is_empty()) {
- m_canvas->print(0, pos, "%*c%-*s", 16, ' ', filenameWidth, "EMPTY");
+ m_canvas->print(0, pos, "%*c%-*s", 18, ' ', filenameWidth, "empty");
} else if (itr.is_entering()) {
- m_canvas->print(0, pos, "%*c %ls", 16 + itr.depth(), '\\',
- itr.depth() < (*itr)->path()->size() ? wstring_width((*itr)->path()->at(itr.depth()), filenameWidth - itr.depth() - 1).c_str() : L"UNKNOWN");
+ m_canvas->print(0, pos, "%*c %ls", 18 + itr.depth(), '\\',
+ itr.depth() < (*itr)->path()->size() ? wstring_width((*itr)->path()->at(itr.depth()), filenameWidth - itr.depth() - 1).c_str() : L"unknown");
} else if (itr.is_leaving()) {
- m_canvas->print(0, pos, "%*c %-*s", 16 + (itr.depth() - 1), '/', filenameWidth - (itr.depth() - 1), "");
+ m_canvas->print(0, pos, "%*c %-*s", 18 + (itr.depth() - 1), '/', filenameWidth - (itr.depth() - 1), "");
} else if (itr.is_file()) {
torrent::File* e = *itr;
@@ -185,7 +185,7 @@ WindowFileList::redraw() {
case torrent::PRIORITY_OFF: priority = "off"; break;
case torrent::PRIORITY_NORMAL: priority = " "; break;
case torrent::PRIORITY_HIGH: priority = "hig"; break;
- default: priority = "BUG"; break;
+ default: priority = "bug"; break;
};
m_canvas->print(0, pos, "%3d %s ", done_percentage(e), priority);
@@ -193,19 +193,19 @@ WindowFileList::redraw() {
int64_t val = e->size_bytes();
if (val < (int64_t(1000) << 10))
- m_canvas->print(8, pos, "%5.1f K", (double)val / (int64_t(1) << 10));
+ m_canvas->print(8, pos, " %5.1f k ", (double)val / (int64_t(1) << 10));
else if (val < (int64_t(1000) << 20))
- m_canvas->print(8, pos, "%5.1f M", (double)val / (int64_t(1) << 20));
+ m_canvas->print(8, pos, " %5.1f m ", (double)val / (int64_t(1) << 20));
else if (val < (int64_t(1000) << 30))
- m_canvas->print(8, pos, "%5.1f G", (double)val / (int64_t(1) << 30));
+ m_canvas->print(8, pos, " %5.1f g ", (double)val / (int64_t(1) << 30));
else
- m_canvas->print(8, pos, "%5.1f T", (double)val / (int64_t(1) << 40));
+ m_canvas->print(8, pos, " %5.1f t ", (double)val / (int64_t(1) << 40));
- m_canvas->print(15, pos, "%*c %ls", 1 + itr.depth(), '|',
- itr.depth() < (*itr)->path()->size() ? wstring_width((*itr)->path()->at(itr.depth()), filenameWidth - itr.depth() - 1).c_str() : L"UNKNOWN");
+ m_canvas->print(17, pos, "%*c %ls", 1 + itr.depth(), '|',
+ itr.depth() < (*itr)->path()->size() ? wstring_width((*itr)->path()->at(itr.depth()), filenameWidth - itr.depth() - 1).c_str() : L"unknown");
} else {
- m_canvas->print(0, pos, "BORK BORK");
+ m_canvas->print(0, pos, "bork bork");
}
m_canvas->set_default_attributes(A_NORMAL);
diff -rupN src/display/window_http_queue.cc src-custom/display/window_http_queue.cc
--- src/display/window_http_queue.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/window_http_queue.cc 2013-06-06 01:54:59.328119043 +0530
@@ -70,7 +70,7 @@ WindowHttpQueue::redraw() {
}
m_canvas->erase();
- m_canvas->print(0, 0, "Http [%i]", m_queue->size());
+ m_canvas->print(0, 0, "http [%i]", m_queue->size());
unsigned int pos = 10;
Container::iterator itr = m_container.begin();
diff -rupN src/display/window_input.cc src-custom/display/window_input.cc
--- src/display/window_input.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/window_input.cc 2013-06-06 01:54:59.338119016 +0530
@@ -49,7 +49,7 @@ WindowInput::redraw() {
m_canvas->print(0, 0, "%s> %s", m_title.c_str(), m_input != NULL ? m_input->c_str() : "<NULL>");
if (m_focus)
- m_canvas->set_attr(m_input->get_pos() + 2 + m_title.size(), 0, 1, A_REVERSE, COLOR_PAIR(0));
+ m_canvas->set_attr(m_input->get_pos() + 2 + m_title.size(), 0, 1, A_BOLD, 3);
}
}
diff -rupN src/display/window_peer_list.cc src-custom/display/window_peer_list.cc
--- src/display/window_peer_list.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/window_peer_list.cc 2013-06-06 01:54:59.334785692 +0530
@@ -68,16 +68,16 @@ WindowPeerList::redraw() {
int x = 2;
int y = 0;
- m_canvas->print(x, y, "IP"); x += 16;
- m_canvas->print(x, y, "UP"); x += 7;
- m_canvas->print(x, y, "DOWN"); x += 7;
- m_canvas->print(x, y, "PEER"); x += 7;
- m_canvas->print(x, y, "CT/RE/LO"); x += 10;
- m_canvas->print(x, y, "QS"); x += 6;
- m_canvas->print(x, y, "DONE"); x += 6;
- m_canvas->print(x, y, "REQ"); x += 6;
- m_canvas->print(x, y, "SNUB"); x += 6;
- m_canvas->print(x, y, "FAILED");
+ m_canvas->print(x, y, "ip"); x += 16;
+ m_canvas->print(x, y, "up"); x += 7;
+ m_canvas->print(x, y, "down"); x += 7;
+ m_canvas->print(x, y, "peer"); x += 7;
+ m_canvas->print(x, y, "ct/re/lo"); x += 10;
+ m_canvas->print(x, y, "qs"); x += 6;
+ m_canvas->print(x, y, "done"); x += 6;
+ m_canvas->print(x, y, "req"); x += 6;
+ m_canvas->print(x, y, "snub"); x += 6;
+ m_canvas->print(x, y, "failed");
++y;
diff -rupN src/display/window_title.cc src-custom/display/window_title.cc
--- src/display/window_title.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/display/window_title.cc 2013-06-06 01:54:59.338119016 +0530
@@ -47,7 +47,9 @@ WindowTitle::redraw() {
m_canvas->erase();
m_canvas->print(std::max(0, ((int)m_canvas->width() - (int)m_title.size()) / 2 - 4), 0,
- "*** %s ***", m_title.c_str());
+ "--- %s ---", m_title.c_str());
+ m_canvas->set_attr((((int)m_canvas->width() - (int)m_title.size()) / 2 - 4), 0, 3, A_BOLD, 1);
+ m_canvas->set_attr(((((int)m_canvas->width() - (int)m_title.size()) / 2) + (int)m_title.size() + 1), 0, 3, A_BOLD, 1);
}
}
diff -rupN src/display/window_tracker_list.cc src-custom/display/window_tracker_list.cc
--- src/display/window_tracker_list.cc 2012-04-10 18:16:51.000000000 +0530
+++ src-custom/display/window_tracker_list.cc 2013-06-06 01:54:59.331452368 +0530
@@ -65,7 +65,7 @@ WindowTrackerList::redraw() {
torrent::TrackerList* tl = m_download->tracker_list();
torrent::TrackerController* tc = m_download->tracker_controller();
- m_canvas->print(2, pos, "Trackers: [Key: %08x] [%s %s %s]",
+ m_canvas->print(2, pos, "trackers: [key: %08x] [%s %s %s]",
tl->key(),
tc->is_requesting() ? "req" : " ",
tc->is_promiscuous_mode() ? "prom" : " ",
@@ -99,7 +99,7 @@ WindowTrackerList::redraw() {
else
state = " ";
- m_canvas->print(0, pos++, "%s Id: %s Counters: %uf / %us (%u) %s S/L/D: %u/%u/%u (%u/%u)",
+ m_canvas->print(0, pos++, "%s id: %s counters: %uf / %us (%u) %s s/l/d: %u/%u/%u (%u/%u)",
state,
rak::copy_escape_html(tracker->tracker_id()).c_str(),
tracker->failed_counter(),
@@ -114,13 +114,13 @@ WindowTrackerList::redraw() {
}
if (range.first == *m_focus) {
- m_canvas->set_attr(4, pos - 2, m_canvas->width(), is_focused() ? A_REVERSE : A_BOLD, COLOR_PAIR(0));
- m_canvas->set_attr(4, pos - 1, m_canvas->width(), is_focused() ? A_REVERSE : A_BOLD, COLOR_PAIR(0));
+ m_canvas->set_attr(4, pos - 2, m_canvas->width(), is_focused() ? A_BOLD : A_NORMAL, 3);
+ m_canvas->set_attr(4, pos - 1, m_canvas->width(), is_focused() ? A_BOLD : A_NORMAL, 3);
}
if (tracker->is_busy()) {
- m_canvas->set_attr(0, pos - 2, 4, A_REVERSE, COLOR_PAIR(0));
- m_canvas->set_attr(0, pos - 1, 4, A_REVERSE, COLOR_PAIR(0));
+ m_canvas->set_attr(0, pos - 2, 4, A_BOLD, 2);
+ m_canvas->set_attr(0, pos - 1, 4, A_BOLD, 2);
}
range.first++;
diff -rupN src/ui/download.cc src-custom/ui/download.cc
--- src/ui/download.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/ui/download.cc 2013-06-06 01:54:59.404785502 +0530
@@ -109,22 +109,22 @@ inline ElementBase*
Download::create_menu() {
ElementMenu* element = new ElementMenu;
- element->push_back("Peer list",
+ element->push_back("peer list",
sigc::bind(sigc::mem_fun(this, &Download::activate_display_focus), DISPLAY_PEER_LIST),
sigc::bind(sigc::mem_fun(this, &Download::activate_display_menu), DISPLAY_PEER_LIST));
- element->push_back("Info",
+ element->push_back("info",
sigc::bind(sigc::mem_fun(this, &Download::activate_display_focus), DISPLAY_INFO),
sigc::bind(sigc::mem_fun(this, &Download::activate_display_menu), DISPLAY_INFO));
- element->push_back("File list",
+ element->push_back("file list",
sigc::bind(sigc::mem_fun(this, &Download::activate_display_focus), DISPLAY_FILE_LIST),
sigc::bind(sigc::mem_fun(this, &Download::activate_display_menu), DISPLAY_FILE_LIST));
- element->push_back("Tracker list",
+ element->push_back("tracker list",
sigc::bind(sigc::mem_fun(this, &Download::activate_display_focus), DISPLAY_TRACKER_LIST),
sigc::bind(sigc::mem_fun(this, &Download::activate_display_menu), DISPLAY_TRACKER_LIST));
- element->push_back("Chunks seen",
+ element->push_back("chunks seen",
sigc::bind(sigc::mem_fun(this, &Download::activate_display_focus), DISPLAY_CHUNKS_SEEN),
sigc::bind(sigc::mem_fun(this, &Download::activate_display_menu), DISPLAY_CHUNKS_SEEN));
- element->push_back("Transfer list",
+ element->push_back("transfer list",
sigc::bind(sigc::mem_fun(this, &Download::activate_display_focus), DISPLAY_TRANSFER_LIST),
sigc::bind(sigc::mem_fun(this, &Download::activate_display_menu), DISPLAY_TRANSFER_LIST));
@@ -149,41 +149,41 @@ Download::create_info() {
// Get these bindings with some kind of string map.
- element->push_column("Name:", te_command("d.name="));
- element->push_column("Local id:", te_command("d.local_id_html="));
- element->push_column("Info hash:", te_command("d.hash="));
- element->push_column("Created:", te_command("cat=$convert.date=$d.creation_date=,\" \",$convert.time=$d.creation_date="));
+ element->push_column("name:", te_command("d.name="));
+ element->push_column("local id:", te_command("d.local_id_html="));
+ element->push_column("info hash:", te_command("d.hash="));
+ element->push_column("created:", te_command("cat=$convert.date=$d.creation_date=,\" \",$convert.time=$d.creation_date="));
element->push_back("");
- element->push_column("Directory:", te_command("d.directory="));
- element->push_column("Base Path:", te_command("d.base_path="));
- element->push_column("Tied to file:", te_command("d.tied_to_file="));
- element->push_column("File stats:", te_command("cat=$if=$d.is_multi_file=\\,multi\\,single,\" \",$d.size_files=,\" files\""));
+ element->push_column("directory:", te_command("d.directory="));
+ element->push_column("base Path:", te_command("d.base_path="));
+ element->push_column("tied to file:", te_command("d.tied_to_file="));
+ element->push_column("file stats:", te_command("cat=$if=$d.is_multi_file=\\,multi\\,single,\" \",$d.size_files=,\" files\""));
element->push_back("");
- element->push_column("Chunks:", te_command("cat=(d.completed_chunks),\" / \",(d.size_chunks),\" * \",(d.chunk_size),\" (\",(d.wanted_chunks),\")\""));
- element->push_column("Priority:", te_command("d.priority="));
- element->push_column("Peer exchange:", te_command("cat=$if=$d.peer_exchange=\\,enabled\\,disabled,\\ ,"
+ element->push_column("chunks:", te_command("cat=(d.completed_chunks),\" / \",(d.size_chunks),\" * \",(d.chunk_size),\" (\",(d.wanted_chunks),\")\""));
+ element->push_column("priority:", te_command("d.priority="));
+ element->push_column("peer exchange:", te_command("cat=$if=$d.peer_exchange=\\,enabled\\,disabled,\\ ,"
"$if=$d.is_pex_active=\\,active\\,$d.is_private=\\,private\\,inactive,"
"\\ (,$d.size_pex=,/,$d.max_size_pex=,)"));
- element->push_column("State changed:", te_command("convert.elapsed_time=$d.state_changed="));
+ element->push_column("state changed:", te_command("convert.elapsed_time=$d.state_changed="));
element->push_back("");
- element->push_column("Memory usage:", te_command("cat=$convert.mb=$pieces.memory.current=,\" MB\""));
- element->push_column("Max memory usage:", te_command("cat=$convert.mb=$pieces.memory.max=,\" MB\""));
- element->push_column("Free diskspace:", te_command("cat=$convert.mb=$d.free_diskspace=,\" MB\""));
- element->push_column("Safe diskspace:", te_command("cat=$convert.mb=$pieces.sync.safe_free_diskspace=,\" MB\""));
+ element->push_column("memory usage:", te_command("cat=$convert.mb=$pieces.memory.current=,\" MB\""));
+ element->push_column("max memory usage:", te_command("cat=$convert.mb=$pieces.memory.max=,\" MB\""));
+ element->push_column("free diskspace:", te_command("cat=$convert.mb=$d.free_diskspace=,\" MB\""));
+ element->push_column("safe diskspace:", te_command("cat=$convert.mb=$pieces.sync.safe_free_diskspace=,\" MB\""));
element->push_back("");
- element->push_column("Connection type:", te_command("cat=(d.connection_current),\" \",(if,(d.accepting_seeders),"",\"no_seeders\")"));
- element->push_column("Choke heuristic:", te_command("cat=(d.up.choke_heuristics),\", \",(d.down.choke_heuristics),\", \",(d.group)"));
- element->push_column("Safe sync:", te_command("if=$pieces.sync.always_safe=,yes,no"));
- element->push_column("Send buffer:", te_command("cat=$convert.kb=$network.send_buffer.size=,\" KB\""));
- element->push_column("Receive buffer:", te_command("cat=$convert.kb=$network.receive_buffer.size=,\" KB\""));
+ element->push_column("connection type:", te_command("cat=(d.connection_current),\" \",(if,(d.accepting_seeders),"",\"no_seeders\")"));
+ element->push_column("choke heuristic:", te_command("cat=(d.up.choke_heuristics),\", \",(d.down.choke_heuristics),\", \",(d.group)"));
+ element->push_column("safe sync:", te_command("if=$pieces.sync.always_safe=,yes,no"));
+ element->push_column("send buffer:", te_command("cat=$convert.kb=$network.send_buffer.size=,\" KB\""));
+ element->push_column("receive buffer:", te_command("cat=$convert.kb=$network.receive_buffer.size=,\" KB\""));
// TODO: Define a custom command for this and use $argument.0 instead of looking up the name multiple times?
- element->push_column("Throttle:", te_command("branch=d.throttle_name=,\""
+ element->push_column("throttle:", te_command("branch=d.throttle_name=,\""
"cat=$d.throttle_name=,\\\" [Max \\\","
"$convert.throttle=$throttle.up.max=$d.throttle_name=,\\\"/\\\","
"$convert.throttle=$throttle.down.max=$d.throttle_name=,\\\" KB] [Rate \\\","
@@ -192,10 +192,10 @@ Download::create_info() {
"cat=\"global\""));
element->push_back("");
- element->push_column("Upload:", te_command("cat=$convert.kb=$d.up.rate=,\" KB / \",$convert.xb=$d.up.total="));
- element->push_column("Download:", te_command("cat=$convert.kb=$d.down.rate=,\" KB / \",$convert.xb=$d.down.total="));
- element->push_column("Skipped:", te_command("cat=$convert.kb=$d.skip.rate=,\" KB / \",$convert.xb=$d.skip.total="));
- element->push_column("Preload:", te_command("cat=$pieces.preload.type=,\" / \",$pieces.stats_preloaded=,\" / \",$pieces.stats_preloaded="));
+ element->push_column("upload:", te_command("cat=$convert.kb=$d.up.rate=,\" KB / \",$convert.xb=$d.up.total="));
+ element->push_column("download:", te_command("cat=$convert.kb=$d.down.rate=,\" KB / \",$convert.xb=$d.down.total="));
+ element->push_column("skipped:", te_command("cat=$convert.kb=$d.skip.rate=,\" KB / \",$convert.xb=$d.skip.total="));
+ element->push_column("preload:", te_command("cat=$pieces.preload.type=,\" / \",$pieces.stats_preloaded=,\" / \",$pieces.stats_preloaded="));
element->set_column_width(element->column_width() + 1);
diff -rupN src/ui/download_list.cc src-custom/ui/download_list.cc
--- src/ui/download_list.cc 2012-03-13 17:40:49.000000000 +0530
+++ src-custom/ui/download_list.cc 2013-06-06 01:54:59.404785502 +0530
@@ -221,12 +221,12 @@ DownloadList::activate_display(Display d
// Set title.
switch (displayType) {
case DISPLAY_DOWNLOAD_LIST:
- control->ui()->window_title()->set_title("rTorrent " VERSION "/" +
+ control->ui()->window_title()->set_title("rtorrent-custom " VERSION "/" +
std::string(torrent::version()) + " - " +
rpc::call_command_string("session.name"));
break;
case DISPLAY_LOG:
- control->ui()->window_title()->set_title("Log");
+ control->ui()->window_title()->set_title("log");
break;
default: break;
}
diff -rupN src/ui/element_download_list.cc src-custom/ui/element_download_list.cc
--- src/ui/element_download_list.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/ui/element_download_list.cc 2013-06-06 01:54:59.404785502 +0530
@@ -59,7 +59,7 @@ ElementDownloadList::ElementDownloadList
m_window(NULL),
m_view(NULL) {
- receive_change_view("main");
+ receive_change_view("name");
if (m_view == NULL)
throw torrent::internal_error("View \"main\" must be present to initialize the main display.");
@@ -153,7 +153,7 @@ ElementDownloadList::receive_command(con
m_view->set_last_changed();
} catch (torrent::input_error& e) {
- lt_log_print(torrent::LOG_WARN, "Command failed: %s", e.what());
+ lt_log_print(torrent::LOG_WARN, "command failed: %s", e.what());
return;
}
}
diff -rupN src/ui/element_file_list.cc src-custom/ui/element_file_list.cc
--- src/ui/element_file_list.cc 2012-01-19 15:48:01.000000000 +0530
+++ src-custom/ui/element_file_list.cc 2013-06-06 01:54:59.408118826 +0530
@@ -86,19 +86,19 @@ element_file_list_create_info() {
element->set_column(1);
element->set_interval(1);
- element->push_back("File info:");
+ element->push_back("file info:");
element->push_back("");
- element->push_column("Filename:", te_command("fi.filename_last="));
+ element->push_column("filename:", te_command("fi.filename_last="));
element->push_back("");
- element->push_column("Size:", te_command("if=$fi.is_file=,$convert.xb=$f.size_bytes=,---"));
- element->push_column("Chunks:", te_command("cat=$f.completed_chunks=,\" / \",$f.size_chunks="));
- element->push_column("Range:", te_command("cat=$f.range_first=,\" - \",$f.range_second="));
+ element->push_column("size:", te_command("if=$fi.is_file=,$convert.xb=$f.size_bytes=,---"));
+ element->push_column("chunks:", te_command("cat=$f.completed_chunks=,\" / \",$f.size_chunks="));
+ element->push_column("range:", te_command("cat=$f.range_first=,\" - \",$f.range_second="));
element->push_back("");
- element->push_column("Queued:", te_command("cat=\"$if=$f.is_create_queued=,create\",\" \",\"$if=$f.is_resize_queued=,resize\""));
- element->push_column("Prioritize:", te_command("cat=\"$if=$f.prioritize_first=,first\",\" \",\"$if=$f.prioritize_last=,last\""));
+ element->push_column("queued:", te_command("cat=\"$if=$f.is_create_queued=,create\",\" \",\"$if=$f.is_resize_queued=,resize\""));
+ element->push_column("prioritize:", te_command("cat=\"$if=$f.prioritize_first=,first\",\" \",\"$if=$f.prioritize_last=,last\""));
element->set_column_width(element->column_width() + 1);
diff -rupN src/ui/element_peer_list.cc src-custom/ui/element_peer_list.cc
--- src/ui/element_peer_list.cc 2012-04-09 12:09:14.000000000 +0530
+++ src-custom/ui/element_peer_list.cc 2013-06-06 01:54:59.404785502 +0530
@@ -106,24 +106,24 @@ ElementPeerList::create_info() {
element->set_column(1);
element->set_interval(1);
- element->push_back("Peer info:");
+ element->push_back("peer info:");
element->push_back("");
- element->push_column("Address:", te_command("cat=$p.address=,:,$p.port="));
- element->push_column("Id:", te_command("p.id_html="));
- element->push_column("Client:", te_command("p.client_version="));
- element->push_column("Options:", te_command("p.options_str="));
- element->push_column("Connected:", te_command("if=$p.is_incoming=,incoming,outgoing"));
- element->push_column("Encrypted:", te_command("if=$p.is_encrypted=,yes,$p.is_obfuscated=,handshake,no"));
+ element->push_column("address:", te_command("cat=$p.address=,:,$p.port="));
+ element->push_column("id:", te_command("p.id_html="));
+ element->push_column("client:", te_command("p.client_version="));
+ element->push_column("options:", te_command("p.options_str="));
+ element->push_column("connected:", te_command("if=$p.is_incoming=,incoming,outgoing"));
+ element->push_column("encrypted:", te_command("if=$p.is_encrypted=,yes,$p.is_obfuscated=,handshake,no"));
element->push_back("");
- element->push_column("Snubbed:", te_command("if=$p.is_snubbed=,yes,no"));
- element->push_column("Done:", te_command("p.completed_percent="));
- element->push_column("Rate:", te_command("cat=$convert.kb=$p.up_rate=,\\ KB\\ ,$convert.kb=$p.down_rate=,\\ KB"));
- element->push_column("Total:", te_command("cat=$convert.kb=$p.up_total=,\\ KB\\ ,$convert.kb=$p.down_total=,\\ KB"));
+ element->push_column("snubbed:", te_command("if=$p.is_snubbed=,yes,no"));
+ element->push_column("done:", te_command("p.completed_percent="));
+ element->push_column("rate:", te_command("cat=$convert.kb=$p.up_rate=,\\ KB\\ ,$convert.kb=$p.down_rate=,\\ KB"));
+ element->push_column("total:", te_command("cat=$convert.kb=$p.up_total=,\\ KB\\ ,$convert.kb=$p.down_total=,\\ KB"));
element->set_column_width(element->column_width() + 1);
- element->set_error_handler(new display::TextElementCString("No peer selected."));
+ element->set_error_handler(new display::TextElementCString("no peer selected."));
return element;
}
enjoy !!
"First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack." ~ George Carrette
Offline
Interesting, i'm going to try it. Thnxs.
"Yo creo que los muertos son tiernos. ¿Nos besamos?"
Offline
Offline
Pages: 1