| 185 | } |
| 186 | |
| 187 | void PluginListView::initColumns(void) |
| 188 | { |
| 189 | |
| 190 | |
| 191 | LVCOLUMN col; |
| 192 | col.mask = LVCF_TEXT | LVCF_FMT | LVCF_WIDTH; |
| 193 | col.fmt = LVCFMT_LEFT; |
| 194 | col.iSubItem = 0; |
| 195 | col.cx = 250; |
| 196 | col.pszText = _T("Plugin"); |
| 197 | ListView_InsertColumn(_hListView, 0, &col); |
| 198 | |
| 199 | col.iSubItem = 1; |
| 200 | col.pszText = _T("Category"); |
| 201 | col.cx = 60; |
| 202 | ListView_InsertColumn(_hListView, 1, &col); |
| 203 | |
| 204 | col.fmt = LVCFMT_RIGHT; |
| 205 | int columnOffset = 2; |
| 206 | |
| 207 | for(int index = 0; index < _nVersionColumns; index++) |
| 208 | { |
| 209 | col.iSubItem = index + columnOffset; |
| 210 | col.cx = 110; |
| 211 | switch(_columns[index]) |
| 212 | { |
| 213 | case VERSION_INSTALLED: |
| 214 | col.pszText = _T("Installed Version"); |
| 215 | break; |
| 216 | |
| 217 | case VERSION_AVAILABLE: |
| 218 | col.pszText = _T("Available Version"); |
| 219 | break; |
| 220 | } |
| 221 | |
| 222 | ListView_InsertColumn(_hListView, index + columnOffset, &col); |
| 223 | } |
| 224 | |
| 225 | col.iSubItem = _nVersionColumns + columnOffset; |
| 226 | col.cx = 70; |
| 227 | col.fmt = 0; |
| 228 | col.pszText = _T("Stability"); |
| 229 | ListView_InsertColumn(_hListView, col.iSubItem, &col); |
| 230 | |
| 231 | ListView_SetExtendedListViewStyle(_hListView, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES); |
| 232 | |
| 233 | } |
| 234 | |
| 235 | void PluginListView::setList(PluginListContainer &list) |
| 236 | { |
nothing calls this directly
no outgoing calls
no test coverage detected