| 268 | |
| 269 | |
| 270 | void CSearchListCtrl::UpdateResult(CSearchFile* toupdate) |
| 271 | { |
| 272 | long index = FindItem(-1, reinterpret_cast<wxUIntPtr>(toupdate)); |
| 273 | if (index != -1) { |
| 274 | // Update the filename, which may be changed in case of multiple variants. |
| 275 | SetItem(index, ID_SEARCH_COL_NAME, toupdate->GetFileName().GetPrintable()); |
| 276 | |
| 277 | wxString temp = CFormat("%d") % toupdate->GetSourceCount(); |
| 278 | if (toupdate->GetCompleteSourceCount()) { |
| 279 | temp += CFormat(" (%d)") % toupdate->GetCompleteSourceCount(); |
| 280 | } |
| 281 | if (toupdate->GetClientsCount()) { |
| 282 | temp += CFormat(" [%d]") % toupdate->GetClientsCount(); |
| 283 | } |
| 284 | #if defined(__DEBUG__) && !defined(CLIENT_GUI) |
| 285 | if (toupdate->GetKadPublishInfo() == 0) { |
| 286 | temp += " | -"; |
| 287 | } else { |
| 288 | temp += CFormat(" | N:%u, P:%u, T:%0.2f") |
| 289 | % ((toupdate->GetKadPublishInfo() & 0xFF000000) >> 24) |
| 290 | % ((toupdate->GetKadPublishInfo() & 0x00FF0000) >> 16) |
| 291 | % ((toupdate->GetKadPublishInfo() & 0x0000FFFF) / 100.0); |
| 292 | } |
| 293 | #endif |
| 294 | SetItem(index, ID_SEARCH_COL_SOURCES, temp); |
| 295 | |
| 296 | SetItem(index, ID_SEARCH_COL_STATUS, DetermineStatusPrintable(toupdate)); |
| 297 | |
| 298 | UpdateItemColor(index); |
| 299 | |
| 300 | // Deletions of items causes rather large amount of flicker, so to |
| 301 | // avoid this, we resort the list to ensure correct ordering. |
| 302 | if (!IsItemSorted(index)) { |
| 303 | SortList(); |
| 304 | } |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | |
| 309 | void CSearchListCtrl::UpdateItemColor(long index) |
nothing calls this directly
no test coverage detected