diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-02 14:11:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-02 14:11:01 +0000 |
commit | 75b1ff75c42644eb36552762652e4b0c9ff071bc (patch) | |
tree | 238f026ef373d30a395846f38c302a81961b14ac /protocols/JabberG/src | |
parent | 2caba72d51b09368801f23dd8951d589ab4dc809 (diff) |
final switch to the typed icolib api
git-svn-id: http://svn.miranda-ng.org/main/trunk@2152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r-- | protocols/JabberG/src/jabber_icolib.cpp | 15 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_menu.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_opt.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_privacy.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_userinfo.cpp | 3 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_xstatus.cpp | 6 | ||||
-rw-r--r-- | protocols/JabberG/src/ui_utils.h | 2 |
9 files changed, 19 insertions, 19 deletions
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index f29a827313..689ace5b09 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -163,7 +163,7 @@ char *CIconPool::GetIcolibName(const char *name) HICON CIconPool::GetIcon(const char *name, bool big)
{
if (CPoolItem *item = FindItemByName(name))
- return (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, big, (LPARAM)item->m_hIcolibItem);
+ return Skin_GetIconByHandle(item->m_hIcolibItem, big);
return NULL;
}
@@ -188,7 +188,7 @@ HANDLE CIconPool::GetClistHandle(const char *name) if (item->m_hClistItem)
return item->m_hClistItem;
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item->m_hIcolibItem);
+ HICON hIcon = Skin_GetIconByHandle(item->m_hIcolibItem);
item->m_hClistItem = (HANDLE)CallService(MS_CLIST_EXTRA_ADD_ICON, (WPARAM)hIcon, 0);
g_ReleaseIcon(hIcon);
return item->m_hClistItem;
@@ -310,7 +310,7 @@ HICON CJabberProto::LoadIconEx( const char* name, bool big ) char szSettingName[100];
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", m_szModuleName, name );
- return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ return Skin_GetIcon(szSettingName, big);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -408,7 +408,7 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa if (hi && nf) DestroyIcon(hi);
if ( IconName != NULL && SectName != NULL) {
sid.cbSize = sizeof(sid);
- sid.hDefaultIcon = (has_proto_icon)?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,(WPARAM)NULL,(LPARAM)(-internalidx));
+ sid.hDefaultIcon = (has_proto_icon)?NULL:(HICON)CallService(MS_SKIN_LOADPROTOICON,0,(LPARAM)(-internalidx));
sid.ptszSection = SectName;
sid.pszName = IconName;
sid.ptszDescription = Description;
@@ -417,7 +417,7 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa sid.flags = SIDF_TCHAR;
Skin_AddIcon(&sid);
}
- return ((HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)IconName));
+ return Skin_GetIcon(IconName);
}
static HICON LoadSmallIcon(HINSTANCE hInstance, LPCTSTR lpIconName)
@@ -706,12 +706,13 @@ HICON g_LoadIconEx( const char* name, bool big ) {
char szSettingName[100];
mir_snprintf( szSettingName, sizeof( szSettingName ), "%s_%s", GLOBAL_SETTING_PREFIX, name );
- return ( HICON )CallService( MS_SKIN2_GETICON, big, (LPARAM)szSettingName );
+ return Skin_GetIcon(szSettingName, big);
}
void g_ReleaseIcon( HICON hIcon )
{
- if ( hIcon ) CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
+ if (hIcon)
+ Skin_ReleaseIcon(hIcon);
}
void ImageList_AddIcon_Icolib( HIMAGELIST hIml, HICON hIcon )
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 6bc4c1f8c8..e13a56864d 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -843,7 +843,7 @@ void CJabberProto::MenuInit() mir_snprintf(srvFce, sizeof(srvFce), "%s/menuSetPriority/0", m_szModuleName);
bool needServices = !ServiceExists(srvFce);
if ( needServices )
- JCreateServiceParam(svcName, &CJabberProto::OnMenuSetPriority, (LPARAM)0);
+ JCreateServiceParam(svcName, &CJabberProto::OnMenuSetPriority, 0);
int steps[] = { 10, 5, 1, 0, -1, -5, -10 };
for (int i = 0; i < SIZEOF(steps); ++i) {
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 6817435d7f..2596b5d648 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -788,7 +788,7 @@ private: }
if ( bIsError )
- SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)NULL);
+ SendMessage(hwnd, WM_JABBER_REFRESH, 0, 0);
}
};
@@ -2273,7 +2273,7 @@ void CJabberDlgAccMgrUI::QueryServerListThread(void *arg) if ( result )
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)result);
if ( bIsError )
- SendMessage(hwnd, WM_JABBER_REFRESH, 0, (LPARAM)NULL);
+ SendMessage(hwnd, WM_JABBER_REFRESH, 0, 0);
}
INT_PTR CJabberProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 636cf50bf6..a78f1fbd37 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -924,7 +924,7 @@ void CJabberDlgPrivacyLists::OnProtoRefresh(WPARAM, LPARAM) SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_RESETCONTENT, 0, 0 );
LRESULT nItemId = SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_ADDSTRING, 0, (LPARAM)TranslateT( "<none>" ));
- SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_SETITEMDATA, nItemId, (LPARAM)NULL );
+ SendDlgItemMessage( m_hwnd, IDC_LB_LISTS, LB_SETITEMDATA, nItemId, 0 );
m_proto->m_privacyListManager.Lock();
CPrivacyList* pList = m_proto->m_privacyListManager.GetFirstList();
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index e242294a16..ad8d204951 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -173,7 +173,7 @@ void CJabberProto::OnIqResultGetSearchFields( HXML iqNode ) const TCHAR* szFrom = xmlGetAttrValue( iqNode, _T("from"));
if (szFrom)
SearchAddToRecent(szFrom,searchHandleDlg);
- PostMessage(searchHandleDlg,WM_USER+10,(WPARAM)0,(LPARAM)0);
+ PostMessage(searchHandleDlg,WM_USER+10,0,0);
ShowWindow(searchHandleDlg,SW_SHOW);
}
else if ( !lstrcmp( type, _T("error"))) {
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 6344751ead..420852ae43 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -538,7 +538,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI( WPARAM wParam, LPARAM l acs.handleType = HANDLE_SEARCHRESULT;
acs.szProto = m_szModuleName;
acs.psr = &jsr.hdr;
- CallService( MS_ADDCONTACT_SHOW, (WPARAM)NULL, (LPARAM)&acs );
+ CallService( MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs );
}
return 0;
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 9d8b476851..cc7c0257e8 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -327,8 +327,7 @@ static void sttFillAdvStatusInfo( CJabberProto* ppro, HWND hwndTree, HTREEITEM h mir_sntprintf(szText, 2047, _T("%s (%s)"), TranslateTS(szAdvStatusTitle), szAdvStatusText);
else
mir_sntprintf(szText, 2047, _T("%s"), TranslateTS(szAdvStatusTitle));
- sttFillInfoLine( hwndTree, htiRoot, (HICON)CallService(MS_SKIN2_GETICON, 0,
- (LPARAM)szAdvStatusIcon), szTitle, szText, dwInfoLine);
+ sttFillInfoLine( hwndTree, htiRoot, Skin_GetIcon(szAdvStatusIcon), szTitle, szText, dwInfoLine);
}
mir_free(szAdvStatusIcon);
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index d15cae2bcd..5078d7c5c0 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1985,7 +1985,7 @@ void CJabberInfoFrame::PaintCompact(HDC hdc) {
if (item.m_hIcolibIcon)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item.m_hIcolibIcon);
+ HICON hIcon = Skin_GetIconByHandle(item.m_hIcolibIcon);
if (hIcon)
{
DrawIconEx(hdc, SZ_FRAMEPADDING, (rc.bottom-cy_icon)/2, hIcon, cx_icon, cy_icon, 0, NULL, DI_NORMAL);
@@ -1999,7 +1999,7 @@ void CJabberInfoFrame::PaintCompact(HDC hdc) {
if (item.m_hIcolibIcon)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item.m_hIcolibIcon);
+ HICON hIcon = Skin_GetIconByHandle(item.m_hIcolibIcon);
if (hIcon)
{
SetRect(&item.m_rcItem, cx, (rc.bottom-cy_icon)/2, cx+cx_icon, (rc.bottom-cy_icon)/2+cy_icon);
@@ -2049,7 +2049,7 @@ void CJabberInfoFrame::PaintNormal(HDC hdc) if (item.m_hIcolibIcon)
{
- HICON hIcon = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)item.m_hIcolibIcon);
+ HICON hIcon = Skin_GetIconByHandle(item.m_hIcolibIcon);
if (hIcon)
{
DrawIconEx(hdc, cx, cy + (line_height-cy_icon)/2, hIcon, cx_icon, cy_icon, 0, NULL, DI_NORMAL);
diff --git a/protocols/JabberG/src/ui_utils.h b/protocols/JabberG/src/ui_utils.h index 9af9e8ba36..05a7090710 100644 --- a/protocols/JabberG/src/ui_utils.h +++ b/protocols/JabberG/src/ui_utils.h @@ -110,7 +110,7 @@ typedef struct tagLVSETINFOTIP #define LVGF_HEADER 0x00000001
#define LVGF_GROUPID 0x00000010
#define ListView_MapIndexToID(hwnd, index) \
- (UINT)SendMessage((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, (LPARAM)0)
+ (UINT)SendMessage((hwnd), LVM_MAPINDEXTOID, (WPARAM)index, 0)
#define TreeView_GetLineColor(hwnd) \
(COLORREF)SendMessage((hwnd), TVM_GETLINECOLOR, 0, 0)
#define TreeView_SetLineColor(hwnd, clr) \
|