summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_options.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2016-04-07 10:37:53 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2016-04-07 10:37:53 +0000
commit4b9e39a3ea97bfb34fab1803df542f766b730e9b (patch)
tree743eb17f6535db5646984ba6c2b6d11447dffb22 /protocols/VKontakte/src/vk_options.cpp
parentfbd9d8a939dabfb2d0ef04081eba55c26c4f566e (diff)
VKontakte: add settings for show/hide proto menu items
git-svn-id: http://svn.miranda-ng.org/main/trunk@16602 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_options.cpp')
-rw-r--r--protocols/VKontakte/src/vk_options.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp
index 178a9e37c9..abbb3e8387 100644
--- a/protocols/VKontakte/src/vk_options.cpp
+++ b/protocols/VKontakte/src/vk_options.cpp
@@ -101,6 +101,11 @@ int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM)
odp.pDialog = new CVkOptionViewForm(this);
Options_AddPage(wParam, &odp);
+ odp.ptszTab = LPGENT("Menu");
+ odp.position = 5;
+ odp.pDialog = new CVkOptionMenuForm(this);
+ Options_AddPage(wParam, &odp);
+
return 0;
}
@@ -455,3 +460,34 @@ void CVkOptionViewForm::OnApply()
m_proto->m_vkOptions.iBBCForAttachments = BBCSupport::bbcAdvanced;
}
+////////////////////// Menu page /////////////////////////////////////////////
+
+CVkOptionMenuForm::CVkOptionMenuForm(CVkProto *proto):
+ CVkDlgBase(proto, IDD_OPT_MENU, false),
+ m_cbMenuEnabled0(this, IDC_SHOW_MENU0),
+ m_cbMenuEnabled1(this, IDC_SHOW_MENU1),
+ m_cbMenuEnabled2(this, IDC_SHOW_MENU2),
+ m_cbMenuEnabled3(this, IDC_SHOW_MENU3),
+ m_cbMenuEnabled4(this, IDC_SHOW_MENU4),
+ m_cbMenuEnabled5(this, IDC_SHOW_MENU5),
+ m_cbMenuEnabled6(this, IDC_SHOW_MENU6),
+ m_proto(proto)
+{
+ CreateLink(m_cbMenuEnabled0, m_proto->m_vkOptions.bShowProtoMenuItem0);
+ CreateLink(m_cbMenuEnabled1, m_proto->m_vkOptions.bShowProtoMenuItem1);
+ CreateLink(m_cbMenuEnabled2, m_proto->m_vkOptions.bShowProtoMenuItem2);
+ CreateLink(m_cbMenuEnabled3, m_proto->m_vkOptions.bShowProtoMenuItem3);
+ CreateLink(m_cbMenuEnabled4, m_proto->m_vkOptions.bShowProtoMenuItem4);
+ CreateLink(m_cbMenuEnabled5, m_proto->m_vkOptions.bShowProtoMenuItem5);
+ CreateLink(m_cbMenuEnabled6, m_proto->m_vkOptions.bShowProtoMenuItem6);
+}
+
+void CVkOptionMenuForm::OnApply()
+{
+ if (MessageBox(NULL,
+ TranslateT("These changes will take effect after Miranda NG restart.\nWould you like to restart it now?"),
+ TranslateT("VKontakte protocol"), MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2) == IDYES)
+ CallServiceSync(MS_SYSTEM_RESTART, 1, 0);
+}
+
+