summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-07 11:55:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-07 11:55:18 +0000
commit2e1ccca56dcd321148ac0e233dc88e553a951d0b (patch)
treeb80f10e86a8034af83a97aba7113c5405ceb5c61 /protocols/VKontakte/src
parent168092f5f71b7ba73e61e214d6c3af3655905c06 (diff)
VK: group name became tunable
git-svn-id: http://svn.miranda-ng.org/main/trunk@7530 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r--protocols/VKontakte/src/resource.h5
-rw-r--r--protocols/VKontakte/src/version.h2
-rw-r--r--protocols/VKontakte/src/vk_options.cpp11
-rw-r--r--protocols/VKontakte/src/vk_proto.h3
4 files changed, 17 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/resource.h b/protocols/VKontakte/src/resource.h
index ef19487943..fba3cf24a7 100644
--- a/protocols/VKontakte/src/resource.h
+++ b/protocols/VKontakte/src/resource.h
@@ -17,15 +17,16 @@
#define IDC_FRAME2 1009
#define IDC_SUBMIT 1010
#define IDC_DELIVERY 1011
+#define IDC_GROUPNAME 1012
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 104
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1012
+#define _APS_NEXT_CONTROL_VALUE 1014
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h
index c4e6849449..ac2fbb3d20 100644
--- a/protocols/VKontakte/src/version.h
+++ b/protocols/VKontakte/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 0
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp
index 3ce73d7f72..6228cb3fae 100644
--- a/protocols/VKontakte/src/vk_options.cpp
+++ b/protocols/VKontakte/src/vk_options.cpp
@@ -96,7 +96,7 @@ INT_PTR CVkProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam)
INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- CVkProto* ppro = (CVkProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ CVkProto *ppro = (CVkProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (uMsg) {
case WM_INITDIALOG:
@@ -115,6 +115,8 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
ptrT tszPassw(ppro->GetUserStoredPassword());
if (tszPassw != NULL)
SetDlgItemText(hwndDlg, IDC_PASSWORD, tszPassw);
+
+ SetDlgItemText(hwndDlg, IDC_GROUPNAME, ppro->getGroup());
}
CheckDlgButton(hwndDlg, IDC_DELIVERY, ppro->m_bServerDelivery);
return TRUE;
@@ -127,6 +129,7 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
case IDC_LOGIN:
case IDC_PASSWORD:
+ case IDC_GROUPNAME:
if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -144,6 +147,12 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str));
ppro->setTString("Login", str);
+ GetDlgItemText(hwndDlg, IDC_GROUPNAME, str, SIZEOF(str));
+ if (_tcscmp(ppro->getGroup(), str)) {
+ ppro->setGroup(str);
+ ppro->setTString("ProtoGroup", str);
+ }
+
GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str));
ptrA szRawPasswd(mir_utf8encodeT(str));
if (szRawPasswd != NULL)
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index 12e6bd710b..7b488f15ae 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -131,6 +131,9 @@ struct CVkProto : public PROTO<CVkProto>
void SetServerStatus(int);
__forceinline bool IsOnline() const { return m_bOnline; }
+
+ __forceinline LPCTSTR getGroup() const { return m_defaultGroup; }
+ __forceinline void setGroup(LPCTSTR grp) { m_defaultGroup = mir_tstrdup(grp); }
private:
LIST<AsyncHttpRequest> m_arRequestsQueue;