From df73a896acdae7c5a8f4f73e81b9d1437d2a415d Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 20 Oct 2013 12:41:42 +0000 Subject: options page added git-svn-id: http://svn.miranda-ng.org/main/trunk@6551 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/proto.cpp | 18 ++++++++++++++++++ protocols/WhatsApp/src/proto.h | 3 ++- protocols/WhatsApp/src/resource.h | 3 ++- protocols/WhatsApp/src/version.h | 4 ++-- 4 files changed, 24 insertions(+), 4 deletions(-) (limited to 'protocols/WhatsApp/src') diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 648accab5b..69f5931026 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -16,6 +16,7 @@ WhatsAppProto::WhatsAppProto(const char* proto_name, const TCHAR* username) : HookProtoEvent(ME_GC_EVENT, &WhatsAppProto::OnChatOutgoing); HookProtoEvent(ME_CLIST_PREBUILDSTATUSMENU, &WhatsAppProto::OnBuildStatusMenu); + HookProtoEvent(ME_OPT_INITIALISE, &WhatsAppProto::OnOptionsInit); this->InitContactMenus(); @@ -282,6 +283,23 @@ INT_PTR WhatsAppProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam) (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_WHATSAPOPTIONS); + odp.pfnDlgProc = WhatsAppAccountProc; + Options_AddPage(wParam, &odp); + return 0; +} + int WhatsAppProto::RefreshBuddyList(WPARAM, LPARAM ) { debugLogA(""); diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h index 10969f44fb..0afa3e3a55 100644 --- a/protocols/WhatsApp/src/proto.h +++ b/protocols/WhatsApp/src/proto.h @@ -81,10 +81,11 @@ public: //////////////////////// // Services - INT_PTR __cdecl SvcCreateAccMgrUI( WPARAM, LPARAM); + INT_PTR __cdecl SvcCreateAccMgrUI( WPARAM, LPARAM); INT_PTR __cdecl OnJoinChat(WPARAM, LPARAM); INT_PTR __cdecl OnLeaveChat(WPARAM, LPARAM); INT_PTR __cdecl OnCreateGroup(WPARAM,LPARAM); + int __cdecl OnOptionsInit(WPARAM, LPARAM); int __cdecl RefreshBuddyList(WPARAM, LPARAM); int __cdecl RequestFriendship(WPARAM, LPARAM); diff --git a/protocols/WhatsApp/src/resource.h b/protocols/WhatsApp/src/resource.h index 1c2d4f26a9..764ea8dd5f 100644 --- a/protocols/WhatsApp/src/resource.h +++ b/protocols/WhatsApp/src/resource.h @@ -5,6 +5,7 @@ #define IDD_WHATSAPPACCOUNT 101 #define IDD_INPUTBOX 102 #define IDR_REGISTERUTILITY 103 +#define IDD_WHATSAPOPTIONS 104 #define IDI_WHATSAPP 203 #define IDI_ADD_GROUP 206 #define IDI_ADD_USER_TO_GROUP 207 @@ -32,7 +33,7 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 112 +#define _APS_NEXT_RESOURCE_VALUE 105 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1019 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/protocols/WhatsApp/src/version.h b/protocols/WhatsApp/src/version.h index c3d1f6f9c6..9146119e20 100644 --- a/protocols/WhatsApp/src/version.h +++ b/protocols/WhatsApp/src/version.h @@ -7,10 +7,10 @@ #define __TOSTRING(x) #x #define __VERSION_STRING __TOSTRING(__FILEVERSION_STRING) -#define __PLUGIN_NAME "WhatsApp" +#define __PLUGIN_NAME "WhatsApp protocol" #define __FILENAME "WhatsApp.dll" #define __DESCRIPTION "WhatsApp protocol support for Miranda NG." #define __AUTHOR "Uli Hecht" #define __AUTHOREMAIL "" #define __AUTHORWEB "http://miranda-ng.org/p/WhatsApp/" -#define __COPYRIGHT "© 2013 Uli Hecht" +#define __COPYRIGHT "© 2013 Uli Hecht" -- cgit v1.2.3