diff options
Diffstat (limited to 'options.cpp')
-rw-r--r-- | options.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/options.cpp b/options.cpp index 740cd8b..4390e49 100644 --- a/options.cpp +++ b/options.cpp @@ -162,7 +162,7 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ListView_SetItemText(hwndList, iRow, 3, (_tcslen(tmp) > 1)?tmp:_T("not set")); mir_free(tmp); if(DBGetContactSettingByte(hContact, szGPGModuleName, "GPGEncryption", 0)) - ListView_SetItemState(hwndList, iRow, 0x2000, 0xF000); + ListView_SetCheckState(hwndList, iRow, 1); user_data[i] = hContact; ZeroMemory(&item,sizeof(item)); ListView_SetColumnWidth(hwndList, 0, LVSCW_AUTOSIZE);// not sure about this @@ -368,11 +368,13 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA { if(hdr->hdr.code == NM_CLICK) { + item_num = hdr->iItem; + } + else if(hdr->hdr.code == LVN_ITEMCHANGED) + { void setClistIcon(HANDLE hContact); void setSrmmIcon(HANDLE hContact); - item_num = hdr->iItem; - int i123 = ListView_GetItemState(hwndList, item_num, 0xF000); - if(ListView_GetItemState(hwndList, item_num, 0xF000) != 0x2000) + if(ListView_GetCheckState(hwndList, item_num)) DBWriteContactSettingByte(user_data[item_num+1], szGPGModuleName, "GPGEncryption", 1); else DBWriteContactSettingByte(user_data[item_num+1], szGPGModuleName, "GPGEncryption", 0); |