summaryrefslogtreecommitdiff
path: root/options.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-07 17:47:54 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-07 17:47:54 +0300
commit9041e1e89514d7a1a1df7620b7fdf974a4abac1e (patch)
tree983d5f816368dfbe6245ba473f21e61a077fb8aa /options.cpp
parentd0ad03493f626bebe46f7e17ba5bda4433f83687 (diff)
userlist
Diffstat (limited to 'options.cpp')
-rw-r--r--options.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/options.cpp b/options.cpp
index 8eb471c..494a4fd 100644
--- a/options.cpp
+++ b/options.cpp
@@ -58,6 +58,36 @@ static BOOL CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
+ HWND hwndList=GetDlgItem(hwndDlg, IDC_USERLIST);
+ LVCOLUMN col;
+ LVITEM item;
+ NMLISTVIEW *hdr;
+ col.pszText = _T("Contact");
+ col.mask = LVCF_TEXT | LVCF_WIDTH;
+ col.fmt = LVCFMT_LEFT;
+ col.cx = 100;
+ ListView_InsertColumn(hwndList, 0, &col);
+ col.pszText = _T("PubKey");
+ col.mask = LVCF_TEXT | LVCF_WIDTH;
+ col.fmt = LVCFMT_LEFT;
+ col.cx = 250;
+ ListView_InsertColumn(hwndList, 1, &col);
+ ListView_SetExtendedListViewStyleEx(hwndList, 0, LVS_EX_FULLROWSELECT);
+ int i = 1, iRow = 0;
+ for(HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); hContact != NULL; hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0))
+ {
+ TCHAR *name = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
+ item.mask = LVIF_TEXT;
+ item.iItem = i;
+ item.iSubItem = 0;
+ item.pszText = name;
+ iRow = ListView_InsertItem(hwndList, &item);
+ ListView_SetItemText(hwndList, iRow, 0, name);
+ ListView_SetItemText(hwndList, iRow, 1, UniGetContactSettingUtf(hContact, szModuleName, "GPGPubKey", _T("not set")));
+ i++;
+ }
+ ListView_SetColumnWidth(hwndList, 0, LVSCW_AUTOSIZE);// not sure about this
+ ListView_SetColumnWidth(hwndList, 1, LVSCW_AUTOSIZE);
return TRUE;
}