summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/AVS/src/userInfo.cpp4
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp3
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp20
3 files changed, 14 insertions, 13 deletions
diff --git a/plugins/AVS/src/userInfo.cpp b/plugins/AVS/src/userInfo.cpp
index 919bf96847..ca47ea06be 100644
--- a/plugins/AVS/src/userInfo.cpp
+++ b/plugins/AVS/src/userInfo.cpp
@@ -466,6 +466,8 @@ int OnDetailsInit(WPARAM wParam, LPARAM hContact)
{
USERINFOPAGE uip = {};
uip.szTitle.a = LPGEN("Avatar");
+ uip.flags = ODPF_ICON;
+ uip.dwInitParam = (LPARAM)g_plugin.getIconHandle(IDI_AVATAR);
if (hContact == NULL) {
// User dialog
@@ -476,10 +478,8 @@ int OnDetailsInit(WPARAM wParam, LPARAM hContact)
char *szProto = Proto_GetBaseAccountName(hContact);
if (szProto == nullptr || g_plugin.getByte(szProto, 1)) {
// Contact dialog
- uip.flags = ODPF_ICON;
uip.position = -2000000000;
uip.pDialog = new AvatarUserInfoDlg();
- uip.dwInitParam = (LPARAM)g_plugin.getIconHandle(IDI_AVATAR);
g_plugin.addUserInfo(wParam, &uip);
}
}
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index d8ba73b3ca..57f4a4b28d 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -1051,8 +1051,9 @@ void CJabberProto::OnUserInfoInit_VCard(WPARAM wParam, LPARAM)
m_szPhotoFileName[0] = 0;
USERINFOPAGE uip = {};
- uip.flags = ODPF_UNICODE | ODPF_USERINFOTAB | ODPF_DONTTRANSLATE;
+ uip.flags = ODPF_UNICODE | ODPF_USERINFOTAB | ODPF_ICON;
uip.szGroup.w = m_tszUserName;
+ uip.dwInitParam = (LPARAM)Skin_GetProtoIcon(m_szModuleName, ID_STATUS_ONLINE);
uip.pDialog = new JabberVcardPersonalDlg(this);
uip.szTitle.w = LPGENW("General");
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index f2ef8788bd..bd81ec66d7 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -133,11 +133,20 @@ class CUserInfoDlg : public CDlgBase
const wchar_t *pwszPrevGroup = nullptr;
for (auto &it : items) {
+ int iImage = 1;
+ if ((it->dwFlags & ODPF_ICON) && it->lParam) {
+ HICON hIcon = IcoLib_GetIconByHandle((HANDLE)it->lParam);
+ if (hIcon) {
+ iImage = ImageList_AddIcon(m_imageList, hIcon);
+ IcoLib_ReleaseIcon(hIcon);
+ }
+ }
+
if (hParent == nullptr || (!hContact && mir_wstrcmp(pwszPrevGroup, it->pwszGroup))) {
TVINSERTSTRUCT tvis = {};
tvis.hInsertAfter = TVI_LAST;
tvis.item.lParam = (LPARAM)it;
- tvis.item.iImage = tvis.item.iSelectedImage = iFolderImage;
+ tvis.item.iImage = tvis.item.iSelectedImage = (it->pwszGroup == 0) ? iFolderImage : iImage;
tvis.item.mask = TVIF_TEXT | TVIF_PARAM | TVIF_STATE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
tvis.item.state = tvis.item.stateMask = TVIS_EXPANDED;
tvis.item.pszText = (it->pwszGroup == 0) ? pwszRoot : it->pwszGroup;
@@ -145,15 +154,6 @@ class CUserInfoDlg : public CDlgBase
pwszPrevGroup = it->pwszGroup;
}
- int iImage = 1;
- if ((it->dwFlags & ODPF_ICON) && it->lParam) {
- HICON hIcon = IcoLib_GetIconByHandle((HANDLE)it->lParam);
- if (hIcon) {
- iImage = ImageList_AddIcon(m_imageList, hIcon);
- IcoLib_ReleaseIcon(hIcon);
- }
- }
-
TVINSERTSTRUCT tvis;
tvis.hParent = hParent;
tvis.hInsertAfter = TVI_LAST;