From 48dc7dcfa22de436c7133385666b29aa191056f4 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Fri, 12 Aug 2016 03:11:54 +0000 Subject: VKontakte: fix lists default item index git-svn-id: http://svn.miranda-ng.org/main/trunk@17179 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_options.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 01629da714..f0eeed2c87 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -168,24 +168,24 @@ void CVkOptionAccountForm::OnInitDialog() m_pwszOldGroup = m_edtGroupName.GetText(); - int iListIndex = 0; - for (size_t i = 0; i < _countof(vkMarkMsgAsReadMethods); i++) { - int cur = m_cbxMarkAsRead.AddString(vkMarkMsgAsReadMethods[i].type, vkMarkMsgAsReadMethods[i].data); + int iListIndex = MarkMsgReadOn::markOnRead; + for (int i = 0; i < _countof(vkMarkMsgAsReadMethods); i++) { + m_cbxMarkAsRead.InsertString((wchar_t *)vkMarkMsgAsReadMethods[i].type, i, vkMarkMsgAsReadMethods[i].data); if (vkMarkMsgAsReadMethods[i].data == m_proto->m_vkOptions.iMarkMessageReadOn) - iListIndex = cur; + iListIndex = i; } m_cbxMarkAsRead.SetCurSel(iListIndex); - iListIndex = 0; - for (size_t i = 0; i < _countof(vkHistorySyncMethods); i++) { - int cur = m_cbxSyncHistory.AddString(vkHistorySyncMethods[i].type, vkHistorySyncMethods[i].data); + iListIndex = SyncHistoryMetod::syncOff; + for (int i = 0; i < _countof(vkHistorySyncMethods); i++) { + m_cbxSyncHistory.InsertString((wchar_t *)vkHistorySyncMethods[i].type, i, vkHistorySyncMethods[i].data); if (vkHistorySyncMethods[i].data == m_proto->m_vkOptions.iSyncHistoryMetod) - iListIndex = cur; + iListIndex = i; } m_cbxSyncHistory.SetCurSel(iListIndex); iListIndex = 0; - for (size_t i = 0; i < _countof(vkLangCodes); i++) { + for (int i = 0; i < _countof(vkLangCodes); i++) { m_cbxVKLang.InsertString(TranslateW(vkLangCodes[i].szDescription), i, (LPARAM)vkLangCodes[i].szCode); if (!mir_wstrcmpi(vkLangCodes[i].szCode, m_proto->m_vkOptions.pwszVKLang)) iListIndex = i; -- cgit v1.2.3