summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-04-13 18:16:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-04-13 18:16:50 +0000
commite163beb2212fe4688f2c1f01d1d95747f9a9082d (patch)
tree8837d91a898c320f05a6f3256342de457064e861 /protocols
parentf728e1752634ad6b3237b758717277f4fee8ba53 (diff)
bye-bye, Windows
git-svn-id: http://svn.miranda-ng.org/main/trunk@12792 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/WhatsApp/src/chat.cpp11
-rw-r--r--protocols/WhatsApp/src/common.h7
-rw-r--r--protocols/WhatsApp/src/dialogs.cpp355
-rw-r--r--protocols/WhatsApp/src/dialogs.h1
-rw-r--r--protocols/WhatsApp/src/proto.cpp25
-rw-r--r--protocols/WhatsApp/src/version.h2
6 files changed, 171 insertions, 230 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp
index 116d347485..8f4469af3e 100644
--- a/protocols/WhatsApp/src/chat.cpp
+++ b/protocols/WhatsApp/src/chat.cpp
@@ -163,17 +163,6 @@ void WhatsAppProto::EditChatSubject(WAChatInfo *pInfo)
}
}
-void WhatsAppProto::InviteChatUser(WAChatInfo *pInfo)
-{
- if (TRUE != DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_GROUPCHAT_INVITE), NULL, InviteDialogProc, (LPARAM)this))
- return;
-
- if (isOnline()) {
- m_pConnection->sendAddParticipants((char*)_T2A(pInfo->tszJid), m_szInviteJids);
- m_szInviteJids.clear();
- }
-}
-
void WhatsAppProto::SetChatAvatar(WAChatInfo *pInfo)
{
TCHAR tszFileName[MAX_PATH]; tszFileName[0] = '\0';
diff --git a/protocols/WhatsApp/src/common.h b/protocols/WhatsApp/src/common.h
index 338b4578ca..009b0f0db7 100644
--- a/protocols/WhatsApp/src/common.h
+++ b/protocols/WhatsApp/src/common.h
@@ -12,8 +12,8 @@ Copyright © 2013-14 Uli Hecht
#pragma warning(disable:4996)
#pragma warning(disable:4290)
-#define _WIN32_WINNT 0x0500
-#define _WIN32_WINDOWS 0x0500
+#define _WIN32_WINNT 0x0601
+#define _WIN32_WINDOWS 0x0601
#include <algorithm>
#include <iostream>
@@ -69,16 +69,17 @@ Copyright © 2013-14 Uli Hecht
#include <m_hotkeys.h>
#include <m_folders.h>
#include <m_json.h>
+#include <m_gui.h>
#include "constants.h"
#include "utils.h"
#include "db.h"
#include "resource.h"
-#include "dialogs.h"
#include "theme.h"
#include "definitions.h"
#include "WASocketConnection.h"
#include "proto.h"
+#include "dialogs.h"
#include "entities.h"
#if defined _DEBUG
diff --git a/protocols/WhatsApp/src/dialogs.cpp b/protocols/WhatsApp/src/dialogs.cpp
index 17048df398..ab5c37fa30 100644
--- a/protocols/WhatsApp/src/dialogs.cpp
+++ b/protocols/WhatsApp/src/dialogs.cpp
@@ -3,225 +3,200 @@
#define szAskSendSms LPGEN("An SMS with registration code will be sent to your mobile phone.\nNotice that you are not able to use the real WhatsApp and this plugin simultaneously!\nContinue?")
#define szPasswordSet LPGEN("Your password has been set automatically. You can proceed with login now")
-INT_PTR CALLBACK WhatsAppAccountProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+class COptionsDlg : public CProtoDlgBase<WhatsAppProto>
{
- WhatsAppProto *proto = (WhatsAppProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- switch (uMsg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- proto = (WhatsAppProto*)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- SendDlgItemMessage(hwndDlg, IDC_PW, EM_LIMITTEXT, 3, 0);
- SendDlgItemMessage(hwndDlg, IDC_PW2, EM_LIMITTEXT, 3, 0);
-
- CheckDlgButton(hwndDlg, IDC_SSL, db_get_b(NULL, proto->m_szModuleName, WHATSAPP_KEY_SSL, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTORUN, proto->getBool(WHATSAPP_KEY_AUTORUNCHATS, true) ? BST_CHECKED : BST_UNCHECKED);
- {
- ptrA szStr(proto->getStringA(WHATSAPP_KEY_CC));
- if (szStr != NULL)
- SetDlgItemTextA(hwndDlg, IDC_CC, szStr);
-
- if ((szStr = proto->getStringA(WHATSAPP_KEY_LOGIN)) != NULL)
- SetDlgItemTextA(hwndDlg, IDC_LOGIN, szStr);
-
- if ((szStr = proto->getStringA(WHATSAPP_KEY_NICK)) != NULL)
- SetDlgItemTextA(hwndDlg, IDC_NICK, szStr);
- }
- SetDlgItemText(hwndDlg, IDC_DEFGROUP, proto->m_tszDefaultGroup);
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_PW), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PW2), FALSE);
- return TRUE;
-
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_BUTTON_REQUEST_CODE || LOWORD(wParam) == IDC_BUTTON_REGISTER) {
- string password;
- char cc[5];
- char number[128];
- GetDlgItemTextA(hwndDlg, IDC_CC, cc, SIZEOF(cc));
- GetDlgItemTextA(hwndDlg, IDC_LOGIN, number, SIZEOF(number));
-
- if (LOWORD(wParam) == IDC_BUTTON_REQUEST_CODE) {
- if (IDYES == MessageBox(NULL, TranslateT(szAskSendSms), PRODUCT_NAME, MB_YESNO)) {
- if (proto->Register(REG_STATE_REQ_CODE, string(cc), string(number), string(), password)) {
- if (!password.empty()) {
- MessageBox(NULL, TranslateT(szPasswordSet), PRODUCT_NAME, MB_ICONWARNING);
- proto->setString(WHATSAPP_KEY_PASS, password.c_str());
- }
- else {
- EnableWindow(GetDlgItem(hwndDlg, IDC_PW), TRUE); // unblock sms code entry field
- EnableWindow(GetDlgItem(hwndDlg, IDC_PW2), TRUE);
- }
- }
- }
- }
- else if (LOWORD(wParam) == IDC_BUTTON_REGISTER) {
- HWND hwnd1 = GetDlgItem(hwndDlg, IDC_PW), hwnd2 = GetDlgItem(hwndDlg, IDC_PW2);
- if (GetWindowTextLength(hwnd1) != 3 || GetWindowTextLength(hwnd2) != 3) {
- MessageBox(NULL, TranslateT("Please correctly specify your registration code received by SMS"), PRODUCT_NAME, MB_ICONEXCLAMATION);
- return TRUE;
- }
-
- char code[10];
- GetWindowTextA(hwnd1, code, 4);
- GetWindowTextA(hwnd2, code + 3, 4);
+ CCtrlEdit m_pw1, m_pw2, m_cc, m_login, m_nick, m_group;
+ CCtrlCheck m_ssl, m_autorun;
+ CCtrlButton m_request, m_register;
+
+public:
+ COptionsDlg(WhatsAppProto *pThis, int dlgId) :
+ CProtoDlgBase<WhatsAppProto>(pThis, dlgId, false),
+ m_cc(this, IDC_CC),
+ m_pw1(this, IDC_PW),
+ m_pw2(this, IDC_PW2),
+ m_ssl(this, IDC_SSL),
+ m_nick(this, IDC_NICK),
+ m_group(this, IDC_DEFGROUP),
+ m_login(this, IDC_LOGIN),
+ m_autorun(this, IDC_AUTORUN),
+ m_request(this, IDC_BUTTON_REQUEST_CODE),
+ m_register(this, IDC_BUTTON_REGISTER)
+ {
+ CreateLink(m_ssl, WHATSAPP_KEY_SSL, DBVT_BYTE, false);
+ CreateLink(m_autorun, WHATSAPP_KEY_AUTORUNCHATS, DBVT_BYTE, true);
+
+ CreateLink(m_cc, WHATSAPP_KEY_CC, _T(""));
+ CreateLink(m_nick, WHATSAPP_KEY_NICK, _T(""));
+ CreateLink(m_login, WHATSAPP_KEY_LOGIN, _T(""));
+ CreateLink(m_group, WHATSAPP_KEY_DEF_GROUP, _T(""));
+
+ m_request.OnClick = Callback(this, &COptionsDlg::OnRequestClick);
+ m_register.OnClick = Callback(this, &COptionsDlg::OnRegisterClick);
+ }
- if (proto->Register(REG_STATE_REG_CODE, string(cc), string(number), string(code), password)) {
- proto->setString(WHATSAPP_KEY_PASS, password.c_str());
- MessageBox(NULL, TranslateT(szPasswordSet), PRODUCT_NAME, MB_ICONWARNING);
- }
- }
- }
+ virtual void OnInitDialog()
+ {
+ m_pw1.SendMsg(EM_LIMITTEXT, 3, 0); m_pw1.Enable(false);
+ m_pw2.SendMsg(EM_LIMITTEXT, 3, 0); m_pw2.Enable(false);
+ }
- if (HWND(lParam) == GetFocus()) {
- if (HIWORD(wParam) == EN_CHANGE) {
- switch (LOWORD(wParam)) {
- case IDC_CC:
- case IDC_LOGIN:
- case IDC_NICK:
- case IDC_DEFGROUP:
- case IDC_PW:
- case IDC_PW2:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
+ void OnRequestClick(CCtrlButton*)
+ {
+ if (IDYES != MessageBox(NULL, TranslateT(szAskSendSms), PRODUCT_NAME, MB_YESNO))
+ return;
+
+ ptrA cc(m_cc.GetTextA()), number(m_login.GetTextA());
+ string password;
+ if (m_proto->Register(REG_STATE_REQ_CODE, string(cc), string(number), string(), password)) {
+ if (!password.empty()) {
+ MessageBox(NULL, TranslateT(szPasswordSet), PRODUCT_NAME, MB_ICONWARNING);
+ m_proto->setString(WHATSAPP_KEY_PASS, password.c_str());
}
- else if (HIWORD(wParam) == BN_CLICKED) {
- switch (LOWORD(wParam)) {
- case IDC_AUTORUN:
- case IDC_SSL:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
+ else {
+ m_pw1.Enable(); // unblock sms code entry field
+ m_pw2.Enable();
}
}
- break;
-
- case WM_NOTIFY:
- if (reinterpret_cast<NMHDR *>(lParam)->code == PSN_APPLY) {
- char str[128];
- GetDlgItemTextA(hwndDlg, IDC_CC, str, SIZEOF(str));
- proto->setString(WHATSAPP_KEY_CC, str);
-
- GetDlgItemTextA(hwndDlg, IDC_LOGIN, str, SIZEOF(str));
- proto->setString(WHATSAPP_KEY_LOGIN, str);
+ }
- GetDlgItemTextA(hwndDlg, IDC_NICK, str, SIZEOF(str));
- proto->setString(WHATSAPP_KEY_NICK, str);
+ void OnRegisterClick(CCtrlButton*)
+ {
+ if (GetWindowTextLength(m_pw1.GetHwnd()) != 3 || GetWindowTextLength(m_pw2.GetHwnd()) != 3) {
+ MessageBox(NULL, TranslateT("Please correctly specify your registration code received by SMS"), PRODUCT_NAME, MB_ICONEXCLAMATION);
+ return;
+ }
- TCHAR tstr[100];
- GetDlgItemText(hwndDlg, IDC_DEFGROUP, tstr, SIZEOF(tstr));
- if (mir_tstrcmp(proto->m_tszDefaultGroup, tstr)) {
- proto->m_tszDefaultGroup = mir_tstrdup(tstr);
- proto->setTString(WHATSAPP_KEY_DEF_GROUP, tstr);
- }
+ char code[10];
+ GetWindowTextA(m_pw1.GetHwnd(), code, 4);
+ GetWindowTextA(m_pw2.GetHwnd(), code + 3, 4);
- proto->setByte(WHATSAPP_KEY_SSL, IsDlgButtonChecked(hwndDlg, IDC_SSL));
- proto->setByte(WHATSAPP_KEY_AUTORUNCHATS, IsDlgButtonChecked(hwndDlg, IDC_AUTORUN));
+ string password;
+ ptrA cc(m_cc.GetTextA()), number(m_login.GetTextA());
+ if (m_proto->Register(REG_STATE_REG_CODE, string(cc), string(number), string(code), password)) {
+ m_proto->setString(WHATSAPP_KEY_PASS, password.c_str());
+ MessageBox(NULL, TranslateT(szPasswordSet), PRODUCT_NAME, MB_ICONWARNING);
+ }
+ }
- if (proto->isOnline())
- MessageBox(NULL, TranslateT("Changes will be applied after protocol restart"), proto->m_tszUserName, MB_OK);
+ virtual void OnApply()
+ {
+ ptrT tszGroup(m_group.GetText());
+ if (mir_tstrcmp(m_proto->m_tszDefaultGroup, tszGroup))
+ m_proto->m_tszDefaultGroup = tszGroup.detouch();
- return TRUE;
- }
- break;
+ if (m_proto->isOnline())
+ MessageBox(NULL, TranslateT("Changes will be applied after protocol restart"), m_proto->m_tszUserName, MB_OK);
}
+};
+
+INT_PTR WhatsAppProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam)
+{
+ COptionsDlg *pDlg = new COptionsDlg(this, IDD_ACCMGRUI);
+ pDlg->Create();
+ return (INT_PTR)pDlg->GetHwnd();
+}
- return FALSE;
+int WhatsAppProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
+ odp.ptszTitle = m_tszUserName;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
+ odp.ptszGroup = LPGENT("Network");
+
+ odp.ptszTab = LPGENT("Account");
+ odp.pDialog = new COptionsDlg(this, IDD_OPTIONS);
+ Options_AddPage(wParam, &odp);
+ return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
// Invite dialog
-static void FilterList(HWND hwndClist, WhatsAppProto *ppro)
+class CInviteDialog : public CProtoDlgBase<WhatsAppProto>
{
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- char *proto = GetContactProto(hContact);
- if (mir_strcmp(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact))
- if (MCONTACT hItem = SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0))
- SendMessage(hwndClist, CLM_DELETEITEM, hItem, 0);
+ CCtrlClc m_clc;
+ CCtrlEdit m_entry;
+ CCtrlButton m_btnOk;
+
+ void FilterList(CCtrlClc *)
+ {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ char *proto = GetContactProto(hContact);
+ if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
+ if (HANDLE hItem = m_clc.FindContact(hContact))
+ m_clc.DeleteItem(hItem);
+ }
}
-}
-static void InitList(HWND hwndClist, WhatsAppProto *ppro)
-{
- SetWindowLongPtr(hwndClist, GWL_STYLE,
- GetWindowLongPtr(hwndClist, GWL_STYLE) | CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE);
- SendMessage(hwndClist, CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
- SendMessage(hwndClist, CLM_SETBKBITMAP, 0, 0);
- SendMessage(hwndClist, CLM_SETBKCOLOR, GetSysColor(COLOR_WINDOW), 0);
- SendMessage(hwndClist, CLM_SETGREYOUTFLAGS, 0, 0);
- SendMessage(hwndClist, CLM_SETLEFTMARGIN, 4, 0);
- SendMessage(hwndClist, CLM_SETINDENT, 10, 0);
- SendMessage(hwndClist, CLM_SETBKBITMAP, 0, 0);
- SendMessage(hwndClist, CLM_SETHIDEEMPTYGROUPS, TRUE, 0);
- SendMessage(hwndClist, CLM_SETHIDEOFFLINEROOT, TRUE, 0);
-
- for (int i = 0; i <= FONTID_MAX; i++)
- SendMessage(hwndClist, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
-
- FilterList(hwndClist, ppro);
-}
+ void ResetListOptions(CCtrlClc *)
+ {
+ m_clc.SetBkBitmap(0, NULL);
+ m_clc.SetBkColor(GetSysColor(COLOR_WINDOW));
+ m_clc.SetGreyoutFlags(0);
+ m_clc.SetLeftMargin(4);
+ m_clc.SetIndent(10);
+ m_clc.SetHideEmptyGroups(true);
+ m_clc.SetHideOfflineRoot(true);
+ for (int i = 0; i <= FONTID_MAX; i++)
+ m_clc.SetTextColor(i, GetSysColor(COLOR_WINDOWTEXT));
+ }
-INT_PTR CALLBACK InviteDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- WhatsAppProto *proto = (WhatsAppProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+public:
+ CInviteDialog(WhatsAppProto *pThis) :
+ CProtoDlgBase<WhatsAppProto>(pThis, IDD_GROUPCHAT_INVITE, false),
+ m_clc(this, IDC_CLIST),
+ m_entry(this, IDC_NEWJID),
+ m_btnOk(this, IDOK)
+ {
+ m_btnOk.OnClick = Callback(this, &CInviteDialog::btnOk_OnClick);
+ m_clc.OnNewContact =
+ m_clc.OnListRebuilt = Callback(this, &CInviteDialog::FilterList);
+ m_clc.OnOptionsChanged = Callback(this, &CInviteDialog::ResetListOptions);
+ }
+
+ void OnInitDialog()
+ {
+ SetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE,
+ GetWindowLongPtr(m_clc.GetHwnd(), GWL_STYLE) | CLS_CHECKBOXES | CLS_HIDEEMPTYGROUPS | CLS_USEGROUPS | CLS_GREYALTERNATE);
+ m_clc.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
- switch (uMsg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
+ ResetListOptions(&m_clc);
+ FilterList(&m_clc);
+ }
- proto = (WhatsAppProto*)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+ void btnOk_OnClick(CCtrlButton*)
+ {
+ m_proto->m_szInviteJids.clear();
- InitList(GetDlgItem(hwndDlg, IDC_CLIST), proto);
- return 1;
+ // invite users from clist
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
+ if (m_proto->isChatRoom(hContact))
+ continue;
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->idFrom == IDC_CLIST) {
- switch (((LPNMHDR)lParam)->code) {
- case CLN_LISTREBUILT:
- case CLN_NEWCONTACT:
- FilterList(((LPNMHDR)lParam)->hwndFrom, proto);
- }
- }
- break;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDCANCEL:
- EndDialog(hwndDlg, 0);
- break;
-
- case IDOK:
- proto->m_szInviteJids.clear();
-
- // invite users from clist
- for (MCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; hContact = db_find_next(hContact, proto->m_szModuleName)) {
- if (proto->isChatRoom(hContact))
- continue;
-
- HWND hwndList = GetDlgItem(hwndDlg, IDC_CLIST);
- if (int hItem = SendMessage(hwndList, CLM_FINDCONTACT, hContact, 0)) {
- if (SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- ptrA jid(proto->getStringA(hContact, "ID"));
- if (jid != NULL)
- proto->m_szInviteJids.push_back((char*)jid);
- }
+ if (HANDLE hItem = m_clc.FindContact(hContact)) {
+ if (m_clc.GetCheck(hItem)) {
+ ptrA jid(m_proto->getStringA(hContact, "ID"));
+ if (jid != NULL)
+ m_proto->m_szInviteJids.push_back((char*)jid);
}
}
-
- HWND hwndEntry = GetDlgItem(hwndDlg, IDC_NEWJID);
- int len = GetWindowTextLength(hwndEntry);
- if (len > 0) {
- std::string szOther; szOther.resize(len + 1);
- GetWindowTextA(hwndEntry, (char*)szOther.data(), len);
- proto->m_szInviteJids.push_back(szOther);
- }
-
- EndDialog(hwndDlg, 1);
}
+
+ ptrA tszText(m_entry.GetTextA());
+ if (tszText != NULL)
+ m_proto->m_szInviteJids.push_back(string(tszText));
}
+};
- return 0;
+void WhatsAppProto::InviteChatUser(WAChatInfo *pInfo)
+{
+ CInviteDialog dlg(this);
+ if (!dlg.DoModal())
+ return;
+
+ if (isOnline()) {
+ m_pConnection->sendAddParticipants((char*)_T2A(pInfo->tszJid), m_szInviteJids);
+ m_szInviteJids.clear();
+ }
}
diff --git a/protocols/WhatsApp/src/dialogs.h b/protocols/WhatsApp/src/dialogs.h
index f31cc322c6..bb244c6834 100644
--- a/protocols/WhatsApp/src/dialogs.h
+++ b/protocols/WhatsApp/src/dialogs.h
@@ -2,6 +2,5 @@
#define DIALOGS_H
INT_PTR CALLBACK InviteDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK WhatsAppAccountProc(HWND hwndDlg, UINT uMsg, WPARAM wparam, LPARAM lParam);
#endif \ No newline at end of file
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index dd01ffac5b..c91b72dcc5 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -53,7 +53,7 @@ WhatsAppProto::WhatsAppProto(const char* proto_name, const TCHAR* username) :
if (m_tszDefaultGroup == NULL)
m_tszDefaultGroup = mir_tstrdup(_T("WhatsApp"));
- Clist_CreateGroup(0, m_tszDefaultGroup);
+ Clist_CreateGroup(0, m_tszDefaultGroup);
SetAllContactStatuses(ID_STATUS_OFFLINE, true);
}
@@ -316,29 +316,6 @@ bool WhatsAppProto::Register(int state, const string &cc, const string &number,
//////////////////////////////////////////////////////////////////////////////
// EVENTS
-INT_PTR WhatsAppProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam)
-{
- return (INT_PTR)CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_ACCMGRUI),
- (HWND)lParam, WhatsAppAccountProc, (LPARAM)this);
-}
-
-int WhatsAppProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp = { sizeof(odp) };
- odp.hInstance = g_hInstance;
- odp.ptszTitle = m_tszUserName;
- odp.dwInitParam = LPARAM(this);
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE;
-
- odp.position = 1;
- odp.ptszGroup = LPGENT("Network");
- odp.ptszTab = LPGENT("Account");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.pfnDlgProc = WhatsAppAccountProc;
- Options_AddPage(wParam, &odp);
- return 0;
-}
-
int WhatsAppProto::OnUserInfo(WPARAM, LPARAM hContact)
{
ptrA jid(getStringA(hContact, WHATSAPP_KEY_ID));
diff --git a/protocols/WhatsApp/src/version.h b/protocols/WhatsApp/src/version.h
index 8abf89f928..65de5db425 100644
--- a/protocols/WhatsApp/src/version.h
+++ b/protocols/WhatsApp/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 2
-#define __BUILD_NUM 12
+#define __BUILD_NUM 13
#include <stdver.h>