summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_dialogs.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-07-15 14:46:10 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-07-15 14:46:10 +0000
commit5604a6276fe755bcc0731d6a2ff944271aa07e75 (patch)
treeba3038dd652e8737339d1909107d7fad69efe4c7 /protocols/SkypeWeb/src/skype_dialogs.cpp
parent6ffdb6d86ef448bd95ec9065bd624cf15593a044 (diff)
SkypeWeb: Chat create dialog -> core ui
git-svn-id: http://svn.miranda-ng.org/main/trunk@14568 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_dialogs.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_dialogs.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/protocols/SkypeWeb/src/skype_dialogs.cpp b/protocols/SkypeWeb/src/skype_dialogs.cpp
index 78f612419d..43834306c8 100644
--- a/protocols/SkypeWeb/src/skype_dialogs.cpp
+++ b/protocols/SkypeWeb/src/skype_dialogs.cpp
@@ -41,3 +41,62 @@ void CSkypeInviteDlg::btnOk_OnOk(CCtrlButton*)
m_hContact = m_combo.GetItemData(m_combo.GetCurSel());
EndDialog(m_hwnd, 1);
}
+
+//CSkypeGCCreateDlg
+
+CSkypeGCCreateDlg::CSkypeGCCreateDlg(CSkypeProto *proto) :
+ CSkypeDlgBase(proto, IDD_GC_CREATE, false), m_ok(this, IDOK), m_cancel(this, IDCANCEL), m_clc(this, IDC_CLIST)
+{
+ m_ok.OnClick = Callback(this, &CSkypeGCCreateDlg::btnOk_OnOk);
+}
+
+void CSkypeGCCreateDlg::OnInitDialog()
+{
+ SetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE,
+ GetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE) | CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE);
+ m_clc.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
+
+ ResetListOptions(&m_clc);
+ FilterList(&m_clc);
+}
+
+void CSkypeGCCreateDlg::btnOk_OnOk(CCtrlButton*)
+{
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName))
+ {
+ if (!m_proto->isChatRoom(hContact))
+ {
+ if (HANDLE hItem = m_clc.FindContact(hContact))
+ {
+ if (m_clc.GetCheck(hItem))
+ {
+ m_hContacts.push_back(hContact);
+ }
+ }
+ }
+ }
+ EndDialog(m_hwnd, 1);
+}
+
+void CSkypeGCCreateDlg::FilterList(CCtrlClc *)
+{
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ char *proto = GetContactProto(hContact);
+ if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
+ if (HANDLE hItem = m_clc.FindContact(hContact))
+ m_clc.DeleteItem(hItem);
+ }
+}
+
+void CSkypeGCCreateDlg::ResetListOptions(CCtrlClc *)
+{
+ m_clc.SetBkBitmap(0, NULL);
+ m_clc.SetBkColor(GetSysColor(COLOR_WINDOW));
+ m_clc.SetGreyoutFlags(0);
+ m_clc.SetLeftMargin(4);
+ m_clc.SetIndent(10);
+ m_clc.SetHideEmptyGroups(true);
+ m_clc.SetHideOfflineRoot(true);
+ for (int i = 0; i <= FONTID_MAX; i++)
+ m_clc.SetTextColor(i, GetSysColor(COLOR_WINDOWTEXT));
+} \ No newline at end of file