Changeset 1460
- Timestamp:
- 07/12/05 12:32:23 (3 years ago)
- Files:
-
- hydranode/modules/hnsh/shellcommands.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hydranode/modules/hnsh/shellcommands.cpp
r1456 r1460 466 466 PartData *pd = (*i)->getPartData(); 467 467 m_downloads.push_back(pd); 468 helperPrintDownload(m_downloads.size() - 1, pd);469 468 470 469 completed.push_back(pd->getCompleted()); … … 475 474 if (!m_downloads.size()) { 476 475 return true; 476 } 477 478 std::sort( 479 m_downloads.begin(), m_downloads.end(), 480 boost::bind( 481 std::less<std::string>(), 482 bind(&PartData::getName, _1), 483 bind(&PartData::getName, _2) 484 ) 485 ); 486 487 for (uint32_t num = 0; num < m_downloads.size(); ++num) { 488 helperPrintDownload(num, m_downloads[num]); 477 489 } 478 490 … … 916 928 } 917 929 } 918 boost::format fmt("%3d) %s %5.2f%% %9s %4s %s"); 930 931 boost::format fmt("%3d) %s %6.2f%% %9s %4s %s"); 919 932 fmt % num % buf % perc % Utils::bytesToString(pd->getSize()); 920 933 fmt % pd->getSourceCnt(); 921 934 std::string filename = pd->getDestination().leaf(); 922 if (filename.size() > m_parent->getWidth() - 4 5u) {923 std::string beg = filename.substr(0, m_parent->getWidth() - 49);935 if (filename.size() > m_parent->getWidth() - 44u) { 936 std::string beg = filename.substr(0,m_parent->getWidth() - 50); 924 937 std::string end = filename.substr(filename.size() - 4); 925 938 filename = beg + "[...]" + end;
