Dropped checkboxImageList. This is the first of a multi-part commit stream becasue when I tried doing it alll at once the program broke in utterly mysterious ways.
This commit is contained in:
parent
3b5e8f5e7d
commit
fe01ebbbcd
|
@ -260,16 +260,14 @@ static HIMAGELIST newCheckboxImageList(HWND hwnddc, void (*sizefunc)(HDC, int *,
|
|||
return il;
|
||||
}
|
||||
|
||||
HIMAGELIST checkboxImageList = NULL;
|
||||
|
||||
void makeCheckboxImageList(HWND hwnddc)
|
||||
HIMAGELIST makeCheckboxImageList(HWND hwnddc)
|
||||
{
|
||||
if (theme == NULL) // try to open the theme
|
||||
openTheme(hwnddc);
|
||||
if (theme != NULL) { // use the theme
|
||||
checkboxImageList = newCheckboxImageList(hwnddc, themeSize, themeImage);
|
||||
return newCheckboxImageList(hwnddc, themeSize, themeImage);
|
||||
return;
|
||||
}
|
||||
// couldn't open; fall back
|
||||
checkboxImageList = newCheckboxImageList(hwnddc, dfcSize, dfcImage);
|
||||
return newCheckboxImageList(hwnddc, dfcSize, dfcImage);
|
||||
}
|
||||
|
|
|
@ -139,6 +139,9 @@ void tableAutosizeColumns(HWND hwnd, int nColumns)
|
|||
|
||||
void tableSetCheckboxImageList(HWND hwnd)
|
||||
{
|
||||
HIMAGELIST checkboxImageList;
|
||||
|
||||
checkboxImageList = makeCheckboxImageList(hwnd);
|
||||
if (SendMessageW(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM) checkboxImageList) == (LRESULT) NULL)
|
||||
;//TODO xpanic("error setting image list", GetLastError());
|
||||
// TODO free old one here if any/different
|
||||
|
|
|
@ -133,11 +133,6 @@ static LRESULT CALLBACK msgwinproc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
|||
if (sharedWndProc(hwnd, uMsg, wParam, lParam, &shared))
|
||||
return shared;
|
||||
switch (uMsg) {
|
||||
case WM_CREATE:
|
||||
// initial
|
||||
makeCheckboxImageList(hwnd);
|
||||
return 0;
|
||||
// TODO respond to WM_THEMECHANGED
|
||||
case msgRequest:
|
||||
// in modal?
|
||||
if (!queueIfModal((void *) lParam))
|
||||
|
|
|
@ -144,8 +144,7 @@ enum {
|
|||
checkboxStatePushed = 1 << 2,
|
||||
checkboxnStates = 1 << 3,
|
||||
};
|
||||
extern HIMAGELIST checkboxImageList;
|
||||
extern void makeCheckboxImageList(HWND);
|
||||
extern HIMAGELIST makeCheckboxImageList(HWND);
|
||||
|
||||
// dialog_windows.c
|
||||
extern WCHAR *openFile(void);
|
||||
|
|
Loading…
Reference in New Issue