diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-15 14:23:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-15 14:23:02 +0000 |
commit | 3f9882178018afbe9aaaba1f4461f3fc75493260 (patch) | |
tree | 50554bd4a21472624c94a859bfdc5e8758becd45 /src/mir_core | |
parent | 547ec570deb26f93fa4ab974a76c0e964a635586 (diff) |
MS_SKIN_LOADICON & MS_SKIN_LOADPROTOICON replaced with direct function calls
git-svn-id: http://svn.miranda-ng.org/main/trunk@14176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/modules.cpp | 16 | ||||
-rw-r--r-- | src/mir_core/src/protos.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/ui_utils.cpp | 4 |
3 files changed, 12 insertions, 10 deletions
diff --git a/src/mir_core/src/modules.cpp b/src/mir_core/src/modules.cpp index 51a953e934..d2c21ad90f 100644 --- a/src/mir_core/src/modules.cpp +++ b/src/mir_core/src/modules.cpp @@ -299,13 +299,15 @@ static HANDLE HookEventInt(int type, const char *name, MIRANDAHOOK hookProc, voi if ((idx = hooks.getIndex((THook*)name)) == -1) return NULL; - THook* p = hooks[ idx ]; - p->subscriber = (THookSubscriber*)mir_realloc(p->subscriber, sizeof(THookSubscriber)*(p->subscriberCount+1)); - p->subscriber[ p->subscriberCount ].type = type; - p->subscriber[ p->subscriberCount ].pfnHook = hookProc; - p->subscriber[ p->subscriberCount ].object = object; - p->subscriber[ p->subscriberCount ].lParam = lParam; - p->subscriber[ p->subscriberCount ].hOwner = GetInstByAddress(hookProc); + THook *p = hooks[idx]; + p->subscriber = (THookSubscriber*)mir_realloc(p->subscriber, sizeof(THookSubscriber)*(p->subscriberCount + 1)); + + THookSubscriber &s = p->subscriber[p->subscriberCount]; + s.type = type; + s.pfnHook = hookProc; + s.object = object; + s.lParam = lParam; + s.hOwner = GetInstByAddress(hookProc); p->subscriberCount++; return (HANDLE)((p->id << 16) | p->subscriberCount); diff --git a/src/mir_core/src/protos.cpp b/src/mir_core/src/protos.cpp index d643a811f4..2b408e7acb 100644 --- a/src/mir_core/src/protos.cpp +++ b/src/mir_core/src/protos.cpp @@ -104,7 +104,7 @@ MIR_CORE_DLL(void) ProtoConstructor(PROTO_INTERFACE *pThis, LPCSTR pszModuleName pThis->m_iVersion = 2;
pThis->m_iStatus = pThis->m_iDesiredStatus = ID_STATUS_OFFLINE;
pThis->m_szModuleName = mir_strdup(pszModuleName);
- pThis->m_hProtoIcon = IcoLib_IsManaged(LoadSkinnedProtoIcon(pszModuleName, ID_STATUS_ONLINE));
+ pThis->m_hProtoIcon = IcoLib_IsManaged(Skin_LoadProtoIcon(pszModuleName, ID_STATUS_ONLINE));
pThis->m_tszUserName = mir_tstrdup(ptszUserName);
}
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index fae4fb3f3e..3800ca318d 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -642,7 +642,7 @@ CCtrlMButton::CCtrlMButton(CDlgBase* dlg, int ctrlId, HICON hIcon, const char* t CCtrlMButton::CCtrlMButton(CDlgBase* dlg, int ctrlId, int iCoreIcon, const char* tooltip)
: CCtrlButton(dlg, ctrlId),
- m_hIcon(::LoadSkinnedIcon(iCoreIcon)),
+ m_hIcon(::Skin_LoadIcon(iCoreIcon)),
m_toolTip(tooltip)
{}
@@ -2648,6 +2648,6 @@ void CProtoIntDlgBase::UpdateStatusBar() RECT rcStatus; GetWindowRect(m_hwndStatus, &rcStatus);
int parts[] = { rcStatus.right - rcStatus.left - sz.cx, -1 };
SendMessage(m_hwndStatus, SB_SETPARTS, 2, (LPARAM)parts);
- SendMessage(m_hwndStatus, SB_SETICON, 1, (LPARAM)LoadSkinnedProtoIcon(m_proto_interface->m_szModuleName, m_proto_interface->m_iStatus));
+ SendMessage(m_hwndStatus, SB_SETICON, 1, (LPARAM)Skin_LoadProtoIcon(m_proto_interface->m_szModuleName, m_proto_interface->m_iStatus));
SendMessage(m_hwndStatus, SB_SETTEXT, 1, (LPARAM)m_proto_interface->m_tszUserName);
}
|