diff options
author | Szymon Tokarz <wsx22@o2.pl> | 2013-10-31 00:52:27 +0000 |
---|---|---|
committer | Szymon Tokarz <wsx22@o2.pl> | 2013-10-31 00:52:27 +0000 |
commit | a1e7a7060fd0e73a0af3fdfd82fade1dab4deb80 (patch) | |
tree | 16f83be5425ffaf088f2704c5e56d9c5634709d0 /protocols/Gadu-Gadu | |
parent | 9dbc398a3915f63637a3fa163c0fa18732b2cb46 (diff) |
Gadu-Gadu protocol
- restore "Owner: User Details" GG page init (after r5428)
git-svn-id: http://svn.miranda-ng.org/main/trunk@6712 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu')
-rw-r--r-- | protocols/Gadu-Gadu/src/dialogs.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 86f422c26a..eb47f96fab 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -906,26 +906,33 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, int GGPROTO::details_init(WPARAM wParam, LPARAM lParam)
{
HANDLE hContact = (HANDLE)lParam;
- char* szProto = GetContactProto(hContact);
- if (szProto == NULL)
- return 0;
-
- if (hContact && (strcmp(szProto, m_szModuleName) || isChatRoom(hContact)))
- return 0;
+ char* pszTemplate;
+
+ if (hContact == NULL){
+ // View/Change My Details
+ pszTemplate = MAKEINTRESOURCEA(IDD_CHINFO_GG);
+ } else {
+ // Other user details
+ char* szProto = GetContactProto(hContact);
+ if (szProto == NULL)
+ return 0;
+ if (strcmp(szProto, m_szModuleName) || isChatRoom(hContact))
+ return 0;
+ pszTemplate = MAKEINTRESOURCEA(IDD_INFO_GG);
+ }
- // Here goes init
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.flags = ODPF_DONTTRANSLATE | ODPF_TCHAR;
odp.hInstance = hInstance;
odp.pfnDlgProc = gg_detailsdlgproc;
odp.position = -1900000000;
- odp.pszTemplate = ((HANDLE)lParam != NULL) ? MAKEINTRESOURCEA(IDD_INFO_GG) : MAKEINTRESOURCEA(IDD_CHINFO_GG);
+ odp.pszTemplate = pszTemplate;
odp.ptszTitle = m_tszUserName;
odp.dwInitParam = (LPARAM)this;
UserInfo_AddPage(wParam, &odp);
// Start search for user data
- if ((HANDLE)lParam == NULL)
+ if (hContact == NULL)
GetInfo(NULL, 0);
return 0;
|