- Display the maximum number of connections per torrents only when it is enabled (torrent properties)

This commit is contained in:
Christophe Dumez 2009-11-26 13:52:05 +00:00
parent ce31bef2cf
commit 77ded75613

View file

@ -315,7 +315,10 @@ void PropertiesWidget::loadDynamicData() {
elapsed_txt += " ("+tr("Seeded for %1", "e.g. Seeded for 3m10s").arg(misc::userFriendlyDuration(h.seeding_time()))+")"; elapsed_txt += " ("+tr("Seeded for %1", "e.g. Seeded for 3m10s").arg(misc::userFriendlyDuration(h.seeding_time()))+")";
} }
lbl_elapsed->setText(elapsed_txt); lbl_elapsed->setText(elapsed_txt);
lbl_connections->setText(QString::number(h.num_connections())+" ("+tr("%1 max", "e.g. 10 max").arg(QString::number(h.connections_limit()))+")"); if(h.connections_limit() > 0)
lbl_connections->setText(QString::number(h.num_connections())+" ("+tr("%1 max", "e.g. 10 max").arg(QString::number(h.connections_limit()))+")");
else
lbl_connections->setText(QString::number(h.num_connections()));
// Update ratio info // Update ratio info
float ratio; float ratio;
if(h.total_payload_download() == 0){ if(h.total_payload_download() == 0){