| 384 | } |
| 385 | |
| 386 | int CALLBACK PluginListView::stringComparer(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) |
| 387 | { |
| 388 | const TCHAR *text1; |
| 389 | const TCHAR *text2; |
| 390 | |
| 391 | switch(static_cast<LVSORTCOLUMN>(lParamSort)) |
| 392 | { |
| 393 | case LVSORTCOLUMN_NAME: |
| 394 | text1 = reinterpret_cast<Plugin*>(lParam1)->getName().c_str(); |
| 395 | text2 = reinterpret_cast<Plugin*>(lParam2)->getName().c_str(); |
| 396 | break; |
| 397 | |
| 398 | case LVSORTCOLUMN_STABILITY: |
| 399 | text1 = reinterpret_cast<Plugin*>(lParam1)->getStability().c_str(); |
| 400 | text2 = reinterpret_cast<Plugin*>(lParam2)->getStability().c_str(); |
| 401 | break; |
| 402 | |
| 403 | case LVSORTCOLUMN_CATEGORY: |
| 404 | text1 = reinterpret_cast<Plugin*>(lParam1)->getCategory().c_str(); |
| 405 | text2 = reinterpret_cast<Plugin*>(lParam2)->getCategory().c_str(); |
| 406 | break; |
| 407 | |
| 408 | default: |
| 409 | text1 = _T(""); |
| 410 | text2 = _T(""); |
| 411 | break; |
| 412 | } |
| 413 | |
| 414 | |
| 415 | return _tcsicmp(text1, text2); |
| 416 | } |
| 417 | |
| 418 | |
| 419 | int CALLBACK PluginListView::versionComparer(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) |