summaryrefslogtreecommitdiff
path: root/protocols
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
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')
-rw-r--r--protocols/VKontakte/res/resource.rc9
-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
5 files changed, 23 insertions, 7 deletions
diff --git a/protocols/VKontakte/res/resource.rc b/protocols/VKontakte/res/resource.rc
index 6f80403b35..c2465f1919 100644
--- a/protocols/VKontakte/res/resource.rc
+++ b/protocols/VKontakte/res/resource.rc
@@ -40,14 +40,17 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
+ GROUPBOX "Login settings",IDC_STATIC,4,7,293,65
LTEXT "E-mail or phone number:",IDC_STATIC,51,23,95,12
EDITTEXT IDC_LOGIN,147,23,89,12,ES_AUTOHSCROLL
LTEXT "Password:",IDC_STATIC,51,39,94,12
EDITTEXT IDC_PASSWORD,147,39,90,12,ES_PASSWORD | ES_AUTOHSCROLL
CONTROL "Open VKontakte site",IDC_URL,"Hyperlink",WS_TABSTOP,59,55,174,12
- GROUPBOX "Login settings",IDC_STATIC,4,7,293,65
- GROUPBOX "Advanced",IDC_STATIC,4,74,293,143
- CONTROL "Server-side delivery confirmation",IDC_DELIVERY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,87,278,10
+ GROUPBOX "Local settings",IDC_STATIC,4,73,293,33
+ LTEXT "Contact list group:",IDC_STATIC,12,88,146,8
+ EDITTEXT IDC_GROUPNAME,167,85,121,14,ES_AUTOHSCROLL
+ GROUPBOX "Advanced",IDC_STATIC,4,108,293,108
+ CONTROL "Server-side delivery confirmation",IDC_DELIVERY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,121,278,10
END
IDD_CAPTCHAFORM DIALOGEX 0, 0, 258, 224
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;