diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-02 01:37:46 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-02 01:37:46 +0300 |
commit | 20fe45cad49f46bdfad5fc934d3c4ff9cddb26ce (patch) | |
tree | c6b3d07e7e548add05dae9bcc5447a52f1a9b206 /options.cpp | |
parent | 9cbe3dd56ad06a2bd4ea3cff53c1c484d51e69ea (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); |