summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-04-06 15:33:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-04-06 15:33:04 +0300
commit8221b8c22b4632c5f6c7f9f0ed6604f9a5d29c57 (patch)
tree25a1f6b07441ac891ee4f8a4e70bbc15e42d2688 /protocols/VKontakte
parent4ad2b9f2eea032d300179fcea453264dfd439ddc (diff)
useless commands removed
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp35
-rw-r--r--protocols/VKontakte/src/vk_dialogs.h4
2 files changed, 15 insertions, 24 deletions
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index f48746da0b..bfd4dab273 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -176,20 +176,20 @@ void CVkInviteChatForm::btnOk_OnOk(CCtrlButton*)
CVkGCCreateForm::CVkGCCreateForm(CVkProto *proto) :
CVkDlgBase(proto, IDD_GC_CREATE),
m_btnOk(this, IDOK),
- m_clCList(this, IDC_CLIST),
+ m_clc(this, IDC_CLIST),
m_edtTitle(this, IDC_TITLE)
{
m_btnOk.OnClick = Callback(this, &CVkGCCreateForm::btnOk_OnOk);
- m_clCList.OnListRebuilt = Callback(this, &CVkGCCreateForm::FilterList);
+ m_clc.OnListRebuilt = Callback(this, &CVkGCCreateForm::FilterList);
}
bool CVkGCCreateForm::OnInitDialog()
{
- SetWindowLongPtr(m_clCList.GetHwnd(), GWL_STYLE, GetWindowLongPtr(m_clCList.GetHwnd(), GWL_STYLE)
+ SetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE, GetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE)
| CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE);
- m_clCList.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
+ m_clc.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
- ResetListOptions(&m_clCList);
+ ResetListOptions();
return true;
}
@@ -200,8 +200,8 @@ void CVkGCCreateForm::btnOk_OnOk(CCtrlButton*)
if (m_proto->isChatRoom(hContact))
continue;
- HANDLE hItem = m_clCList.FindContact(hContact);
- if (hItem && m_clCList.GetCheck(hItem)) {
+ HANDLE hItem = m_clc.FindContact(hContact);
+ if (hItem && m_clc.GetCheck(hItem)) {
int uid = m_proto->getDword(hContact, "ID");
if (uid != 0) {
if (!szUIds.IsEmpty())
@@ -223,25 +223,16 @@ void CVkGCCreateForm::FilterList(CCtrlClc*)
for (auto &hContact : Contacts()) {
char *proto = Proto_GetBaseAccountName(hContact);
if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact) || m_proto->getDword(hContact, "ID") == VK_FEED_USER)
- if (HANDLE hItem = m_clCList.FindContact(hContact))
- m_clCList.DeleteItem(hItem);
+ if (HANDLE hItem = m_clc.FindContact(hContact))
+ m_clc.DeleteItem(hItem);
}
}
-void CVkGCCreateForm::ResetListOptions(CCtrlClc *clCList)
+void CVkGCCreateForm::ResetListOptions()
{
- if (!clCList)
- return;
-
- clCList->SetBkBitmap(0, nullptr);
- clCList->SetBkColor(GetSysColor(COLOR_WINDOW));
- clCList->SetGreyoutFlags(0);
- clCList->SetLeftMargin(4);
- clCList->SetIndent(10);
- clCList->SetHideEmptyGroups(true);
- clCList->SetHideOfflineRoot(true);
- for (int i = 0; i <= FONTID_MAX; i++)
- clCList->SetTextColor(i, GetSysColor(COLOR_WINDOWTEXT));
+ m_clc.SetBkColor(GetSysColor(COLOR_WINDOW));
+ m_clc.SetHideEmptyGroups(true);
+ m_clc.SetHideOfflineRoot(true);
}
////////////////////////////////// IDD_CONTACTDELETE //////////////////////////////////////
diff --git a/protocols/VKontakte/src/vk_dialogs.h b/protocols/VKontakte/src/vk_dialogs.h
index 9a5cc1f12a..903e26679a 100644
--- a/protocols/VKontakte/src/vk_dialogs.h
+++ b/protocols/VKontakte/src/vk_dialogs.h
@@ -116,7 +116,7 @@ public:
class CVkGCCreateForm : public CVkDlgBase
{
CCtrlButton m_btnOk;
- CCtrlClc m_clCList;
+ CCtrlClc m_clc;
CCtrlEdit m_edtTitle;
public:
@@ -125,7 +125,7 @@ public:
void btnOk_OnOk(CCtrlButton*);
void FilterList(CCtrlClc*);
- void ResetListOptions(CCtrlClc*);
+ void ResetListOptions();
};
////////////////////////////////// IDD_CONTACTDELETE //////////////////////////////////////