diff options
author | George Hazan <george.hazan@gmail.com> | 2012-12-11 14:40:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-12-11 14:40:55 +0000 |
commit | 976d66eafcc8f1005b74e30ef43b13eedcb473ab (patch) | |
tree | 2aacc439a06ec31be5da9a97f77b32b3f354252d /protocols/JabberG/src/jabber_userinfo.cpp | |
parent | a12876e95ecf66728d793619dd243711092a6b70 (diff) |
we don't remove jabber avatars when it's not needed
git-svn-id: http://svn.miranda-ng.org/main/trunk@2722 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_userinfo.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_userinfo.cpp | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 681dfbbd3a..0cad014101 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -845,31 +845,30 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) if ( !CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
return 0;
- OPTIONSDIALOGPAGE odp = {0};
- odp.cbSize = sizeof(odp);
- odp.hInstance = hInst;
- odp.dwInitParam = (LPARAM)this;
-
HANDLE hContact = (HANDLE)lParam;
- if (hContact) {
- char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
- odp.pfnDlgProc = JabberUserInfoDlgProc;
- odp.position = -2000000000;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_JABBER);
- odp.pszTitle = LPGEN("Account");
- UserInfo_AddPage(wParam, &odp);
-
- odp.pfnDlgProc = JabberUserPhotoDlgProc;
- odp.position = 2000000000;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_PHOTO);
- odp.pszTitle = LPGEN("Photo");
- UserInfo_AddPage(wParam, &odp);
- }
- }
- else {
+ if (hContact == NULL) {
// Show our vcard
OnUserInfoInit_VCard(wParam, lParam);
+ return 0;
+ }
+
+ char *szProto = GetContactProto(hContact);
+ if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
+ OPTIONSDIALOGPAGE odp = { sizeof(odp) };
+ odp.hInstance = hInst;
+ odp.dwInitParam = (LPARAM)this;
+
+ odp.pfnDlgProc = JabberUserInfoDlgProc;
+ odp.position = -2000000000;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_JABBER);
+ odp.pszTitle = LPGEN("Account");
+ UserInfo_AddPage(wParam, &odp);
+
+ odp.pfnDlgProc = JabberUserPhotoDlgProc;
+ odp.position = 2000000000;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_VCARD_PHOTO);
+ odp.pszTitle = LPGEN("Photo");
+ UserInfo_AddPage(wParam, &odp);
}
return 0;
|