summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/JabberG/src/jabber.h2
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp11
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp2
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp5
4 files changed, 11 insertions, 9 deletions
diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h
index d6cc3803df..b999103128 100644
--- a/protocols/JabberG/src/jabber.h
+++ b/protocols/JabberG/src/jabber.h
@@ -71,6 +71,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_skin.h>
#include <m_chat.h>
#include <m_clc.h>
+#include <m_icolib.h>
+#include <m_cluiframes.h>
#include <m_clistint.h>
#include <m_button.h>
#include <m_avatars.h>
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp
index db09e790c4..f727d0ee1f 100644
--- a/protocols/JabberG/src/jabber_icolib.cpp
+++ b/protocols/JabberG/src/jabber_icolib.cpp
@@ -26,10 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "jabber.h"
#include "jabber_list.h"
-#include <m_icolib.h>
-
-#include <m_cluiframes.h>
-
#define IDI_ONLINE 104
#define IDI_OFFLINE 105
#define IDI_AWAY 128
@@ -190,9 +186,10 @@ HICON CJabberProto::LoadIconEx(const char* name, bool big)
if (HICON result = g_LoadIconEx(name, big))
return result;
- char szSettingName[100];
- mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", m_szModuleName, name);
- return Skin_GetIcon(szSettingName, big);
+ if ( !strcmp(name, "main"))
+ return Skin_GetIconByHandle(m_hProtoIcon, big);
+
+ return NULL;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 9e42b13f53..4ed270192e 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -633,6 +633,8 @@ void CJabberProto::InitPopups(void)
ppc.colorText = RGB(255, 245, 225); //Yellow
ppc.iSeconds = 60;
m_hPopupClass = Popup_RegisterClass(&ppc);
+
+ Skin_ReleaseIcon(ppc.hIcon);
}
void CJabberProto::MsgPopup(HANDLE hContact, const TCHAR *szMsg, const TCHAR *szTitle)
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 4986c7f401..fc296d7c18 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -298,11 +298,12 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM)
StatusIconData sid = {0};
sid.cbSize = sizeof(sid);
sid.szModule = m_szModuleName;
- sid.hIcon = LoadIconEx("main");
- sid.hIconDisabled = LoadIconEx("main");
+ sid.hIcon = sid.hIconDisabled = LoadIconEx("main");
sid.flags = MBF_HIDDEN;
sid.szTooltip = Translate("Jabber Resource");
CallService(MS_MSG_ADDICON, 0, (LPARAM) &sid);
+ Skin_ReleaseIcon(sid.hIcon);
+
JHookEvent(ME_MSG_ICONPRESSED, &CJabberProto::OnProcessSrmmIconClick);
JHookEvent(ME_MSG_WINDOWEVENT, &CJabberProto::OnProcessSrmmEvent);