From 343ed18d264ae1b90eda3c64ffb066035997489f Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 10 Jul 2013 18:51:18 +0000 Subject: options page for privacy settings git-svn-id: http://svn.miranda-ng.org/main/trunk@5312 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/src/skype_dialogs.cpp | 81 +++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'protocols/Skype/src/skype_dialogs.cpp') diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 427c924c7f..010e599ec4 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -187,6 +187,45 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR return FALSE; } +INT_PTR CALLBACK CSkypeProto::SkypePrivacyOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + CSkypeProto *ppro = (CSkypeProto *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (msg) + { + case WM_INITDIALOG: + if (lParam) + { + ppro = (CSkypeProto *)lParam; + ::SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); + + ::TranslateDialogDefault(hwndDlg); + } + break; + + case WM_COMMAND: + { + switch(LOWORD(wParam)) + { + } + } + break; + + case WM_NOTIFY: + if (reinterpret_cast(lParam)->code == PSN_APPLY && !ppro->IsOnline()) + { + return TRUE; + } + break; + + switch(LOWORD(wParam)) + { + } + break; + } + return FALSE; +} + INT_PTR CALLBACK CSkypeProto::SkypePasswordRequestProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { PasswordRequestBoxParam *param = reinterpret_cast(::GetWindowLongPtr(hwndDlg, GWLP_USERDATA)); @@ -764,6 +803,48 @@ INT_PTR CALLBACK CSkypeProto::HomeSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wP } break; + case WM_NOTIFY: + if (((LPNMHDR)lParam)->idFrom == 0) { + switch (((LPNMHDR)lParam)->code) { + case PSN_PARAMCHANGED: + SendMessage(hwndDlg, WM_INITDIALOG, 0, ((PSHNOTIFY *)lParam)->lParam); + break; + case PSN_APPLY: + if (ppro->IsOnline() && ppro->NeedUpdate) + ppro->SaveOwnInfoToServer(hwndDlg, iPageId); + else if ( !ppro->IsOnline()) + ppro->ShowNotification(::TranslateT("You are not currently connected to the Skype network. You must be online in order to update your information on the server.")); + break; + } + } + break; + } + return FALSE; +} + +INT_PTR CALLBACK CSkypeProto::AccountSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + const unsigned long iPageId = 3; + CSkypeProto *ppro = (CSkypeProto *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + + switch (msg) { + case WM_INITDIALOG: + if (lParam) { + ppro = (CSkypeProto *)lParam; + ::TranslateDialogDefault(hwndDlg); + + ::SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); + } + break; + + case WM_COMMAND: + if (((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)) + { + ppro->NeedUpdate = 1; + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); + } + break; + case WM_NOTIFY: if (((LPNMHDR)lParam)->idFrom == 0) { switch (((LPNMHDR)lParam)->code) { -- cgit v1.2.3