summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_dialogs.cpp
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-09-19 13:44:36 +0500
committerElzorFox <elzorfox@ya.ru>2017-09-19 13:45:19 +0500
commit73b122d495760172d7f380d783d17e1b36212282 (patch)
treecd4634fe9da43e16aef01ef1b615274a9fec542f /protocols/VKontakte/src/vk_dialogs.cpp
parent7b91e481c58fdc8bca6619e3665bc1ded40b0200 (diff)
VKontakte:
add removing from friendlist and clear server history on delete from Miranda clist version bump
Diffstat (limited to 'protocols/VKontakte/src/vk_dialogs.cpp')
-rw-r--r--protocols/VKontakte/src/vk_dialogs.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp
index 94ebc96a97..3948482328 100644
--- a/protocols/VKontakte/src/vk_dialogs.cpp
+++ b/protocols/VKontakte/src/vk_dialogs.cpp
@@ -241,4 +241,47 @@ void CVkGCCreateForm::ResetListOptions(CCtrlClc *clCList)
clCList->SetHideOfflineRoot(true);
for (int i = 0; i <= FONTID_MAX; i++)
clCList->SetTextColor(i, GetSysColor(COLOR_WINDOWTEXT));
+}
+
+////////////////////////////////// IDD_CONTACTDELETE //////////////////////////////////////
+
+CVkContactDeleteForm::CVkContactDeleteForm(CVkProto *proto, CONTACTDELETE_FORM_PARAMS *param) :
+ CVkDlgBase(proto, IDD_CONTACTDELETE, false),
+ m_btnOk(this, IDOK),
+ m_stText(this, IDC_STATIC_TXT),
+ m_cbDeleteFromFriendlist(this, IDC_CH_REMOVE_FROM_FRIEND),
+ m_cbDeleteDialog(this, IDC_CH_CLEARHISTORY),
+ m_param(param)
+{
+ m_btnOk.OnClick = Callback(this, &CVkContactDeleteForm::btnOk_OnOk);
+}
+
+void CVkContactDeleteForm::OnInitDialog()
+{
+ CMStringW szText(FORMAT, TranslateT("You delete %s from the contact list.\nWhat needs to be done additionally?"),
+ m_param->pwszNick);
+ m_stText.SetText(szText.c_str());
+
+ szText.Format(TranslateT("Remove %s from your friend list"), m_param->pwszNick);
+ m_cbDeleteFromFriendlist.SetText(szText.c_str());
+ m_cbDeleteFromFriendlist.SetState(m_param->bDeleteFromFriendlist && m_param->bEnableDeleteFromFriendlist);
+ m_cbDeleteFromFriendlist.Enable(m_param->bEnableDeleteFromFriendlist);
+
+
+ szText.Format(TranslateT("Ñlear server history with %s"), m_param->pwszNick);
+ m_cbDeleteDialog.SetText(szText.c_str());
+ m_cbDeleteDialog.SetState(m_param->bDeleteDialog);
+
+ szText.Format(TranslateT("Deleting %s from contact list"), m_param->pwszNick);
+ SetCaption(szText.c_str());
+}
+
+void CVkContactDeleteForm::btnOk_OnOk(CCtrlButton*)
+{
+
+ m_param->bDeleteDialog = m_cbDeleteDialog.GetState() != 0;
+ m_param->bDeleteFromFriendlist = m_param->bEnableDeleteFromFriendlist
+ && (m_cbDeleteFromFriendlist.GetState() != 0);
+
+ EndDialog(m_hwnd, 1);
} \ No newline at end of file