From 6f562987395cad37f8aa55a8950ca86b64f987ad Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 24 Jul 2015 14:35:02 +0000 Subject: SkypeWeb: ChatCreateDialog refactoring git-svn-id: http://svn.miranda-ng.org/main/trunk@14678 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_dialogs.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_dialogs.cpp') diff --git a/protocols/SkypeWeb/src/skype_dialogs.cpp b/protocols/SkypeWeb/src/skype_dialogs.cpp index 43834306c8..64a5aae03a 100644 --- a/protocols/SkypeWeb/src/skype_dialogs.cpp +++ b/protocols/SkypeWeb/src/skype_dialogs.cpp @@ -45,10 +45,16 @@ void CSkypeInviteDlg::btnOk_OnOk(CCtrlButton*) //CSkypeGCCreateDlg CSkypeGCCreateDlg::CSkypeGCCreateDlg(CSkypeProto *proto) : - CSkypeDlgBase(proto, IDD_GC_CREATE, false), m_ok(this, IDOK), m_cancel(this, IDCANCEL), m_clc(this, IDC_CLIST) +CSkypeDlgBase(proto, IDD_GC_CREATE, false), m_ok(this, IDOK), m_cancel(this, IDCANCEL), m_clc(this, IDC_CLIST), m_ContactsList(1) { m_ok.OnClick = Callback(this, &CSkypeGCCreateDlg::btnOk_OnOk); } +CSkypeGCCreateDlg::~CSkypeGCCreateDlg() +{ + for (int i = 0; i < m_ContactsList.getCount(); i++) + mir_free(m_ContactsList[i]); + m_ContactsList.destroy(); +} void CSkypeGCCreateDlg::OnInitDialog() { @@ -70,12 +76,15 @@ void CSkypeGCCreateDlg::btnOk_OnOk(CCtrlButton*) { if (m_clc.GetCheck(hItem)) { - m_hContacts.push_back(hContact); + char *szName = db_get_sa(hContact, m_proto->m_szModuleName, SKYPE_SETTINGS_ID); + if (szName != NULL) + m_ContactsList.insert(szName); } } } } - EndDialog(m_hwnd, 1); + m_ContactsList.insert(m_proto->m_szSelfSkypeName); + EndDialog(m_hwnd, m_ContactsList.getCount()); } void CSkypeGCCreateDlg::FilterList(CCtrlClc *) -- cgit v1.2.3