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 /plugins/SimpleStatusMsg/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 'plugins/SimpleStatusMsg/src')
-rw-r--r-- | plugins/SimpleStatusMsg/src/awaymsg.cpp | 6 | ||||
-rw-r--r-- | plugins/SimpleStatusMsg/src/main.cpp | 20 | ||||
-rw-r--r-- | plugins/SimpleStatusMsg/src/msgbox.cpp | 18 | ||||
-rw-r--r-- | plugins/SimpleStatusMsg/src/utils.cpp | 4 |
4 files changed, 24 insertions, 24 deletions
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 705b860cc5..1861034b62 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -194,8 +194,8 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP if (dat->hAwayMsgEvent) UnhookEvent(dat->hAwayMsgEvent);
Utils_SaveWindowPosition(hwndDlg, dat->hContact, "SRAway", "AwayMsgDlg");
WindowList_Remove(hWindowList, hwndDlg);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, NULL));
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, NULL));
mir_free(dat);
break;
}
@@ -399,7 +399,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) }
}
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hAwayMsgMenuItem, (LPARAM)&clmi);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)clmi.hIcon, (LPARAM)0);
+ Skin_ReleaseIcon(clmi.hIcon);
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden)
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 96a62fc6cf..ca92ffbd7c 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1284,61 +1284,61 @@ static INT_PTR ChangeStatusMsg(WPARAM wParam, LPARAM lParam) static INT_PTR SetOfflineStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_OFFLINE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_OFFLINE, 0);
return 0;
}
static INT_PTR SetOnlineStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_ONLINE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_ONLINE, 0);
return 0;
}
static INT_PTR SetAwayStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_AWAY, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_AWAY, 0);
return 0;
}
static INT_PTR SetDNDStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_DND, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_DND, 0);
return 0;
}
static INT_PTR SetNAStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_NA, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_NA, 0);
return 0;
}
static INT_PTR SetOccupiedStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_OCCUPIED, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_OCCUPIED, 0);
return 0;
}
static INT_PTR SetFreeChatStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_FREECHAT, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_FREECHAT, 0);
return 0;
}
static INT_PTR SetInvisibleStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_INVISIBLE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_INVISIBLE, 0);
return 0;
}
static INT_PTR SetOnThePhoneStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_ONTHEPHONE, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_ONTHEPHONE, 0);
return 0;
}
static INT_PTR SetOutToLunchStatus(WPARAM wParam, LPARAM lParam)
{
- ChangeStatusMessage((WPARAM)ID_STATUS_OUTTOLUNCH, (LPARAM)NULL);
+ ChangeStatusMessage((WPARAM)ID_STATUS_OUTTOLUNCH, 0);
return 0;
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 4a0dddfc20..c03ec64576 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -78,7 +78,7 @@ HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) HIMAGELIST himlIcons = ImageList_Create(16, 16, (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, num_icons, 0);
HICON hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_OFFLINE);
ImageList_AddIcon(himlIcons, hicon);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0);
+ Skin_ReleaseIcon(hicon);
statusicon_nr[0] = 0;
int j = 1;
@@ -88,7 +88,7 @@ HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) {
hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_ONLINE + i);
ImageList_AddIcon(himlIcons, hicon);
- CallService(MS_SKIN2_RELEASEICON, (LPARAM)hicon, (WPARAM)0);
+ Skin_ReleaseIcon(hicon);
statusicon_nr[i + 1] = j;
j++;
}
@@ -208,10 +208,10 @@ HWND WINAPI CreateStatusComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) }
if (!(data->m_iDlgFlags & DLG_SHOW_STATUS_ICONS))
- SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16);
+ SendMessage(handle, CB_SETITEMHEIGHT, 0, (LPARAM)16);
else
{
- SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)18);
+ SendMessage(handle, CB_SETITEMHEIGHT, 0, (LPARAM)18);
SendMessage(handle, CBEM_SETIMAGELIST, 0, (LPARAM)data->status_icons);
}
SetWindowPos(handle, NULL, 11, 11, 112, 20, SWP_NOACTIVATE);
@@ -424,7 +424,7 @@ HWND WINAPI CreateRecentComboBoxEx(HWND hwndDlg, struct MsgBoxData *data) SendMessage(handle, CB_SETDROPPEDWIDTH, (WPARAM)250, 0);
}
SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)16);
- SendMessage(handle, CB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)16);
+ SendMessage(handle, CB_SETITEMHEIGHT, 0, (LPARAM)16);
if (((data->m_iDlgFlags & DLG_SHOW_BUTTONS) || (data->m_iDlgFlags & DLG_SHOW_BUTTONS_FLAT)) && !found && !data->num_def_msgs)
EnableWindow(handle, FALSE);
@@ -888,8 +888,8 @@ void ChangeDlgStatus(HWND hwndDlg, struct MsgBoxData *msgbox_data, int iStatus) else if (iStatus > ID_STATUS_CURRENT)
iStatus = GetCurrentStatus(NULL);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)) , 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)));
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus)));
if (!bDisabled && ((Proto_Status2Flag(iStatus) & msgbox_data->m_iStatusMsgModes)
|| (iStatus == ID_STATUS_OFFLINE && (Proto_Status2Flag(ID_STATUS_INVISIBLE) & msgbox_data->m_iStatusMsgModes))))
@@ -1784,8 +1784,8 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA ReleaseIconEx("predef");
ReleaseIconEx("add");
ReleaseIconEx("clear");
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)NULL), 0);
- CallService(MS_SKIN2_RELEASEICON, (WPARAM)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)NULL), 0);
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, 0));
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT1), GWLP_WNDPROC, (LONG_PTR)MainDlgProc);
if (msgbox_data)
diff --git a/plugins/SimpleStatusMsg/src/utils.cpp b/plugins/SimpleStatusMsg/src/utils.cpp index 549dd957bc..013d8e5971 100644 --- a/plugins/SimpleStatusMsg/src/utils.cpp +++ b/plugins/SimpleStatusMsg/src/utils.cpp @@ -72,7 +72,7 @@ HICON LoadIconEx(const char* name) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name);
- return (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)szSettingName);
+ return Skin_GetIcon(szSettingName);
}
HANDLE GetIconHandle(int iconId)
@@ -86,7 +86,7 @@ void ReleaseIconEx(const char* name) {
char szSettingName[100];
mir_snprintf(szSettingName, sizeof(szSettingName), "SimpleStatusMsg_%s", name);
- CallService(MS_SKIN2_RELEASEICON, 0, (LPARAM)szSettingName);
+ Skin_ReleaseIcon(szSettingName);
}
HANDLE HookEventEx(const char *szEvent, MIRANDAHOOK hookProc)
|