summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-02-23 16:14:06 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-02-23 16:14:06 +0000
commit2e711d104e232f6e957cf2dcd6954f659c980f02 (patch)
tree2bc5e957690ffb17550014577d4fcebca0a2505b /protocols
parentee8802d8809f2effd5ae827cba7137f2dd684b6d (diff)
correct Jabber account icon calculation
git-svn-id: http://svn.miranda-ng.org/main/trunk@3734 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp5
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp4
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
3 files changed, 5 insertions, 8 deletions
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index 9afd1e3950..71bfea3dc6 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -186,13 +186,10 @@ void CJabberProto::IconsInit(void)
HANDLE CJabberProto::GetIconHandle(int iconId)
{
- if (HANDLE result = g_GetIconHandle(iconId))
- return result;
-
if (iconId == IDI_JABBER)
return m_hProtoIcon;
- return NULL;
+ return g_GetIconHandle(iconId);
}
HICON CJabberProto::LoadIconEx(const char* name, bool big)
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 02d8171b3b..3f78cbb360 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -436,7 +436,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON|CMIM_FLAGS;
- mi.icolibItem = GetIconHandle(IDI_JABBER);
+ mi.icolibItem = m_hProtoIcon;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hMenuResourcesRoot, (LPARAM)&mi);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)g_hMenuResourcesActive, (LPARAM)&mi);
@@ -690,7 +690,7 @@ void CJabberProto::MenuInit()
mi.position = -1999901006;
mi.hParentMenu = HGENMENU_ROOT;
mi.flags = CMIF_ICONFROMICOLIB | CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.icolibItem = GetIconHandle(IDI_JABBER);
+ mi.icolibItem = m_hProtoIcon;
hJabberRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
}
else {
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 9ad0e24675..520c0b9954 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -711,10 +711,10 @@ HICON __cdecl CJabberProto::GetIcon(int iconIndex)
{
if (LOWORD(iconIndex) == PLI_PROTOCOL) {
if (iconIndex & PLIF_ICOLIBHANDLE)
- return (HICON)GetIconHandle(IDI_JABBER);
+ return (HICON)m_hProtoIcon;
bool big = (iconIndex & PLIF_SMALL) == 0;
- HICON hIcon = LoadIconEx("main", big);
+ HICON hIcon = Skin_GetIconByHandle(m_hProtoIcon, big);
if (iconIndex & PLIF_ICOLIB)
return hIcon;