From 0517871b91bd2e567a8fe294344225ec9247a632 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 2 Aug 2013 07:26:30 +0000 Subject: fixed not selected first item in accounts list on options page git-svn-id: http://svn.miranda-ng.org/main/trunk@5549 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/options.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'plugins/NewXstatusNotify') diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index ae9b897bed..4173d34f3d 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -722,22 +722,22 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA HWND hList = GetDlgItem(hwndDlg, IDC_PROTOCOLLIST); SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES); LVCOLUMN lvCol = {0}; - lvCol.mask = LVCF_WIDTH|LVCF_TEXT; + lvCol.mask = LVCF_WIDTH | LVCF_TEXT; lvCol.pszText=TranslateT("Protocol"); lvCol.cx = 118; ListView_InsertColumn(hList, 0, &lvCol); // fill the list LVITEM lvItem = {0}; - lvItem.mask=LVIF_TEXT|LVIF_PARAM; - lvItem.iItem=0; - lvItem.iSubItem=0; + lvItem.mask = LVIF_TEXT | LVIF_PARAM; + lvItem.iItem = 0; + lvItem.iSubItem = 0; int count; PROTOACCOUNT** protos; - ProtoEnumAccounts( &count, &protos ); + ProtoEnumAccounts(&count, &protos); - for(int i=0; i < count; i++) { - if ( !IsSuitableProto( protos[i] )) + for(int i = 0; i < count; i++) { + if (!IsSuitableProto(protos[i])) continue; UpdateListFlag = TRUE; @@ -767,7 +767,7 @@ INT_PTR CALLBACK DlgProcSMPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA } if (lvItem.iItem) { - ListView_SetSelectionMark(hList, 0); + ListView_SetItemState(hList, 0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); PROTOTEMPLATE *prototemplate = ProtoTemplates[0]; SetDlgItemText(hwndDlg, IDC_POPUPTEXT, prototemplate->ProtoTemplate); } -- cgit v1.2.3