made the interface more space efficient

This commit is contained in:
Arvid Norberg
2006-12-05 23:41:13 +00:00
parent e49934f236
commit ddfadaf6e4

View File

@@ -815,10 +815,19 @@ int main(int ac, char* av[])
++i; ++i;
} }
out << "name: " << esc("37"); out << "* " << esc("37") << std::setw(40)
if (h.has_metadata()) out << h.get_torrent_info().name(); << std::setiosflags(std::ios::left);
else out << "-"; if (h.has_metadata())
out << esc("0") << "\n"; {
std::string name = h.get_torrent_info().name();
if (name.size() > 40) name.resize(40);
out << name;
}
else
{
out << "-";
}
out << esc("0") << " ";
torrent_status s = h.status(); torrent_status s = h.status();
if (s.state != torrent_status::seeding) if (s.state != torrent_status::seeding)