diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/res/resource.rc | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/resource.h | 5 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 9 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 2 |
6 files changed, 15 insertions, 7 deletions
diff --git a/protocols/VKontakte/res/resource.rc b/protocols/VKontakte/res/resource.rc index 2c7897eb4d..c5f96aad2d 100644 --- a/protocols/VKontakte/res/resource.rc +++ b/protocols/VKontakte/res/resource.rc @@ -51,6 +51,7 @@ BEGIN EDITTEXT IDC_GROUPNAME,167,86,121,12,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
+ CONTROL "Hide chats on startup",IDC_HIDECHATS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,134,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 6b3d64d274..3624c5ca01 100644 --- a/protocols/VKontakte/src/resource.h +++ b/protocols/VKontakte/src/resource.h @@ -21,12 +21,11 @@ #define IDC_DELIVERY 1011
#define IDC_GROUPNAME 1012
#define IDC_CLIST 1013
+#define IDC_HIDECHATS 1014
#define IDC_CONTACT 1015
-#define IDC_BUTTON1 1018
-#define IDC_BUTTON2 1019
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 29b3a8a5e4..efdf937973 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -58,6 +58,8 @@ CVkChatInfo* CVkProto::AppendChat(int id, JSONNODE *pDlg) gci.Flags = BYID | HCONTACT;
CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci);
c->m_hContact = gci.hContact;
+
+ setTString(gci.hContact, "Nick", tszTitle);
m_chats.insert(c);
GCDEST gcd = { m_szModuleName, sid, GC_EVENT_ADDGROUP };
@@ -69,7 +71,7 @@ CVkChatInfo* CVkProto::AppendChat(int id, JSONNODE *pDlg) gcd.iType = GC_EVENT_CONTROL;
gce.ptszStatus = 0;
- CallServiceSync(MS_GC_EVENT, SESSION_INITDONE, (LPARAM)&gce);
+ CallServiceSync(MS_GC_EVENT, (m_bHideChats) ? WINDOW_HIDDEN : SESSION_INITDONE, (LPARAM)&gce);
CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
RetrieveChatInfo(c);
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 35fc818bd3..60cfb60407 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -34,11 +34,11 @@ INT_PTR CALLBACK VKAccountProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIconByHandle(ppro->m_hProtoIcon, true));
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIconByHandle(ppro->m_hProtoIcon));
{
- ptrT tszLogin( ppro->getTStringA("Login"));
+ ptrT tszLogin(ppro->getTStringA("Login"));
if (tszLogin != NULL)
SetDlgItemText(hwndDlg, IDC_LOGIN, tszLogin);
- ptrT tszPassw( ppro->GetUserStoredPassword());
+ ptrT tszPassw(ppro->GetUserStoredPassword());
if (tszPassw != NULL)
SetDlgItemText(hwndDlg, IDC_PASSWORD, tszPassw);
}
@@ -119,6 +119,7 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L SetDlgItemText(hwndDlg, IDC_GROUPNAME, ppro->getGroup());
}
CheckDlgButton(hwndDlg, IDC_DELIVERY, ppro->m_bServerDelivery);
+ CheckDlgButton(hwndDlg, IDC_HIDECHATS, ppro->m_bHideChats);
return TRUE;
case WM_COMMAND:
@@ -135,6 +136,7 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L break;
case IDC_DELIVERY:
+ case IDC_HIDECHATS:
if (HIWORD(wParam) == BN_CLICKED && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
@@ -160,6 +162,9 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L ppro->m_bServerDelivery = IsDlgButtonChecked(hwndDlg, IDC_DELIVERY) == BST_CHECKED;
ppro->setByte("ServerDelivery", ppro->m_bServerDelivery);
+
+ ppro->m_bHideChats = IsDlgButtonChecked(hwndDlg, IDC_HIDECHATS) == BST_CHECKED;
+ ppro->setByte("HideChats", ppro->m_bHideChats);
}
break;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index aad19ae036..b94497d54b 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -53,6 +53,7 @@ CVkProto::CVkProto(const char *szModuleName, const TCHAR *ptszUserName) : db_set_resident(m_szModuleName, "Status");
m_bServerDelivery = getBool("ServerDelivery", true);
+ m_bHideChats = getBool("HideChats", true);
// Chats
GCREGISTER gcr = { sizeof(gcr) };
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 34f036393a..a98ad33681 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -224,7 +224,7 @@ private: void __cdecl SendMsgAck(void *param);
- bool m_bOnline;
+ bool m_bOnline, m_bHideChats;
LONG m_myUserId;
ptrA m_szAccessToken;
|