From 38438c06408517405a5b26049e3537ee7f0d9615 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 18 Nov 2012 09:44:34 +0000 Subject: added own info dialog git-svn-id: http://svn.miranda-ng.org/main/trunk@2349 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/res/Resource.rc | 19 +++++++++++++++++++ protocols/Skype/src/resource.h | 6 +++++- protocols/Skype/src/skype_contacts.cpp | 1 + protocols/Skype/src/skype_dialogs.cpp | 31 +++++++++++++++++++------------ protocols/Skype/src/skype_proto.h | 1 + 5 files changed, 45 insertions(+), 13 deletions(-) (limited to 'protocols') diff --git a/protocols/Skype/res/Resource.rc b/protocols/Skype/res/Resource.rc index e9a9b81c2d..ad333ebf1c 100644 --- a/protocols/Skype/res/Resource.rc +++ b/protocols/Skype/res/Resource.rc @@ -53,6 +53,17 @@ BEGIN EDITTEXT IDC_LASTPROFILECHANGE,74,57,142,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER END +IDD_OWNINFO_SKYPE DIALOGEX 0, 0, 222, 151 +STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD +EXSTYLE WS_EX_CONTROLPARENT +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + CONTROL "",IDC_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,2,2,218,133 + PUSHBUTTON "&Save changes",IDC_SAVE,140,137,80,13,WS_DISABLED + EDITTEXT IDC_UPLOADING,2,138,127,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE | NOT WS_BORDER +END + + ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -82,6 +93,14 @@ BEGIN HORZGUIDE, 61 HORZGUIDE, 74 END + + IDD_OWNINFO_SKYPE, DIALOG + BEGIN + LEFTMARGIN, 2 + RIGHTMARGIN, 220 + TOPMARGIN, 2 + BOTTOMMARGIN, 150 + END END #endif // APSTUDIO_INVOKED diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h index c0d3786ec0..30ff3dace7 100644 --- a/protocols/Skype/src/resource.h +++ b/protocols/Skype/src/resource.h @@ -5,6 +5,7 @@ #define IDD_SKYPEACCOUNT 9 #define IDD_OPTIONS 10 #define IDD_INFO_SKYPE 11 +#define IDD_OWNINFO_SKYPE 12 #define IDI_ICON 101 #define IDR_RUNTIME 102 #define IDI_AUTH_GRANT 103 @@ -24,6 +25,9 @@ #define IDC_ONLINESINCE 1010 #define IDC_LASTEVENTDATE 1011 #define IDC_LASTPROFILECHANGE 1012 +#define IDC_SAVE 1013 +#define IDC_LIST 1014 +#define IDC_UPLOADING 1015 // Next default values for new objects // @@ -31,7 +35,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 108 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1013 +#define _APS_NEXT_CONTROL_VALUE 1016 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 736bffd7c6..7669615456 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -376,6 +376,7 @@ void CSkypeProto::UpdateContactProfile(HANDLE hContact, CContact::Ref contact) this->UpdateContactLastEventDate(hContact, contact); this->UpdateFullName(hContact, contact); + this->SetSettingString(hContact, "MirVer", _T("Skype")); this->SetSettingDword(hContact, "ProfileTS", newTS); } } diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 908786fd01..4e57273320 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -218,18 +218,18 @@ int __cdecl CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM lParam) { OPTIONSDIALOGPAGE odp = {0}; odp.cbSize = sizeof(odp); - odp.hInstance = g_hInstance; - odp.ptszTitle = m_tszUserName; + odp.hInstance = g_hInstance; + odp.ptszTitle = m_tszUserName; odp.dwInitParam = LPARAM(this); - odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE; + odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR | ODPF_DONTTRANSLATE; - odp.position = 271828; - odp.ptszGroup = LPGENT("Network"); - odp.ptszTab = LPGENT("Account"); + odp.position = 271828; + odp.ptszGroup = LPGENT("Network"); + odp.ptszTab = LPGENT("Account"); odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); - odp.pfnDlgProc = SkypeOptionsProc; + odp.pfnDlgProc = SkypeOptionsProc; Options_AddPage(wParam, &odp); - + return 0; } @@ -316,7 +316,12 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam break; } - return FALSE; + return FALSE; +} + +INT_PTR CALLBACK CSkypeProto::OwnSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +{ + return FALSE; } int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) @@ -329,19 +334,21 @@ int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE; odp.hInstance = g_hInstance; odp.dwInitParam = LPARAM(this); + odp.position = -1900000000; + odp.ptszTitle = m_tszUserName; HANDLE hContact = (HANDLE)lParam; if (hContact) { char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0); if (szProto != NULL && !strcmp(szProto, m_szModuleName)) { odp.pfnDlgProc = SkypeDlgProc; - odp.position = -1900000000; - odp.ptszTitle = m_tszUserName; odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SKYPE); UserInfo_AddPage(wParam, &odp); } } else { - //show own info + odp.pfnDlgProc = OwnSkypeDlgProc; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OWNINFO_SKYPE); + UserInfo_AddPage(wParam, &odp); } return 0; diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 1b4cc4e48b..9df51105cf 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -299,4 +299,5 @@ protected: static INT_PTR CALLBACK SkypeOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); static INT_PTR CALLBACK SkypePasswordProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); + static INT_PTR CALLBACK OwnSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); }; \ No newline at end of file -- cgit v1.2.3