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 | |
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
230 files changed, 749 insertions, 868 deletions
diff --git a/bin10/lib/mir_app.lib b/bin10/lib/mir_app.lib Binary files differindex 7bdfd143e1..618ebfdd4b 100644 --- a/bin10/lib/mir_app.lib +++ b/bin10/lib/mir_app.lib diff --git a/bin10/lib/mir_app64.lib b/bin10/lib/mir_app64.lib Binary files differindex e82621a0d3..7b6d6499e8 100644 --- a/bin10/lib/mir_app64.lib +++ b/bin10/lib/mir_app64.lib diff --git a/bin12/lib/mir_app.lib b/bin12/lib/mir_app.lib Binary files differindex 7bdfd143e1..618ebfdd4b 100644 --- a/bin12/lib/mir_app.lib +++ b/bin12/lib/mir_app.lib diff --git a/bin12/lib/mir_app64.lib b/bin12/lib/mir_app64.lib Binary files differindex e82621a0d3..7b6d6499e8 100644 --- a/bin12/lib/mir_app64.lib +++ b/bin12/lib/mir_app64.lib diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index 9fbd21c671..86bee1a2d6 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -53,12 +53,6 @@ procedure Srmm_RemoveIcon(sid: PStatusIconData); procedure Srmm_ModifyIcon(hContact:TMCONTACT; sid:PStatusIconData);
function Srmm_GetNthIcon(hContact:TMCONTACT; index:int):pStatusIconData;
-function LoadSkinnedIcon (id: int): HICON;
-function LoadSkinnedIconHandle(id: int): THANDLE;
-function LoadSkinnedIconBig (id: int): HICON;
-function LoadSkinnedIconName (id: int): PAnsiChar;
-
-function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THANDLE;
function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
function SkinPlaySound (const name: PAnsiChar): int_ptr;
@@ -400,36 +394,6 @@ begin result:=PStatusIconData(CallService(MS_MSG_GETNTHICON, hContact, index));
end;
-function LoadSkinnedIcon(id: int): HICON;
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- Result := HICON(CallService(MS_SKIN_LOADICON, id, 0));
-end;
-
-function LoadSkinnedIconHandle(id: int): THANDLE;
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- Result := THANDLE(CallService(MS_SKIN_LOADICON, id, 1));
-end;
-
-function LoadSkinnedIconBig(id: int): HICON;
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- Result := HICON(CallService(MS_SKIN_LOADICON, id, 2));
-end;
-
-function LoadSkinnedIconName(id: int): PAnsiChar;
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- Result := PAnsiChar(CallService(MS_SKIN_LOADICON, id, 3));
-end;
-
-function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THANDLE;
- {$IFDEF AllowInline}inline;{$ENDIF}
-begin
- Result := CallService(MS_SKIN_LOADPROTOICON, wParam(szProto), status);
-end;
-
function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
var
ssd: TSKINSOUNDDESCEX;
diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc index fcc4911e94..5c07d87008 100644 --- a/include/delphi/m_skin.inc +++ b/include/delphi/m_skin.inc @@ -88,22 +88,18 @@ const SKINICON_AUTH_REQUEST = 248;
SKINICON_AUTH_GRANT = 249;
SKINICON_AUTH_REVOKE = 250;
-{
- SKINICON_EVENT_MESSAGE_BIG = 300;
- SKINICON_EVENT_URL_BIG = 301;
- SKINICON_EVENT_FILE_BIG = 302;
- SKINICON_OTHER_MIRANDA_BIG = 303;
- SKINICON_OTHER_ADDCONTACT_BIG = 304;
- SKINICON_OTHER_USERDETAILS_BIG = 305;
- SKINICON_OTHER_HISTORY_BIG = 306;
- SKINICON_OTHER_FINDUSER_BIG = 307;
- SKINICON_OTHER_OPTIONS_BIG = 308;
- SKINICON_OTHER_ACCMGR_BIG = 309;
-}
- // menu icons are owned by the module that uses them so are not and should
- // not be skinnable. Except exit and show/hide
- // status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
+function Skin_LoadIcon(iconId:int; big:byte) : HICON; stdcall;
+ external AppDLL name 'Skin_LoadIcon';
+
+function Skin_GetIconHandle(iconId:int) : THANDLE; stdcall;
+ external AppDLL name 'Skin_GetIconHandle';
+
+function Skin_GetIconName(iconId:int) : PAnsiChar; stdcall;
+ external AppDLL name 'Skin_GetIconName';
+
+// status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
+const
SKINICON_STATUS_OFFLINE = 0;
SKINICON_STATUS_ONLINE = 1;
SKINICON_STATUS_AWAY = 2;
@@ -115,6 +111,9 @@ const SKINICON_STATUS_ONTHEPHONE = 8;
SKINICON_STATUS_OUTTOLUNCH = 9;
+function Skin_LoadProtoIcon(protoName:PAnsiChar; iconId:int; big:byte) : HICON; stdcall;
+ external AppDLL name 'Skin_LoadProtoIcon';
+
const
SSDF_UNICODE = $0001;
type
@@ -130,11 +129,6 @@ type const
{
- wParam : ICON_ID
- lParam : 0 - return HICON
- 1 - return icolib handle
- 2 - return big icon HICON
- 3 - return icolib icon name
Affect : Load an icon from the user's custom skin lib, or from the exe
if there isn't one loaded, see notes
Return : HICON for the new icon, do *not* DestroyIcon() the return value
@@ -143,16 +137,12 @@ const MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load';
{
- wParam : null terminated string containing the protocol name
- lParam : status_wanted
Affect : Load an icon representing the status_wanted for a particular protocol, see notes
Returns: an HICON for the new icon, do NOT DestroyIcon() the return value
returns NULL(0) on failure.
Notes : If wParam is NULL(0) the service will load the user's selected
'all protocols' status icon
}
- MS_SKIN_LOADPROTOICON :PAnsiChar = 'Skin/Icons/LoadProto';
- MS_SKIN_LOADPROTOICONBIG:PAnsiChar = 'Skin/Icons/LoadProtoBig';
{
wParam : hLangpack
diff --git a/include/m_skin.h b/include/m_skin.h index 7537e4a918..46e7d06299 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -30,26 +30,6 @@ extern int hLangpack; #include <m_core.h>
#endif
-//loads an icon from the user's custom skin library, or from the exe if there
-//isn't one of them
-//wParam = id of icon to load - see below
-//lParam = 0
-//returns an hIcon for the new icon. Do *not* DestroyIcon() the return value
-//returns NULL if id is invalid, but will always succeed for a valid id
-#define MS_SKIN_LOADICON "Skin/Icons/Load"
-//nice function to wrap this:
-__forceinline HICON LoadSkinnedIcon(int id) { return (HICON) CallService(MS_SKIN_LOADICON, id, 0); }
-__forceinline HANDLE LoadSkinnedIconHandle(int id) { return (HANDLE)CallService(MS_SKIN_LOADICON, id, 1); }
-__forceinline HICON LoadSkinnedIconBig(int id) { return (HICON) CallService(MS_SKIN_LOADICON, id, 2); }
-__forceinline LPCSTR LoadSkinnedIconName(int id) { return (LPCSTR)CallService(MS_SKIN_LOADICON, id, 3); }
-
-///////////////////////////////////////////////////////////////////////////////
-// Miranda skin
-
-MIR_APP_DLL(HICON) LoadSkinProtoIcon(const char *szProto, int status, bool big = false);
-MIR_APP_DLL(HICON) LoadSkinIcon(int idx, bool big = false);
-MIR_APP_DLL(HANDLE) GetSkinIconHandle(int idx);
-
// event icons
#define SKINICON_EVENT_MESSAGE 100
#define SKINICON_EVENT_URL 101
@@ -114,10 +94,15 @@ MIR_APP_DLL(HANDLE) GetSkinIconHandle(int idx); #define SKINICON_AUTH_GRANT 249
#define SKINICON_AUTH_REVOKE 250
-//menu icons are owned by the module that uses them so are not and should not
-//be skinnable. Except exit and show/hide
+/////////////////////////////////////////////////////////////////////////////////////////
+// Miranda skin
+// in all these functions idx = SKINICON_* constant
-//status mode icons. NOTE: These are deprecated in favour of LoadSkinnedProtoIcon()
+EXTERN_C MIR_APP_DLL(HICON) Skin_LoadIcon(int idx, bool big = false);
+EXTERN_C MIR_APP_DLL(HANDLE) Skin_GetIconHandle(int idx);
+EXTERN_C MIR_APP_DLL(char*) Skin_GetIconName(int idx);
+
+// status mode icons. NOTE: These are deprecated in favour of LoadSkinProtoIcon()
#define SKINICON_STATUS_OFFLINE 0
#define SKINICON_STATUS_ONLINE 1
#define SKINICON_STATUS_AWAY 2
@@ -129,23 +114,20 @@ MIR_APP_DLL(HANDLE) GetSkinIconHandle(int idx); #define SKINICON_STATUS_ONTHEPHONE 8
#define SKINICON_STATUS_OUTTOLUNCH 9
-//Loads an icon representing the status mode for a particular protocol.
-//wParam = (WPARAM)(const char*)szProto
-//lParam = status
-//returns an hIcon for the new icon. Do *not* DestroyIcon() the return value
-//returns NULL on failure
-//if szProto is NULL the function will load the user's selected 'all protocols'
-//status icon.
-#define MS_SKIN_LOADPROTOICON "Skin/Icons/LoadProto"
-#define MS_SKIN_LOADPROTOICONBIG "Skin/Icons/LoadProtoBig"
-//nice function to wrap this:
-__forceinline HICON LoadSkinnedProtoIcon(const char *szProto, int status) {return (HICON)CallService(MS_SKIN_LOADPROTOICON, (WPARAM)szProto, status);}
-__forceinline HICON LoadSkinnedProtoIconBig(const char *szProto, int status) {return (HICON)CallService(MS_SKIN_LOADPROTOICONBIG, (WPARAM)szProto, status);}
-
-//add a new sound so it has a default and can be changed in the options dialog
-//wParam = hLangpack
-//lParam = (LPARAM)(SKINSOUNDDESC*)ssd;
-//returns 0 on success, nonzero otherwise
+/////////////////////////////////////////////////////////////////////////////////////////
+// Loads an icon representing the status mode for a particular protocol.
+// returns an hIcon for the new icon. Do *not* DestroyIcon() the return value
+// returns NULL on failure
+// if szProto is NULL the function will load the user's selected 'all protocols'
+// status icon.
+
+EXTERN_C MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, bool big = false);
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// add a new sound so it has a default and can be changed in the options dialog
+// wParam = hLangpack
+// lParam = (LPARAM)(SKINSOUNDDESC*)ssd;
+// returns 0 on success, nonzero otherwise
#define SSDF_UNICODE 0x0001
@@ -210,11 +192,13 @@ __forceinline INT_PTR Skin_AddSound(SKINSOUNDDESCEX *ssd) return CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)ssd);
}
-//plays a named sound event
-//wParam = 0
-//lParam = (LPARAM)(const char*)pszName
-//pszName should have been added with Skin/Sounds/AddNew, but if not the
-//function will not fail, it will play the Windows default sound instead.
+/////////////////////////////////////////////////////////////////////////////////////////
+// plays a named sound event
+// wParam = 0
+// lParam = (LPARAM)(const char*)pszName
+// pszName should have been added with Skin/Sounds/AddNew, but if not the
+// function will not fail, it will play the Windows default sound instead.
+
#define MS_SKIN_PLAYSOUND "Skin/Sounds/Play"
__forceinline INT_PTR SkinPlaySound(const char *name)
@@ -222,9 +206,11 @@ __forceinline INT_PTR SkinPlaySound(const char *name) return CallService(MS_SKIN_PLAYSOUND, 0, (LPARAM)name);
}
-//plays any sound file
-//wParam = 0
-//lParam = (LPARAM)(const TCHAR*)ptszFileName
+/////////////////////////////////////////////////////////////////////////////////////////
+// plays any sound file
+// wParam = 0
+// lParam = (LPARAM)(const TCHAR*)ptszFileName
+
#define MS_SKIN_PLAYSOUNDFILE "Skin/Sounds/PlayFile"
__forceinline INT_PTR SkinPlaySoundFile(const TCHAR *ptszFileName)
@@ -232,23 +218,20 @@ __forceinline INT_PTR SkinPlaySoundFile(const TCHAR *ptszFileName) return CallService(MS_SKIN_PLAYSOUNDFILE, 0, (LPARAM)ptszFileName);
}
-//sent when the icons DLL has been changed in the options dialog, and everyone
-//should re-make their image lists
-//wParam = lParam = 0
+/////////////////////////////////////////////////////////////////////////////////////////
+// sent when the icons DLL has been changed in the options dialog, and everyone
+// should re-make their image lists
+// wParam = lParam = 0
+
#define ME_SKIN_ICONSCHANGED "Skin/IconsChanged"
+/////////////////////////////////////////////////////////////////////////////////////////
+// wParam: 0 when playing sound (1 when sound is being previewed)
+// lParam: (TCHAR*) pszSoundFile
+// Affect: This hook is fired when the sound module needs to play a sound
+// Note : This event has default processing, if no one HookEvent()'s this event then it will
+// use the default hook code, which uses PlaySound()
-/*
- wParam: 0 when playing sound (1 when sound is being previewed)
- lParam: (TCHAR*) pszSoundFile
- Affect: This hook is fired when the sound module needs to play a sound
- Note : This event has default processing, if no one HookEvent()'s this event then it will
- use the default hook code, which uses PlaySound()
- Version: 0.3.4a (2004/09/15)
-*/
#define ME_SKIN_PLAYINGSOUND "Skin/Sounds/Playing"
-//random ideas for the future:
-// Skin/LoadNetworkAnim - get some silly spinner thing when we want to be busy
-
#endif //M_SKIN_H__
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 5835213a5f..9e1f3a45f3 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -1016,7 +1016,7 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP if (!Proto_IsAvatarsEnabled(accs[i]->szModuleName)) continue; - ImageList_AddIcon(hIml, LoadSkinnedProtoIcon(accs[i]->szModuleName, ID_STATUS_ONLINE)); + ImageList_AddIcon(hIml, Skin_LoadProtoIcon(accs[i]->szModuleName, ID_STATUS_ONLINE)); item.pszText = accs[i]->tszAccountName; item.iImage = num; item.lParam = (LPARAM)accs[i]->szModuleName; diff --git a/plugins/AvatarHistory/src/icolib.cpp b/plugins/AvatarHistory/src/icolib.cpp index eadc7d4542..2db9d4b5a5 100644 --- a/plugins/AvatarHistory/src/icolib.cpp +++ b/plugins/AvatarHistory/src/icolib.cpp @@ -39,7 +39,7 @@ int IcoLibIconsChanged(WPARAM, LPARAM) void SetupIcoLib()
{
- iconList[0].hIcolib = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
+ iconList[0].hIcolib = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
Icon_Register(hInst, LPGEN("Avatar History"), iconList+1, SIZEOF(iconList)-1);
IcoLibUpdateMenus();
}
@@ -79,7 +79,7 @@ HICON createProtoOverlayedIcon(MCONTACT hContact) HICON icon1 = LoadIconEx(I_OVERLAY);
char *szProto = GetContactProto(hContact);
- HICON icon0 = LoadSkinnedProtoIcon(szProto, ID_STATUS_ONLINE);
+ HICON icon0 = Skin_LoadProtoIcon(szProto, ID_STATUS_ONLINE);
HICON resIcon = getOverlayedIcon(icon0, icon1, FALSE);
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 520b17e17b..d4c292b718 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -469,7 +469,7 @@ void CreateFrame() Frame.align = alBottom;
Frame.Flags = F_TCHAR | F_VISIBLE | F_SHOWTB | F_SHOWTBTIP;
Frame.height = 22;
- Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame_id = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
ColourIDT colourid = { 0 };
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index d38915caec..b77e6cdc18 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -90,7 +90,7 @@ int ToolbarModuleLoaded(WPARAM wParam,LPARAM lParam) ttb.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
ttb.name = ttb.pszTooltipUp = LPGEN("Open History");
ttb.dwFlags = TTBBF_SHOWTOOLTIP;
- ttb.hIconHandleUp = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
+ ttb.hIconHandleUp = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
hToolbarButton = TopToolbar_AddButton(&ttb);
return 0;
}
@@ -99,7 +99,7 @@ void InitMenuItems() {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 1000090000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.pszName = LPGEN("View &History");
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
hContactMenu = Menu_AddContactMenuItem(&mi);
@@ -109,7 +109,7 @@ void InitMenuItems() Menu_AddMainMenuItem(&mi);
mi.position = 1000090001;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszName = LPGEN("Delete All User History");
mi.pszService = MS_HISTORY_DELETEALLCONTACTHISTORY;
hDeleteContactMenu = Menu_AddContactMenuItem(&mi);
@@ -124,7 +124,7 @@ void InitTaskMenuItems() if (hTaskMainMenu == NULL) {
mi.position = 500060005;
mi.flags = CMIF_ROOTPOPUP;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.pszName = LPGEN("Execute history task");
hTaskMainMenu = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index 786b30c178..6dcb35a69d 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -614,7 +614,7 @@ HICON EventList::GetEventCoreIcon(const EventIndex& ev) return NULL;
HICON ico = (HICON)CallService(MS_DB_EVENT_GETICON, LR_SHARED, (LPARAM)&gdbei);
- HICON icoMsg = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ HICON icoMsg = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
if (icoMsg == ico)
return NULL;
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 2b3a9bd1b4..e01294de40 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1103,8 +1103,8 @@ void HistoryWindow::Initialise() ResetCList(hWnd);
RestorePos();
- SendMessage(hWnd, WM_SETICON, ICON_BIG, ( LPARAM )LoadSkinnedIconBig( SKINICON_OTHER_HISTORY ));
- SendMessage(hWnd, WM_SETICON, ICON_SMALL, ( LPARAM )LoadSkinnedIcon( SKINICON_OTHER_HISTORY ));
+ SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_HISTORY, true));
+ SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_HISTORY));
SendMessage(editWindow,EM_AUTOURLDETECT,TRUE,0);
SendMessage(editWindow,EM_SETEVENTMASK,0,ENM_LINK | ENM_SELCHANGE | ENM_KEYEVENTS | ENM_MOUSEEVENTS);
SendMessage(editWindow,EM_SETEDITSTYLE,SES_EXTENDBACKCOLOR,SES_EXTENDBACKCOLOR);
@@ -1122,13 +1122,13 @@ void HistoryWindow::Initialise() }
int id = iconsNum;
- eventIcons[id] = LoadSkinnedIcon(SKINICON_EVENT_FILE);
+ eventIcons[id] = Skin_LoadIcon(SKINICON_EVENT_FILE);
ImageList_AddIcon(himlSmall, eventIcons[id]);
- eventIcons[++id] = LoadSkinnedIcon(SKINICON_EVENT_URL);
+ eventIcons[++id] = Skin_LoadIcon(SKINICON_EVENT_URL);
ImageList_AddIcon(himlSmall, eventIcons[id]);
- eventIcons[++id] = LoadSkinnedIcon(SKINICON_OTHER_WINDOWS);
+ eventIcons[++id] = Skin_LoadIcon(SKINICON_OTHER_WINDOWS);
ImageList_AddIcon(himlSmall, eventIcons[id]);
if ((isGroupImages = Options::instance->groupShowEvents) != false)
@@ -1161,9 +1161,9 @@ void HistoryWindow::Initialise() ImageList_AddIcon(himlButtons, findNextIco);
findPrevIco = LoadIconEx(IDI_FINDPREV);
ImageList_AddIcon(himlButtons, findPrevIco);
- configIco = LoadSkinnedIcon(SKINICON_OTHER_OPTIONS);
+ configIco = Skin_LoadIcon(SKINICON_OTHER_OPTIONS);
ImageList_AddIcon(himlButtons, configIco);
- deleteIco = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
+ deleteIco = Skin_LoadIcon(SKINICON_OTHER_DELETE);
ImageList_AddIcon(himlButtons, deleteIco);
// Set the image list.
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index c44922fb91..fa833a46c5 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -72,7 +72,7 @@ void InitScheduler() POPUPCLASS test = { sizeof(test) };
test.flags = PCF_TCHAR;
- test.hIcon = LoadSkinnedIcon(SKINICON_OTHER_HISTORY);
+ test.hIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY);
test.iSeconds = 10;
test.ptszDescription = TranslateT("History task");
test.pszName = MODULE;
@@ -1302,7 +1302,7 @@ void DoError(const TaskOptions& to, const std::wstring _error) ShowClassPopupT(MODULE, msg, (wchar_t*)_error.c_str());
else if ( ServiceExists(MS_POPUP_ADDPOPUPT)) {
POPUPDATAT ppd = {0};
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_HISTORY);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY);
_tcscpy_s(ppd.lptzContactName, msg);
_tcscpy_s(ppd.lptzText, _error.c_str());
CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, 0);
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 7ae91cb6f7..1d03a33b44 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -164,7 +164,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd) _ASSERT(ppd.lchIcon);
if (!ppd.lchIcon || (DWORD)ppd.lchIcon == CALLSERVICE_NOTFOUND) {
// if we didn't succeed retrieving client icon, show the usual status icon instead
- ppd.lchIcon = LoadSkinnedProtoIcon(szProto, db_get_w(sd->hContact, szProto, "Status", ID_STATUS_OFFLINE));
+ ppd.lchIcon = Skin_LoadProtoIcon(szProto, db_get_w(sd->hContact, szProto, "Status", ID_STATUS_OFFLINE));
pdata->hIcon = NULL;
}
_tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)sd->hContact, GCDNF_TCHAR), lengthof(ppd.lptzContactName) - 1);
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index ddda0c28fa..b31d4e4a6c 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -1633,7 +1633,7 @@ static int CLUIFramesLoadMainMenu() // create root menu
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIF_ROOTHANDLE;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FRAME);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
mi.pszName = LPGEN("Frames");
_hmiRoot = Menu_AddMainMenuItem(&mi);
@@ -2719,9 +2719,9 @@ int DrawTitleBar(HDC hdcMem2, RECT *rect, int Frameid) ske_TextOut(hdcMem, textrc.left, textrc.top, g_pfwFrames[pos].TitleBar.tbname, (int)mir_tstrlen(g_pfwFrames[pos].TitleBar.tbname));
if (!AlignCOLLIconToLeft)
- ske_DrawIconEx(hdcMem, g_pfwFrames[pos].TitleBar.wndSize.right - GetSystemMetrics(SM_CXSMICON) - 2, rc.top + ((g_nTitleBarHeight >> 1) - (GetSystemMetrics(SM_CXSMICON) >> 1)), g_pfwFrames[pos].collapsed ? LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN) : LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT), GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
+ ske_DrawIconEx(hdcMem, g_pfwFrames[pos].TitleBar.wndSize.right - GetSystemMetrics(SM_CXSMICON) - 2, rc.top + ((g_nTitleBarHeight >> 1) - (GetSystemMetrics(SM_CXSMICON) >> 1)), g_pfwFrames[pos].collapsed ? Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN) : Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT), GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
else
- ske_DrawIconEx(hdcMem, rc.left, rc.top + ((g_nTitleBarHeight >> 1) - (GetSystemMetrics(SM_CXSMICON) >> 1)), g_pfwFrames[pos].collapsed ? LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN) : LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT), GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
+ ske_DrawIconEx(hdcMem, rc.left, rc.top + ((g_nTitleBarHeight >> 1) - (GetSystemMetrics(SM_CXSMICON) >> 1)), g_pfwFrames[pos].collapsed ? Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN) : Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT), GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
}
if (g_pfwFrames[pos].floating || (!g_CluiData.fLayered)) {
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index f7406fd5fb..308c441f7a 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -240,42 +240,42 @@ void GroupMenus_Init(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 1900000;
mi.pszService = "CloseAction";
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
mi.pszName = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.pszName = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 200000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300000;
mi.pszService = "";
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszName = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 300100;
mi.pszService = "";
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
mi.pszName = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 400000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
mi.position = 500000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
AddGroupMenuItem(0, (LPARAM)&mi);
@@ -517,7 +517,7 @@ void InitSubGroupMenus(void) memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 900001;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_RENAME);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&Rename group");
gmp.lParam = 0;
@@ -525,7 +525,7 @@ void InitSubGroupMenus(void) AddSubGroupMenuItem((WPARAM)&gmp, (LPARAM)&mi);
mi.position = 900002;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&Delete group");
gmp.lParam = 0;
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index ea2cdbfbdb..3cdf2a23d3 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -1781,7 +1781,7 @@ int ModernOptInit(WPARAM wParam, LPARAM) MODERNOPTOBJECT obj = { sizeof(obj) };
obj.dwFlags = MODEROPT_FLG_TCHAR | MODEROPT_FLG_NORESIZE;
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.hInstance = g_hInst;
obj.iSection = MODERNOPT_PAGE_CLIST;
obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index d2afb5b63c..6ef62cc6ee 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -415,7 +415,7 @@ int EventArea_Create(HWND hCluiWnd) CLISTFrame Frame = { sizeof(Frame) };
Frame.hWnd = g_CluiData.hwndEventFrame;
Frame.align = alBottom;
- Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
Frame.Flags = (db_get_b(NULL, "CLUI", "ShowEventArea", SETTING_SHOWEVENTAREAFRAME_DEFAULT) ? F_VISIBLE : 0) | F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
Frame.height = h;
Frame.tname = _T("EventArea"); //do not translate
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index d24302d8e8..49725c9527 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -324,41 +324,41 @@ void InitTrayMenus(void) mi.position = 900000;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
Menu_AddTrayMenuItem(&mi);
mi.position = 100000;
mi.pszService = MS_CLIST_SHOWHIDE;
mi.pszName = LPGEN("&Hide/show");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
hTrayHideShowMainMenuItem = Menu_AddTrayMenuItem(&mi);
mi.position = 200000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/add contacts...");
Menu_AddTrayMenuItem(&mi);
mi.position = 300000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
mi.pszService = "FakeService_1";
mi.pszName = LPGEN("&Main menu");
hTrayMainMenuItemProxy = Menu_AddTrayMenuItem(&mi);
mi.position = 300100;
mi.pszService = "FakeService_2";
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS); // eternity #004
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
mi.pszName = LPGEN("&Status");
hTrayStatusMenuItemProxy = Menu_AddTrayMenuItem(&mi);
mi.position = 400000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
Menu_AddTrayMenuItem(&mi);
mi.position = 500000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "Help/AboutCommand";
mi.pszName = LPGEN("&About");
Menu_AddTrayMenuItem(&mi);
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 984f3fb499..3f8bc898f0 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -421,7 +421,7 @@ HRESULT CLUI::CreateCLC() CLISTFrame Frame = { sizeof(Frame) };
Frame.hWnd = pcli->hwndContactTree;
Frame.align = alClient;
- Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NO_SUBCONTAINER | F_TCHAR;
Frame.tname = LPGENT("My contacts");
Frame.TBtname = TranslateT("My contacts");
@@ -1541,7 +1541,7 @@ static BOOL FileExists(TCHAR * tszFilename) HANDLE RegisterIcolibIconHandle(char *szIcoID, char *szSectionName, char *szDescription, TCHAR *tszDefaultFile, int iDefaultIndex, HINSTANCE hDefaultModuleInst, int iDefaultResource)
{
if (hDefaultModuleInst == NULL)
- return LoadSkinnedIconHandle(iDefaultResource);
+ return Skin_GetIconHandle(iDefaultResource);
TCHAR fileFull[MAX_PATH] = { 0 };
@@ -2474,7 +2474,7 @@ LRESULT CLUI::OnDrawItem(UINT, WPARAM wParam, LPARAM lParam) char buf[255];
short offset = 1 + (dis->itemState&ODS_SELECTED ? 1 : 0) - (dis->itemState&ODS_HOTLIGHT ? 1 : 0);
- HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MAINMENU);
+ HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_MAINMENU);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 1, dis->itemState);
mir_snprintf(buf, "Main,ID=MainMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
@@ -2528,7 +2528,7 @@ LRESULT CLUI::OnDrawItem(UINT, WPARAM wParam, LPARAM lParam) //TODO check if caption is visible
char buf[255] = { 0 };
short dx = 1 + (dis->itemState&ODS_SELECTED ? 1 : 0) - (dis->itemState&ODS_HOTLIGHT ? 1 : 0);
- HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
CLUI_DrawMenuBackGround(m_hWnd, dis->hDC, 3, dis->itemState);
mir_snprintf(buf, "Main,ID=MainMenu,Selected=%s,Hot=%s", (dis->itemState&ODS_SELECTED) ? "True" : "False", (dis->itemState&ODS_HOTLIGHT) ? "True" : "False");
SkinDrawGlyph(dis->hDC, &dis->rcItem, &dis->rcItem, buf);
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 5c603ad699..7fa5958ebb 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -67,7 +67,7 @@ int ModernSkinOptInit(WPARAM wParam, LPARAM) MODERNOPTOBJECT obj = { 0 }; obj.cbSize = sizeof(obj); obj.dwFlags = MODEROPT_FLG_TCHAR; - obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA); + obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA); obj.hInstance = g_hInst; obj.iSection = MODERNOPT_PAGE_SKINS; obj.iType = MODERNOPT_TYPE_SELECTORPAGE; diff --git a/plugins/Clist_modern/src/modern_statusbar.cpp b/plugins/Clist_modern/src/modern_statusbar.cpp index 1d71974683..0637c9a3bc 100644 --- a/plugins/Clist_modern/src/modern_statusbar.cpp +++ b/plugins/Clist_modern/src/modern_statusbar.cpp @@ -462,9 +462,9 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if (hIcon)
bNeedDestroy = true;
else
- hIcon = LoadSkinnedProtoIcon(p.szAccountName, p.iProtoStatus);
+ hIcon = Skin_LoadProtoIcon(p.szAccountName, p.iProtoStatus);
}
- else hIcon = LoadSkinnedProtoIcon(p.szAccountName, p.iProtoStatus);
+ else hIcon = Skin_LoadProtoIcon(p.szAccountName, p.iProtoStatus);
}
HRGN rgn = CreateRectRgn(r.left, r.top, r.right, r.bottom);
@@ -503,7 +503,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if (hxIcon || hIcon) { // TODO g_StatusBarData.bDrawLockOverlay options to draw locked proto
if (db_get_b(NULL, p.szAccountName, "LockMainStatus", 0)) {
- HICON hLockOverlay = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
+ HICON hLockOverlay = Skin_LoadIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hLockOverlay != NULL) {
ske_DrawIconEx(hDC, x, iconY, hLockOverlay, iconWidth, iconHeight, 0, NULL, DI_NORMAL | dim);
IcoLib_ReleaseIcon(hLockOverlay);
@@ -885,7 +885,7 @@ HWND StatusBar_Create(HWND parent) CLISTFrame Frame = { sizeof(Frame) };
Frame.hWnd = hModernStatusBar;
Frame.align = alBottom;
- Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
Frame.Flags = F_LOCKED | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
if (db_get_b(NULL, "CLUI", "ShowSBar", SETTING_SHOWSBAR_DEFAULT))
Frame.Flags |= F_VISIBLE;
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp index e3b12a3db7..37bd25dacd 100644 --- a/plugins/Clist_modern/src/modern_toolbar.cpp +++ b/plugins/Clist_modern/src/modern_toolbar.cpp @@ -288,7 +288,7 @@ void CustomizeToolbar(HWND hwnd) Frame.align = alTop;
Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR | F_NO_SUBCONTAINER;
Frame.height = 18;
- Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
pMTBInfo->hFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
CallService(MS_SKINENG_REGISTERPAINTSUB, (WPARAM)hwnd, (LPARAM)ToolBar_LayeredPaintProc);
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 5f04741f66..3a73313d86 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -644,7 +644,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
int i;
for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- HICON hIcon = LoadSkinnedProtoIcon(NULL, i);
+ HICON hIcon = Skin_LoadProtoIcon(NULL, i);
ImageList_AddIcon(himlViewModes, hIcon);
IcoLib_ReleaseIcon(hIcon);
}
@@ -1199,7 +1199,7 @@ void CreateViewModeFrame() CLISTFrame frame = { 0 };
frame.cbSize = sizeof(frame);
frame.tname = _T("View modes");
- frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 18;
frame.TBtname = TranslateT("View modes");
frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_NO_SUBCONTAINER | F_TCHAR;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index d9a2614206..dba83c3b88 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -581,7 +581,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU return NULL; CLISTMENUITEM mi = { sizeof(mi) }; - mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA); + mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA); mi.pszPopupName = (char *)root; mi.popupPosition = frameid; mi.position = popuppos++; @@ -1478,7 +1478,7 @@ static int CLUIFramesLoadMainMenu() // create root menu CLISTMENUITEM mi = { sizeof(mi) }; - mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FRAME); + mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME); mi.flags = CMIF_ROOTHANDLE; mi.position = 3000090000; mi.pszPopupName = (char*)-1; @@ -2340,9 +2340,9 @@ int OnFrameTitleBarBackgroundChange() hBmpBackground = NULL; } if (cfg::getByte("FrameTitleBar", "UseBitmap", CLCDEFAULT_USEBITMAP)) { - ptrT tszBitmapName(db_get_tsa(NULL, "FrameTitleBar", "BkBitmap"));
- if (tszBitmapName != NULL)
- hBmpBackground = Bitmap_Load(tszBitmapName);
+ ptrT tszBitmapName(db_get_tsa(NULL, "FrameTitleBar", "BkBitmap")); + if (tszBitmapName != NULL) + hBmpBackground = Bitmap_Load(tszBitmapName); } backgroundBmpUse = cfg::getWord("FrameTitleBar", "BkBmpUse", CLCDEFAULT_BKBMPUSE); @@ -2418,9 +2418,9 @@ static int DrawTitleBar(HDC dc, RECT rect, int Frameid) else TextOut(hdcMem, 18 + cfg::dat.bClipBorder, fontTop, Frames[pos].TitleBar.tbname, (int)mir_tstrlen(Frames[pos].TitleBar.tbname)); if (!AlignCOLLIconToLeft) - DrawIconEx(hdcMem, Frames[pos].TitleBar.wndSize.right - 22, ((TitleBarH >> 1) - 8), Frames[pos].collapsed ? LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN) : LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT), 16, 16, 0, NULL, DI_NORMAL); + DrawIconEx(hdcMem, Frames[pos].TitleBar.wndSize.right - 22, ((TitleBarH >> 1) - 8), Frames[pos].collapsed ? Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN) : Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT), 16, 16, 0, NULL, DI_NORMAL); else - DrawIconEx(hdcMem, 0, ((TitleBarH >> 1) - 8), Frames[pos].collapsed ? LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN) : LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT), 16, 16, 0, NULL, DI_NORMAL); + DrawIconEx(hdcMem, 0, ((TitleBarH >> 1) - 8), Frames[pos].collapsed ? Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN) : Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT), 16, 16, 0, NULL, DI_NORMAL); SelectObject(hdcMem, oFont); } } diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index e2ef621a41..038344b989 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -258,7 +258,7 @@ void InitGroupMenus(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 1900000;
mi.pszService = "CloseAction";
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_EXIT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
mi.pszName = LPGEN("E&xit");
AddGroupMenuItem(0, (LPARAM)&mi);
@@ -266,14 +266,14 @@ void InitGroupMenus(void) mi.cbSize = sizeof(mi);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SHOWHIDE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
mi.pszName = LPGEN("&Hide/show");
hHideShowMainMenuItem = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 200000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FINDUSER);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
mi.pszService = "FindAdd/FindAddCommand";
mi.pszName = LPGEN("&Find/add contacts...");
AddGroupMenuItem(0, (LPARAM)&mi);
@@ -282,7 +282,7 @@ void InitGroupMenus(void) mi.cbSize = sizeof(mi);
mi.position = 300000;
mi.pszService = "";
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MAINMENU);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
mi.pszName = LPGEN("&Main menu");
hGroupMainMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
@@ -290,7 +290,7 @@ void InitGroupMenus(void) mi.cbSize = sizeof(mi);
mi.position = 300100;
mi.pszService = "";
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_STATUS);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
mi.pszName = LPGEN("&Status");
hGroupStatusMenuItemProxy = (HGENMENU)AddGroupMenuItem(0, (LPARAM)&mi);
@@ -305,7 +305,7 @@ void InitGroupMenus(void) memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 400000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_OPTIONS);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.pszService = "Options/OptionsCommand";
mi.pszName = LPGEN("&Options...");
AddGroupMenuItem(0, (LPARAM)&mi);
@@ -313,7 +313,7 @@ void InitGroupMenus(void) memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 500000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszService = "CLN/About";
mi.pszName = LPGEN("&About the contact list...");
AddGroupMenuItem(0, (LPARAM)&mi);
@@ -546,7 +546,7 @@ void InitSubGroupMenus(void) memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 900001;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_RENAME);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&Rename group");
gmp.lParam = 0;
@@ -556,7 +556,7 @@ void InitSubGroupMenus(void) memset(&mi, 0, sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 900002;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
mi.pszName = LPGEN("&Delete group");
gmp.lParam = 0;
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index 89d359b656..da922b17af 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -85,14 +85,14 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA hwndAdd = GetDlgItem(hWnd, IDC_IGN_ADDPERMANENTLY); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
CustomizeButton(hwndAdd, false, true, false);
- SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT));
+ SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT));
SetWindowText(hwndAdd, TranslateT("Add permanently"));
EnableWindow(hwndAdd, cfg::getByte(hContact, "CList", "NotOnList", 0));
hwndAdd = GetDlgItem(hWnd, IDC_DSP_LOADDEFAULT); // CreateWindowEx(0, _T("CLCButtonClass"), _T("FOO"), WS_VISIBLE | BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 200, 276, 106, 24, hWnd, (HMENU)IDC_IGN_ADDPERMANENTLY, g_hInst, NULL);
CustomizeButton(hwndAdd, false, true, false);
- SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_DELETE));
+ SendMessage(hwndAdd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_DELETE));
SetWindowText(hwndAdd, TranslateT("Revert to default"));
EnableWindow(hwndAdd, TRUE);
@@ -120,7 +120,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA mir_sntprintf(szTitle, TranslateT("Contact list display and ignore options for %s"), contact ? contact->szText : (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR));
SetWindowText(hWnd, szTitle);
- SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
+ SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
pCaps = CallProtoService(contact ? contact->proto : GetContactProto(hContact), PS_GETCAPS, PFLAGNUM_1, 0);
Utils::enableDlgControl(hWnd, IDC_IGN_ALWAYSONLINE, pCaps & PF1_INVISLIST ? TRUE : FALSE);
Utils::enableDlgControl(hWnd, IDC_IGN_ALWAYSOFFLINE, pCaps & PF1_VISLIST ? TRUE : FALSE);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index c5e69676b6..0b48aae08d 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -187,7 +187,7 @@ static int CreateCLC() frame.cbSize = sizeof(frame); frame.tname = _T("EventArea"); frame.TBtname = TranslateT("Event area"); - frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME); + frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME); frame.height = 20; frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_TCHAR; frame.align = alBottom; @@ -203,7 +203,7 @@ static int CreateCLC() Frame.cbSize = sizeof(CLISTFrame); Frame.hWnd = pcli->hwndContactTree; Frame.align = alClient; - Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME); + Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME); Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_TCHAR; Frame.tname = _T("My contacts"); Frame.TBtname = TranslateT("My contacts"); @@ -288,14 +288,14 @@ void CreateButtonBar(HWND hWnd) hTbMenu = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU)IDC_TBMENU, g_hInst, NULL); CustomizeButton(hTbMenu, false, false, false); SetWindowText(hTbMenu, TranslateT("Menu")); - SendMessage(hTbMenu, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MAINMENU)); + SendMessage(hTbMenu, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MAINMENU)); SendMessage(hTbMenu, BUTTONSETSENDONDOWN, TRUE, 0); SendMessage(hTbMenu, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Open main menu"), 0); hTbGlobalStatus = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU)IDC_TBGLOBALSTATUS, g_hInst, NULL); CustomizeButton(hTbGlobalStatus, false, false, false); SetWindowText(hTbGlobalStatus, TranslateT("Offline")); - SendMessage(hTbGlobalStatus, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_STATUS_OFFLINE)); + SendMessage(hTbGlobalStatus, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_STATUS_OFFLINE)); SendMessage(hTbGlobalStatus, BUTTONSETSENDONDOWN, TRUE, 0); SendMessage(hTbGlobalStatus, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Set status modes"), 0); } @@ -1696,10 +1696,10 @@ buttons_done: if (ProtoServiceExists(pd->RealName, PS_GETCUSTOMSTATUSEX) && !CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cst) && xStatus > 0) hIcon = (HICON)CallProtoService(pd->RealName, PS_GETCUSTOMSTATUSICON, 0, LR_SHARED); // get OWN xStatus icon (if set) else - hIcon = LoadSkinnedProtoIcon(szProto, status); + hIcon = Skin_LoadProtoIcon(szProto, status); } else - hIcon = LoadSkinnedProtoIcon(szProto, status); + hIcon = Skin_LoadProtoIcon(szProto, status); if (!(showOpts & 6) && cfg::dat.bEqualSections) x = (dis->rcItem.left + dis->rcItem.right - 16) >> 1; @@ -1712,7 +1712,7 @@ buttons_done: if (cfg::getByte("CLUI", "sbar_showlocked", 1)) { if (cfg::getByte(szProto, "LockMainStatus", 0)) { - hIcon = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED); + hIcon = Skin_LoadIcon(SKINICON_OTHER_STATUS_LOCKED); if (hIcon != NULL) { DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - 16) >> 1, hIcon, 16, 16, 0, NULL, DI_NORMAL); IcoLib_ReleaseIcon(hIcon); diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index df281499c0..4d1414408c 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -573,7 +573,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP himlViewModes = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 12, 0);
for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
- ImageList_AddIcon(himlViewModes, LoadSkinnedProtoIcon(NULL, i));
+ ImageList_AddIcon(himlViewModes, Skin_LoadProtoIcon(NULL, i));
hIcon = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_MINIMIZE), IMAGE_ICON, 16, 16, 0);
nullImage = ImageList_AddIcon(himlViewModes, hIcon);
@@ -1029,7 +1029,7 @@ void CreateViewModeFrame() frame.cbSize = sizeof(frame);
frame.tname = _T("View modes");
frame.TBtname = TranslateT("View modes");
- frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
frame.height = 22;
frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_TCHAR;
frame.align = alBottom;
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp index 6176b145e9..554761f09a 100644 --- a/plugins/CrashDumper/src/crshdmp.cpp +++ b/plugins/CrashDumper/src/crshdmp.cpp @@ -310,7 +310,7 @@ static int ModulesLoaded(WPARAM, LPARAM) if (catchcrashes && !needrestart) {
mi.position = 2000099990;
mi.ptszName = LPGENT("Open crash report directory");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_FILE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_AddMainMenuItem(&mi);
}
@@ -318,7 +318,7 @@ static int ModulesLoaded(WPARAM, LPARAM) mi.popupPosition = 1;
mi.position = 2000099991;
mi.ptszName = LPGENT("Open online Version Info");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/DbEditorPP/src/icons.cpp b/plugins/DbEditorPP/src/icons.cpp index 475c6e6ce8..48d0f079fa 100644 --- a/plugins/DbEditorPP/src/icons.cpp +++ b/plugins/DbEditorPP/src/icons.cpp @@ -56,7 +56,7 @@ void AddProtoIconsToList(HIMAGELIST hil, int newshift) for (int i = 0; i < protoCount; i++) {
HICON hIcon;
- if (hIcon = LoadSkinnedProtoIcon(protocols[i]->szModuleName, ID_STATUS_ONLINE))
+ if (hIcon = Skin_LoadProtoIcon(protocols[i]->szModuleName, ID_STATUS_ONLINE))
AddIconToList(hil, hIcon);
else
AddIconToList(himl, LoadSkinnedDBEIcon(ICO_ONLINE));
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp index f15d6901be..4322f9d5c1 100644 --- a/plugins/FTPFileYM/src/dialog.cpp +++ b/plugins/FTPFileYM/src/dialog.cpp @@ -204,7 +204,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar SendDlgItemMessage(hwndDlg, IDC_BTN_CLIPBOARD, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Copy Link to Clipboard"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_URL));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_URL));
SendDlgItemMessage(hwndDlg, IDC_BTN_DOWNLOAD, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open in Browser"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_FILEMANAGER, BUTTONSETASFLATBTN, 0, 0);
@@ -212,11 +212,11 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar SendDlgItemMessage(hwndDlg, IDC_BTN_FILEMANAGER, BUTTONADDTOOLTIP, (WPARAM)TranslateT("FTP File Manager"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_OPTIONS));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_OPTIONS));
SendDlgItemMessage(hwndDlg, IDC_BTN_OPTIONS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Options"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_DELETE));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_DELETE));
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close"), BATF_TCHAR);
break;
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp index d8a680d5a1..9fa21c5a5b 100644 --- a/plugins/FTPFileYM/src/job_generic.cpp +++ b/plugins/FTPFileYM/src/job_generic.cpp @@ -240,7 +240,7 @@ void GenericJob::refreshTab(bool bTabChanged) {
if (this->hContact != NULL)
{
- SendDlgItemMessage(uDlg->hwnd, IDC_BTN_PROTO, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedProtoIcon( GetContactProto(this->hContact), ID_STATUS_ONLINE));
+ SendDlgItemMessage(uDlg->hwnd, IDC_BTN_PROTO, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadProtoIcon( GetContactProto(this->hContact), ID_STATUS_ONLINE));
SetDlgItemText(uDlg->hwnd, IDC_UP_CONTACT, (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)this->hContact, GCDNF_TCHAR));
}
else
diff --git a/plugins/FTPFileYM/src/manager.cpp b/plugins/FTPFileYM/src/manager.cpp index 3c6481ba31..b25ad7442b 100644 --- a/plugins/FTPFileYM/src/manager.cpp +++ b/plugins/FTPFileYM/src/manager.cpp @@ -76,10 +76,10 @@ void Manager::initImageList() char buff[256];
this->himlStates = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, ServerList::FTP_COUNT + 4, 0);
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_DELETE)); // image index 0 is useless for INDEXTOSTATEIMAGEMASK
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_DELETE));
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_AddIcon(himlStates, LoadSkinnedIcon(SKINICON_OTHER_TICK));
+ ImageList_AddIcon(himlStates, Skin_LoadIcon(SKINICON_OTHER_DELETE)); // image index 0 is useless for INDEXTOSTATEIMAGEMASK
+ ImageList_AddIcon(himlStates, Skin_LoadIcon(SKINICON_OTHER_DELETE));
+ ImageList_AddIcon(himlStates, Skin_LoadIcon(SKINICON_OTHER_NOTICK));
+ ImageList_AddIcon(himlStates, Skin_LoadIcon(SKINICON_OTHER_TICK));
for (int i = 0; i < ServerList::FTP_COUNT; i++)
{
@@ -236,10 +236,10 @@ INT_PTR CALLBACK Manager::ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Utils::loadIconEx("main"));
SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_TICK));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_TICK));
SendDlgItemMessage(hwndDlg, IDC_BTN_SELECTALL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Select All"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_NOTICK));
SendDlgItemMessage(hwndDlg, IDC_BTN_DESELECTALL, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Clear All"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_DELETEFROMLIST, BUTTONSETASFLATBTN, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_DELETEFROMLIST, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("clear"));
@@ -248,7 +248,7 @@ INT_PTR CALLBACK Manager::ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_BTN_DELETE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Utils::loadIconEx("delete"));
SendDlgItemMessage(hwndDlg, IDC_BTN_DELETE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Delete from FTP"), BATF_TCHAR);
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_EXIT));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_EXIT));
SendDlgItemMessage(hwndDlg, IDC_BTN_CLOSE, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Close"), BATF_TCHAR);
return TRUE;
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index dc749998b4..131d7b65b9 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -134,7 +134,7 @@ extern "C" int __declspec(dllexport) Load() CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -0x7FFFFFFF;
mi.flags = 0;
- mi.hIcon = LoadSkinnedProtoIcon(pluginName, ID_STATUS_ONLINE);
+ mi.hIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_ONLINE);
mi.pszName = LPGEN("&Check all Gmail inboxes");
mi.pszContactOwner = pluginName;
mi.pszService = "GmailMNotifier/MenuCommand";
diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index 76f2584973..e1aff5e67e 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -91,7 +91,7 @@ void NotifyUser(Account *curAcc) cle.hContact = curAcc->hContact;
cle.hDbEvent = 1;
cle.flags = CLEF_URGENT;
- cle.hIcon = LoadSkinnedProtoIcon(pluginName, ID_STATUS_OCCUPIED);
+ cle.hIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_OCCUPIED);
cle.pszService = "GmailMNotifier/Notifying";
cle.pszTooltip = curAcc->results.next->content;
CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1);
@@ -102,7 +102,7 @@ void NotifyUser(Account *curAcc) POPUPDATA ppd = { 0 };
ppd.lchContact = curAcc->hContact;
- ppd.lchIcon = LoadSkinnedProtoIcon(pluginName, ID_STATUS_OCCUPIED);
+ ppd.lchIcon = Skin_LoadProtoIcon(pluginName, ID_STATUS_OCCUPIED);
mir_strcpy(ppd.lpzContactName, curAcc->results.content);
resultLink *prst = curAcc->results.next;
for (int i = 0; i < 5 && i < newMails; i++) {
diff --git a/plugins/HistoryPlusPlus/hpp_options.pas b/plugins/HistoryPlusPlus/hpp_options.pas index 52e6546d0a..cafbbabd2f 100644 --- a/plugins/HistoryPlusPlus/hpp_options.pas +++ b/plugins/HistoryPlusPlus/hpp_options.pas @@ -302,19 +302,6 @@ begin WriteDBBool(hppDBName,'InlineTextFormatting',Value);
end;
-{function LoadIconFromDB(ID: Integer; Icon: TIcon): Boolean;
-var
- hic: HIcon;
-begin
- Result := False;
- hic := LoadSkinnedIcon(ID);
- if (hic <> 0) then begin
- hic := CopyIcon(hic);
- Icon.Handle := hic;
- Result := True;
- end;
-end;}
-
procedure LoadIcons;
var
i: Integer;
@@ -330,7 +317,7 @@ begin // LoadIconFromDB(SKINICON_OTHER_MIRANDA,GridOptions.IconOther);
for i := 0 to High(skinIcons) do
begin
- ic := LoadSkinnedIcon(skinIcons[i].id);
+ ic := Skin_LoadIcon(skinIcons[i].id,0);
if skinIcons[i].handle <> ic then
begin
skinIcons[i].handle := ic;
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 5a02f8320c..821f1e2c58 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -236,18 +236,6 @@ namespace mu }
/*
- * skin
- */
-
- namespace skin
- {
- HICON loadIcon(int id)
- {
- return reinterpret_cast<HICON>(CallService(MS_SKIN_LOADICON, id, 0));
- }
- }
-
- /*
* system
*/
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index ee7b332859..99ace4861e 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -200,7 +200,7 @@ INT_PTR CALLBACK DlgProcHSOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa {
HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 2, 2);
- HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT);
+ HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_SMALLDOT);
ImageList_AddIcon(hIml, hIcon);
IcoLib_ReleaseIcon(hIcon);
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 9be7767e0d..65cf519515 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -345,7 +345,7 @@ static void RefreshProtoIcons() DestroyIcon(hIcon);
}
if (hIcon == NULL) {
- hIcon = (HICON)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ hIcon = (HICON)Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
ImageList_AddIcon(hProtocolImageList, hIcon);
IcoLib_ReleaseIcon(hIcon);
}
diff --git a/plugins/IgnoreState/src/options.cpp b/plugins/IgnoreState/src/options.cpp index c22e2df46c..6118fbbd25 100644 --- a/plugins/IgnoreState/src/options.cpp +++ b/plugins/IgnoreState/src/options.cpp @@ -43,7 +43,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP for (int i = 2; i < nII; i++) { // we don`t need it IGNORE_ALL and IGNORE_MESSAGE
TVINSERTSTRUCT tvis = { 0 };
- int index = ImageList_AddIcon(himlButtonIcons, LoadSkinnedIcon(ii[i].icon));
+ int index = ImageList_AddIcon(himlButtonIcons, Skin_LoadIcon(ii[i].icon));
tvis.hParent = NULL;
tvis.hInsertAfter = TVI_LAST;
tvis.item.mask = TVIF_PARAM | TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE;
diff --git a/plugins/ImportTXT/importtxt.dpr b/plugins/ImportTXT/importtxt.dpr index 68f1081321..31b8af8238 100644 --- a/plugins/ImportTXT/importtxt.dpr +++ b/plugins/ImportTXT/importtxt.dpr @@ -50,9 +50,6 @@ var hwndDialog:HWND;
//Services
SrvITxt,SrvIWiz:THANDLE;
- //hooks
- onLoadHook:THANDLE;
- onAccChangHook:THANDLE;
function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl;
begin
@@ -105,8 +102,6 @@ end; function OnModulesLoaded(wParam: wParam; lParam: lParam): int; cdecl;
begin
- UnhookEvent(onLoadHook);
- result := 0;
EnumProtocols;
// check for AutoStart
if (DBReadByte(0, IMPORT_TXT_MODULE, IMPORT_TXT_AS) = 1) and (ProtoCount > 0) then
@@ -114,6 +109,7 @@ begin CallService(IMPORT_WIZ_SERVICE, 0, 0);
DBWriteByte(0, IMPORT_TXT_MODULE, IMPORT_TXT_AS, 0);
end;
+ result := 0;
end;
function Load(): int; cdecl;
@@ -138,14 +134,13 @@ begin mi.pszContactOwner := nil;
Menu_AddMainMenuItem(@mi);
- onLoadHook := HookEvent(ME_SYSTEM_MODULESLOADED, @OnModulesLoaded);
- onAccChangHook := HookEvent(ME_PROTO_ACCLISTCHANGED, @OnAccountChanged);
+ HookEvent(ME_SYSTEM_MODULESLOADED, @OnModulesLoaded);
+ HookEvent(ME_PROTO_ACCLISTCHANGED, @OnAccountChanged);
result := 0;
end;
function Unload: int; cdecl;
begin
- UnhookEvent(onAccChangHook);
DestroyServiceFunction(SrvITxt);
DestroyServiceFunction(SrvIWiz);
Result := 0;
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index 6f97c61aa9..2a6bf1080f 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -205,10 +205,10 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ImageList_AddIcon(hIml, LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_SMALLDOT)));
ImageList_AddIcon(hIml, LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_FILLEDBLOB)));
ImageList_AddIcon(hIml, LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_EMPTYBLOB)));
- ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
- ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_EVENT_URL));
- ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_EVENT_FILE));
- ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
+ ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_EVENT_URL));
+ ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_EVENT_FILE));
+ ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hIml);
for (i=0; i < SIZEOF(hIcons); i++)
hIcons[i] = ImageList_GetIcon(hIml, 1+i, ILD_NORMAL);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 2f86c70366..5a4a1b3fff 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -213,7 +213,7 @@ void ShowPopup(char* szText, TCHAR* tszText, MCONTACT hContact) text = mir_a2t(szText);
if (!text) return;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
ppd.lchContact = hContact;
_tcsncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME - 1);
_tcsncpy(ppd.lptzText, text, MAX_SECONDLINE - 1);
@@ -469,7 +469,7 @@ void ModifyVisibleSet(int mode, BOOL alpha) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON;
- mi.hIcon = (mode) ? hIcon[1] : (alpha ? hIcon[3] : LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT));
+ mi.hIcon = (mode) ? hIcon[1] : (alpha ? hIcon[3] : Skin_LoadIcon(SKINICON_OTHER_SMALLDOT));
Menu_ModifyItem(hmenuVis, &mi);
}
@@ -477,7 +477,7 @@ void ModifyInvisSet(int mode, BOOL alpha) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON;
- mi.hIcon = (mode) ? hIcon[2] : (alpha ? hIcon[4] : LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT));
+ mi.hIcon = (mode) ? hIcon[2] : (alpha ? hIcon[4] : Skin_LoadIcon(SKINICON_OTHER_SMALLDOT));
Menu_ModifyItem(hmenuOff, &mi);
}
@@ -889,7 +889,7 @@ int EnumProtoSubmenu(WPARAM, LPARAM) for (int i = 0; i < protoCount; i++)
{
hProtoItem[i] = AddSubmenuItem(hmenuProto, accs[i]->tszAccountName,
- LoadSkinnedProtoIcon(accs[i]->szModuleName, ID_STATUS_ONLINE), CMIF_KEEPUNTRANSLATED,
+ Skin_LoadProtoIcon(accs[i]->szModuleName, ID_STATUS_ONLINE), CMIF_KEEPUNTRANSLATED,
MS_PROTO, pos++, (int)accs[i]->szModuleName);
}
return 0;
@@ -999,10 +999,10 @@ static int PluginInit(WPARAM, LPARAM) mi.hIcon = IcoLib_GetIcon("miex_ignore");
hmenuIgnore = Menu_AddContactMenuItem(&mi);
- hIgnoreItem[0] = AddSubmenuItem(hmenuIgnore, ii[0].name, LoadSkinnedIcon(ii[0].icon), 0, MS_IGNORE, pos, ii[0].type);
+ hIgnoreItem[0] = AddSubmenuItem(hmenuIgnore, ii[0].name, Skin_LoadIcon(ii[0].icon), 0, MS_IGNORE, pos, ii[0].type);
pos += 100000; // insert separator
for (i = 1; i < SIZEOF(ii); i++)
- hIgnoreItem[i] = AddSubmenuItem(hmenuIgnore, ii[i].name, LoadSkinnedIcon(ii[i].icon), 0, MS_IGNORE, pos++, ii[i].type);
+ hIgnoreItem[i] = AddSubmenuItem(hmenuIgnore, ii[i].name, Skin_LoadIcon(ii[i].icon), 0, MS_IGNORE, pos++, ii[i].type);
pos += 100000; // insert separator
ood.cbSize = sizeof(ood);
@@ -1024,13 +1024,13 @@ static int PluginInit(WPARAM, LPARAM) mi.position++;
mi.ptszName = LPGENT("Send 'You were added'");
mi.pszService = MS_ADDED;
- mi.hIcon = LoadSkinnedIcon(SKINICON_AUTH_ADD);
+ mi.hIcon = Skin_LoadIcon(SKINICON_AUTH_ADD);
hmenuAdded = Menu_AddContactMenuItem(&mi);
mi.position++;
mi.ptszName = LPGENT("Request authorization");
mi.pszService = MS_AUTHREQ;
- mi.hIcon = LoadSkinnedIcon(SKINICON_AUTH_REQUEST);
+ mi.hIcon = Skin_LoadIcon(SKINICON_AUTH_REQUEST);
hmenuAuthReq = Menu_AddContactMenuItem(&mi);
mi.position++;
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp index e192bf21be..b661a453ae 100644 --- a/plugins/ModernOpt/src/modernopt.cpp +++ b/plugins/ModernOpt/src/modernopt.cpp @@ -586,7 +586,7 @@ static int hookModernOpt_Initialize(WPARAM wParam, LPARAM) obj.cbSize = sizeof(obj);
obj.dwFlags = MODEROPT_FLG_TCHAR;
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.hInstance = hInst;
obj.iSection = MODERNOPT_PAGE_HOME;
@@ -607,22 +607,22 @@ static int hookModernOpt_Initialize(WPARAM wParam, LPARAM) CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
obj.iType = MODERNOPT_TYPE_IGNOREOBJECT;
- obj.hIcon = LoadSkinnedIcon(SKINICON_EVENT_FILE);
+ obj.hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
obj.lptzSubsection = _T("Files");
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ obj.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
obj.lptzSubsection = _T("Messages");
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.hIcon = LoadSkinnedIcon(SKINICON_EVENT_URL);
+ obj.hIcon = Skin_LoadIcon(SKINICON_EVENT_URL);
obj.lptzSubsection = _T("URL events");
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_TYPING);
obj.lptzSubsection = _T("Typing notifications");
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
obj.lptzSubsection = _T("Added notifications");
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.lptzSubsection = _T("Auth requests");
CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 994ba7489a..2b49e1ddf8 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -311,12 +311,12 @@ INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wPara if (sd->active && !mir_tstrcmp(sd->active, dat->filename)) {
DrawIconEx(lps->hDC, lps->rcItem.left, (lps->rcItem.top+lps->rcItem.bottom-cyIcon)/2,
- LoadSkinnedIcon(SKINICON_OTHER_EMPTYBLOB),
+ Skin_LoadIcon(SKINICON_OTHER_EMPTYBLOB),
cxIcon, cyIcon, 0, NULL, DI_NORMAL);
}
else {
DrawIconEx(lps->hDC, lps->rcItem.left, (lps->rcItem.top+lps->rcItem.bottom-cyIcon)/2,
- LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT),
+ Skin_LoadIcon(SKINICON_OTHER_SMALLDOT),
cxIcon, cyIcon, 0, NULL, DI_NORMAL);
}
lps->rcItem.left += cxIcon;
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp index 04db33bed2..924a9fc2e2 100644 --- a/plugins/MyDetails/src/frame.cpp +++ b/plugins/MyDetails/src/frame.cpp @@ -281,7 +281,7 @@ int CreateFrame() Frame.cbSize = sizeof(CLISTFrame);
Frame.hWnd = hwnd_frame;
Frame.align = alTop;
- Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
Frame.Flags = F_VISIBLE | F_SHOWTB | F_SHOWTBTIP | F_NOBORDER | F_SKINNED | F_TCHAR;
Frame.height = 100;
frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
@@ -332,7 +332,7 @@ int CreateFrame() mi.popupPosition = -0x7FFFFFFF;
mi.ptszPopupName = LPGENT("My details");
mi.position = 1; // 500010000
- mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS);
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
mi.ptszName = LPGENT("Show my details");
mi.pszService = MODULE_NAME"/ShowHideMyDetails";
hMenuShowHideFrame = Menu_AddMainMenuItem(&mi);
@@ -1246,7 +1246,7 @@ void Draw(HWND hwnd, HDC hdc_orig) if (proto->custom_status != 0 && ProtoServiceExists(proto->name, PS_GETCUSTOMSTATUSICON))
status_icon = (HICON)CallProtoService(proto->name, PS_GETCUSTOMSTATUSICON, proto->custom_status, LR_SHARED);
else
- status_icon = LoadSkinnedProtoIcon(proto->name, proto->status);
+ status_icon = Skin_LoadProtoIcon(proto->name, proto->status);
if (status_icon != NULL) {
DrawIconEx(hdc, data->status_icon_rect.left, data->status_icon_rect.top, status_icon, ICON_SIZE, ICON_SIZE, 0, NULL, DI_NORMAL);
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index b731e71603..9b7d0742f0 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -89,7 +89,7 @@ static int MainInit(WPARAM, LPARAM) CLISTMENUITEM mi = { sizeof(mi) };
mi.popupPosition = 500050000;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_USERDETAILS);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.ptszName = LPGENT("My details");
HANDLE hMenuRoot = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/MyDetails/src/services.cpp b/plugins/MyDetails/src/services.cpp index b9ec1cb21e..3c2e515bcc 100644 --- a/plugins/MyDetails/src/services.cpp +++ b/plugins/MyDetails/src/services.cpp @@ -44,7 +44,7 @@ static INT_PTR CALLBACK DlgProcSetNickname(HWND hwndDlg, UINT msg, WPARAM wParam SetWindowLongPtr(hwndDlg, GWLP_USERDATA, proto_num);
if (proto_num == -1) {
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
// All protos have the same nick?
if (protocols->GetSize() > 0) {
@@ -338,7 +338,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w SetDlgItemText(hwndDlg, IDC_STATUSMESSAGE, proto->GetStatusMsg());
}
else if (data->status != 0) {
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(NULL, data->status));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(NULL, data->status));
TCHAR title[256];
mir_sntprintf(title, SIZEOF(title), TranslateT("Set my status message for %s"),
@@ -348,7 +348,7 @@ static INT_PTR CALLBACK DlgProcSetStatusMessage(HWND hwndDlg, UINT msg, WPARAM w SetDlgItemText(hwndDlg, IDC_STATUSMESSAGE, protocols->GetDefaultStatusMsg(data->status));
}
else {
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
SetDlgItemText(hwndDlg, IDC_STATUSMESSAGE, protocols->GetDefaultStatusMsg());
}
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 4343b9878d..5821da7ec3 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -316,7 +316,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) mir_sntprintf(szReadStr, SIZEOF(szReadStr), TranslateT("Re&ad %s message"), pcli->pfnGetStatusModeDescription(iContactMode, 0));
miReadMsg.ptszName = szReadStr;
miReadMsg.flags = CMIM_FLAGS | CMIF_TCHAR | CMIM_NAME | CMIM_ICON;
- miReadMsg.hIcon = LoadSkinnedProtoIcon(szProto, iContactMode);
+ miReadMsg.hIcon = Skin_LoadProtoIcon(szProto, iContactMode);
}
}
if (g_hContactMenuItem) {
diff --git a/plugins/NewAwaySysMod/src/MsgTree.cpp b/plugins/NewAwaySysMod/src/MsgTree.cpp index 04163e7dd5..921c52d620 100644 --- a/plugins/NewAwaySysMod/src/MsgTree.cpp +++ b/plugins/NewAwaySysMod/src/MsgTree.cpp @@ -176,7 +176,7 @@ static LRESULT CALLBACK ParentSubclassProc(HWND hWnd, UINT Msg, WPARAM wParam, L int x = rc.left - iSize - 5;
for (int i = 0; i < SIZEOF(SettingsList); i++) {
if (lpNMCD->nmcd.lItemlParam == dat->MsgTreePage.GetValue(SettingsList[i].DBSetting)) {
- DrawIconEx(lpNMCD->nmcd.hdc, x, rc.top, LoadSkinnedProtoIcon(NULL, SettingsList[i].Status), iSize, iSize, 0, GetSysColorBrush(COLOR_WINDOW), DI_NORMAL);
+ DrawIconEx(lpNMCD->nmcd.hdc, x, rc.top, Skin_LoadProtoIcon(NULL, SettingsList[i].Status), iSize, iSize, 0, GetSysColorBrush(COLOR_WINDOW), DI_NORMAL);
x -= iSize + 1;
}
}
diff --git a/plugins/NewAwaySysMod/src/Properties.h b/plugins/NewAwaySysMod/src/Properties.h index 8edc9e4c5b..55b1da1d22 100644 --- a/plugins/NewAwaySysMod/src/Properties.h +++ b/plugins/NewAwaySysMod/src/Properties.h @@ -128,9 +128,9 @@ public: DestroyIcon(IconList[i]);
if (Icons[i] & IL_SKINICON)
- IconList.SetAtGrow(i) = (HICON)CopyImage(LoadSkinnedIcon(Icons[i] & ~IL_SKINICON), IMAGE_ICON, cxIcon, cyIcon, LR_COPYFROMRESOURCE);
+ IconList.SetAtGrow(i) = (HICON)CopyImage(Skin_LoadIcon(Icons[i] & ~IL_SKINICON), IMAGE_ICON, cxIcon, cyIcon, LR_COPYFROMRESOURCE);
else if (Icons[i] & IL_PROTOICON)
- IconList.SetAtGrow(i) = (HICON)CopyImage(LoadSkinnedProtoIcon(NULL, Icons[i] & ~IL_PROTOICON), IMAGE_ICON, cxIcon, cyIcon, LR_COPYFROMRESOURCE);
+ IconList.SetAtGrow(i) = (HICON)CopyImage(Skin_LoadProtoIcon(NULL, Icons[i] & ~IL_PROTOICON), IMAGE_ICON, cxIcon, cyIcon, LR_COPYFROMRESOURCE);
else
IconList.SetAtGrow(i) = (HICON)LoadImage(g_hInstance, MAKEINTRESOURCE(Icons[i]), IMAGE_ICON, cxIcon, cyIcon, 0);
}
diff --git a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp index 1123ae5fab..f1018316b8 100644 --- a/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/ReadAwayMsg.cpp @@ -53,7 +53,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- HICON hTitleIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ HICON hTitleIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hTitleIcon);
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)hTitleIcon);
Utils_RestoreWindowPosition(hwndDlg, NULL, MOD_NAME, RAMDLGSIZESETTING);
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 78b95e9766..be3d3093aa 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -480,13 +480,13 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA g_SetAwayMsgPage.SetWnd(hwndDlg);
g_SetAwayMsgPage.DBToMemToPage();
- HICON hTitleIconBigElse = LoadSkinnedIconBig(SKINICON_OTHER_MIRANDA);
+ HICON hTitleIconBigElse = Skin_LoadIcon(SKINICON_OTHER_MIRANDA, true);
char *szProto = dat->hInitContact ? GetContactProto(dat->hInitContact) : dat->szProtocol;
int Status = 0;
Status = g_ProtoStates[dat->szProtocol].Status;
- HICON hTitleIcon = LoadSkinnedProtoIcon(szProto, Status);
- HICON hTitleIconBig = LoadSkinnedProtoIconBig(szProto, Status);
+ HICON hTitleIcon = Skin_LoadProtoIcon(szProto, Status);
+ HICON hTitleIconBig = Skin_LoadProtoIcon(szProto, Status, true);
if (hTitleIconBig == NULL || (HICON)CALLSERVICE_NOTFOUND == hTitleIconBig)
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hTitleIconBigElse);
@@ -869,7 +869,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA CList->SetExtraImageList(hil);
HTREEITEM hSelItem;
- HTREEITEM hItem = hSelItem = CList->AddInfo(TranslateT("** All contacts **"), CLC_ROOT, CLC_ROOT, NULL, LoadSkinnedProtoIcon(NULL, g_ProtoStates[(char*)NULL].Status));
+ HTREEITEM hItem = hSelItem = CList->AddInfo(TranslateT("** All contacts **"), CLC_ROOT, CLC_ROOT, NULL, Skin_LoadProtoIcon(NULL, g_ProtoStates[(char*)NULL].Status));
int numAccs;
PROTOACCOUNT **accs;
ProtoEnumAccounts(&numAccs, &accs);
@@ -878,7 +878,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA // don't forget to change Recent Message Save loop in the UM_SAM_APPLYANDCLOSE if you're changing something here
if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
PROTOACCOUNT * acc = ProtoGetAccount(p->szModuleName);
- hItem = CList->AddInfo(TCString(_T("* ")) + acc->tszAccountName + _T(" *"), CLC_ROOT, hItem, (LPARAM)p->szModuleName, LoadSkinnedProtoIcon(p->szModuleName, g_ProtoStates[p->szModuleName].Status));
+ hItem = CList->AddInfo(TCString(_T("* ")) + acc->tszAccountName + _T(" *"), CLC_ROOT, hItem, (LPARAM)p->szModuleName, Skin_LoadProtoIcon(p->szModuleName, g_ProtoStates[p->szModuleName].Status));
if (dat->szProtocol && !mir_strcmp(p->szModuleName, dat->szProtocol))
hSelItem = hItem;
}
@@ -997,7 +997,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (CList->GetItemType(hItem) == MCLCIT_INFO) {
char *szProto = (char*)CList->GetItemParam(hItem);
if (!wParam || !mir_strcmp(szProto, (char*)wParam)) {
- CList->SetInfoIcon(hItem, LoadSkinnedProtoIcon(szProto, g_ProtoStates[szProto].Status));
+ CList->SetInfoIcon(hItem, Skin_LoadProtoIcon(szProto, g_ProtoStates[szProto].Status));
}
}
SetExtraIcon(CList, EXTRACOLUMN_IGNORE, hItem, -1);
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 26abadd88b..e7c6d1ffee 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -418,7 +418,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U switch (eventType) {
case EVENTTYPE_MESSAGE:
if (!(pluginOptions->maskNotify & MASK_MESSAGE)) return 1;
- pudw.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
pudw.colorBack = pluginOptions->bDefaultColorMsg ? 0 : pluginOptions->colBackMsg;
pudw.colorText = pluginOptions->bDefaultColorMsg ? 0 : pluginOptions->colTextMsg;
iSeconds = pluginOptions->iDelayMsg;
@@ -427,7 +427,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U case EVENTTYPE_URL:
if (!(pluginOptions->maskNotify & MASK_URL)) return 1;
- pudw.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_URL);
+ pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_URL);
pudw.colorBack = pluginOptions->bDefaultColorUrl ? 0 : pluginOptions->colBackUrl;
pudw.colorText = pluginOptions->bDefaultColorUrl ? 0 : pluginOptions->colTextUrl;
iSeconds = pluginOptions->iDelayUrl;
@@ -436,7 +436,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U case EVENTTYPE_FILE:
if (!(pluginOptions->maskNotify & MASK_FILE)) return 1;
- pudw.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_FILE);
+ pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
pudw.colorBack = pluginOptions->bDefaultColorFile ? 0 : pluginOptions->colBackFile;
pudw.colorText = pluginOptions->bDefaultColorFile ? 0 : pluginOptions->colTextFile;
iSeconds = pluginOptions->iDelayFile;
@@ -445,7 +445,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, U default:
if (!(pluginOptions->maskNotify & MASK_OTHER)) return 1;
- pudw.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ pudw.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
pudw.colorBack = pluginOptions->bDefaultColorOthers ? 0 : pluginOptions->colBackOthers;
pudw.colorText = pluginOptions->bDefaultColorOthers ? 0 : pluginOptions->colTextOthers;
iSeconds = pluginOptions->iDelayOthers;
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 011873b9e9..af4783d659 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -94,8 +94,8 @@ HIMAGELIST GetStatusIconsImgList(char *szProto) hList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, STATUS_COUNT - 1, 0);
if (hList != NULL) {
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++)
- ImageList_AddIcon(hList, LoadSkinnedProtoIcon(szProto, i));
- ImageList_AddIcon(hList, LoadSkinnedIcon(SKINICON_OTHER_USERONLINE));
+ ImageList_AddIcon(hList, Skin_LoadProtoIcon(szProto, i));
+ ImageList_AddIcon(hList, Skin_LoadIcon(SKINICON_OTHER_USERONLINE));
}
}
@@ -443,7 +443,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam) ImageList_AddIcon(hImageList, LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLEALL)));
SendDlgItemMessage(hwndDlg, IDC_ENABLEALLICON, STM_SETICON, (WPARAM)ImageList_GetIcon(hImageList, EXTRA_IMAGE_ENABLEALL, ILD_NORMAL), 0);
- ImageList_AddIcon(hImageList, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT));
+ ImageList_AddIcon(hImageList, Skin_LoadIcon(SKINICON_OTHER_SMALLDOT));
SendDlgItemMessage(hwndDlg, IDC_INDSNDLIST, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hImageList);
SendDlgItemMessage(hwndDlg, IDC_INDSNDLIST, CLM_SETEXTRACOLUMNS, 8, 0);
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 2d22580a03..dd3a5c2796 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -437,11 +437,11 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus) pdp->newStatus = newStatus;
pdp->hAwayMsgHook = NULL;
pdp->hAwayMsgProcess = NULL;
- ShowChangePopup(hContact, LoadSkinnedProtoIcon(szProto, newStatus), newStatus, str, pdp);
+ ShowChangePopup(hContact, Skin_LoadProtoIcon(szProto, newStatus), newStatus, str, pdp);
}
if (opt.BlinkIcon && !opt.TempDisabled) {
- HICON hIcon = opt.BlinkIcon_Status ? LoadSkinnedProtoIcon(szProto, newStatus) : LoadSkinnedIcon(SKINICON_OTHER_USERONLINE);
+ HICON hIcon = opt.BlinkIcon_Status ? Skin_LoadProtoIcon(szProto, newStatus) : Skin_LoadIcon(SKINICON_OTHER_USERONLINE);
TCHAR str[256];
mir_sntprintf(str, SIZEOF(str), TranslateT("%s is now %s"), pcli->pfnGetContactDisplayName(hContact, 0), StatusList[Index(newStatus)].lpzStandardText);
BlinkIcon(hContact, hIcon, str);
@@ -719,7 +719,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) }
ShowChangePopup(hContact,
- LoadSkinnedProtoIcon(szProto, db_get_w(hContact, szProto, "Status", ID_STATUS_ONLINE)),
+ Skin_LoadProtoIcon(szProto, db_get_w(hContact, szProto, "Status", ID_STATUS_ONLINE)),
ID_STATUS_STATUSMSG, str);
mir_free(str);
@@ -731,7 +731,7 @@ int ProcessStatusMessage(DBCONTACTWRITESETTING *cws, MCONTACT hContact) }
if (opt.BlinkIcon && opt.BlinkIcon_ForMsgs && !opt.TempDisabled) {
- HICON hIcon = opt.BlinkIcon_Status ? LoadSkinnedProtoIcon(szProto, db_get_w(hContact, szProto, "Status", ID_STATUS_ONLINE)) : LoadSkinnedIcon(SKINICON_OTHER_USERONLINE);
+ HICON hIcon = opt.BlinkIcon_Status ? Skin_LoadProtoIcon(szProto, db_get_w(hContact, szProto, "Status", ID_STATUS_ONLINE)) : Skin_LoadIcon(SKINICON_OTHER_USERONLINE);
TCHAR str[256];
mir_sntprintf(str, SIZEOF(str), TranslateT("%s changed status message to %s"), pcli->pfnGetContactDisplayName(hContact, 0), smi.newstatusmsg);
BlinkIcon(hContact, hIcon, str);
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index 3ce99eb21e..7c4be90878 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -403,12 +403,12 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM mir_tstrcat(str, TranslateT("This is status message"));
}
- ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, i), i, str);
+ ShowChangePopup(NULL, Skin_LoadProtoIcon(NULL, i), i, str);
}
_tcsncpy(str, TranslateT("This is extra status"), SIZEOF(str));
- ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_EXTRASTATUS, str);
+ ShowChangePopup(NULL, Skin_LoadProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_EXTRASTATUS, str);
_tcsncpy(str, TranslateT("This is status message"), SIZEOF(str));
- ShowChangePopup(NULL, LoadSkinnedProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_STATUSMSG, str);
+ ShowChangePopup(NULL, Skin_LoadProtoIcon(NULL, ID_STATUS_ONLINE), ID_STATUS_STATUSMSG, str);
return FALSE;
}
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index ef9ff5e47c..e89551ab6c 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -185,7 +185,7 @@ void ShowXStatusPopup(XSTATUSCHANGE *xsc) }
if (hIcon == NULL)
- hIcon = LoadSkinnedProtoIcon(xsc->szProto, db_get_w(xsc->hContact, xsc->szProto, "Status", ID_STATUS_ONLINE));
+ hIcon = Skin_LoadProtoIcon(xsc->szProto, db_get_w(xsc->hContact, xsc->szProto, "Status", ID_STATUS_ONLINE));
// cut message if needed
TCHAR *copyText = NULL;
@@ -248,7 +248,7 @@ void BlinkXStatusIcon(XSTATUSCHANGE *xsc) }
if (hIcon == NULL)
- hIcon = LoadSkinnedIcon(SKINICON_OTHER_USERONLINE);
+ hIcon = Skin_LoadIcon(SKINICON_OTHER_USERONLINE);
BlinkIcon(xsc->hContact, hIcon, str);
mir_free(str);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index e3751ea52a..bc786fa263 100644 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -181,7 +181,7 @@ extern "C" int __declspec(dllexport) Load() CLISTMENUITEM mi = { sizeof(mi) };
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName=LPGENT("Load GPG public key");
mi.pszService="/LoadPubKey";
hLoadPubKey = Menu_AddContactMenuItem(&mi);
@@ -190,7 +190,7 @@ extern "C" int __declspec(dllexport) Load() mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName=LPGENT("Toggle GPG encryption");
mi.pszService="/ToggleEncryption";
hToggleEncryption = Menu_AddContactMenuItem(&mi);
@@ -199,7 +199,7 @@ extern "C" int __declspec(dllexport) Load() mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFd;
mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName=LPGENT("Send public key");
mi.pszService="/SendKey";
hSendKey = Menu_AddContactMenuItem(&mi);
@@ -208,7 +208,7 @@ extern "C" int __declspec(dllexport) Load() mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFe;
mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName=LPGENT("Export GPG Public keys");
mi.pszService="/ExportGPGKeys";
hExportGpgKeys = Menu_AddMainMenuItem(&mi);
@@ -217,7 +217,7 @@ extern "C" int __declspec(dllexport) Load() mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFF;
mi.flags=CMIF_TCHAR;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName=LPGENT("Import GPG Public keys");
mi.pszService="/ImportGPGKeys";
hImportGpgKeys = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index ff3e1795e6..86adb17aae 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -140,10 +140,10 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP /* icons */
CheckRadioButton(hwnd, 40072, 40080, db_get_w(hContact, MODNAME, "Icon", ID_STATUS_ONLINE));
- SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_USERDATA, (LONG_PTR)LoadSkinnedProtoIcon(MODNAME, ID_STATUS_ONLINE));
+ SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_USERDATA, (LONG_PTR)Skin_LoadProtoIcon(MODNAME, ID_STATUS_ONLINE));
g_PrevBtnWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_WNDPROC, (LONG_PTR)ButtWndProc);
for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_USERDATA, (LONG_PTR)LoadSkinnedProtoIcon(MODNAME, i));
+ SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_USERDATA, (LONG_PTR)Skin_LoadProtoIcon(MODNAME, i));
SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_WNDPROC, (LONG_PTR)ButtWndProc);
}
db_free(&dbv);
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 07354e9c59..c82c54019f 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -169,20 +169,20 @@ HICON getIcon(const std::tstring &name) icons[_T("winlogo")] = LoadIcon(NULL, IDI_WINLOGO);
// miranda icons
- icons[_T("online")] = LoadSkinnedIcon(SKINICON_STATUS_ONLINE);
- icons[_T("offline")] = LoadSkinnedIcon(SKINICON_STATUS_OFFLINE);
- icons[_T("away")] = LoadSkinnedIcon(SKINICON_STATUS_AWAY);
- icons[_T("na")] = LoadSkinnedIcon(SKINICON_STATUS_NA);
- icons[_T("occupied")] = LoadSkinnedIcon(SKINICON_STATUS_OCCUPIED);
- icons[_T("dnd")] = LoadSkinnedIcon(SKINICON_STATUS_DND);
- icons[_T("free4chat")] = LoadSkinnedIcon(SKINICON_STATUS_FREE4CHAT);
- icons[_T("invisible")] = LoadSkinnedIcon(SKINICON_STATUS_INVISIBLE);
- icons[_T("onthephone")] = LoadSkinnedIcon(SKINICON_STATUS_ONTHEPHONE);
- icons[_T("outtolunch")] = LoadSkinnedIcon(SKINICON_STATUS_OUTTOLUNCH);
-
- icons[_T("message")] = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
- icons[_T("url")] = LoadSkinnedIcon(SKINICON_EVENT_URL);
- icons[_T("file")] = LoadSkinnedIcon(SKINICON_EVENT_FILE);
+ icons[_T("online")] = Skin_LoadIcon(SKINICON_STATUS_ONLINE);
+ icons[_T("offline")] = Skin_LoadIcon(SKINICON_STATUS_OFFLINE);
+ icons[_T("away")] = Skin_LoadIcon(SKINICON_STATUS_AWAY);
+ icons[_T("na")] = Skin_LoadIcon(SKINICON_STATUS_NA);
+ icons[_T("occupied")] = Skin_LoadIcon(SKINICON_STATUS_OCCUPIED);
+ icons[_T("dnd")] = Skin_LoadIcon(SKINICON_STATUS_DND);
+ icons[_T("free4chat")] = Skin_LoadIcon(SKINICON_STATUS_FREE4CHAT);
+ icons[_T("invisible")] = Skin_LoadIcon(SKINICON_STATUS_INVISIBLE);
+ icons[_T("onthephone")] = Skin_LoadIcon(SKINICON_STATUS_ONTHEPHONE);
+ icons[_T("outtolunch")] = Skin_LoadIcon(SKINICON_STATUS_OUTTOLUNCH);
+
+ icons[_T("message")] = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ icons[_T("url")] = Skin_LoadIcon(SKINICON_EVENT_URL);
+ icons[_T("file")] = Skin_LoadIcon(SKINICON_EVENT_FILE);
}
std::map<std::tstring, HICON>::iterator i = icons.find(name);
diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp index aae2928a79..c0157b32fa 100644 --- a/plugins/PackUpdater/Src/Notifications.cpp +++ b/plugins/PackUpdater/Src/Notifications.cpp @@ -114,7 +114,7 @@ VOID show_popup(HWND hDlg, LPCTSTR Title, LPCTSTR Text, int Number, int ActType) POPUPDATAT_V2 pd = { 0 };
pd.cbSize = sizeof(pd);
pd.lchContact = NULL; //(HANDLE)wParam;
- pd.lchIcon = LoadSkinnedIcon(PopupsList[Number].Icon);
+ pd.lchIcon = Skin_LoadIcon(PopupsList[Number].Icon);
mir_tstrncpy(pd.lptzText, Text, SIZEOF(pd.lptzText));
mir_tstrncpy(pd.lptzContactName, Title, SIZEOF(pd.lptzContactName));
switch (MyOptions.DefColors) {
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index 291d2f10f8..3d599d9d8e 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -48,7 +48,7 @@ void LoadActions() #if defined(_DEBUG)
{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_POPUP_ON, 0), "Popup Plus/Test action", PAF_ENABLED },
{ sizeof(POPUPACTION), IcoLib_GetIcon(ICO_ACT_CLOSE, 0), "Popup Plus/Second test action", 0 },
- { sizeof(POPUPACTION), LoadSkinnedIcon(SKINICON_OTHER_MIRANDA), "Popup Plus/One more action", PAF_ENABLED },
+ { sizeof(POPUPACTION), Skin_LoadIcon(SKINICON_OTHER_MIRANDA), "Popup Plus/One more action", PAF_ENABLED },
#endif
};
diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp index 0139fcbbdd..404ac56916 100644 --- a/plugins/Popup/src/config.cpp +++ b/plugins/Popup/src/config.cpp @@ -105,7 +105,7 @@ void PopupPreview() ppd.lptzTitle = lptzTitle1Eng;
ppd.lptzText = lptzText1Eng;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY);
if (PopupOptions.UseAnimations || PopupOptions.UseEffect) Sleep((ANIM_TIME * 2) / 3); // Pause
@@ -114,7 +114,7 @@ void PopupPreview() ppd.flags = PU2_TCHAR;
ppd.lptzTitle = lptzTitle2;
ppd.lptzText = lptzText2;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
ppd.hbmAvatar = hbmNoAvatar;
CallService(MS_POPUP_ADDPOPUP2, (WPARAM)&ppd, APF_NO_HISTORY);
diff --git a/plugins/Popup/src/opt_class.cpp b/plugins/Popup/src/opt_class.cpp index 35bd585ed0..5d70ff8e03 100644 --- a/plugins/Popup/src/opt_class.cpp +++ b/plugins/Popup/src/opt_class.cpp @@ -218,7 +218,7 @@ INT_PTR CALLBACK DlgProcOptsClasses(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONSETASPUSHBTN, TRUE, 0);
SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BM_SETIMAGE,
- IMAGE_ICON, (LPARAM)LoadSkinnedIcon(statusButtons[i].iconId));
+ IMAGE_ICON, (LPARAM)Skin_LoadIcon(statusButtons[i].iconId));
SendDlgItemMessage(hwnd, statusButtons[i].idCtrl, BUTTONADDTOOLTIP,
(WPARAM)Translate(statusButtons[i].title), 0);
}
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index 31041c357a..750ecf889f 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -52,7 +52,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) SendDlgItemMessage(hwnd, IDC_ICO_BLOCK, STM_SETICON, (WPARAM)IcoLib_GetIcon(ICO_OPT_BLOCK, 0), 0);
{
HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 5, 5);
- ImageList_AddIcon(hIml, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT));
+ ImageList_AddIcon(hIml, Skin_LoadIcon(SKINICON_OTHER_SMALLDOT));
ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_DEF, 0));
ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FAV, 0));
ImageList_AddIcon(hIml, IcoLib_GetIcon(ICO_OPT_FULLSCREEN, 0));
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 52ac9b6ddc..672de348be 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -75,7 +75,7 @@ static void updatePreviewImage(HWND hwndBox) memset(&ppd, 0, sizeof(ppd));
ppd.cbSize = sizeof(ppd);
ppd.flags = PU2_TCHAR;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_STATUS_ONLINE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_ONLINE);
ppd.lptzTitle = TranslateT("Skin preview");
ppd.lptzText = TranslateT("Just take a look at this skin... ;)");
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index 39a9d3f090..e6bb00b1bd 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -162,12 +162,12 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, int *res hImgLst = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR | ILC_COLOR32 | ILC_MASK, 5, 1);
ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_POPUP), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR | LR_SHARED));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_TICK));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_TICK));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_NOTICK));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_TICK));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_NOTICK));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_TICK));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_NOTICK));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT));
TreeView_SetImageList(hwndTree, hImgLst, TVSIL_NORMAL);
/* build options tree. based on code from IcoLib */
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index 03f98dd87f..0e6c805738 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -760,12 +760,12 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA // Buttons
FillCheckbox(hwndDlg, IDC_SHOW_ALL_CONTACTS, LPGENT("Show all contacts"), hasNewHotkeyModule ? NULL : _T("Ctrl+A"));
- FillButton(hwndDlg, IDC_MESSAGE, LPGENT("Send message"), NULL, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
- FillButton(hwndDlg, IDC_FILE, LPGENT("Send file"), hasNewHotkeyModule ? NULL : _T("Ctrl+F"), LoadSkinnedIcon(SKINICON_EVENT_FILE));
- FillButton(hwndDlg, IDC_URL, LPGENT("Send URL"), hasNewHotkeyModule ? NULL : _T("Ctrl+U"), LoadSkinnedIcon(SKINICON_EVENT_URL));
- FillButton(hwndDlg, IDC_USERINFO, LPGENT("Open user info"), hasNewHotkeyModule ? NULL : _T("Ctrl+I"), LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS));
- FillButton(hwndDlg, IDC_HISTORY, LPGENT("Open history"), hasNewHotkeyModule ? NULL : _T("Ctrl+H"), LoadSkinnedIcon(SKINICON_OTHER_HISTORY));
- FillButton(hwndDlg, IDC_MENU, LPGENT("Open contact menu"), hasNewHotkeyModule ? NULL : _T("Ctrl+M"), LoadSkinnedIcon(SKINICON_OTHER_DOWNARROW));
+ FillButton(hwndDlg, IDC_MESSAGE, LPGENT("Send message"), NULL, Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ FillButton(hwndDlg, IDC_FILE, LPGENT("Send file"), hasNewHotkeyModule ? NULL : _T("Ctrl+F"), Skin_LoadIcon(SKINICON_EVENT_FILE));
+ FillButton(hwndDlg, IDC_URL, LPGENT("Send URL"), hasNewHotkeyModule ? NULL : _T("Ctrl+U"), Skin_LoadIcon(SKINICON_EVENT_URL));
+ FillButton(hwndDlg, IDC_USERINFO, LPGENT("Open user info"), hasNewHotkeyModule ? NULL : _T("Ctrl+I"), Skin_LoadIcon(SKINICON_OTHER_USERDETAILS));
+ FillButton(hwndDlg, IDC_HISTORY, LPGENT("Open history"), hasNewHotkeyModule ? NULL : _T("Ctrl+H"), Skin_LoadIcon(SKINICON_OTHER_HISTORY));
+ FillButton(hwndDlg, IDC_MENU, LPGENT("Open contact menu"), hasNewHotkeyModule ? NULL : _T("Ctrl+M"), Skin_LoadIcon(SKINICON_OTHER_DOWNARROW));
SendDlgItemMessage(hwndDlg, IDC_USERNAME, CB_SETEXTENDEDUI, TRUE, 0);
diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc index 7963da1808..7ac8db8f70 100644 --- a/plugins/QuickSearch/i_ok.inc +++ b/plugins/QuickSearch/i_ok.inc @@ -577,11 +577,11 @@ begin begin
if ((SBData[i].flags and (QSF_ACCDEL or QSF_ACCOFF))<>0) then
begin
- icon:=CallService(MS_SKIN_LOADPROTOICON,0,ID_STATUS_OFFLINE);
+ icon:=Skin_LoadProtoIcon(0,ID_STATUS_OFFLINE,0);
end
else
begin
- icon:=CallService(MS_SKIN_LOADPROTOICON,wparam(GetProtoName(i)),ID_STATUS_ONLINE);
+ icon:=Skin_LoadProtoIcon(GetProtoName(i),ID_STATUS_ONLINE,0);
end;
FastAnsiToWideBuf(GetProtoName(i),fmtstr);
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index b9c5b567b0..aaef72e0a9 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -129,7 +129,7 @@ extern "C" int __declspec(dllexport) Load() mi.cbSize=sizeof(mi);
mi.position=-0x7FFFFFFF;
mi.flags=0;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.pszName = LPGEN("Remove Personal Settings...");
mi.pszService="RemovePersonalSettings/RemoveAll";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index 6e594bea8e..1cbd805a0b 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -30,14 +30,14 @@ int LoadModules(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 300050000;
- mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMS);
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
mi.ptszName = SMS_SEND_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
Menu_AddMainMenuItem(&mi);
mi.position = -2000070000;
- mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMS);
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
mi.ptszName = SMS_SEND_CM_STR;
mi.pszService = szServiceFunction;
mi.flags = CMIF_TCHAR;
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index 8c4f040b79..bc37fe89f3 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -244,7 +244,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) cle.flags = CLEF_TCHAR;
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
- cle.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMS);
+ cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
cle.pszService = szServiceFunction;
cle.ptszTooltip = szToolTip;
CallService(MS_CLIST_ADDEVENT,0,(LPARAM)&cle);
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp index f8f401f26f..3d02256407 100644 --- a/plugins/SMS/src/recvdlg.cpp +++ b/plugins/SMS/src/recvdlg.cpp @@ -199,7 +199,7 @@ HWND RecvSMSWindowAdd(MCONTACT hContact, DWORD dwEventType, LPWSTR lpwszPhone, s switch(dwEventType){
case ICQEVENTTYPE_SMS:
lpwszTitlepart=TranslateT("Received SMS");
- hIcon=LoadSkinnedIcon(SKINICON_OTHER_SMS);
+ hIcon=Skin_LoadIcon(SKINICON_OTHER_SMS);
break;
case ICQEVENTTYPE_SMSCONFIRMATION:
lpwszTitlepart=TranslateT("Received SMS Confirmation");
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp index 73b3457cb2..c7e3b640aa 100644 --- a/plugins/SMS/src/senddlg.cpp +++ b/plugins/SMS/src/senddlg.cpp @@ -86,15 +86,15 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l mir_subclassWindow(GetDlgItem(hWndDlg, IDC_MESSAGE), MessageSubclassProc);
- SendMessage(hWndDlg,WM_SETICON,ICON_BIG,(LPARAM)LoadSkinnedIcon(SKINICON_OTHER_SMS));
- SendDlgItemMessage(hWndDlg,IDC_HISTORY,BM_SETIMAGE,IMAGE_ICON,(LPARAM)LoadSkinnedIcon(SKINICON_OTHER_HISTORY));
+ SendMessage(hWndDlg,WM_SETICON,ICON_BIG,(LPARAM)Skin_LoadIcon(SKINICON_OTHER_SMS));
+ SendDlgItemMessage(hWndDlg,IDC_HISTORY,BM_SETIMAGE,IMAGE_ICON,(LPARAM)Skin_LoadIcon(SKINICON_OTHER_HISTORY));
{
HICON hIcon;
HIMAGELIST hIml=ImageList_Create(16,16,ILC_COLOR32|ILC_MASK,0,30);
TreeView_SetImageList(GetDlgItem(hWndDlg,IDC_NUMBERSLIST),hIml,TVSIL_NORMAL);
- hIcon=LoadSkinnedIcon(SKINICON_OTHER_NOTICK);
+ hIcon=Skin_LoadIcon(SKINICON_OTHER_NOTICK);
ImageList_AddIcon(hIml,hIcon);
- hIcon=LoadSkinnedIcon(SKINICON_OTHER_TICK);
+ hIcon=Skin_LoadIcon(SKINICON_OTHER_TICK);
ImageList_AddIcon(hIml,hIcon);
hIcon=(HICON)LoadImage(ssSMSSettings.hInstance,MAKEINTRESOURCE(IDI_HALFTICK),IMAGE_ICON,0,0,LR_SHARED);
ImageList_AddIcon(hIml,hIcon);
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index e8fed79470..a96facf35f 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -34,11 +34,11 @@ void LoadModuleIcons(MODULEINFO *mi) int overlayIcon = ImageList_AddIcon(hList, GetCachedIcon("chat_overlay"));
ImageList_SetOverlayImage(hList, overlayIcon, 1);
- int index = ImageList_AddIcon(hList, LoadSkinnedProtoIcon(mi->pszModule, ID_STATUS_ONLINE));
+ int index = ImageList_AddIcon(hList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_ONLINE));
mi->hOnlineIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT);
mi->hOnlineTalkIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
- index = ImageList_AddIcon(hList, LoadSkinnedProtoIcon(mi->pszModule, ID_STATUS_OFFLINE));
+ index = ImageList_AddIcon(hList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_OFFLINE));
mi->hOfflineIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT);
mi->hOfflineTalkIcon = ImageList_GetIcon(hList, index, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
@@ -124,8 +124,8 @@ static void OnFlashWindow(SESSION_INFO *si, int bInactive) static void OnCreateModule(MODULEINFO *mi)
{
LoadModuleIcons(mi);
- mi->hOnlineIconBig = LoadSkinnedProtoIconBig(mi->pszModule, ID_STATUS_ONLINE);
- mi->hOfflineIconBig = LoadSkinnedProtoIconBig(mi->pszModule, ID_STATUS_OFFLINE);
+ mi->hOnlineIconBig = Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_ONLINE, true);
+ mi->hOfflineIconBig = Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_OFFLINE, true);
}
static BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce)
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index 60a5bf88c8..cb1655aabc 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -1400,7 +1400,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR FillRect(dis->hDC, &dis->rcItem, pci->hListBkgBrush);
if (g_Settings.bShowContactStatus && g_Settings.bContactStatusFirst && ui->ContactStatus) {
- hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
+ hIcon = Skin_LoadProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, NULL, DI_NORMAL);
IcoLib_ReleaseIcon(hIcon);
x_offset += 18;
@@ -1408,7 +1408,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset, pci->SM_GetStatusIcon(si, ui), 10, 10, 0, NULL, DI_NORMAL);
x_offset += 12;
if (g_Settings.bShowContactStatus && !g_Settings.bContactStatusFirst && ui->ContactStatus) {
- hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
+ hIcon = Skin_LoadProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, NULL, DI_NORMAL);
IcoLib_ReleaseIcon(hIcon);
x_offset += 18;
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index dde38e5739..3ef13e7fa4 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -174,7 +174,7 @@ static int ackevent(WPARAM, LPARAM lParam) int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id)
{
- HICON hIcon = LoadSkinnedIcon(id);
+ HICON hIcon = Skin_LoadIcon(id);
int res = ImageList_AddIcon(hIml, hIcon);
IcoLib_ReleaseIcon(hIcon);
return res;
@@ -189,7 +189,7 @@ int ImageList_AddIcon_Ex2(HIMAGELIST hIml, HICON hIcon) int ImageList_ReplaceIcon_Ex(HIMAGELIST hIml, int nIndex, int id)
{
- HICON hIcon = LoadSkinnedIcon(id);
+ HICON hIcon = Skin_LoadIcon(id);
int res = ImageList_ReplaceIcon(hIml, nIndex, hIcon);
IcoLib_ReleaseIcon(hIcon);
return res;
@@ -197,7 +197,7 @@ int ImageList_ReplaceIcon_Ex(HIMAGELIST hIml, int nIndex, int id) int ImageList_AddIcon_ProtoEx(HIMAGELIST hIml, const char* szProto, int status)
{
- HICON hIcon = LoadSkinnedProtoIcon(szProto, status);
+ HICON hIcon = Skin_LoadProtoIcon(szProto, status);
int res = ImageList_AddIcon(hIml, hIcon);
IcoLib_ReleaseIcon(hIcon);
return res;
@@ -213,8 +213,8 @@ void ReleaseIcons() HICON GetCachedIcon(const char *name)
{
for (int i = 0; i < SIZEOF(iconList); i++)
- if (!mir_strcmp(iconList[i].szName, name))
- return IcoLib_GetIconByHandle(iconList[i].hIcolib);
+ if (!mir_strcmp(iconList[i].szName, name))
+ return IcoLib_GetIconByHandle(iconList[i].hIcolib);
return NULL;
}
@@ -223,8 +223,8 @@ void LoadGlobalIcons() {
int i;
- g_dat.hMsgIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
- g_dat.hMsgIconBig = LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
+ g_dat.hMsgIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ g_dat.hMsgIconBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
g_dat.hIconChatBig = IcoLib_GetIcon("chat_window", true);
ImageList_RemoveAll(g_dat.hButtonIconList);
@@ -321,7 +321,7 @@ void FreeGlobals() if (g_dat.hSearchEngineIconList)
ImageList_Destroy(g_dat.hSearchEngineIconList);
mir_free(g_dat.tabIconListUsage);
-
+
WindowList_Destroy(g_dat.hMessageWindowList);
WindowList_Destroy(g_dat.hParentWindowList);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 6c93ab2243..c0f45ade83 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -221,15 +221,10 @@ void SetStatusIcon(SrmmWindowData *dat) MCONTACT hContact = db_mc_getSrmmSub(dat->hContact);
if (hContact == NULL)
hContact = dat->hContact;
- char *szProto = GetContactProto(hContact);
-
- IcoLib_ReleaseIcon(dat->statusIcon);
- dat->statusIcon = LoadSkinnedProtoIcon(szProto, dat->wStatus);
- IcoLib_ReleaseIcon(dat->statusIconBig);
- dat->statusIconBig = LoadSkinnedProtoIconBig(szProto, dat->wStatus);
- if ((int)dat->statusIconBig == CALLSERVICE_NOTFOUND)
- dat->statusIconBig = NULL;
+ char *szProto = GetContactProto(hContact);
+ dat->statusIcon = Skin_LoadProtoIcon(szProto, dat->wStatus, false);
+ dat->statusIconBig = Skin_LoadProtoIcon(szProto, dat->wStatus, true);
if (dat->statusIconOverlay != NULL)
DestroyIcon(dat->statusIconOverlay);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index e4d025badb..ba09683dd0 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -127,7 +127,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) cle.flags = CLEF_TCHAR;
cle.hContact = hContact;
cle.hDbEvent = hDbEvent;
- cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName);
cle.ptszTooltip = toolTip;
@@ -258,7 +258,7 @@ static void RestoreUnreadMessageAlerts(void) DBEVENTINFO dbei = { sizeof(dbei) };
CLISTEVENT cle = { sizeof(cle) };
- cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
cle.flags = CLEF_TCHAR;
cle.ptszTooltip = toolTip;
@@ -450,7 +450,7 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
- mi.icolibItem = LoadSkinnedIconHandle( SKINICON_EVENT_MESSAGE );
+ mi.icolibItem = Skin_GetIconHandle( SKINICON_EVENT_MESSAGE );
mi.pszName = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
hMsgMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index fa56ecbfcf..6698122920 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -178,15 +178,15 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR),
TranslateT("last seen history"));
SetWindowText(hwndDlg, sztemp);
- SendMessage(hwndDlg, WM_SETICON, (WPARAM)ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
- SendMessage(hwndDlg, WM_SETICON, (WPARAM)ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
+ SendMessage(hwndDlg, WM_SETICON, (WPARAM)ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
+ SendMessage(hwndDlg, WM_SETICON, (WPARAM)ICON_SMALL, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
if (db_get_b(hContact, S_MOD, "OnlineAlert", 0))
CheckDlgButton(hwndDlg, IDC_STATUSCHANGE, BST_CHECKED);
- SendDlgItemMessage(hwndDlg, IDC_DETAILS, BM_SETIMAGE, IMAGE_ICON, (WPARAM)LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS));
- SendDlgItemMessage(hwndDlg, IDC_USERMENU, BM_SETIMAGE, IMAGE_ICON, (WPARAM)LoadSkinnedIcon(SKINICON_OTHER_DOWNARROW));
- SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BM_SETIMAGE, IMAGE_ICON, (WPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ SendDlgItemMessage(hwndDlg, IDC_DETAILS, BM_SETIMAGE, IMAGE_ICON, (WPARAM)Skin_LoadIcon(SKINICON_OTHER_USERDETAILS));
+ SendDlgItemMessage(hwndDlg, IDC_USERMENU, BM_SETIMAGE, IMAGE_ICON, (WPARAM)Skin_LoadIcon(SKINICON_OTHER_DOWNARROW));
+ SendDlgItemMessage(hwndDlg, IDC_SENDMSG, BM_SETIMAGE, IMAGE_ICON, (WPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
//set-up tooltips
SendDlgItemMessage(hwndDlg, IDC_DETAILS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("View User's Details"), BATF_TCHAR);
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 3e953f08c9..27a7b6746c 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -62,7 +62,7 @@ int BuildContactMenu(WPARAM wparam, LPARAM) }
else if (db_get_b(NULL, S_MOD, "ShowIcon", 1)) {
isetting = db_get_w(hContact, S_MOD, "StatusTriger", -1);
- cmi.hIcon = LoadSkinnedProtoIcon(szProto, isetting | 0x8000);
+ cmi.hIcon = Skin_LoadProtoIcon(szProto, isetting | 0x8000);
}
}
diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index 140175b128..cd635e746f 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -90,7 +90,7 @@ INT_PTR CALLBACK OptsPopupsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp GetColorsFromDWord(&ppd.colorBack, &ppd.colorText, temp);
SendDlgItemMessage(hdlg, idBack, CPM_SETCOLOUR, 0, ppd.colorBack);
SendDlgItemMessage(hdlg, idText, CPM_SETCOLOUR, 0, ppd.colorText);
- ppd.lchIcon = LoadSkinnedProtoIcon(NULL, idBack);
+ ppd.lchIcon = Skin_LoadProtoIcon(NULL, idBack);
GetDlgItemText(hdlg, IDC_POPUPSTAMP, szstamp, SIZEOF(szstamp));
_tcsncpy(ppd.lptzContactName, ParseString(szstamp, NULL, 0), MAX_CONTACTNAME);
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 32329e7a99..55f4cdf575 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -493,7 +493,7 @@ void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus) GetColorsFromDWord(&ppd.colorBack, &ppd.colorText, sett);
ppd.lchContact = hcontact;
- ppd.lchIcon = LoadSkinnedProtoIcon(lpzProto, newStatus);
+ ppd.lchIcon = Skin_LoadProtoIcon(lpzProto, newStatus);
if (!db_get_ts(NULL, S_MOD, "PopupStamp", &dbv)) {
_tcsncpy(ppd.lptzContactName, ParseString(dbv.ptszVal, hcontact, 0), MAX_CONTACTNAME);
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index 8a502c9c2d..3cf30d20d1 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -206,7 +206,7 @@ void ipcGetSkinIcons(THeaderIPC *ipch) // capture all the icons!
spi.hProto = murmur_hash(pa->szModuleName);
for (int j = 0; j <= 10; j++)
- spi.hIcons[j] = LoadSkinnedProtoIcon(pa->szModuleName, ID_STATUS_OFFLINE + j);
+ spi.hIcons[j] = Skin_LoadProtoIcon(pa->szModuleName, ID_STATUS_OFFLINE + j);
pct->fType = REQUEST_NEWICONS;
memcpy(LPSTR(pct) + sizeof(TSlotIPC), &spi, sizeof(TSlotProtoIcons));
@@ -224,7 +224,7 @@ void ipcGetSkinIcons(THeaderIPC *ipch) if (pct != NULL) {
memset(&spi.hIcons, 0, sizeof(spi.hIcons));
spi.hProto = 0; // no protocol
- spi.hIcons[0] = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ spi.hIcons[0] = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
pct->fType = REQUEST_NEWICONS;
memcpy(LPSTR(pct) + sizeof(TSlotIPC), &spi, sizeof(TSlotProtoIcons));
if (ipch->NewIconsBegin == NULL)
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index b3e9a0334e..178dc5206b 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -122,8 +122,8 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP SetDlgItemText(hwndDlg, IDOK, TranslateT("&Close"));
}
SetDlgItemText(hwndDlg, IDC_RETRIEVING, str);
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(szProto, dwStatus));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadProtoIcon(szProto, dwStatus));
EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), FALSE);
}
Utils_RestoreWindowPosition(hwndDlg, lParam, "SRAway", "AwayMsgDlg");
@@ -376,7 +376,7 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM lParam) if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) {
iHidden = 0;
clmi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
- clmi.hIcon = LoadSkinnedProtoIcon(szProto, iStatus);
+ clmi.hIcon = Skin_LoadProtoIcon(szProto, iStatus);
mir_sntprintf(str, SIZEOF(str), TranslateT("Re&ad %s message"), pcli->pfnGetStatusModeDescription(iStatus, 0));
clmi.ptszName = str;
}
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index 5713bf1c62..27ec537e27 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -76,7 +76,7 @@ HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) num_icons++; HIMAGELIST himlIcons = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, num_icons, 0); - HICON hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_OFFLINE); + HICON hicon = Skin_LoadProtoIcon(szProto, ID_STATUS_OFFLINE); ImageList_AddIcon(himlIcons, hicon); IcoLib_ReleaseIcon(hicon); statusicon_nr[0] = 0; @@ -84,7 +84,7 @@ HIMAGELIST AddStatusIconsToImageList(const char *szProto, int status_flags) int j = 1; for (i = 0; i < 9; ++i) { if (Proto_Status2Flag(ID_STATUS_ONLINE + i) & status_flags) { - hicon = LoadSkinnedProtoIcon(szProto, ID_STATUS_ONLINE + i); + hicon = Skin_LoadProtoIcon(szProto, ID_STATUS_ONLINE + i); ImageList_AddIcon(himlIcons, hicon); IcoLib_ReleaseIcon(hicon); statusicon_nr[i + 1] = j; @@ -805,8 +805,8 @@ void ChangeDlgStatus(HWND hwndDlg, struct MsgBoxData *msgbox_data, int iStatus) else if (iStatus > ID_STATUS_CURRENT) iStatus = GetCurrentStatus(NULL); - IcoLib_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus))); - IcoLib_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(msgbox_data->m_szProto, iStatus))); + IcoLib_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(msgbox_data->m_szProto, iStatus))); + IcoLib_ReleaseIcon((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadProtoIcon(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)))) @@ -924,8 +924,8 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA icoStatus = init_data->m_iStatus; if (icoStatus < ID_STATUS_OFFLINE) icoStatus = ID_STATUS_OFFLINE; - SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIcon(init_data->m_szProto, icoStatus)); - SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(init_data->m_szProto, icoStatus)); + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(init_data->m_szProto, icoStatus)); + SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadProtoIcon(init_data->m_szProto, icoStatus)); copy_init_data = (struct MsgBoxData *)mir_alloc(sizeof(struct MsgBoxData)); diff --git a/plugins/Spamotron/src/popups.cpp b/plugins/Spamotron/src/popups.cpp index c06cbe9d6a..9a5d8b889f 100644 --- a/plugins/Spamotron/src/popups.cpp +++ b/plugins/Spamotron/src/popups.cpp @@ -156,19 +156,19 @@ int ShowPopupPreview(HWND optDlg, BYTE popupType, TCHAR *line1, TCHAR *line2) ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_FOREGROUND,CPM_GETCOLOUR,0,0);
ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_BLOCKED_BACKGROUND,CPM_GETCOLOUR,0,0);
ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_BLOCKED_TIMEOUT, NULL, TRUE);
- ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
+ ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
break;
case POPUP_APPROVED:
ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_FOREGROUND,CPM_GETCOLOUR,0,0);
ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_APPROVED_BACKGROUND,CPM_GETCOLOUR,0,0);
ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_APPROVED_TIMEOUT, NULL, TRUE);
- ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
+ ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
break;
case POPUP_CHALLENGE:
ppdp.colorText = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_FOREGROUND,CPM_GETCOLOUR,0,0);
ppdp.colorBack = SendDlgItemMessage(optDlg,IDC_OPT_POPUPS_CHALLENGE_BACKGROUND,CPM_GETCOLOUR,0,0);
ppdp.iSeconds = GetDlgItemInt(optDlg, IDC_OPT_POPUPS_CHALLENGE_TIMEOUT, NULL, TRUE);
- ppdp.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ ppdp.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
break;
}
if (IsDlgButtonChecked(optDlg, IDC_OPT_POPUPS_WINDOWS_COLORS)) {
@@ -205,19 +205,19 @@ int ShowPopup(MCONTACT hContact, BYTE popupType, TCHAR *line1, TCHAR *line2) ppdp.colorText = _getOptD("PopupBlockedForeground", defaultPopupBlockedForeground);
ppdp.colorBack = _getOptD("PopupBlockedBackground", defaultPopupBlockedBackground);
ppdp.iSeconds = _getOptD("PopupBlockedTimeout", defaultPopupBlockedTimeout);
- ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
+ ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
break;
case POPUP_APPROVED:
ppdp.colorText = _getOptD("PopupApprovedForeground", defaultPopupApprovedForeground);
ppdp.colorBack = _getOptD("PopupApprovedBackground", defaultPopupApprovedBackground);
ppdp.iSeconds = _getOptD("PopupApprovedTimeout", defaultPopupApprovedTimeout);
- ppdp.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
+ ppdp.lchIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
break;
case POPUP_CHALLENGE:
ppdp.colorText = _getOptD("PopupChallengeForeground", defaultPopupChallengeForeground);
ppdp.colorBack = _getOptD("PopupChallengeBackground", defaultPopupChallengeBackground);
ppdp.iSeconds = _getOptD("PopupChallengeTimeout", defaultPopupChallengeTimeout);
- ppdp.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ ppdp.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
break;
}
if (_getOptB("PopupWindowsColors", defaultPopupWindowsColors)) {
diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h index 62bcd37f80..f96d0ff728 100644 --- a/plugins/SplashScreen/src/debug.h +++ b/plugins/SplashScreen/src/debug.h @@ -22,7 +22,7 @@ int inline _DebugPopup(MCONTACT hContact, TCHAR *fmt, ...) if(CallService(MS_POPUP_QUERY, PUQS_GETSTATUS, 0) == 1) {
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
if(hContact != 0)
mir_tstrncpy(ppd.lptzContactName, (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR), MAX_CONTACTNAME);
else
diff --git a/plugins/StatusChange/src/main.cpp b/plugins/StatusChange/src/main.cpp index eab4b1bdf2..ccf60e03d9 100644 --- a/plugins/StatusChange/src/main.cpp +++ b/plugins/StatusChange/src/main.cpp @@ -116,11 +116,11 @@ static INT_PTR CALLBACK DlgProcStatusChangeOpts(HWND hwndDlg, UINT msg, WPARAM w case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- hIconMsg = (HICON)CopyImage(LoadSkinnedIcon(SKINICON_EVENT_MESSAGE), IMAGE_ICON, 16, 16, LR_COPYFROMRESOURCE);
+ hIconMsg = (HICON)CopyImage(Skin_LoadIcon(SKINICON_EVENT_MESSAGE), IMAGE_ICON, 16, 16, LR_COPYFROMRESOURCE);
SendDlgItemMessage(hwndDlg, IDC_MSGICON, STM_SETICON, (WPARAM)hIconMsg, 0);
- hIconUrl = (HICON)CopyImage(LoadSkinnedIcon(SKINICON_EVENT_URL), IMAGE_ICON, 16, 16, LR_COPYFROMRESOURCE);
+ hIconUrl = (HICON)CopyImage(Skin_LoadIcon(SKINICON_EVENT_URL), IMAGE_ICON, 16, 16, LR_COPYFROMRESOURCE);
SendDlgItemMessage(hwndDlg, IDC_URLICON, STM_SETICON, (WPARAM)hIconUrl, 0);
- hIconFile = (HICON)CopyImage(LoadSkinnedIcon(SKINICON_EVENT_FILE), IMAGE_ICON, 16, 16, LR_COPYFROMRESOURCE);
+ hIconFile = (HICON)CopyImage(Skin_LoadIcon(SKINICON_EVENT_FILE), IMAGE_ICON, 16, 16, LR_COPYFROMRESOURCE);
SendDlgItemMessage(hwndDlg, IDC_FILEICON, STM_SETICON, (WPARAM)hIconFile, 0);
CheckDlgButton(hwndDlg, IDC_CHK_MESSAGEREAD, Options.MessageRead ? BST_CHECKED : BST_UNCHECKED);
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index b45f796a4c..7dc9711bb0 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -659,7 +659,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND, UINT, UINT_PTR, DWORD) log_debugA("CheckConnectionTimer"); bool setStatus = false; if (showConnectionPopups) - hIcon = LoadSkinnedIcon(SKINICON_STATUS_OFFLINE); + hIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE); for (int i = 0; i < connectionSettings.getCount() && !setStatus; i++) { TConnectionSettings& cs = connectionSettings[i]; @@ -672,7 +672,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND, UINT, UINT_PTR, DWORD) if ((shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS)) { setStatus = true; if (showConnectionPopups) - hIcon = LoadSkinnedProtoIcon(cs.szName, ID_STATUS_OFFLINE); + hIcon = Skin_LoadProtoIcon(cs.szName, ID_STATUS_OFFLINE); } } @@ -893,7 +893,7 @@ static int ProcessPopup(int reason, LPARAM lParam) if (!db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE)) return -1; - hIcon = LoadSkinnedProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); + hIcon = Skin_LoadProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); mir_sntprintf(text, TranslateT("%s connected from another location"), GetHumanName(lParam)); break; @@ -901,7 +901,7 @@ static int ProcessPopup(int reason, LPARAM lParam) if (!db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE)) return -1; - hIcon = LoadSkinnedProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); + hIcon = Skin_LoadProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); if (db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING) == LOGINERR_CANCEL) mir_sntprintf(text, TranslateT("%s login error, cancel reconnecting"), GetHumanName(lParam)); else if (db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING) == LOGINERR_SETDELAY) @@ -915,7 +915,7 @@ static int ProcessPopup(int reason, LPARAM lParam) return -1; if (lParam) { // Óêàçàòåëü íà èìÿ ìîäóëÿ. - hIcon = LoadSkinnedProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); + hIcon = Skin_LoadProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); mir_sntprintf(text, TranslateT("%s status error (next retry (%d) in %d s)"), GetHumanName(lParam), retryCount + 1, currentDelay / 1000); } else mir_sntprintf(text, TranslateT("Status error (next retry (%d) in %d s)"), retryCount + 1, currentDelay / 1000); @@ -938,7 +938,7 @@ static int ProcessPopup(int reason, LPARAM lParam) } } } - hIcon = LoadSkinnedProtoIcon(ps[0]->szName, SKINICON_STATUS_OFFLINE); + hIcon = Skin_LoadProtoIcon(ps[0]->szName, SKINICON_STATUS_OFFLINE); rtrimt(protoInfo); if (retryCount == (maxRetries - 1)) @@ -963,14 +963,14 @@ static int ProcessPopup(int reason, LPARAM lParam) return -1; if (lParam) { - hIcon = LoadSkinnedIcon(SKINICON_STATUS_ONLINE); + hIcon = Skin_LoadIcon(SKINICON_STATUS_ONLINE); mir_sntprintf(text, TranslateT("Status was set ok")); } else mir_sntprintf(text, TranslateT("Giving up")); break; } if (hIcon == NULL) - hIcon = LoadSkinnedIcon(SKINICON_STATUS_OFFLINE); + hIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE); log_info(L"KeepStatus: %s", text); return ShowPopup(text, hIcon); diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index c533847b03..a5ecb7c2fe 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -479,7 +479,7 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l POPUPDATAT ppd = { NULL };
ppd.lchContact = NULL;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_STATUS_OFFLINE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE);
_tcsncpy(ppd.lptzContactName, TranslateT("KeepStatus"), MAX_CONTACTNAME);
_tcsncpy(ppd.lptzText, TranslateT("You broke the Internet!"), MAX_SECONDLINE);
if (IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp index 727d83a33a..96a7d63f51 100755 --- a/plugins/StopSpamMod/src/init.cpp +++ b/plugins/StopSpamMod/src/init.cpp @@ -151,7 +151,7 @@ extern "C" int __declspec(dllexport) Load() CLISTMENUITEM mi = { sizeof(mi) };
mi.position=-0x7FFFFFFF;
mi.flags=0;
- mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon=Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.pszName=LPGEN("Remove Temporary Contacts");
mi.pszService="/RemoveTmp";
diff --git a/plugins/StopSpamPlus/src/opt_proto.cpp b/plugins/StopSpamPlus/src/opt_proto.cpp index 9c6875baf4..404f619eca 100644 --- a/plugins/StopSpamPlus/src/opt_proto.cpp +++ b/plugins/StopSpamPlus/src/opt_proto.cpp @@ -56,10 +56,10 @@ INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM, LPARAM lParam) {
HIMAGELIST himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
HICON Icon;
- Icon = (HICON)LoadSkinnedIcon(SKINICON_OTHER_NOTICK);
+ Icon = (HICON)Skin_LoadIcon(SKINICON_OTHER_NOTICK);
ImageList_AddIcon(himlCheckBoxes, Icon);
IcoLib_ReleaseIcon(Icon);
- Icon = (HICON)LoadSkinnedIcon(SKINICON_OTHER_TICK);
+ Icon = (HICON)Skin_LoadIcon(SKINICON_OTHER_TICK);
ImageList_AddIcon(himlCheckBoxes, Icon);
IcoLib_ReleaseIcon(Icon);
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp index 4e561f32f0..31679de87b 100644 --- a/plugins/StopSpamPlus/src/stopspam.cpp +++ b/plugins/StopSpamPlus/src/stopspam.cpp @@ -51,7 +51,7 @@ extern "C" int __declspec(dllexport) Load(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName = LPGENT("Remove Temporary Contacts");
mi.pszService = pluginName"/RemoveTempContacts";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 87b1197344..f351b48a82 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -452,7 +452,7 @@ static int BuildMenuObjectsTree(HWND hToolBarTree) TreeView_DeleteAllItems(hToolBarTree); himgl = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2); - ImageList_AddIcon(himgl, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT)); + ImageList_AddIcon(himgl, Skin_LoadIcon(SKINICON_OTHER_SMALLDOT)); ImageList_Destroy(TreeView_GetImageList(hToolBarTree, TVSIL_NORMAL)); TreeView_SetImageList(hToolBarTree, himgl, TVSIL_NORMAL); @@ -845,7 +845,7 @@ void CB_InitDefaultButtons() bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISARROWBUTTON | BBBF_CREATEBYID; bbd.dwButtonID = IDC_PROTOCOL; bbd.dwDefPos = 10; - bbd.hIcon = LoadSkinnedIconHandle(SKINICON_OTHER_CONNECTING); + bbd.hIcon = Skin_GetIconHandle(SKINICON_OTHER_CONNECTING); bbd.pszModuleName = "Tabsrmm"; bbd.ptszTooltip = LPGENT("Protocol button"); CB_AddButton(0, (LPARAM)&bbd); diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 8fcecf9662..e26797e999 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -116,7 +116,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT }
else {
if (pContainer->dwFlags & CNT_NOFLASH)
- SendMessage(pContainer->hwnd, DM_SETICON, 0, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(pContainer->hwnd, DM_SETICON, 0, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
else
FlashContainer(pContainer, 1, 0);
}
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 5af8dc4a6a..2f3063c880 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -1900,13 +1900,13 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar switch (si->iType) { case GCW_CHATROOM: - hIcon = LoadSkinnedProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); + hIcon = Skin_LoadProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); mir_sntprintf(szTemp, (si->nUsersInNicklist == 1) ? TranslateT("%s: chat room (%u user%s)") : TranslateT("%s: chat room (%u users%s)"), szNick, si->nUsersInNicklist, si->bFilterEnabled ? TranslateT(", event filter active") : _T("")); break; case GCW_PRIVMESS: - hIcon = LoadSkinnedProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); + hIcon = Skin_LoadProtoIcon(si->pszModule, (dat->wStatus <= ID_STATUS_OFFLINE) ? ID_STATUS_OFFLINE : dat->wStatus); if (si->nUsersInNicklist == 1) mir_sntprintf(szTemp, TranslateT("%s: message session"), szNick); else @@ -2184,7 +2184,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar x_offset = 2; if (g_Settings.bShowContactStatus && g_Settings.bContactStatusFirst && ui->ContactStatus) { - HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus); + HICON hIcon = Skin_LoadProtoIcon(si->pszModule, ui->ContactStatus); DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL); IcoLib_ReleaseIcon(hIcon); x_offset += 18; @@ -2208,7 +2208,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar } if (g_Settings.bShowContactStatus && !g_Settings.bContactStatusFirst && ui->ContactStatus) { - HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus); + HICON hIcon = Skin_LoadProtoIcon(si->pszModule, ui->ContactStatus); DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL); IcoLib_ReleaseIcon(hIcon); x_offset += 18; diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 3a38cdaef3..7b1583e0d4 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -566,7 +566,7 @@ TCHAR* CContactCache::getNormalizedStatusMsg(const TCHAR *src, bool fStripAll) HICON CContactCache::getIcon(int& iSize) const { if (!m_dat || !m_hwnd) - return LoadSkinnedProtoIcon(cc->szProto, m_wStatus); + return Skin_LoadProtoIcon(cc->szProto, m_wStatus); if (m_dat->dwFlags & MWF_ERRORSTATE) return PluginConfig.g_iconErr; diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 87452fb702..9046c7ce7c 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1529,7 +1529,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, {
TWindowData *dat = (TWindowData*)wParam;
HICON hIconMsg = PluginConfig.g_IconMsgEvent;
- HICON hIconBig = (dat && dat->cache) ? LoadSkinnedProtoIconBig(dat->cache->getProto(), dat->cache->getStatus()) : 0;
+ HICON hIconBig = (dat && dat->cache) ? Skin_LoadProtoIcon(dat->cache->getProto(), dat->cache->getStatus(), true) : 0;
if (Win7Taskbar->haveLargeIcons()) {
if ((HICON)lParam == PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING] || (HICON)lParam == hIconMsg) {
@@ -1580,11 +1580,11 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, break;
}
if (reinterpret_cast<HICON>(lParam) == hIconMsg)
- hIconBig = LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
+ hIconBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
if (pContainer->hIcon == STICK_ICON_MSG && (HICON)lParam != hIconMsg && pContainer->dwFlags & CNT_NEED_UPDATETITLE) {
lParam = (LPARAM)hIconMsg;
- hIconBig = LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
+ hIconBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
}
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, lParam);
if (0 != hIconBig && reinterpret_cast<HICON>(CALLSERVICE_NOTFOUND) != hIconBig)
diff --git a/plugins/TabSRMM/src/containeroptions.cpp b/plugins/TabSRMM/src/containeroptions.cpp index bfea4acde1..b21c826881 100644 --- a/plugins/TabSRMM/src/containeroptions.cpp +++ b/plugins/TabSRMM/src/containeroptions.cpp @@ -194,8 +194,8 @@ INT_PTR CALLBACK DlgProcContainerOptions(HWND hwndDlg, UINT msg, WPARAM wParam, Utils::showDlgControl(hwndDlg, o_pages[i].uIds[j], SW_HIDE);
ShowPage(hwndDlg, i, FALSE);
}
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true));
ShowPage(hwndDlg, 0, TRUE);
SetFocus(hwndTree);
Utils::enableDlgControl(hwndDlg, IDC_APPLY, false);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index 94fe049ccc..0fec89b39e 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -54,7 +54,7 @@ CMenuBar::CMenuBar(HWND hwndParent, const TContainerData *pContainer) if (m_MimIcon == 0) {
HDC hdc = ::GetDC(m_pContainer->hwnd);
- HANDLE hIcon = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA);
+ HANDLE hIcon = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
HDC hdcTemp = ::CreateCompatibleDC(hdc);
@@ -319,7 +319,7 @@ LONG_PTR CMenuBar::customDrawWorker(NMCUSTOMDRAW *nm) }
if (iIndex == 0)
::DrawIconEx(m_hdcDraw, (nmtb->nmcd.rc.left + nmtb->nmcd.rc.right) / 2 - 8,
- (nmtb->nmcd.rc.top + nmtb->nmcd.rc.bottom) / 2 - 8, LoadSkinnedIcon(SKINICON_OTHER_MIRANDA),
+ (nmtb->nmcd.rc.top + nmtb->nmcd.rc.bottom) / 2 - 8, Skin_LoadIcon(SKINICON_OTHER_MIRANDA),
16, 16, 0, 0, DI_NORMAL);
return CDRF_SKIPDEFAULT;
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index f9a9bdf5bb..402c169e67 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -584,7 +584,7 @@ static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEve long iSeconds;
switch (eventType) {
case EVENTTYPE_MESSAGE:
- pud.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ pud.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
pud.colorBack = pluginOptions->bDefaultColorMsg ? 0 : pluginOptions->colBackMsg;
pud.colorText = pluginOptions->bDefaultColorMsg ? 0 : pluginOptions->colTextMsg;
iSeconds = pluginOptions->iDelayMsg;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index 18c6d9607c..bd339bb0eb 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -423,7 +423,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, switch (iSelection) { case ID_FAVORITES_ADDCONTACTTOFAVORITES: db_set_b(dat->hContact, SRMSGMOD_T, "isFavorite", 1); - AddContactToFavorites(dat->hContact, dat->cache->getNick(), dat->cache->getProto(), dat->szStatus, dat->wStatus, LoadSkinnedProtoIcon(dat->cache->getProto(), dat->cache->getStatus()), 1, PluginConfig.g_hMenuFavorites); + AddContactToFavorites(dat->hContact, dat->cache->getNick(), dat->cache->getProto(), dat->szStatus, dat->wStatus, Skin_LoadProtoIcon(dat->cache->getProto(), dat->cache->getStatus()), 1, PluginConfig.g_hMenuFavorites); break; case ID_FAVORITES_REMOVECONTACTFROMFAVORITES: db_set_b(dat->hContact, SRMSGMOD_T, "isFavorite", 0); @@ -617,7 +617,7 @@ static INT_PTR CALLBACK DlgProcAbout(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR TranslateT("Version"), __MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM, v[3]); SetDlgItemText(hwndDlg, IDC_HEADERBAR, tStr); } - SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE)); + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true)); return TRUE; case WM_COMMAND: @@ -1647,7 +1647,7 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM hContact, LPARAM lParam) if ((GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer || dat->pContainer->hwndActive != hwndDlg) && !(dbei.flags & DBEF_SENT)) { if (!(m_pContainer->dwFlags & CNT_NOFLASH) && (GetActiveWindow() != hwndContainer || GetForegroundWindow() != hwndContainer)) FlashContainer(m_pContainer, 1, 0); - SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE)); + SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE; } @@ -1791,11 +1791,11 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM, LPARAM lParam) UpdateTrayMenuState(dat, TRUE); if (dat->cache->isFavorite()) AddContactToFavorites(dat->hContact, dat->cache->getNick(), szActProto, dat->szStatus, dat->wStatus, - LoadSkinnedProtoIcon(dat->cache->getProto(), dat->cache->getStatus()), 0, PluginConfig.g_hMenuFavorites); + Skin_LoadProtoIcon(dat->cache->getProto(), dat->cache->getStatus()), 0, PluginConfig.g_hMenuFavorites); if (dat->cache->isRecent()) AddContactToFavorites(dat->hContact, dat->cache->getNick(), szActProto, dat->szStatus, dat->wStatus, - LoadSkinnedProtoIcon(dat->cache->getProto(), dat->cache->getStatus()), 0, PluginConfig.g_hMenuRecent); + Skin_LoadProtoIcon(dat->cache->getProto(), dat->cache->getStatus()), 0, PluginConfig.g_hMenuRecent); dat->Panel->Invalidate(); if (dat->pWnd) diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 8d85c8e0bd..ea7cd59b22 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -138,7 +138,7 @@ void CGlobals::reloadSystemModulesChanged() CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_MESSAGE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
mi.pszName = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
PluginConfig.m_hMenuItem = Menu_AddContactMenuItem(&mi);
@@ -543,7 +543,7 @@ int CGlobals::OkToExit(WPARAM, LPARAM) void CGlobals::RestoreUnreadMessageAlerts(void)
{
CLISTEVENT cle = { sizeof(cle) };
- cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
cle.flags = CLEF_TCHAR;
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 0ed4a9ff53..345b527901 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -719,8 +719,8 @@ HMENU CInfoPanel::constructContextualMenu() const HMENU m = ::CreatePopupMenu();
if (m_hoverFlags & HOVER_NICK) {
- Utils::addMenuItem(m, mii, ::LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS), TranslateT("Open user details..."), IDC_NAME, 0);
- Utils::addMenuItem(m, mii, ::LoadSkinnedIcon(SKINICON_OTHER_HISTORY), TranslateT("Open history..."), m_isChat ? IDC_CHAT_HISTORY : IDC_HISTORY, 0);
+ Utils::addMenuItem(m, mii, ::Skin_LoadIcon(SKINICON_OTHER_USERDETAILS), TranslateT("Open user details..."), IDC_NAME, 0);
+ Utils::addMenuItem(m, mii, ::Skin_LoadIcon(SKINICON_OTHER_HISTORY), TranslateT("Open history..."), m_isChat ? IDC_CHAT_HISTORY : IDC_HISTORY, 0);
if (!m_isChat)
Utils::addMenuItem(m, mii, PluginConfig.g_iconContainer, TranslateT("Messaging settings..."), ID_MESSAGELOGSETTINGS_FORTHISCONTACT, 1);
else {
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index f78fdf9b98..8776a324dd 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -547,7 +547,7 @@ nowindowcreate: cle.hContact = hContact; cle.hDbEvent = hDbEvent; cle.flags = CLEF_TCHAR; - cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE); + cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE); cle.pszService = "SRMsg/ReadMessage"; contactName = pcli->pfnGetContactDisplayName(hContact, 0); mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName); diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index bdfd094f3d..bf0f76394e 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1390,7 +1390,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP dbei.eventType = EVENTTYPE_MESSAGE;
FlashOnClist(hwndDlg, dat, dat->hDbEventFirst, &dbei);
- SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(hwndContainer, DM_SETICON, (WPARAM)dat, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
m_pContainer->dwFlags |= CNT_NEED_UPDATETITLE;
dat->dwFlags |= MWF_NEEDCHECKSIZE | MWF_WASBACKGROUNDCREATE | MWF_DEFERREDSCROLL;
}
@@ -3178,7 +3178,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (dat->cache->isValid()) { // not valid means the contact was deleted
TABSRMM_FireEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_CLOSING, 0);
AddContactToFavorites(dat->hContact, dat->cache->getNick(), dat->cache->getActiveProto(), dat->szStatus, dat->wStatus,
- LoadSkinnedProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus()), 1, PluginConfig.g_hMenuRecent);
+ Skin_LoadProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus()), 1, PluginConfig.g_hMenuRecent);
if (dat->hContact) {
if (!dat->fEditNotesActive) {
char *msg = Message_GetFromStream(GetDlgItem(hwndDlg, IDC_MESSAGE), SF_TEXT);
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 739af6ae0b..62c18f8d36 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -775,7 +775,7 @@ void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, MEVENT hEvent, DBEVENTIN cle.cbSize = sizeof(cle);
cle.hContact = (MCONTACT)dat->hContact;
cle.hDbEvent = hEvent;
- cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
dat->dwFlagsEx |= MWF_SHOW_FLASHCLIST;
@@ -1786,8 +1786,8 @@ HICON TSAPI MY_GetContactIcon(const TWindowData *dat, LPCSTR szSetting) {
int bUseMeta = (szSetting == NULL) ? false : M.GetByte(szSetting, mir_strcmp(szSetting, "MetaiconTab") == 0);
if (bUseMeta)
- return LoadSkinnedProtoIcon(dat->cache->getProto(), dat->cache->getStatus());
- return LoadSkinnedProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus());
+ return Skin_LoadProtoIcon(dat->cache->getProto(), dat->cache->getStatus());
+ return Skin_LoadProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus());
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 620feae359..dc39ec3eed 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -181,9 +181,9 @@ void FreeLogFonts() void TSAPI CacheMsgLogIcons()
{
- Logicons[0] = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
- Logicons[1] = LoadSkinnedIcon(SKINICON_EVENT_URL);
- Logicons[2] = LoadSkinnedIcon(SKINICON_EVENT_FILE);
+ Logicons[0] = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ Logicons[1] = Skin_LoadIcon(SKINICON_EVENT_URL);
+ Logicons[2] = Skin_LoadIcon(SKINICON_EVENT_FILE);
Logicons[3] = PluginConfig.g_iconOut;
Logicons[4] = PluginConfig.g_iconIn;
Logicons[5] = PluginConfig.g_iconStatus;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 79e8c0ab3f..192b28fffb 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -1624,7 +1624,7 @@ static int ModernOptInitialise(WPARAM wParam, LPARAM) MODERNOPTOBJECT obj = { sizeof(obj) };
obj.dwFlags = MODEROPT_FLG_TCHAR | MODEROPT_FLG_NORESIZE;
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.hInstance = g_hInst;
obj.iSection = MODERNOPT_PAGE_MSGS;
obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index b9312fa29d..2a95682f6a 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -546,7 +546,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, }
else {
if (pContainer->dwFlags & CNT_NOFLASH)
- SendMessage(pContainer->hwnd, DM_SETICON, 0, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(pContainer->hwnd, DM_SETICON, 0, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
else
FlashContainer(pContainer, 1, 0);
}
@@ -627,12 +627,12 @@ void TSAPI CreateImageList(BOOL bInitial) DestroyIcon(hIcon);
}
- PluginConfig.g_IconFileEvent = LoadSkinnedIcon(SKINICON_EVENT_FILE);
- PluginConfig.g_IconMsgEvent = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
- PluginConfig.g_IconMsgEventBig = LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
+ PluginConfig.g_IconFileEvent = Skin_LoadIcon(SKINICON_EVENT_FILE);
+ PluginConfig.g_IconMsgEvent = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ PluginConfig.g_IconMsgEventBig = Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
if ((HICON)CALLSERVICE_NOTFOUND == PluginConfig.g_IconMsgEventBig)
PluginConfig.g_IconMsgEventBig = 0;
- PluginConfig.g_IconTypingEventBig = LoadSkinnedIconBig(SKINICON_OTHER_TYPING);
+ PluginConfig.g_IconTypingEventBig = Skin_LoadIcon(SKINICON_OTHER_TYPING, true);
if ((HICON)CALLSERVICE_NOTFOUND == PluginConfig.g_IconTypingEventBig)
PluginConfig.g_IconTypingEventBig = 0;
PluginConfig.g_IconSend = PluginConfig.g_buttonBarIcons[9];
@@ -840,18 +840,18 @@ static int TSAPI LoadFromIconLib() for (int i = 0; i < ICONBLOCKS[n].nItems; i++)
*(ICONBLOCKS[n].idesc[i].phIcon) = IcoLib_GetIcon(ICONBLOCKS[n].idesc[i].szName);
- PluginConfig.g_buttonBarIcons[0] = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
- PluginConfig.g_buttonBarIcons[1] = LoadSkinnedIcon(SKINICON_OTHER_HISTORY);
- PluginConfig.g_buttonBarIconHandles[0] = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY);
- PluginConfig.g_buttonBarIconHandles[1] = LoadSkinnedIconHandle(SKINICON_OTHER_ADDCONTACT);
- PluginConfig.g_buttonBarIconHandles[20] = LoadSkinnedIconHandle(SKINICON_OTHER_USERDETAILS);
+ PluginConfig.g_buttonBarIcons[0] = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
+ PluginConfig.g_buttonBarIcons[1] = Skin_LoadIcon(SKINICON_OTHER_HISTORY);
+ PluginConfig.g_buttonBarIconHandles[0] = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
+ PluginConfig.g_buttonBarIconHandles[1] = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT);
+ PluginConfig.g_buttonBarIconHandles[20] = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING] =
- PluginConfig.g_buttonBarIcons[12] = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
- PluginConfig.g_IconChecked = LoadSkinnedIcon(SKINICON_OTHER_TICK);
- PluginConfig.g_IconUnchecked = LoadSkinnedIcon(SKINICON_OTHER_NOTICK);
- PluginConfig.g_IconGroupOpen = LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN);
- PluginConfig.g_IconGroupClose = LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT);
+ PluginConfig.g_buttonBarIcons[12] = Skin_LoadIcon(SKINICON_OTHER_TYPING);
+ PluginConfig.g_IconChecked = Skin_LoadIcon(SKINICON_OTHER_TICK);
+ PluginConfig.g_IconUnchecked = Skin_LoadIcon(SKINICON_OTHER_NOTICK);
+ PluginConfig.g_IconGroupOpen = Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN);
+ PluginConfig.g_IconGroupClose = Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT);
PluginConfig.g_iconOverlayEnabled = IcoLib_GetIcon("tabSRMM_overlay_enabled");
PluginConfig.g_iconOverlayDisabled = IcoLib_GetIcon("tabSRMM_overlay_disabled");
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index fb63069d01..eec885a529 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -678,9 +678,9 @@ void CThumbBase::renderBase() }
}
else {
- hIcon = reinterpret_cast<HICON>(LoadSkinnedProtoIconBig(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus()));
+ hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus(), true));
if (0 == hIcon || reinterpret_cast<HICON>(CALLSERVICE_NOTFOUND) == hIcon) {
- hIcon = reinterpret_cast<HICON>(LoadSkinnedProtoIcon(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus()));
+ hIcon = reinterpret_cast<HICON>(Skin_LoadProtoIcon(m_dat->cache->getActiveProto(), m_dat->cache->getActiveStatus()));
lIconSize = 16;
}
}
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index 852e3256ce..950b90c482 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -212,7 +212,7 @@ void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, con return;
if (hIcon == 0)
- hIcon = LoadSkinnedProtoIcon(szProto, wStatus);
+ hIcon = Skin_LoadProtoIcon(szProto, wStatus);
PROTOACCOUNT *acc = ProtoGetAccount(szProto);
if (acc && acc->tszAccountName) {
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index d7be4d2221..e905fb0908 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -1272,8 +1272,8 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP m_hwnd = hwnd;
::SetWindowTextW(hwnd, TranslateT("TabSRMM warning message"));
- ::SendMessage(hwnd, WM_SETICON, ICON_BIG, LPARAM(::LoadSkinnedIconBig(SKINICON_OTHER_MIRANDA)));
- ::SendMessage(hwnd, WM_SETICON, ICON_SMALL, LPARAM(::LoadSkinnedIcon(SKINICON_OTHER_MIRANDA)));
+ ::SendMessage(hwnd, WM_SETICON, ICON_BIG, LPARAM(::Skin_LoadIcon(SKINICON_OTHER_MIRANDA, true)));
+ ::SendMessage(hwnd, WM_SETICON, ICON_SMALL, LPARAM(::Skin_LoadIcon(SKINICON_OTHER_MIRANDA)));
::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_AUTOURLDETECT, TRUE, 0);
::SendDlgItemMessage(hwnd, IDC_WARNTEXT, EM_SETEVENTMASK, 0, ENM_LINK);
@@ -1322,7 +1322,7 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (uResId)
hIcon = reinterpret_cast<HICON>(::LoadImage(0, MAKEINTRESOURCE(uResId), IMAGE_ICON, 0, 0, LR_SHARED | LR_DEFAULTSIZE));
else
- hIcon = ::LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE);
+ hIcon = ::Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true);
::SendDlgItemMessageW(hwnd, IDC_WARNICON, STM_SETICON, reinterpret_cast<WPARAM>(hIcon), 0);
if (!(m_dwFlags & MB_YESNO || m_dwFlags & MB_YESNOCANCEL))
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 64a5543b09..9f58b47288 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -771,7 +771,7 @@ INT_PTR CALLBACK DlgProcOptsContent(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, btns[i].id, BUTTONADDTOOLTIP, (WPARAM)TranslateTS(btns[i].swzTooltip), BATF_TCHAR);
if (btns[i].uintCoreIconId)
- SendDlgItemMessage(hwndDlg, btns[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(btns[i].uintCoreIconId));
+ SendDlgItemMessage(hwndDlg, btns[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(btns[i].uintCoreIconId));
else {
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(btns[i].uintResIconId));
SendDlgItemMessage(hwndDlg, btns[i].id, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
@@ -1716,7 +1716,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Get more skins"), BATF_TCHAR);
- SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_URL));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_GETSKINS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_URL));
SendDlgItemMessage(hwndDlg, IDC_SPIN_TRANS, UDM_SETRANGE, 0, (LPARAM)MAKELONG(100, 0));
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 71094462ef..55eec69396 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -87,7 +87,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa // get status icon if (pwd->bIsIconVisible[0]) { - pwd->extraIcons[0].hIcon = LoadSkinnedProtoIcon(pwd->clcit.szProto, wStatus); + pwd->extraIcons[0].hIcon = Skin_LoadProtoIcon(pwd->clcit.szProto, wStatus); pwd->extraIcons[0].bDestroy = false; } @@ -1504,7 +1504,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (CallService(MS_PROTO_ISACCOUNTLOCKED, 0, (LPARAM)pa->szModuleName)) mir_sntprintf(swzProto, SIZEOF(swzProto), TranslateT("%s (locked)"), pa->tszAccountName); - AddRow(pwd, swzProto, buff, NULL, false, false, !bFirstItem, true, LoadSkinnedProtoIcon(pa->szModuleName, wStatus)); + AddRow(pwd, swzProto, buff, NULL, false, false, !bFirstItem, true, Skin_LoadProtoIcon(pa->szModuleName, wStatus)); bFirstItem = false; if (dwItems & TRAYTIP_LOGON) { @@ -1669,7 +1669,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR swzText[256]; mir_tstrcpy(swzText, pwd->clcit.swzText); if (pchBr) swzText[pchBr - pwd->clcit.swzText] = 0; - AddRow(pwd, swzText, _T(""), NULL, false, true, false, true, LoadSkinnedIcon(SKINICON_OTHER_FILLEDBLOB)); + AddRow(pwd, swzText, _T(""), NULL, false, true, false, true, Skin_LoadIcon(SKINICON_OTHER_FILLEDBLOB)); } } diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 943950fe3d..b7f5c8995f 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -135,10 +135,10 @@ void InitInternalButtons() ttb.hIconDn = NULL;
}
else {
- ttb.hIconHandleUp = LoadSkinnedIconHandle(stdButtons[i].iconidUp);
+ ttb.hIconHandleUp = Skin_GetIconHandle(stdButtons[i].iconidUp);
if (stdButtons[i].iconidDn) {
ttb.dwFlags |= TTBBF_ASPUSHBUTTON;
- ttb.hIconHandleDn = LoadSkinnedIconHandle(stdButtons[i].iconidDn);
+ ttb.hIconHandleDn = Skin_GetIconHandle(stdButtons[i].iconidDn);
}
else
ttb.hIconHandleDn = ttb.hIconDn = NULL;
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp index 08ce75a4bf..9f85e57dac 100644 --- a/plugins/TopToolBar/src/toolbarwnd.cpp +++ b/plugins/TopToolBar/src/toolbarwnd.cpp @@ -279,7 +279,7 @@ INT_PTR OnEventFire(WPARAM wParam, LPARAM lParam) Frame.align = alTop;
Frame.Flags = F_VISIBLE | F_NOBORDER | F_LOCKED | F_TCHAR;
Frame.height = g_ctrl->nLastHeight;
- Frame.hIcon = LoadSkinnedIcon(SKINICON_OTHER_FRAME);
+ Frame.hIcon = Skin_LoadIcon(SKINICON_OTHER_FRAME);
g_ctrl->hFrame = (HANDLE)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
}
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index c6ef0f73fb..4ce4b7df3a 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -495,7 +495,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) if (unOptions.DrawProtoIcon)
{
TC_DrawIconEx(hdc, rect.left, rect.top,
- LoadSkinnedProtoIcon(ProtoList[i].name, CallProtoService(ProtoList[i].name,PS_GETSTATUS,0,0)), b, ClistModernPresent);
+ Skin_LoadProtoIcon(ProtoList[i].name, CallProtoService(ProtoList[i].name,PS_GETSTATUS,0,0)), b, ClistModernPresent);
dx = 19;
}
// Èçîáðàæàåì èìÿ àêêàóíòà
@@ -562,7 +562,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) if (unOptions.DrawProtoIcon)
{
TC_DrawIconEx(hdc, rect.left, rect.top,
- LoadSkinnedIcon(SKINICON_OTHER_MIRANDA), b, ClistModernPresent);
+ Skin_LoadIcon(SKINICON_OTHER_MIRANDA), b, ClistModernPresent);
dx = 19;
}
// Âûâîäèì òåêñò
@@ -624,7 +624,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) if (unOptions.DrawProtoIcon)
{
TC_DrawIconEx(hdc, rect.left, rect.top,
- LoadSkinnedIcon(SKINICON_OTHER_MIRANDA), b, ClistModernPresent);
+ Skin_LoadIcon(SKINICON_OTHER_MIRANDA), b, ClistModernPresent);
dx = 19;
}
// Âûâîäèì òåêñò
@@ -682,7 +682,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) ahIcon = (HICON*)mir_realloc(ahIcon, sizeof(HICON) * (RowsNumber + 1));
ExtraText[RowsNumber] = mir_a2t(ProtoList[i].name);
- ahIcon[RowsNumber++] = LoadSkinnedProtoIcon(ProtoList[i].name, CallProtoService(ProtoList[i].name, PS_GETSTATUS, 0, 0));
+ ahIcon[RowsNumber++] = Skin_LoadProtoIcon(ProtoList[i].name, CallProtoService(ProtoList[i].name, PS_GETSTATUS, 0, 0));
}
}
// Åù¸ 2 îñîáûõ ýëåìåíòà.
@@ -692,7 +692,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) ahIcon = (HICON*)mir_realloc(ahIcon, sizeof(HICON) * (RowsNumber + 1));
ExtraText[RowsNumber] = mir_a2t("summary");
- ahIcon[RowsNumber++] = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ ahIcon[RowsNumber++] = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
}
if (unOptions.ShowOverall)
{
@@ -700,7 +700,7 @@ int PaintTrafficCounterWindow(HWND hwnd, HDC hDC) ahIcon = (HICON*)mir_realloc(ahIcon, sizeof(HICON) * (RowsNumber + 1));
ExtraText[RowsNumber] = mir_a2t("overall");
- ahIcon[RowsNumber++] = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ ahIcon[RowsNumber++] = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
}
// Ðèñóåì ñâîé ñ÷¸ò÷èê äëÿ êàæäîãî èç âûáðàííûõ ïðîòîêîëîâ
@@ -1135,7 +1135,7 @@ void NotifyOnSend(void) memset(&ppd, 0, sizeof(ppd));
ppd.lchContact = NULL;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
_tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"), MAX_CONTACTNAME);
//
mir_sntprintf(ppd.lptzText, SIZEOF(ppd.lptzText), TranslateT("%d kilobytes sent"),
@@ -1154,7 +1154,7 @@ void NotifyOnRecv(void) memset(&ppd, 0, sizeof(ppd));
ppd.lchContact = NULL;
- ppd.lchIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ ppd.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
_tcsncpy(ppd.lptzContactName, TranslateT("Traffic counter notification"),MAX_CONTACTNAME);
//
mir_sntprintf(ppd.lptzText, SIZEOF(ppd.lptzText), TranslateT("%d kilobytes received"),
diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp index ced9f4db3e..792b0022ef 100644 --- a/plugins/TrafficCounter/src/opttree.cpp +++ b/plugins/TrafficCounter/src/opttree.cpp @@ -176,13 +176,13 @@ BOOL OptTree_ProcessMessage(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, TreeView_DeleteAllItems(hwndTree);
hImgLst = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR|ILC_COLOR32|ILC_MASK, 5, 1);
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_TICK)); // check on
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_NOTICK)); // check off
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_TICK)); // radio on
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_NOTICK)); // radio on
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN));
- ImageList_ReplaceIcon(hImgLst, -1, (HICON)LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_TICK)); // check on
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_NOTICK)); // check off
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_TICK)); // radio on
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_NOTICK)); // radio on
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN));
+ ImageList_ReplaceIcon(hImgLst, -1, (HICON)Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT));
TreeView_SetImageList(hwndTree, hImgLst, TVSIL_NORMAL);
/* build options tree. based on code from IcoLib */
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp index 91de3fec58..d47ffad71d 100644 --- a/plugins/UserGuide/src/main.cpp +++ b/plugins/UserGuide/src/main.cpp @@ -91,7 +91,7 @@ extern "C" __declspec(dllexport) int Load(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 500000;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_HELP);
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_HELP);
mi.ptszName = LPGENT("User Guide");
mi.pszService = "UserGuide/ShowGuide";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Watrack/popup/pop_dlg.inc b/plugins/Watrack/popup/pop_dlg.inc index 2d8c0ce79b..4ee10e1952 100644 --- a/plugins/Watrack/popup/pop_dlg.inc +++ b/plugins/Watrack/popup/pop_dlg.inc @@ -80,7 +80,7 @@ begin IDC_TEST: begin
mGetMem(ppd,SizeOf(TPOPUPDATAW));
FillChar(ppd^,SizeOf(ppd^),0);
- ppd^.lchIcon:=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ ppd^.lchIcon:=Skin_LoadIcon(SKINICON_OTHER_MIRANDA,0);
StrCopyW(ppd^.lpwzContactName,TranslateW('popup test'));
StrCopyW(ppd^.lpwzText,TranslateW('second line'));
if IsDlgButtonChecked(Dialog,IDC_COLORDEF)=BST_CHECKED then
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas index 2e95e7f05b..4f896d0224 100644 --- a/plugins/Watrack/popup/popups.pas +++ b/plugins/Watrack/popup/popups.pas @@ -160,7 +160,7 @@ begin if si^.icon<>0 then
Icon:=si^.icon
else
- Icon:=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ Icon:=Skin_LoadIcon(SKINICON_OTHER_MIRANDA,0);
if PopupDelay<0 then
sec:=-1
else if PopupDelay>0 then
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index 4c4980ed46..bd99e5df8b 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -142,10 +142,10 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa wndData = ( CntSetWndDataType* )mir_alloc(sizeof(CntSetWndDataType));
wndData->hContact = hContact = lParam;
- wndData->hRename = LoadSkinnedIcon(SKINICON_OTHER_RENAME);
- wndData->hUserDetail = LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS);
- wndData->hFile = LoadSkinnedIcon(SKINICON_EVENT_FILE);
- wndData->hSrchAll = LoadSkinnedIcon(SKINICON_OTHER_SEARCHALL);
+ wndData->hRename = Skin_LoadIcon(SKINICON_OTHER_RENAME);
+ wndData->hUserDetail = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
+ wndData->hFile = Skin_LoadIcon(SKINICON_EVENT_FILE);
+ wndData->hSrchAll = Skin_LoadIcon(SKINICON_OTHER_SEARCHALL);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)wndData);
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index 7c91da6ffc..921e1b7275 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -155,11 +155,11 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara int statusIcon = db_get_w(data->hContact, WEATHERPROTONAME, "Status", 0);
picSize = GetSystemMetrics(SM_CXICON);
- hIcon = LoadSkinnedProtoIconBig(WEATHERPROTONAME, statusIcon);
+ hIcon = Skin_LoadProtoIcon(WEATHERPROTONAME, statusIcon, true);
if ((INT_PTR)hIcon == CALLSERVICE_NOTFOUND)
{
picSize = GetSystemMetrics(SM_CXSMICON);
- hIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, statusIcon);
+ hIcon = Skin_LoadProtoIcon(WEATHERPROTONAME, statusIcon);
}
}
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index 3ae6f80032..3b08a3c1a5 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -43,7 +43,7 @@ int WeatherPopup(WPARAM hContact, LPARAM lParam) // setup the popup
POPUPDATAT ppd = { 0 };
ppd.lchContact = hContact;
- ppd.PluginData = ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, winfo.status);
+ ppd.PluginData = ppd.lchIcon = Skin_LoadProtoIcon(WEATHERPROTONAME, winfo.status);
GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName);
GetDisplay(&winfo, opt.pText, ppd.lptzText);
ppd.PluginWindowProc = PopupDlgProc;
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp index 564e8e48ee..af318beeb2 100644 --- a/plugins/Weather/src/weather_userinfo.cpp +++ b/plugins/Weather/src/weather_userinfo.cpp @@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa SetDlgItemText(hwndDlg, IDC_INFO1, GetDisplay(&w, TranslateT("Current condition for %n"), str));
SendDlgItemMessage(hwndDlg, IDC_INFOICON, STM_SETICON,
- (WPARAM)LoadSkinnedProtoIcon(WEATHERPROTONAME,
+ (WPARAM)Skin_LoadProtoIcon(WEATHERPROTONAME,
db_get_w(hContact, WEATHERPROTONAME, "StatusIcon",0)), 0);
{ // bold and enlarge the current condition
@@ -213,8 +213,8 @@ INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l // set icons
{
WORD statusIcon = db_get_w(hContact, WEATHERPROTONAME, "StatusIcon", 0);
- ReleaseIconEx((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIconBig(WEATHERPROTONAME, statusIcon)));
- ReleaseIconEx((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(WEATHERPROTONAME, statusIcon)));
+ ReleaseIconEx((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(WEATHERPROTONAME, statusIcon, true)));
+ ReleaseIconEx((HICON)SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadProtoIcon(WEATHERPROTONAME, statusIcon)));
}
RedrawWindow(GetDlgItem(hwndDlg, IDC_HEADERBAR), NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
break;
diff --git a/plugins/WinterSpeak/src/MirandaDialog.cpp b/plugins/WinterSpeak/src/MirandaDialog.cpp index 7bdbec3059..eb63e2f5a2 100644 --- a/plugins/WinterSpeak/src/MirandaDialog.cpp +++ b/plugins/WinterSpeak/src/MirandaDialog.cpp @@ -31,7 +31,7 @@ WCHAR *MirandaDialog::Hlp_GetDlgItemText(HWND hwndDlg, int nIDDlgItem) { int MirandaDialog::ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId)
{
- HICON hIcon = LoadSkinnedIcon(iconId);
+ HICON hIcon = Skin_LoadIcon(iconId);
int res = ImageList_AddIcon(hIml, hIcon);
IcoLib_ReleaseIcon(hIcon);
return res;
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 7a857a1b59..a6fecdae02 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -179,7 +179,7 @@ static int OnLoadInit(WPARAM, LPARAM) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
mi.ptszName = LPGENT("Custom contact sound");
mi.pszService = "XSoundNotify/ContactMenuCommand";
hChangeSound = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/YAPP/src/options.cpp b/plugins/YAPP/src/options.cpp index fc3cf8c3f3..2f9021ca60 100644 --- a/plugins/YAPP/src/options.cpp +++ b/plugins/YAPP/src/options.cpp @@ -496,6 +496,6 @@ void InitOptions() HookEvent(ME_OPT_INITIALISE, OptInit);
// an icon for preview popups
- hPopupIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ hPopupIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
LoadOptions();
}
diff --git a/plugins/ZeroSwitch/src/ZeroSwitch.cpp b/plugins/ZeroSwitch/src/ZeroSwitch.cpp index 37a2b7daa5..20dd9d86d7 100644 --- a/plugins/ZeroSwitch/src/ZeroSwitch.cpp +++ b/plugins/ZeroSwitch/src/ZeroSwitch.cpp @@ -74,12 +74,12 @@ void CreateHelperWnd() wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInst;
- wcex.hIcon = LoadSkinnedIconBig(SKINICON_OTHER_MIRANDA);
+ wcex.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA, true);
wcex.hCursor = NULL;
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wcex.lpszMenuName = NULL;
wcex.lpszClassName = _T("ZeroSwitchHlp");
- wcex.hIconSm = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ wcex.hIconSm = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
if (NULL == RegisterClassEx(&wcex))
return; // wtf
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 98a20f17ea..96d413b8c3 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -109,7 +109,7 @@ void InitContactMenus() CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000006000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszName = LPGEN("Visit profile");
mi.pszService = "FacebookProto/VisitProfile";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::VisitProfile>);
@@ -144,35 +144,35 @@ void InitContactMenus() g_hContactMenuPoke = Menu_AddContactMenuItem(&mi);
mi.position = -2000006010;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
mi.pszName = LPGEN("Cancel friendship");
mi.pszService = "FacebookProto/CancelFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::CancelFriendship>);
g_hContactMenuAuthRevoke = Menu_AddContactMenuItem(&mi);
mi.position = -2000006011;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
mi.pszName = LPGEN("Cancel friendship request");
mi.pszService = "FacebookProto/CancelFriendshipRequest";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::OnCancelFriendshipRequest>);
g_hContactMenuAuthCancel = Menu_AddContactMenuItem(&mi);
mi.position = -2000006012;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
mi.pszName = LPGEN("Request friendship");
mi.pszService = "FacebookProto/RequestFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::RequestFriendship>);
g_hContactMenuAuthAsk = Menu_AddContactMenuItem(&mi);
mi.position = -2000006013;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
mi.pszName = LPGEN("Approve friendship");
mi.pszService = "FacebookProto/ApproveFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::ApproveFriendship>);
g_hContactMenuAuthGrant = Menu_AddContactMenuItem(&mi);
mi.position = -2000006014;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
mi.pszName = LPGEN("Deny friendship request");
mi.pszService = "FacebookProto/DenyFriendship";
CreateServiceFunction(mi.pszService, GlobalService<&FacebookProto::DenyFriendship>);
@@ -245,21 +245,21 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) mir_strcpy(tDest, "/VisitProfile");
mi.flags = CMIF_CHILDPOPUP;
mi.pszName = LPGEN("Visit profile");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
// TODO RM: remember and properly free in destructor?
/*m_hStatusMind = */Menu_AddProtoMenuItem(&mi);
//CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications);
mir_strcpy(tDest, "/VisitNotifications");
mi.pszName = LPGEN("Visit notifications");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
Menu_AddProtoMenuItem(&mi);
// Services...
mi.pszName = LPGEN("Services...");
mir_strcpy(tDest, "/Services");
mi.flags = CMIF_CHILDPOPUP | (this->isOnline() ? 0 : CMIF_GRAYED);
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HELP);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
m_hMenuServicesRoot = Menu_AddProtoMenuItem(&mi);
CreateProtoService("/RefreshBuddyList", &FacebookProto::RefreshBuddyList);
@@ -275,7 +275,7 @@ int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM) mir_strcpy(tDest, "/CheckFriendRequests");
mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Check Friends Requests");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
mi.hParentMenu = m_hMenuServicesRoot;
Menu_AddProtoMenuItem(&mi);
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index c9407b2473..4cb99e7a47 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -68,7 +68,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) if (gg->m_iStatus > ID_STATUS_OFFLINE) {
++items;
mi.flags |= CMIM_ICON;
- mi.hIcon = LoadSkinnedProtoIcon(gg->m_szModuleName, gg->m_iStatus);
+ mi.hIcon = Skin_LoadProtoIcon(gg->m_szModuleName, gg->m_iStatus);
}
else mi.flags |= CMIF_HIDDEN;
@@ -116,7 +116,7 @@ void gg_links_instancemenu_init() tmi.cbSize = sizeof(tmi);
tmi.pszName = "Cancel";
tmi.position = 9999999;
- tmi.hIcolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
+ tmi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
CallService(MO_ADDNEWMENUITEM, (WPARAM)hInstanceMenu, (LPARAM)&tmi);
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index f90d18381f..c76371ffb6 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -56,7 +56,7 @@ void CIrcProto::InitMainMenus(void) if (m_iStatus != ID_STATUS_OFFLINE) mi.flags |= CMIF_GRAYED;
mi.pszName = LPGEN("&Join channel");
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);//GetIconHandle(IDI_JOIN);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);//GetIconHandle(IDI_JOIN);
mir_strcpy(d, IRC_JOINCHANNEL);
mi.position = 201002;
hMenuJoin = Menu_AddProtoMenuItem(&mi);
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index 184ac57d19..afe7cfedfb 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -119,7 +119,7 @@ void g_MenuInit(void) mi.pszName = LPGEN("Request authorization");
mi.position = 1000030000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
g_hContactMenuItems[ICMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
// "Grant authorization"
@@ -127,7 +127,7 @@ void g_MenuInit(void) mi.pszName = LPGEN("Grant authorization");
mi.position = 1000029999;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
g_hContactMenuItems[ICMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
// "Revoke authorization"
@@ -135,7 +135,7 @@ void g_MenuInit(void) mi.pszName = LPGEN("Revoke authorization");
mi.position = 1000029998;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
g_hContactMenuItems[ICMI_AUTH_REVOKE] = Menu_AddContactMenuItem(&mi);
// "Add to server list"
@@ -143,7 +143,7 @@ void g_MenuInit(void) mi.pszName = LPGEN("Add to server list");
mi.position = -2049999999;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_ADD);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
g_hContactMenuItems[ICMI_ADD_TO_SERVLIST] = Menu_AddContactMenuItem(&mi);
// "Show custom status details"
@@ -213,7 +213,7 @@ int CIcqProto::OnPreBuildContactMenu(WPARAM hContact, LPARAM) if (bXStatus > 0 && bXStatus <= XSTATUS_COUNT)
clmi.hIcon = getXStatusIcon(bXStatus, LR_SHARED);
else
- clmi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT);
+ clmi.hIcon = Skin_LoadIcon(SKINICON_OTHER_SMALLDOT);
Menu_ModifyItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], &clmi);
}
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index b6664bcb71..6a75105d87 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -282,7 +282,7 @@ void CJabberDlgBookmarks::OnInitDialog() HIMAGELIST hIml = m_lvBookmarks.CreateImageList(LVSIL_SMALL);
ImageList_AddIcon_Icolib(hIml, m_proto->LoadIconEx("group"));
- ImageList_AddIcon_Icolib(hIml, LoadSkinnedIcon(SKINICON_EVENT_URL));
+ ImageList_AddIcon_Icolib(hIml, Skin_LoadIcon(SKINICON_EVENT_URL));
m_lvBookmarks.AddColumn(0, TranslateT("Bookmark Name"), m_proto->getWord("bookmarksWnd_cx0", 120));
m_lvBookmarks.AddColumn(1, TranslateT("Address (JID or URL)"), m_proto->getWord("bookmarksWnd_cx1", 210));
diff --git a/protocols/JabberG/src/jabber_captcha.cpp b/protocols/JabberG/src/jabber_captcha.cpp index 37fa7e3460..4e9bcc331c 100644 --- a/protocols/JabberG/src/jabber_captcha.cpp +++ b/protocols/JabberG/src/jabber_captcha.cpp @@ -44,8 +44,8 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, switch (msg) {
case WM_INITDIALOG: {
TranslateDialogDefault(hwndDlg);
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(IDI_KEYS));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(IDI_KEYS));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(IDI_KEYS, true));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadIcon(IDI_KEYS));
params = (CAPTCHA_FORM_PARAMS*)lParam;
LPCTSTR hint = params->hint;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 6ecdb6548b..e5cdc1e3e0 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -847,15 +847,15 @@ static INT_PTR CALLBACK sttUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam SendDlgItemMessage(hwndDlg, IDC_TXT_NICK, WM_SETFONT, (WPARAM)hfnt, TRUE);
}
- SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_FILE));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_FILE));
SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_AFFILIATION, BUTTONADDTOOLTIP, (WPARAM)"Apply", 0);
- SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_FILE));
+ SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_FILE));
SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_BTN_ROLE, BUTTONADDTOOLTIP, (WPARAM)"Apply", 0);
- SendDlgItemMessage(hwndDlg, IDC_ICO_STATUS, STM_SETICON, (WPARAM)LoadSkinnedProtoIcon(dat->ppro->m_szModuleName, dat->him->m_iStatus), 0);
+ SendDlgItemMessage(hwndDlg, IDC_ICO_STATUS, STM_SETICON, (WPARAM)Skin_LoadProtoIcon(dat->ppro->m_szModuleName, dat->him->m_iStatus), 0);
TCHAR buf[256];
mir_sntprintf(buf, TranslateT("%s from\n%s"), dat->him->m_tszResourceName, dat->item->jid);
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index b13aac36ff..75c5f08c8c 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -685,7 +685,7 @@ void CJabberDlgDiscovery::OnInitDialog() else if (sttNodeIcons[i].iconName)
hIcon = m_proto->LoadIconEx(sttNodeIcons[i].iconName);
else if (sttNodeIcons[i].iconIndex)
- hIcon = LoadSkinnedIcon(sttNodeIcons[i].iconIndex);
+ hIcon = Skin_LoadIcon(sttNodeIcons[i].iconIndex);
else continue;
sttNodeIcons[i].listIndex = TreeList_AddIcon(hwndList, hIcon, 0);
if (needDestroy) DestroyIcon(hIcon);
diff --git a/protocols/JabberG/src/jabber_filterlist.cpp b/protocols/JabberG/src/jabber_filterlist.cpp index b9161fae54..5e769b42a5 100644 --- a/protocols/JabberG/src/jabber_filterlist.cpp +++ b/protocols/JabberG/src/jabber_filterlist.cpp @@ -262,7 +262,7 @@ LRESULT CCtrlFilterListView::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lPara rc.right - FILTER_BOX_HEIGHT + (FILTER_BOX_HEIGHT-16)/2 + 16, rc.top + (FILTER_BOX_HEIGHT-16)/2 + 16);
DrawIconEx(hdc, rc.left + (FILTER_BOX_HEIGHT-16)/2, rc.top + (FILTER_BOX_HEIGHT-16)/2, g_LoadIconEx("sd_filter_apply"), 16, 16, 0, NULL, DI_NORMAL);
- DrawIconEx(hdc, rc.right - FILTER_BOX_HEIGHT + (FILTER_BOX_HEIGHT-16)/2, rc.top + (FILTER_BOX_HEIGHT-16)/2, LoadSkinnedIcon(SKINICON_OTHER_DELETE), 16, 16, 0, NULL, DI_NORMAL);
+ DrawIconEx(hdc, rc.right - FILTER_BOX_HEIGHT + (FILTER_BOX_HEIGHT-16)/2, rc.top + (FILTER_BOX_HEIGHT-16)/2, Skin_LoadIcon(SKINICON_OTHER_DELETE), 16, 16, 0, NULL, DI_NORMAL);
rc.left += 5*FILTER_BOX_HEIGHT/3;
rc.right -= 5*FILTER_BOX_HEIGHT/3;
diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp index 6c951d2cd7..127092a778 100644 --- a/protocols/JabberG/src/jabber_frame.cpp +++ b/protocols/JabberG/src/jabber_frame.cpp @@ -106,7 +106,7 @@ CJabberInfoFrame::CJabberInfoFrame(CJabberProto *proto): UpdateInfoItem("$", proto->GetIconHandle(IDI_JABBER), proto->m_tszUserName);
CreateInfoItem("$/JID", true);
- UpdateInfoItem("$/JID", LoadSkinnedIconHandle(SKINICON_OTHER_USERDETAILS), _T("Offline"));
+ UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), _T("Offline"));
SetInfoItemCallback("$/JID", &CJabberProto::InfoFrame_OnSetup);
}
}
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 22e03e489f..3a5ba46a40 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -285,7 +285,7 @@ static HICON LoadTransportIcon(char *filename,int i,char *IconName,TCHAR *SectNa if (hi && nf) DestroyIcon(hi);
if (IconName != NULL && SectName != NULL) {
SKINICONDESC sid = { 0 };
- sid.hDefaultIcon = (has_proto_icon) ? NULL : LoadSkinnedProtoIcon(0, -internalidx);
+ sid.hDefaultIcon = (has_proto_icon) ? NULL : Skin_LoadProtoIcon(0, -internalidx);
sid.section.t = SectName;
sid.pszName = IconName;
sid.description.t = Description;
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 21fdf9b5d6..f100a5afbf 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -190,7 +190,7 @@ void g_MenuInit(void) TMO_MenuItem tmi = { sizeof(tmi) };
tmi.pszName = "Cancel";
tmi.position = 9999999;
- tmi.hIcolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE);
+ tmi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
CallService(MO_ADDNEWMENUITEM, (WPARAM)hChooserMenu, (LPARAM)&tmi);
//////////////////////////////////////////////////////////////////////////////////////
@@ -201,7 +201,7 @@ void g_MenuInit(void) // "Request authorization"
mi.pszName = LPGEN("Request authorization");
mi.position = -2000001000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
mi.pszService = "Jabber/ReqAuth";
g_hMenuRequestAuth = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, JabberMenuHandleRequestAuth);
@@ -210,7 +210,7 @@ void g_MenuInit(void) mi.pszService = "Jabber/GrantAuth";
mi.pszName = LPGEN("Grant authorization");
mi.position = -2000001001;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
g_hMenuGrantAuth = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, JabberMenuHandleGrantAuth);
@@ -218,7 +218,7 @@ void g_MenuInit(void) mi.pszService = "Jabber/RevokeAuth";
mi.pszName = LPGEN("Revoke authorization");
mi.position = -2000001002;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REVOKE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
g_hMenuRevokeAuth = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, JabberMenuRevokeAuth);
@@ -234,7 +234,7 @@ void g_MenuInit(void) mi.pszService = "Jabber/AddToRoster";
mi.pszName = LPGEN("Add to roster");
mi.position = -1999901005;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_ADD);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
g_hMenuRosterAdd = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, JabberMenuRosterAdd);
@@ -294,7 +294,7 @@ void g_MenuInit(void) mi.ptszName = pcli->pfnGetStatusModeDescription(PresenceModeArray[i].mode, 0);
mi.position = -1999901000;
mi.hParentMenu = g_hMenuDirectPresence[0];
- mi.icolibItem = LoadSkinnedIcon(PresenceModeArray[i].icon);
+ mi.icolibItem = Skin_LoadIcon(PresenceModeArray[i].icon);
g_hMenuDirectPresence[i+1] = Menu_AddContactMenuItem(&mi);
CreateServiceFunctionParam(mi.pszService, JabberMenuHandleDirectPresence, PresenceModeArray[i].mode);
}
@@ -371,7 +371,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) for (int i=0; i < SIZEOF(PresenceModeArray); i++) {
CLISTMENUITEM clmi = { sizeof(clmi) };
clmi.flags = CMIM_ICON | CMIM_FLAGS;
- clmi.hIcon = (HICON)LoadSkinnedProtoIcon(m_szModuleName, PresenceModeArray[i].mode);
+ clmi.hIcon = (HICON)Skin_LoadProtoIcon(m_szModuleName, PresenceModeArray[i].mode);
Menu_ModifyItem(g_hMenuDirectPresence[i+1], &clmi);
}
@@ -1162,7 +1162,7 @@ CJabberProto* JabberChooseInstance(bool bIsLink) ++nItems;
lastItemId = i + 1;
clmi.flags |= CMIM_ICON;
- clmi.hIcon = LoadSkinnedProtoIcon(ppro->m_szModuleName, ppro->m_iStatus);
+ clmi.hIcon = Skin_LoadProtoIcon(ppro->m_szModuleName, ppro->m_iStatus);
}
else clmi.flags |= CMIF_HIDDEN;
diff --git a/protocols/JabberG/src/jabber_opttree.cpp b/protocols/JabberG/src/jabber_opttree.cpp index 5eddddfb65..28422a81ab 100644 --- a/protocols/JabberG/src/jabber_opttree.cpp +++ b/protocols/JabberG/src/jabber_opttree.cpp @@ -97,13 +97,13 @@ void CCtrlTreeOpts::OnInit() DeleteAllItems();
hImgLst = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR | ILC_COLOR32 | ILC_MASK, 5, 1);
- ImageList_AddIcon_Icolib(hImgLst, LoadSkinnedIcon(SKINICON_OTHER_MIRANDA));
- ImageList_AddIcon_Icolib(hImgLst, LoadSkinnedIcon(SKINICON_OTHER_TICK)); // check on
- ImageList_AddIcon_Icolib(hImgLst, LoadSkinnedIcon(SKINICON_OTHER_NOTICK)); // check off
- ImageList_AddIcon_Icolib(hImgLst, LoadSkinnedIcon(SKINICON_OTHER_TICK)); // radio on
- ImageList_AddIcon_Icolib(hImgLst, LoadSkinnedIcon(SKINICON_OTHER_NOTICK)); // radio on
- ImageList_AddIcon_Icolib(hImgLst, LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN));
- ImageList_AddIcon_Icolib(hImgLst, LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT));
+ ImageList_AddIcon_Icolib(hImgLst, Skin_LoadIcon(SKINICON_OTHER_MIRANDA));
+ ImageList_AddIcon_Icolib(hImgLst, Skin_LoadIcon(SKINICON_OTHER_TICK)); // check on
+ ImageList_AddIcon_Icolib(hImgLst, Skin_LoadIcon(SKINICON_OTHER_NOTICK)); // check off
+ ImageList_AddIcon_Icolib(hImgLst, Skin_LoadIcon(SKINICON_OTHER_TICK)); // radio on
+ ImageList_AddIcon_Icolib(hImgLst, Skin_LoadIcon(SKINICON_OTHER_NOTICK)); // radio on
+ ImageList_AddIcon_Icolib(hImgLst, Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN));
+ ImageList_AddIcon_Icolib(hImgLst, Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT));
SetImageList(hImgLst, TVSIL_NORMAL);
/* build options tree. based on code from IcoLib */
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 2b7309779f..558d70b028 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -782,7 +782,7 @@ void CJabberDlgPrivacyLists::OnInitDialog() m_clcClist.SetExStyle(CLS_EX_DISABLEDRAGDROP|CLS_EX_TRACKSELECT);
HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 9, 9);
- ImageList_AddIcon_Icolib(hIml, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT));
+ ImageList_AddIcon_Icolib(hIml, Skin_LoadIcon(SKINICON_OTHER_SMALLDOT));
ImageList_AddIcon_Icolib(hIml, m_proto->LoadIconEx("pl_msg_allow"));
ImageList_AddIcon_Icolib(hIml, m_proto->LoadIconEx("pl_msg_deny"));
ImageList_AddIcon_Icolib(hIml, m_proto->LoadIconEx("pl_prin_allow"));
@@ -2136,7 +2136,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) m_privacyMenuServiceAllocated = i;
}
mi.position++;
- mi.icolibItem = LoadSkinnedIconHandle(m_privacyListManager.GetActiveListName() ? SKINICON_OTHER_SMALLDOT : SKINICON_OTHER_EMPTYBLOB);
+ mi.icolibItem = Skin_GetIconHandle(m_privacyListManager.GetActiveListName() ? SKINICON_OTHER_SMALLDOT : SKINICON_OTHER_EMPTYBLOB);
mi.ptszName = LPGENT("<none>");
m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi));
@@ -2150,7 +2150,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) }
mi.position++;
- mi.icolibItem = LoadSkinnedIconHandle(
+ mi.icolibItem = Skin_GetIconHandle(
mir_tstrcmp(m_privacyListManager.GetActiveListName(), pList->GetListName()) ? SKINICON_OTHER_SMALLDOT : SKINICON_OTHER_EMPTYBLOB);
mi.ptszName = pList->GetListName();
m_hPrivacyMenuItems.insert(Menu_AddProtoMenuItem(&mi));
diff --git a/protocols/JabberG/src/jabber_treelist.cpp b/protocols/JabberG/src/jabber_treelist.cpp index 5a406e23a2..8736508387 100644 --- a/protocols/JabberG/src/jabber_treelist.cpp +++ b/protocols/JabberG/src/jabber_treelist.cpp @@ -136,9 +136,9 @@ void TreeList_Create(HWND hwnd) ListView_SetImageList (hwnd, hIml, LVSIL_SMALL);
hIml = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 2, 1);
- ImageList_AddIcon_Icolib(hIml, (HICON)CallService(MS_SKIN_LOADICON, SKINICON_OTHER_GROUPOPEN, 0));
- ImageList_AddIcon_Icolib(hIml, (HICON)CallService(MS_SKIN_LOADICON, SKINICON_OTHER_GROUPSHUT, 0));
- ImageList_AddIcon_Icolib(hIml, (HICON)CallService(MS_SKIN_LOADICON, SKINICON_OTHER_DOWNARROW, 0));
+ ImageList_AddIcon_Icolib(hIml, Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN));
+ ImageList_AddIcon_Icolib(hIml, Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT));
+ ImageList_AddIcon_Icolib(hIml, Skin_LoadIcon(SKINICON_OTHER_DOWNARROW));
ListView_SetImageList (hwnd, hIml, LVSIL_STATE);
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 0ebaa064a3..14e275df5c 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -215,11 +215,11 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti pResourceStatus r = resource ? item->arResources[resource-1] : item->getTemp(); if (r->m_tszResourceName && *r->m_tszResourceName) - htiResource = sttFillInfoLine(hwndTree, htiRoot, LoadSkinnedProtoIcon(ppro->m_szModuleName, r->m_iStatus), + htiResource = sttFillInfoLine(hwndTree, htiRoot, Skin_LoadProtoIcon(ppro->m_szModuleName, r->m_iStatus), TranslateT("Resource"), r->m_tszResourceName, sttInfoLineId(resource, INFOLINE_NAME), true); // StatusMsg - sttFillInfoLine(hwndTree, htiResource, NULL /*LoadSkinnedIcon(SKINICON_EVENT_MESSAGE)*/, + sttFillInfoLine(hwndTree, htiResource, NULL /*Skin_LoadIcon(SKINICON_EVENT_MESSAGE)*/, TranslateT("Message"), r->m_tszStatusMessage ? r->m_tszStatusMessage : TranslateT("<not specified>"), sttInfoLineId(resource, INFOLINE_MESSAGE)); @@ -439,8 +439,8 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa // lParam is hContact TranslateDialogDefault(hwndDlg); - SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_OTHER_USERDETAILS)); - SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS)); + SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_USERDETAILS, true)); + SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_USERDETAILS)); dat = (JabberUserInfoDlgData *)mir_alloc(sizeof(JabberUserInfoDlgData)); memset(dat, 0, sizeof(JabberUserInfoDlgData)); @@ -451,7 +451,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa MoveWindow(GetDlgItem(hwndDlg, IDC_TV_INFO), 5, 5, rc.right - 10, rc.bottom - 10, TRUE); HIMAGELIST himl = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR | ILC_COLOR32 | ILC_MASK, 5, 1); - ImageList_AddIcon_Icolib(himl, LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT)); + ImageList_AddIcon_Icolib(himl, Skin_LoadIcon(SKINICON_OTHER_SMALLDOT)); TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TV_INFO), himl, TVSIL_NORMAL); SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat); diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index ded31eb3ef..059015f155 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -734,10 +734,10 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param) if (!ppro->m_bJabberOnline) {
ppro->m_pInfoFrame->RemoveInfoItem("$/PEP");
ppro->m_pInfoFrame->RemoveInfoItem("$/Transports");
- ppro->m_pInfoFrame->UpdateInfoItem("$/JID", LoadSkinnedIconHandle(SKINICON_OTHER_USERDETAILS), TranslateT("Offline"));
+ ppro->m_pInfoFrame->UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), TranslateT("Offline"));
}
else {
- ppro->m_pInfoFrame->UpdateInfoItem("$/JID", LoadSkinnedIconHandle(SKINICON_OTHER_USERDETAILS), ppro->m_szJabberJID);
+ ppro->m_pInfoFrame->UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), ppro->m_szJabberJID);
if (!ppro->m_bPepSupported)
ppro->m_pInfoFrame->RemoveInfoItem("$/PEP");
@@ -748,11 +748,11 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param) ppro->m_pInfoFrame->CreateInfoItem("$/PEP/mood", true);
ppro->m_pInfoFrame->SetInfoItemCallback("$/PEP/mood", &CJabberProto::InfoFrame_OnUserMood);
- ppro->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set mood..."));
+ ppro->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set mood..."));
ppro->m_pInfoFrame->CreateInfoItem("$/PEP/activity", true);
ppro->m_pInfoFrame->SetInfoItemCallback("$/PEP/activity", &CJabberProto::InfoFrame_OnUserActivity);
- ppro->m_pInfoFrame->UpdateInfoItem("$/PEP/activity", LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set activity..."));
+ ppro->m_pInfoFrame->UpdateInfoItem("$/PEP/activity", Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set activity..."));
}
ppro->m_pInfoFrame->RemoveInfoItem("$/Transports/");
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index a6351238ba..61585a59f2 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -191,7 +191,7 @@ CJabberDlgPepSimple::CJabberDlgPepSimple(CJabberProto *proto, TCHAR *title): m_cbModes.OnDropdown =
m_txtDescription.OnChange = Callback(this, &CJabberDlgPepSimple::global_OnChange);
- m_modes.insert(new CStatusMode(-1, "<none>", LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT), TranslateT("None"), false));
+ m_modes.insert(new CStatusMode(-1, "<none>", Skin_LoadIcon(SKINICON_OTHER_SMALLDOT), TranslateT("None"), false));
}
CJabberDlgPepSimple::~CJabberDlgPepSimple()
@@ -609,7 +609,7 @@ CPepMood::CPepMood(CJabberProto *proto) : m_text(NULL),
m_mode(-1)
{
- UpdateMenuItem(LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set mood..."));
+ UpdateMenuItem(Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set mood..."));
}
CPepMood::~CPepMood()
@@ -696,7 +696,7 @@ void CPepMood::SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szTe m_mode = mood;
replaceStrT(m_text, szText);
- HANDLE hIcon = (mood >= 0) ? g_MoodIcons.GetIcolibHandle(g_arrMoods[mood].szTag) : LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT);
+ HANDLE hIcon = (mood >= 0) ? g_MoodIcons.GetIcolibHandle(g_arrMoods[mood].szTag) : Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT);
TCHAR title[128];
if (m_proto->m_pInfoFrame) {
@@ -706,7 +706,7 @@ void CPepMood::SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szTe }
else {
mir_tstrcpy(title, LPGENT("Set mood..."));
- m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set mood..."));
+ m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set mood..."));
}
}
@@ -760,8 +760,8 @@ void CPepMood::ShowSetDialog(BYTE bQuiet) }
else {
Retract();
- UpdateMenuItem(LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set mood..."));
- m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set mood..."));
+ UpdateMenuItem(Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set mood..."));
+ m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/mood", Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set mood..."));
}
}
}
@@ -989,7 +989,7 @@ CPepActivity::CPepActivity(CJabberProto *proto): m_text(NULL),
m_mode(-1)
{
- UpdateMenuItem(LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set activity..."));
+ UpdateMenuItem(Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set activity..."));
}
CPepActivity::~CPepActivity()
@@ -1084,7 +1084,7 @@ void CPepActivity::SetActivity(MCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSec m_mode = activity;
replaceStrT(m_text, szText);
- HANDLE hIcon = (activity >= 0) ? g_ActivityIcons.GetIcolibHandle(returnActivity(activity)) : LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT);
+ HANDLE hIcon = (activity >= 0) ? g_ActivityIcons.GetIcolibHandle(returnActivity(activity)) : Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT);
TCHAR title[128];
if (m_proto->m_pInfoFrame) {
@@ -1094,7 +1094,7 @@ void CPepActivity::SetActivity(MCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSec }
else {
mir_tstrcpy(title, LPGENT("Set activity..."));
- m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/activity", LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set activity..."));
+ m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/activity", Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set activity..."));
}
}
@@ -1133,9 +1133,9 @@ void CPepActivity::ShowSetDialog(BYTE) }
else {
Retract();
- UpdateMenuItem(LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set activity..."));
+ UpdateMenuItem(Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), LPGENT("Set activity..."));
if (m_proto->m_pInfoFrame)
- m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/activity", LoadSkinnedIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set activity..."));
+ m_proto->m_pInfoFrame->UpdateInfoItem("$/PEP/activity", Skin_GetIconHandle(SKINICON_OTHER_SMALLDOT), TranslateT("Set activity..."));
}
}
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp index e16fc7ce19..35310c1cfb 100644 --- a/protocols/MSN/src/msn_lists.cpp +++ b/protocols/MSN/src/msn_lists.cpp @@ -499,7 +499,7 @@ INT_PTR CALLBACK DlgProcMsnServLists(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_MASK | ILC_COLOR32, 5, 5);
- HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT);
+ HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_SMALLDOT);
ImageList_AddIcon(hIml, hIcon);
IcoLib_ReleaseIcon(hIcon);
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 10a968681d..652bb0efcd 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -292,7 +292,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) cle.hContact = hContact;
cle.hDbEvent = 1;
cle.flags = CLEF_URGENT | CLEF_TCHAR;
- cle.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SENDEMAIL);
+ cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SENDEMAIL);
cle.ptszTooltip = tBuffer2;
char buf[64];
mir_snprintf(buf, "%s%s", m_szModuleName, MS_GOTO_INBOX);
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 4ce5d8a9e7..3899dc8cf8 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -445,7 +445,7 @@ void MSN_InitContactMenu(void) hSendHotMail = CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
mi.position = -2000010005;
mi.flags = CMIF_HIDDEN;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_SENDEMAIL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
mi.pszName = LPGEN("Open &Hotmail Inbox");
hOpenInboxMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/protocols/SkypeWeb/src/skype_events.cpp b/protocols/SkypeWeb/src/skype_events.cpp index 38141ca714..66402d442a 100644 --- a/protocols/SkypeWeb/src/skype_events.cpp +++ b/protocols/SkypeWeb/src/skype_events.cpp @@ -56,7 +56,7 @@ INT_PTR CSkypeProto::EventGetIcon(WPARAM wParam, LPARAM lParam) }
default:
{
- icon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ icon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
break;
}
}
diff --git a/protocols/SkypeWeb/src/skype_icons.cpp b/protocols/SkypeWeb/src/skype_icons.cpp index 6dd88d4998..2972273e33 100644 --- a/protocols/SkypeWeb/src/skype_icons.cpp +++ b/protocols/SkypeWeb/src/skype_icons.cpp @@ -63,7 +63,7 @@ HANDLE CSkypeProto::GetIconHandle(const char *name) return 0;
}
-HANDLE CSkypeProto::GetSkinIconHandle(const char *name)
+HANDLE CSkypeProto::Skin_GetIconHandle(const char *name)
{
char iconName[100];
mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", MODULE, name);
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index 93c7add2a3..f845444451 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -67,7 +67,7 @@ void CSkypeProto::InitMenus() mi.pszService = MODULE"/RequestAuth";
mi.ptszName = LPGENT("Request authorization");
mi.position = CMI_POSITION + CMI_AUTH_REQUEST;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnRequestAuth>);
@@ -75,7 +75,7 @@ void CSkypeProto::InitMenus() mi.pszService = MODULE"/GrantAuth";
mi.ptszName = LPGENT("Grant authorization");
mi.position = CMI_POSITION + CMI_AUTH_GRANT;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_GRANT);
ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnGrantAuth>);
@@ -122,7 +122,7 @@ int CSkypeProto::OnInitStatusMenu() mi.position = -1999901006;
mi.hParentMenu = HGENMENU_ROOT;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.icolibItem = GetSkinIconHandle("main");
+ mi.icolibItem = Skin_GetIconHandle("main");
hStatusMunuRoot = /*m_hMenuRoot = */Menu_AddProtoMenuItem(&mi);
}
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h index d65fd6d1e6..8c4ac80eac 100644 --- a/protocols/SkypeWeb/src/skype_proto.h +++ b/protocols/SkypeWeb/src/skype_proto.h @@ -152,7 +152,7 @@ private: // icons
static IconInfo Icons[];
static HANDLE GetIconHandle(const char *name);
- static HANDLE GetSkinIconHandle(const char *name);
+ static HANDLE Skin_GetIconHandle(const char *name);
// menus
static HGENMENU ContactMenuItems[CMI_MAX];
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 7417673315..58702f8aef 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -37,7 +37,7 @@ void CSkypeProto::SetSrmmReadStatus(MCONTACT hContact) StatusTextData st = { 0 };
st.cbSize = sizeof(st);
- st.hIcon = LoadSkinnedIcon(SKINICON_OTHER_HISTORY);
+ st.hIcon = Skin_LoadIcon(SKINICON_OTHER_HISTORY);
mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s"), ttime);
CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st);
}
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index 08a5ca7c03..75c6db25e4 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -147,7 +147,7 @@ void CSteamProto::InitMenus() mi.pszService = MODULE "/AuthRequest";
mi.ptszName = LPGENT("Request authorization");
mi.position = -201001000 + CMI_AUTH_REQUEST;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
contactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSteamProto::AuthRequestCommand>);
@@ -155,7 +155,7 @@ void CSteamProto::InitMenus() mi.pszService = MODULE "/Block";
mi.ptszName = LPGENT("Block");
mi.position = -201001001 + CMI_BLOCK;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
contactMenuItems[CMI_BLOCK] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CSteamProto::BlockCommand>);
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index c96e67ea08..077b6a5933 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -333,7 +333,7 @@ void TlenProtocol::initMenuItems() CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleRequestAuth);
mi.pszName = LPGEN("Request authorization");
mi.position = -2000001001;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
hMenuContactRequestAuth = Menu_AddContactMenuItem(&mi);
// "Grant authorization"
@@ -341,7 +341,7 @@ void TlenProtocol::initMenuItems() CreateProtoService(pSvcName, &TlenProtocol::ContactMenuHandleGrantAuth);
mi.pszName = LPGEN("Grant authorization");
mi.position = -2000001000;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
hMenuContactGrantAuth = Menu_AddContactMenuItem(&mi);
}
diff --git a/protocols/Tox/src/tox_icons.cpp b/protocols/Tox/src/tox_icons.cpp index 7a56fce4c8..85f2b427bd 100644 --- a/protocols/Tox/src/tox_icons.cpp +++ b/protocols/Tox/src/tox_icons.cpp @@ -52,7 +52,7 @@ HANDLE CToxProto::GetIconHandle(const char *name) return NULL;
}
-HANDLE CToxProto::GetSkinIconHandle(const char *name)
+HANDLE CToxProto::Skin_GetIconHandle(const char *name)
{
char iconName[100];
mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", MODULE, name);
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp index 95b37d9dcb..914920eb9d 100644 --- a/protocols/Tox/src/tox_menus.cpp +++ b/protocols/Tox/src/tox_menus.cpp @@ -48,7 +48,7 @@ void CToxProto::InitMenus() mi.pszService = MODULE"/RequestAuth";
mi.ptszName = LPGENT("Request authorization");
mi.position = CMI_POSITION + CMI_AUTH_REQUEST;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
+ mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CToxProto::OnRequestAuth>);
@@ -56,7 +56,7 @@ void CToxProto::InitMenus() mi.pszService = MODULE"/GrantAuth";
mi.ptszName = LPGENT("Grant authorization");
mi.position = CMI_POSITION + CMI_AUTH_GRANT;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_GRANT);
+ mi.icolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_GRANT);
ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
CreateServiceFunction(mi.pszService, GlobalService<&CToxProto::OnGrantAuth>);
@@ -90,7 +90,7 @@ int CToxProto::OnInitStatusMenu() mi.position = -1999901006;
mi.hParentMenu = HGENMENU_ROOT;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
- mi.icolibItem = GetSkinIconHandle("main");
+ mi.icolibItem = Skin_GetIconHandle("main");
hStatusMunuRoot = /*m_hMenuRoot = */Menu_AddProtoMenuItem(&mi);
}
/*else
@@ -116,7 +116,7 @@ int CToxProto::OnInitStatusMenu() CreateProtoService(tDest, &CToxProto::OnCreateChatRoom);
mi.ptszName = LPGENT("Create group chat");
mi.position = SMI_POSITION + SMI_GROUPCHAT_CREATE;
- mi.icolibItem = GetSkinIconHandle("conference");
+ mi.icolibItem = Skin_GetIconHandle("conference");
HGENMENU hCreateChatRoom = Menu_AddProtoMenuItem(&mi);*/
return 0;
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 85af8ca960..d5cc88a42c 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -375,9 +375,9 @@ void CToxOptionsNodeList::OnInitDialog() m_nodes.SetExtendedListViewStyle(LVS_EX_SUBITEMIMAGES | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP);
HIMAGELIST hImageList = m_nodes.CreateImageList(LVSIL_SMALL);
- HICON icon = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
+ HICON icon = Skin_LoadIcon(SKINICON_OTHER_TYPING);
ImageList_AddIcon(hImageList, icon); IcoLib_ReleaseIcon(icon);
- icon = LoadSkinnedIcon(SKINICON_OTHER_DELETE);
+ icon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
ImageList_AddIcon(hImageList, icon); IcoLib_ReleaseIcon(icon);
m_nodes.AddColumn(0, _T("IPv4"), 100);
diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 2afaae8347..b0e9ef17a7 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -125,7 +125,7 @@ private: static IconInfo Icons[];
static HICON GetIcon(const char *name, int size = 0);
static HANDLE GetIconHandle(const char *name);
- static HANDLE GetSkinIconHandle(const char *name);
+ static HANDLE Skin_GetIconHandle(const char *name);
// menus
static HGENMENU ContactMenuItems[CMI_MAX];
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 50237a2ce6..8dcf0c2069 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -37,7 +37,7 @@ static HANDLE hIconLibItem[SIZEOF(icons)]; void InitIcons(void)
{
Icon_Register(g_hInstance, "Protocols/Twitter", icons, SIZEOF(icons), "Twitter");
- icons[SIZEOF(icons) - 1].hIcolib = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
+ icons[SIZEOF(icons) - 1].hIcolib = Skin_GetIconHandle(SKINICON_EVENT_URL);
}
HANDLE GetIconHandle(const char* name)
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index af266530a7..5d4316e996 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -201,7 +201,7 @@ void CVkProto::InitMenus() mir_snprintf(szService, "%s%s", m_szModuleName, PS_CREATECHAT);
mi.pszService = szService;
mi.position = 10009 + PMI_CREATECHAT;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
mi.pszName = LPGEN("Create new chat");
g_hProtoMenuItems[PMI_CREATECHAT] = Menu_AddProtoMenuItem(&mi);
@@ -398,7 +398,7 @@ void CVkProto::InitPopups(void) mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
ppc.ptszDescription = desc;
ppc.pszName = name;
- ppc.hIcon = LoadSkinnedIcon(SKINICON_ERROR);
+ ppc.hIcon = Skin_LoadIcon(SKINICON_ERROR);
ppc.colorBack = RGB(191, 0, 0); //Red
ppc.colorText = RGB(255, 245, 225); //Yellow
ppc.iSeconds = 60;
diff --git a/protocols/WhatsApp/src/utils.cpp b/protocols/WhatsApp/src/utils.cpp index 652a9c7c4a..6d7e77b15a 100644 --- a/protocols/WhatsApp/src/utils.cpp +++ b/protocols/WhatsApp/src/utils.cpp @@ -46,13 +46,13 @@ std::string getLastErrorMsg() void utils::setStatusMessage(MCONTACT hContact, const TCHAR *ptszMessage)
{
if (ptszMessage != NULL) {
- StatusTextData st = { 0 }; - st.cbSize = sizeof(st); - st.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE); - _tcsncpy_s(st.tszText, ptszMessage, _TRUNCATE); - CallService(MS_MSG_SETSTATUSTEXT, hContact, (LPARAM)&st); - } - else CallService(MS_MSG_SETSTATUSTEXT, hContact, NULL); + StatusTextData st = { 0 };
+ st.cbSize = sizeof(st);
+ st.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
+ _tcsncpy_s(st.tszText, ptszMessage, _TRUNCATE);
+ CallService(MS_MSG_SETSTATUSTEXT, hContact, (LPARAM)&st);
+ }
+ else CallService(MS_MSG_SETSTATUSTEXT, hContact, NULL);
}
BYTE* utils::md5string(const BYTE *data, int size, BYTE *digest)
diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp index 58043f1aaa..fd13a4688c 100644 --- a/protocols/Xfire/src/options.cpp +++ b/protocols/Xfire/src/options.cpp @@ -610,7 +610,7 @@ static INT_PTR CALLBACK DlgProcOpts4(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR dbces.lParam = (LPARAM)hwndDlg; CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces); - SendDlgItemMessage(hwndDlg, IDC_REMUSER, BM_SETIMAGE, IMAGE_ICON, (WPARAM)LoadSkinnedIcon(SKINICON_OTHER_DELETE)); + SendDlgItemMessage(hwndDlg, IDC_REMUSER, BM_SETIMAGE, IMAGE_ICON, (WPARAM)Skin_LoadIcon(SKINICON_OTHER_DELETE)); mir_strcpy(inipath, XFireGetFoldersPath("IniFile")); SetDlgItemTextA(hwndDlg, IDC_FILESSHOULDBE, inipath); @@ -762,7 +762,7 @@ static INT_PTR CALLBACK DlgProcOpts6(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR //gamelist füllen SendMessage(hwndDlg, WM_FILLGAMELIST, 0, 0); - //SendDlgItemMessage(hwndDlg, IDC_CREATETXTLIST), BM_SETIMAGE, IMAGE_ICON, (WPARAM)LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS)); + //SendDlgItemMessage(hwndDlg, IDC_CREATETXTLIST), BM_SETIMAGE, IMAGE_ICON, (WPARAM)Skin_LoadIcon(SKINICON_OTHER_USERDETAILS)); return TRUE; } diff --git a/protocols/Yahoo/src/user_info.cpp b/protocols/Yahoo/src/user_info.cpp index f7f4e47c82..bb96c73132 100644 --- a/protocols/Yahoo/src/user_info.cpp +++ b/protocols/Yahoo/src/user_info.cpp @@ -28,7 +28,7 @@ static INT_PTR CALLBACK YahooUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar // lParam is hContact
TranslateDialogDefault(hwndDlg);
- //SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS));
+ //SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_USERDETAILS));
break;
diff --git a/src/core/stdauth/src/auth.cpp b/src/core/stdauth/src/auth.cpp index 3a1a1d43eb..e2a4148e67 100644 --- a/src/core/stdauth/src/auth.cpp +++ b/src/core/stdauth/src/auth.cpp @@ -92,7 +92,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam) else
mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("%u requests authorization"), *(PDWORD)dbei.pBlob);
- cli.hIcon = LoadSkinIcon(SKINICON_AUTH_REQUEST);
+ cli.hIcon = Skin_LoadIcon(SKINICON_AUTH_REQUEST);
cli.pszService = MS_AUTH_SHOWREQUEST;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cli);
}
@@ -103,7 +103,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam) else
mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("%u added you to their contact list"), *(PDWORD)dbei.pBlob);
- cli.hIcon = LoadSkinIcon(SKINICON_AUTH_ADD);
+ cli.hIcon = Skin_LoadIcon(SKINICON_AUTH_ADD);
cli.pszService = MS_AUTH_SHOWADDED;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cli);
}
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp index 80f775ff8f..7cee287dd1 100644 --- a/src/core/stdaway/src/awaymsg.cpp +++ b/src/core/stdaway/src/awaymsg.cpp @@ -148,7 +148,7 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM) if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGRECV) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(status)) {
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIF_NOTOFFLINE | CMIM_ICON | CMIF_TCHAR;
- mi.hIcon = LoadSkinProtoIcon(szProto, status);
+ mi.hIcon = Skin_LoadProtoIcon(szProto, status);
}
}
}
diff --git a/src/core/stdaway/src/sendmsg.cpp b/src/core/stdaway/src/sendmsg.cpp index 5f5246dde4..1347036dd4 100644 --- a/src/core/stdaway/src/sendmsg.cpp +++ b/src/core/stdaway/src/sendmsg.cpp @@ -445,7 +445,7 @@ static INT_PTR CALLBACK DlgProcAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam }
RECT rc = dis->rcItem;
- DrawIconEx(dis->hDC, 3, (rc.top + rc.bottom - 16) / 2, LoadSkinnedProtoIcon(NULL, dis->itemData), 16, 16, 0, NULL, DI_NORMAL);
+ DrawIconEx(dis->hDC, 3, (rc.top + rc.bottom - 16) / 2, Skin_LoadProtoIcon(NULL, dis->itemData), 16, 16, 0, NULL, DI_NORMAL);
rc.left += 25;
SetBkMode(dis->hDC, TRANSPARENT);
DrawText(dis->hDC, buf, -1, &rc, DT_LEFT | DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX);
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 48b31036a2..0528908ae0 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -79,12 +79,12 @@ int OnShutdown(WPARAM, LPARAM) static void OnCreateModule(MODULEINFO *mi)
{
- mi->OnlineIconIndex = ImageList_AddIcon(hIconsList, LoadSkinnedProtoIcon(mi->pszModule, ID_STATUS_ONLINE));
+ mi->OnlineIconIndex = ImageList_AddIcon(hIconsList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_ONLINE));
mi->hOnlineIcon = ImageList_GetIcon(hIconsList, mi->OnlineIconIndex, ILD_TRANSPARENT);
mi->hOnlineTalkIcon = ImageList_GetIcon(hIconsList, mi->OnlineIconIndex, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
ImageList_AddIcon(hIconsList, mi->hOnlineTalkIcon);
- mi->OfflineIconIndex = ImageList_AddIcon(hIconsList, LoadSkinnedProtoIcon(mi->pszModule, ID_STATUS_OFFLINE));
+ mi->OfflineIconIndex = ImageList_AddIcon(hIconsList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_OFFLINE));
mi->hOfflineIcon = ImageList_GetIcon(hIconsList, mi->OfflineIconIndex, ILD_TRANSPARENT);
mi->hOfflineTalkIcon = ImageList_GetIcon(hIconsList, mi->OfflineIconIndex, ILD_TRANSPARENT | INDEXTOOVERLAYMASK(1));
ImageList_AddIcon(hIconsList, mi->hOfflineTalkIcon);
@@ -398,7 +398,7 @@ extern "C" __declspec(dllexport) int Unload(void) void LoadIcons(void)
{
hIconsList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 100);
- ImageList_AddIcon(hIconsList, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ ImageList_AddIcon(hIconsList, Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
ImageList_AddIcon(hIconsList, LoadIconEx("overlay", FALSE));
ImageList_SetOverlayImage(hIconsList, 1, 1);
}
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index a710d2be23..3e8edd8030 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -1835,14 +1835,14 @@ END_REMOVETAB: FillRect(dis->hDC, &dis->rcItem, pci->hListBkgBrush);
if (g_Settings.bShowContactStatus && g_Settings.bContactStatusFirst && ui->ContactStatus) {
- HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
+ HICON hIcon = Skin_LoadProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top+offset-3,hIcon,16,16,0,NULL, DI_NORMAL);
x_offset += 18;
}
DrawIconEx(dis->hDC,x_offset, dis->rcItem.top + offset,hIcon,10,10,0,NULL, DI_NORMAL);
x_offset += 12;
if (g_Settings.bShowContactStatus && !g_Settings.bContactStatusFirst && ui->ContactStatus) {
- HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
+ HICON hIcon = Skin_LoadProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top+offset-3,hIcon,16,16,0,NULL, DI_NORMAL);
x_offset += 18;
}
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index bbd013a7af..3312357c5b 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -449,7 +449,7 @@ int ClcModernOptInit(WPARAM wParam, LPARAM lParam) obj.cbSize = sizeof(obj);
obj.dwFlags = MODEROPT_FLG_TCHAR;
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.hInstance = g_hInst;
obj.iSection = MODERNOPT_PAGE_SKINS;
obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index c39709e9ee..aad1364110 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -259,7 +259,7 @@ int CListModernOptInit(WPARAM wParam, LPARAM lParam) MODERNOPTOBJECT obj = { 0 };
obj.cbSize = sizeof(obj);
obj.dwFlags = MODEROPT_FLG_TCHAR | MODEROPT_FLG_NORESIZE;
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.hInstance = g_hInst;
obj.iSection = MODERNOPT_PAGE_CLIST;
obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
diff --git a/src/core/stdclist/src/cluiopts.cpp b/src/core/stdclist/src/cluiopts.cpp index 50b947abf1..af5fe02bee 100644 --- a/src/core/stdclist/src/cluiopts.cpp +++ b/src/core/stdclist/src/cluiopts.cpp @@ -350,7 +350,7 @@ int CluiModernOptInit(WPARAM wParam, LPARAM lParam) obj.cbSize = sizeof(obj);
obj.dwFlags = MODEROPT_FLG_TCHAR|MODEROPT_FLG_NORESIZE;
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.hInstance = g_hInst;
obj.iSection = MODERNOPT_PAGE_CLIST;
obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
diff --git a/src/core/stdemail/src/email.cpp b/src/core/stdemail/src/email.cpp index fa025cfd1b..270e818e1b 100644 --- a/src/core/stdemail/src/email.cpp +++ b/src/core/stdemail/src/email.cpp @@ -68,7 +68,7 @@ int LoadSendRecvEMailModule(void) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000010000;
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_SENDEMAIL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
mi.pszName = LPGEN("&E-mail");
mi.pszService = MS_EMAIL_SENDEMAIL;
hEMailMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 58db4a89e9..d6a28d2072 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -127,7 +127,7 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam) cle.ptszTooltip = szTooltip;
cle.flags |= CLEF_TCHAR;
- cle.hIcon = LoadSkinIcon(SKINICON_EVENT_FILE);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
cle.pszService = "SRFile/RecvFile";
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
@@ -338,7 +338,7 @@ static int SRFileModulesLoaded(WPARAM, LPARAM) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000020000;
- mi.icolibItem = GetSkinIconHandle(SKINICON_EVENT_FILE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.pszName = LPGEN("&File");
mi.pszService = MS_FILE_SENDFILE;
hSRFileMenuItem = Menu_AddContactMenuItem(&mi);
@@ -435,7 +435,7 @@ int LoadSendRecvFileModule(void) CreateServiceFunction("FtMgr/Show", FtMgrShowCommand);
CLISTMENUITEM mi = { sizeof(mi) };
- mi.icolibItem = GetSkinIconHandle(SKINICON_EVENT_FILE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.position = 1900000000;
mi.pszName = LPGEN("File &transfers...");
mi.pszService = "FtMgr/Show"; //MS_PROTO_SHOWFTMGR;
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index 137f80f23b..ac01125118 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -154,7 +154,7 @@ static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFE } else { mir_tstrncpy(msg, pcli->pfnGetContactDisplayName(fts->hContact, 0), SIZEOF(msg)); - HICON hIcon = LoadSkinIcon(SKINICON_OTHER_DOWNARROW); + HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_DOWNARROW); dat->hIcon = CopyIcon(hIcon); IcoLib_ReleaseIcon(hIcon, NULL); } @@ -274,7 +274,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR { char *szProto = GetContactProto(dat->hContact); WORD status = db_get_w(dat->hContact, szProto, "Status", ID_STATUS_ONLINE); - SendDlgItemMessage(hwndDlg, IDC_CONTACT, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedProtoIcon(szProto, status)); + SendDlgItemMessage(hwndDlg, IDC_CONTACT, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadProtoIcon(szProto, status)); } SendDlgItemMessage(hwndDlg, IDC_CONTACT, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Contact menu"), 0); diff --git a/src/core/stdhelp/src/help.cpp b/src/core/stdhelp/src/help.cpp index 81281c6888..af276a413d 100644 --- a/src/core/stdhelp/src/help.cpp +++ b/src/core/stdhelp/src/help.cpp @@ -74,7 +74,7 @@ int LoadHelpModule(void) CreateServiceFunction("Help/BugCommand", BugCommand);
CLISTMENUITEM mi = { sizeof(mi) };
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.pszPopupName = LPGEN("&Help");
mi.popupPosition = 2000090000;
mi.position = 2000090000;
@@ -82,19 +82,19 @@ int LoadHelpModule(void) mi.pszService = "Help/AboutCommand";
Menu_AddMainMenuItem(&mi);
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_HELP);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
mi.position = -500050000;
mi.pszName = LPGEN("&Support");
mi.pszService = "Help/IndexCommand";
Menu_AddMainMenuItem(&mi);
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_MIRANDAWEB);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDAWEB);
mi.position = 2000050000;
mi.pszName = LPGEN("&Miranda NG homepage");
mi.pszService = "Help/WebsiteCommand";
Menu_AddMainMenuItem(&mi);
- mi.icolibItem = GetSkinIconHandle(SKINICON_EVENT_URL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.position = 2000040000;
mi.pszName = LPGEN("&Report bug");
mi.pszService = "Help/BugCommand";
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index fe5f689eb2..775a202f20 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -912,13 +912,13 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (dat->szProto) {
WORD wStatus = db_get_w(dat->hContact, dat->szProto, "Status", ID_STATUS_OFFLINE);
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedProtoIconBig(dat->szProto, wStatus));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(dat->szProto, wStatus));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(dat->szProto, wStatus, true));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadProtoIcon(dat->szProto, wStatus));
break;
}
}
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_EVENT_MESSAGE));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_EVENT_MESSAGE));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE, true));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadIcon(SKINICON_EVENT_MESSAGE));
break;
case DM_USERNAMETOCLIP:
@@ -1304,7 +1304,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (dat->nTypeSecs) {
TCHAR szBuf[256];
TCHAR* szContactName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
- HICON hTyping = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
+ HICON hTyping = Skin_LoadIcon(SKINICON_OTHER_TYPING);
mir_sntprintf(szBuf, SIZEOF(szBuf), TranslateT("%s is typing a message..."), szContactName);
dat->nTypeSecs--;
@@ -1342,7 +1342,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (dis->CtlID == IDC_PROTOCOL) {
if (dat->szProto) {
int dwStatus = db_get_w(dat->hContact, dat->szProto, "Status", ID_STATUS_OFFLINE);
- HICON hIcon = LoadSkinnedProtoIcon(dat->szProto, dwStatus);
+ HICON hIcon = Skin_LoadProtoIcon(dat->szProto, dwStatus);
if (hIcon) {
if (db_get_dw(dat->hContact, dat->szProto, "IdleTS", 0)) {
HIMAGELIST hImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 1, 0);
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index d2a22249e3..a5d8c93c2a 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -589,7 +589,7 @@ static int ModernOptInitialise(WPARAM wParam, LPARAM lParam) MODERNOPTOBJECT obj = { sizeof(obj) };
obj.dwFlags = MODEROPT_FLG_TCHAR | MODEROPT_FLG_NORESIZE;
- obj.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ obj.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
obj.hInstance = g_hInst;
obj.iSection = MODERNOPT_PAGE_MSGS;
obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index b152ed7bb7..9d8a6befd8 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -91,7 +91,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) cle.hContact = hContact;
cle.hDbEvent = lParam;
cle.flags = CLEF_TCHAR;
- cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
TCHAR toolTip[256];
mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
@@ -181,7 +181,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam) cle.hContact = hContact;
cle.hDbEvent = 1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
- cle.hIcon = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
+ cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_TYPING);
cle.pszService = "SRMsg/ReadMessage";
cle.ptszTooltip = szTip;
CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
@@ -227,7 +227,7 @@ static void RestoreUnreadMessageAlerts(void) TCHAR toolTip[256];
CLISTEVENT cle = { sizeof(cle) };
- cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
cle.flags = CLEF_TCHAR;
cle.ptszTooltip = toolTip;
@@ -281,7 +281,7 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
- mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_MESSAGE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
mi.pszName = LPGEN("&Message");
mi.pszService = MS_MSG_SENDMESSAGE;
hMsgMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index 8f38b2d02f..0297875807 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -412,7 +412,7 @@ int LoadHistoryModule(void) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 1000090000;
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_HISTORY);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.pszName = LPGEN("View &history");
mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
hContactMenu = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp index 5c1b3c50b3..1dfdfa894b 100644 --- a/src/core/stdurl/url.cpp +++ b/src/core/stdurl/url.cpp @@ -55,7 +55,7 @@ static int UrlEventAdded(WPARAM hContact, LPARAM lParam) cle.flags = CLEF_TCHAR;
cle.hContact = hContact;
cle.hDbEvent = lParam;
- cle.hIcon = LoadSkinIcon(SKINICON_EVENT_URL);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_URL);
cle.pszService = "SRUrl/ReadUrl";
cle.ptszTooltip = szTooltip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
@@ -71,7 +71,7 @@ static INT_PTR SendUrlCommand(WPARAM wParam, LPARAM) static void RestoreUnreadUrlAlerts(void)
{
CLISTEVENT cle = { sizeof(cle) };
- cle.hIcon = LoadSkinIcon(SKINICON_EVENT_URL);
+ cle.hIcon = Skin_LoadIcon(SKINICON_EVENT_URL);
cle.pszService = "SRUrl/ReadUrl";
cle.flags = CLEF_TCHAR;
@@ -121,7 +121,7 @@ static int SRUrlModulesLoaded(WPARAM, LPARAM) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -2000040000;
- mi.icolibItem = GetSkinIconHandle(SKINICON_EVENT_URL);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszName = LPGEN("Web page address (&URL)");
mi.pszService = MS_URL_SENDURL;
hSRUrlMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stduserinfo/src/contactinfo.cpp b/src/core/stduserinfo/src/contactinfo.cpp index b06a8c795d..7636f6b231 100644 --- a/src/core/stduserinfo/src/contactinfo.cpp +++ b/src/core/stduserinfo/src/contactinfo.cpp @@ -411,15 +411,15 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP HICON hIcon = NULL;
if (nm->nmcd.lItemlParam == -2 && nm->iSubItem-3 == (nm->nmcd.hdr.idFrom == IDC_PHONES))
- hIcon = LoadSkinIcon(SKINICON_OTHER_ADDCONTACT);
+ hIcon = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
else if (nm->iSubItem>1 && nm->nmcd.lItemlParam != -1 && nm->nmcd.lItemlParam != -2) {
static int iconResources[3] = {SKINICON_OTHER_RENAME, SKINICON_OTHER_DELETE};
if (nm->iSubItem == 2 && nm->nmcd.hdr.idFrom == IDC_PHONES) {
TCHAR szText[2];
ListView_GetItemText(nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, szText, SIZEOF(szText));
- if (szText[0]) hIcon = LoadSkinIcon(SKINICON_OTHER_SMS);
+ if (szText[0]) hIcon = Skin_LoadIcon(SKINICON_OTHER_SMS);
}
- else hIcon = LoadSkinIcon(iconResources[nm->iSubItem-3+(nm->nmcd.hdr.idFrom == IDC_EMAILS)]);
+ else hIcon = Skin_LoadIcon(iconResources[nm->iSubItem-3+(nm->nmcd.hdr.idFrom == IDC_EMAILS)]);
}
else break;
DrawIconEx(nm->nmcd.hdc, (rc.left+rc.right-GetSystemMetrics(SM_CXSMICON))/2, (rc.top+rc.bottom-GetSystemMetrics(SM_CYSMICON))/2, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index db234f29cb..b195b5bb05 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -630,7 +630,7 @@ int LoadUserInfoModule(void) CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 1000050000;
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_USERDETAILS);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.pszName = LPGEN("User &details");
mi.pszService = MS_USERINFO_SHOWDIALOG;
Menu_AddContactMenuItem(&mi);
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index ece6fa3028..e2cb2cc85b 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -65,7 +65,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hContact = hContact;
cle.hDbEvent = uniqueEventId++;
- cle.hIcon = LoadSkinIcon(SKINICON_OTHER_USERONLINE, false);
+ cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERONLINE, false);
cle.pszService = "UserOnline/Description";
mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName(hContact, 0));
cle.ptszTooltip = tooltip;
diff --git a/src/mir_app/src/DefaultExtraIcons.cpp b/src/mir_app/src/DefaultExtraIcons.cpp index 38b19bc5d1..09ff82aa72 100644 --- a/src/mir_app/src/DefaultExtraIcons.cpp +++ b/src/mir_app/src/DefaultExtraIcons.cpp @@ -57,9 +57,9 @@ static void SetVisibility(MCONTACT hContact, int apparentMode, bool clear) // Not chat
hExtraIcon = hExtraVisibility;
if (apparentMode == ID_STATUS_OFFLINE)
- hIcolib = LoadSkinnedIconHandle(SKINICON_OTHER_INVISIBLE_ALL);
+ hIcolib = Skin_GetIconHandle(SKINICON_OTHER_INVISIBLE_ALL);
else if (apparentMode == ID_STATUS_ONLINE)
- hIcolib = LoadSkinnedIconHandle(SKINICON_OTHER_VISIBLE_ALL);
+ hIcolib = Skin_GetIconHandle(SKINICON_OTHER_VISIBLE_ALL);
}
if (hIcolib != NULL || clear) {
@@ -262,7 +262,7 @@ static ProtoInfo* FindProto(const char *proto) if (p)
return p;
- HICON hIcon = LoadSkinnedProtoIcon(proto, ID_STATUS_ONLINE);
+ HICON hIcon = Skin_LoadProtoIcon(proto, ID_STATUS_ONLINE);
if (hIcon == NULL)
return NULL;
@@ -302,18 +302,18 @@ static int ProtocolOnClick(WPARAM wParam, LPARAM, LPARAM) void DefaultExtraIcons_Load()
{
hExtraChat = ExtraIcon_Register("chat_activity", LPGEN("Chat activity"), "ChatActivity");
- hExtraVisibility = ExtraIcon_Register("visibility", "Visibility", LoadSkinnedIconName(SKINICON_OTHER_VISIBLE_ALL));
+ hExtraVisibility = ExtraIcon_Register("visibility", "Visibility", Skin_GetIconName(SKINICON_OTHER_VISIBLE_ALL));
hExtraGender = ExtraIcon_Register("gender", "Gender", "gender_male");
- hExtraProto = ExtraIcon_Register("protocol", "Account", LoadSkinnedIconName(SKINICON_OTHER_ACCMGR),
+ hExtraProto = ExtraIcon_Register("protocol", "Account", Skin_GetIconName(SKINICON_OTHER_ACCMGR),
&ProtocolRebuildIcons, &ProtocolApplyIcon, &ProtocolOnClick);
for (int i = 0; i < SIZEOF(infos); i++) {
Info &p = infos[i];
- p.hIcolib = LoadSkinnedIconHandle(p.iSkinIcon);
+ p.hIcolib = Skin_GetIconHandle(p.iSkinIcon);
if (p.OnClick)
- p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, LoadSkinnedIconName(p.iSkinIcon), DefaultOnClick, (LPARAM)&p);
+ p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, Skin_GetIconName(p.iSkinIcon), DefaultOnClick, (LPARAM)&p);
else
- p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, LoadSkinnedIconName(p.iSkinIcon));
+ p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, Skin_GetIconName(p.iSkinIcon));
}
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp index 982fb25e2e..32d76d2db8 100644 --- a/src/mir_app/src/FontOptions.cpp +++ b/src/mir_app/src/FontOptions.cpp @@ -1353,7 +1353,7 @@ int FontsModernOptInit(WPARAM wParam, LPARAM) MODERNOPTOBJECT obj = {0};
obj.cbSize = sizeof(obj);
obj.dwFlags = MODEROPT_FLG_TCHAR|MODEROPT_FLG_NORESIZE;
- obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
obj.hInstance = g_hInst;
obj.iSection = MODERNOPT_PAGE_SKINS;
obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
diff --git a/src/mir_app/src/IcoLib.h b/src/mir_app/src/IcoLib.h index 2253ec963e..02667beba2 100644 --- a/src/mir_app/src/IcoLib.h +++ b/src/mir_app/src/IcoLib.h @@ -86,9 +86,9 @@ UINT _ExtractIconEx(LPCTSTR lpszFile, int iconIndex, int cxIcon, int cyIcon, HIC void __fastcall SAFE_FREE(void** p);
void __fastcall SafeDestroyIcon(HICON* icon);
-int IconSourceItem_Release(IconSourceItem** pitem);
-int IconSourceItem_ReleaseIcon(IconSourceItem* item);
-HICON IconSourceItem_GetIcon(IconSourceItem* item);
+int IconSourceItem_Release(IconSourceItem* &pitem);
+int IconSourceItem_ReleaseIcon(IconSourceItem *item);
+HICON IconSourceItem_GetIcon(IconSourceItem *item);
IconSourceItem* GetIconSourceItem(const TCHAR* file, int indx, int cxIcon, int cyIcon);
IcolibItem* IcoLib_FindHIcon(HICON hIcon, bool &big);
diff --git a/src/mir_app/src/button.cpp b/src/mir_app/src/button.cpp index 0c8648f485..b17e29d751 100644 --- a/src/mir_app/src/button.cpp +++ b/src/mir_app/src/button.cpp @@ -169,19 +169,17 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint) int textLen = GetWindowTextLength(ctl->hwnd);
if (ctl->hIcon) {
- LONG g_cxsmIcon = GetSystemMetrics(SM_CXSMICON);
- LONG g_cysmIcon = GetSystemMetrics(SM_CYSMICON);
- int ix = (rcClient.right-rcClient.left)/2 - (g_cxsmIcon/2);
- int iy = (rcClient.bottom-rcClient.top)/2 - (g_cysmIcon/2);
+ int ix = (rcClient.right-rcClient.left)/2 - (g_iIconSX/2);
+ int iy = (rcClient.bottom-rcClient.top)/2 - (g_iIconSY/2);
if (ctl->stateId == PBS_PRESSED) {
ix++;
iy++;
}
- HIMAGELIST hImageList = ImageList_Create(g_cxsmIcon, g_cysmIcon, ILC_MASK | ILC_COLOR32, 1, 0);
+ HIMAGELIST hImageList = ImageList_Create(g_iIconSX, g_iIconSY, ILC_MASK | ILC_COLOR32, 1, 0);
ImageList_AddIcon(hImageList, ctl->hIcon);
HICON hIconNew = ImageList_GetIcon(hImageList, 0, ILD_NORMAL);
- DrawState(hdcMem, NULL, NULL, (LPARAM) hIconNew, 0, ix, iy, g_cxsmIcon, g_cysmIcon, DST_ICON | (IsWindowEnabled(ctl->hwnd) ? DSS_NORMAL : DSS_DISABLED));
+ DrawState(hdcMem, NULL, NULL, (LPARAM) hIconNew, 0, ix, iy, g_iIconSX, g_iIconSY, DST_ICON | (IsWindowEnabled(ctl->hwnd) ? DSS_NORMAL : DSS_DISABLED));
ImageList_RemoveAll(hImageList);
ImageList_Destroy(hImageList);
DestroyIcon(hIconNew);
@@ -220,7 +218,7 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint) sz.cx -= szHot.cx;
}
if (ctl->arrow)
- DrawState(hdcMem, NULL, NULL, (LPARAM)ctl->arrow, 0, rcClient.right-rcClient.left-5-GetSystemMetrics(SM_CXSMICON)+(!ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), (rcClient.bottom-rcClient.top)/2-GetSystemMetrics(SM_CYSMICON)/2+(!ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), IsWindowEnabled(ctl->hwnd)?DST_ICON:DST_ICON|DSS_DISABLED);
+ DrawState(hdcMem, NULL, NULL, (LPARAM)ctl->arrow, 0, rcClient.right-rcClient.left-5-g_iIconSX+(!ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), (rcClient.bottom-rcClient.top)/2-g_iIconSY/2+(!ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), g_iIconSX, g_iIconSY, IsWindowEnabled(ctl->hwnd)?DST_ICON:DST_ICON|DSS_DISABLED);
SelectObject(hdcMem, ctl->hFont);
DrawState(hdcMem, NULL, NULL, (LPARAM)szText, 0,
@@ -425,7 +423,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR case BUTTONSETARROW: // turn arrow on/off
if (wParam) {
if (!bct->arrow) {
- bct->arrow = LoadSkinIcon(SKINICON_OTHER_DOWNARROW);
+ bct->arrow = Skin_LoadIcon(SKINICON_OTHER_DOWNARROW);
SetHwndPropInt(bct, OBJID_CLIENT, CHILDID_SELF, PROPID_ACC_ROLE, ROLE_SYSTEM_BUTTONDROPDOWN);
}
}
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index 5d56b3729b..8aee7e22cc 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -563,13 +563,13 @@ static int ModulesLoaded(WPARAM, LPARAM) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = -2000090001; mi.flags = CMIF_DEFAULT; - mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN); + mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN); mi.pszName = LPGEN("&Join chat"); mi.pszService = "GChat/JoinChat"; hJoinMenuItem = Menu_AddContactMenuItem(&mi); mi.position = -2000090000; - mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_LEAVE); + mi.icolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE); mi.flags = CMIF_NOTOFFLINE; mi.pszName = LPGEN("&Leave chat"); mi.pszService = "GChat/LeaveChat"; diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index a19bff68d9..9d7936f926 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -85,7 +85,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce) switch (gce->pDest->iType) {
case GC_EVENT_MESSAGE | GC_EVENT_HIGHLIGHT:
case GC_EVENT_ACTION | GC_EVENT_HIGHLIGHT:
- ci.AddEvent(si->hContact, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE), GC_FAKE_EVENT, 0, TranslateT("%s wants your attention in %s"), gce->ptszNick, si->ptszName);
+ ci.AddEvent(si->hContact, Skin_LoadIcon(SKINICON_EVENT_MESSAGE), GC_FAKE_EVENT, 0, TranslateT("%s wants your attention in %s"), gce->ptszNick, si->ptszName);
break;
case GC_EVENT_MESSAGE:
ci.AddEvent(si->hContact, ci.hIcons[ICON_MESSAGE], GC_FAKE_EVENT, CLEF_ONLYAFEW, TranslateT("%s speaks in %s"), gce->ptszNick, si->ptszName);
@@ -213,10 +213,10 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) {
switch (gce->pDest->iType) {
case GC_EVENT_MESSAGE | GC_EVENT_HIGHLIGHT:
- ci.ShowPopup(si->hContact, si, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE), si->pszModule, si->ptszName, ci.aFonts[16].color, TranslateT("%s says: %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
+ ci.ShowPopup(si->hContact, si, Skin_LoadIcon(SKINICON_EVENT_MESSAGE), si->pszModule, si->ptszName, ci.aFonts[16].color, TranslateT("%s says: %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_ACTION | GC_EVENT_HIGHLIGHT:
- ci.ShowPopup(si->hContact, si, LoadSkinnedIcon(SKINICON_EVENT_MESSAGE), si->pszModule, si->ptszName, ci.aFonts[16].color, _T("%s %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
+ ci.ShowPopup(si->hContact, si, Skin_LoadIcon(SKINICON_EVENT_MESSAGE), si->pszModule, si->ptszName, ci.aFonts[16].color, _T("%s %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
break;
case GC_EVENT_MESSAGE:
ci.ShowPopup(si->hContact, si, ci.hIcons[ICON_MESSAGE], si->pszModule, si->ptszName, ci.aFonts[9].color, TranslateT("%s says: %s"), gce->ptszNick, RemoveFormatting(gce->ptszText));
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index e677c7c6e3..75e0496fce 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -218,8 +218,8 @@ int LoadCLCModule(void) {
bModuleInitialized = true;
- g_IconWidth = GetSystemMetrics(SM_CXSMICON);
- g_IconHeight = GetSystemMetrics(SM_CYSMICON);
+ g_IconWidth = g_iIconSX;
+ g_IconHeight = g_iIconSY;
hClcWindowList = WindowList_Create();
hShowInfoTipEvent = CreateHookableEvent(ME_CLC_SHOWINFOTIP);
diff --git a/src/mir_app/src/clistmenus.cpp b/src/mir_app/src/clistmenus.cpp index 9581c128c3..a69c594fdf 100644 --- a/src/mir_app/src/clistmenus.cpp +++ b/src/mir_app/src/clistmenus.cpp @@ -502,7 +502,7 @@ INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) curProtoStatus = 0;
if (curProtoStatus >= ID_STATUS_OFFLINE && curProtoStatus < ID_STATUS_IDLE)
- timi->mi.hIcon = LoadSkinProtoIcon(prot, curProtoStatus);
+ timi->mi.hIcon = Skin_LoadProtoIcon(prot, curProtoStatus);
else {
timi->mi.hIcon = (HICON)CallProtoServiceInt(NULL, prot, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
if (timi->mi.hIcon == (HICON)CALLSERVICE_NOTFOUND)
@@ -921,7 +921,7 @@ void RebuildMenuOrder(void) tmi.root = rootmenu;
tmi.position = pos++;
tmi.ptszName = cli.pfnGetStatusModeDescription(statusModeList[j], GSMDF_UNTRANSLATED);
- tmi.hIcon = LoadSkinProtoIcon(pa->szModuleName, statusModeList[j]);
+ tmi.hIcon = Skin_LoadProtoIcon(pa->szModuleName, statusModeList[j]);
// owner data
StatusMenuExecParam *smep = (StatusMenuExecParam*)mir_calloc(sizeof(StatusMenuExecParam));
@@ -962,7 +962,7 @@ void RebuildMenuOrder(void) if (statusModeList[j] == ID_STATUS_OFFLINE)
tmi.flags |= CMIF_CHECKED;
- tmi.hIcon = LoadSkinIcon(skinIconStatusList[j]);
+ tmi.hIcon = Skin_LoadIcon(skinIconStatusList[j]);
tmi.position = pos++;
tmi.hotKey = MAKELPARAM(MOD_CONTROL, '0' + j);
@@ -1323,7 +1323,7 @@ void InitCustomMenus(void) mi.position = 0x7fffffff;
mi.pszService = "CloseAction";
mi.pszName = LPGEN("E&xit");
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_EXIT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
AddMainMenuItem(0, (LPARAM)&mi);
cli.currentStatusMenuItem = ID_STATUS_OFFLINE;
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp index a2c1aae495..b124fffe8f 100644 --- a/src/mir_app/src/clistmod.cpp +++ b/src/mir_app/src/clistmod.cpp @@ -269,12 +269,12 @@ static int CListIconsChanged(WPARAM, LPARAM) int i, j;
for (i=0; i < SIZEOF(statusModeList); i++)
- ImageList_ReplaceIcon_IconLibLoaded(hCListImages, i + 1, LoadSkinIcon(skinIconStatusList[i]));
- ImageList_ReplaceIcon_IconLibLoaded(hCListImages, IMAGE_GROUPOPEN, LoadSkinIcon(SKINICON_OTHER_GROUPOPEN));
- ImageList_ReplaceIcon_IconLibLoaded(hCListImages, IMAGE_GROUPSHUT, LoadSkinIcon(SKINICON_OTHER_GROUPSHUT));
+ ImageList_ReplaceIcon_IconLibLoaded(hCListImages, i + 1, Skin_LoadIcon(skinIconStatusList[i]));
+ ImageList_ReplaceIcon_IconLibLoaded(hCListImages, IMAGE_GROUPOPEN, Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN));
+ ImageList_ReplaceIcon_IconLibLoaded(hCListImages, IMAGE_GROUPSHUT, Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT));
for (i=0; i < protoIconIndex.getCount(); i++)
for (j = 0; j < SIZEOF(statusModeList); j++)
- ImageList_ReplaceIcon_IconLibLoaded(hCListImages, protoIconIndex[i].iIconBase + j, LoadSkinProtoIcon(protoIconIndex[i].szProto, statusModeList[j]));
+ ImageList_ReplaceIcon_IconLibLoaded(hCListImages, protoIconIndex[i].iIconBase + j, Skin_LoadProtoIcon(protoIconIndex[i].szProto, statusModeList[j]));
cli.pfnTrayIconIconsChanged();
cli.pfnInvalidateRect(cli.hwndContactList, NULL, TRUE);
return 0;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index 42f231e425..0ee56992a9 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -270,12 +270,12 @@ int LoadCLUIModule(void) wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = cli.hInst;
- wndclass.hIcon = LoadSkinIcon(SKINICON_OTHER_MIRANDA, true);
+ wndclass.hIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA, true);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.hbrBackground = (HBRUSH) (COLOR_3DFACE + 1);
wndclass.lpszMenuName = MAKEINTRESOURCE(IDR_CLISTMENU);
wndclass.lpszClassName = _T(MIRANDACLASS);
- wndclass.hIconSm = LoadSkinIcon(SKINICON_OTHER_MIRANDA);
+ wndclass.hIconSm = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
RegisterClassEx(&wndclass);
if (db_get_ts(NULL, "CList", "TitleText", &dbv))
@@ -329,14 +329,14 @@ int LoadCLUIModule(void) CreateServiceFunction("CList/DeleteContactCommand", MenuItem_DeleteContact);
mi.position = 2000070000;
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_DELETE);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
mi.pszName = LPGEN("De&lete");
mi.pszService = "CList/DeleteContactCommand";
Menu_AddContactMenuItem(&mi);
CreateServiceFunction("CList/RenameContactCommand", MenuItem_RenameContact);
mi.position = 2000050000;
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_RENAME);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
mi.pszName = LPGEN("&Rename");
mi.pszService = "CList/RenameContactCommand";
hRenameMenuItem = Menu_AddContactMenuItem(&mi);
@@ -344,7 +344,7 @@ int LoadCLUIModule(void) CreateServiceFunction("CList/AddToListContactCommand", MenuItem_AddContactToList);
mi.position = -2050000000;
mi.flags |= CMIF_NOTONLIST;
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_ADDCONTACT);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT);
mi.pszName = LPGEN("&Add permanently to list");
mi.pszService = "CList/AddToListContactCommand";
Menu_AddContactMenuItem(&mi);
@@ -982,12 +982,12 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SetBkMode(dis->hDC, TRANSPARENT);
x = dis->rcItem.left;
if (showOpts & 1) {
- HICON hIcon = LoadSkinProtoIcon(szProto, status);
+ HICON hIcon = Skin_LoadProtoIcon(szProto, status);
DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - g_IconHeight) >> 1, hIcon,
g_IconWidth, g_IconHeight, 0, NULL, DI_NORMAL);
IcoLib_ReleaseIcon(hIcon);
if (Proto_IsAccountLocked(Proto_GetAccount(szProto))) {
- hIcon = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
+ hIcon = Skin_LoadIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hIcon != NULL) {
DrawIconEx(dis->hDC, x, (dis->rcItem.top + dis->rcItem.bottom - g_IconHeight) >> 1, hIcon,
g_IconWidth, g_IconHeight, 0, NULL, DI_NORMAL);
@@ -1021,7 +1021,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
else if (dis->CtlType == ODT_MENU) {
if (dis->itemData == MENU_MIRANDAMENU) {
- HICON hIcon = LoadSkinnedIcon(SKINICON_OTHER_MAINMENU);
+ HICON hIcon = Skin_LoadIcon(SKINICON_OTHER_MAINMENU);
fnDrawMenuItem(dis, CopyIcon(hIcon), NULL);
IcoLib_ReleaseIcon(hIcon);
return TRUE;
diff --git a/src/mir_app/src/dbutils.cpp b/src/mir_app/src/dbutils.cpp index 02a6821b7d..18e6bac54f 100644 --- a/src/mir_app/src/dbutils.cpp +++ b/src/mir_app/src/dbutils.cpp @@ -223,15 +223,15 @@ static INT_PTR DbEventGetIcon(WPARAM wParam, LPARAM lParam) if (!icon) {
switch(dbei->eventType) {
case EVENTTYPE_URL:
- icon = LoadSkinIcon(SKINICON_EVENT_URL);
+ icon = Skin_LoadIcon(SKINICON_EVENT_URL);
break;
case EVENTTYPE_FILE:
- icon = LoadSkinIcon(SKINICON_EVENT_FILE);
+ icon = Skin_LoadIcon(SKINICON_EVENT_FILE);
break;
default: // EVENTTYPE_MESSAGE and unknown types
- icon = LoadSkinIcon(SKINICON_EVENT_MESSAGE);
+ icon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
break;
}
}
diff --git a/src/mir_app/src/enterstring.cpp b/src/mir_app/src/enterstring.cpp index 4e76e94a6e..4179741bbb 100644 --- a/src/mir_app/src/enterstring.cpp +++ b/src/mir_app/src/enterstring.cpp @@ -94,8 +94,8 @@ static INT_PTR CALLBACK sttEnterStringDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinnedIconBig(SKINICON_OTHER_RENAME));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_RENAME));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_RENAME, true));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_RENAME, false));
params = (EnterStringFormParam *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)params);
SetWindowText(hwndDlg, params->caption);
diff --git a/src/mir_app/src/extracticon.cpp b/src/mir_app/src/extracticon.cpp index cfd2ed22db..3d9ccfcb29 100644 --- a/src/mir_app/src/extracticon.cpp +++ b/src/mir_app/src/extracticon.cpp @@ -236,25 +236,24 @@ UINT _ExtractFromICO(LPCTSTR pFileName, int iconIndex, int cxIcon, int cyIcon, H UINT _ExtractIconEx(LPCTSTR lpszFile, int iconIndex, int cxIcon, int cyIcon, HICON *phicon, UINT flags)
{
- HANDLE hFile;
- WORD magic[6];
- DWORD read = 0;
UINT res = 0;
-
- if (cxIcon == GetSystemMetrics(SM_CXICON) && cyIcon == GetSystemMetrics(SM_CYICON))
+ if (cxIcon == g_iIconX && cyIcon == g_iIconY)
res = ExtractIconEx(lpszFile, iconIndex, phicon, NULL, 1);
- else if (cxIcon == GetSystemMetrics(SM_CXSMICON) && cyIcon == GetSystemMetrics(SM_CYSMICON))
+ else if (cxIcon == g_iIconSX && cyIcon == g_iIconSY)
res = ExtractIconEx(lpszFile, iconIndex, NULL, phicon, 1);
else if (cxIcon == 0 || cyIcon == 0)
res = ExtractIconEx(lpszFile, iconIndex, NULL, phicon, 1);
// check if the api succeded, if not try our method too
- if (res) return res;
+ if (res)
+ return res;
- hFile = CreateFile(lpszFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+ HANDLE hFile = CreateFile(lpszFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (hFile == INVALID_HANDLE_VALUE)
return 0;
// failed to read file signature
+ DWORD read = 0;
+ WORD magic[6];
if (!ReadFile(hFile, &magic, sizeof(magic), &read, NULL) || (read != sizeof(magic))) {
CloseHandle(hFile);
return 0;
@@ -273,7 +272,6 @@ UINT _ExtractIconEx(LPCTSTR lpszFile, int iconIndex, int cxIcon, int cyIcon, HIC case MAGIC_ICON:
if ((magic[1] == MAGIC_ICO1 || magic[1] == MAGIC_CUR) && magic[2] >= 1)
res = _ExtractFromICO(lpszFile, iconIndex, cxIcon, cyIcon, phicon, flags);
-
break;
}
diff --git a/src/mir_app/src/extraicons.cpp b/src/mir_app/src/extraicons.cpp index 32008087ef..820ee03900 100644 --- a/src/mir_app/src/extraicons.cpp +++ b/src/mir_app/src/extraicons.cpp @@ -303,7 +303,7 @@ void fnReloadExtraIcons() if (hExtraImageList)
ImageList_Destroy(hExtraImageList);
- hExtraImageList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 1, 256);
+ hExtraImageList = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 1, 256);
SendMessage(cli.hwndContactTree, CLM_SETEXTRAIMAGELIST, 0, (LPARAM)hExtraImageList);
SendMessage(cli.hwndContactTree, CLM_SETEXTRACOLUMNS, EXTRA_ICON_COUNT, 0);
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index e1fa64a9b5..b1d470eacd 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -379,7 +379,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (caps & PF1_ANYSEARCH) netProtoCount++; } - dat->himlComboIcons = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, netProtoCount + 1, netProtoCount + 1); + dat->himlComboIcons = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, netProtoCount + 1, netProtoCount + 1); SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CBEM_SETIMAGELIST, 0, (LPARAM)dat->himlComboIcons); COMBOBOXEXITEM cbei; @@ -1037,7 +1037,7 @@ int LoadFindAddModule(void) CLISTMENUITEM mi = { sizeof(mi) }; mi.position = 500020000; - mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_FINDUSER); + mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER); mi.pszName = LPGEN("&Find/add contacts..."); mi.pszService = MS_FINDADD_FINDADD; hMainMenuItem = Menu_AddMainMenuItem(&mi); diff --git a/src/mir_app/src/genmenu.cpp b/src/mir_app/src/genmenu.cpp index 41ecec5c04..3246544f40 100644 --- a/src/mir_app/src/genmenu.cpp +++ b/src/mir_app/src/genmenu.cpp @@ -131,8 +131,8 @@ int MO_MeasureMenuItem(LPMEASUREITEMSTRUCT mis) if (pimi->iconId == -1)
return FALSE;
- mis->itemWidth = max(0, GetSystemMetrics(SM_CXSMICON) - GetSystemMetrics(SM_CXMENUCHECK) + 4);
- mis->itemHeight = GetSystemMetrics(SM_CYSMICON) + 2;
+ mis->itemWidth = max(0, g_iIconSX - GetSystemMetrics(SM_CXMENUCHECK) + 4);
+ mis->itemHeight = g_iIconSY + 2;
return TRUE;
}
@@ -154,12 +154,12 @@ int MO_DrawMenuItem(LPDRAWITEMSTRUCT dis) if (pimi == NULL || pimi->iconId == -1)
return FALSE;
- int y = (dis->rcItem.bottom - dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2 + 1;
+ int y = (dis->rcItem.bottom - dis->rcItem.top - g_iIconSY) / 2 + 1;
if (dis->itemState & ODS_SELECTED) {
if (dis->itemState & ODS_CHECKED) {
RECT rc;
- rc.left = 2; rc.right = GetSystemMetrics(SM_CXSMICON) + 2;
- rc.top = y; rc.bottom = rc.top + GetSystemMetrics(SM_CYSMICON) + 2;
+ rc.left = 2; rc.right = g_iIconSX + 2;
+ rc.top = y; rc.bottom = rc.top + g_iIconSY + 2;
FillRect(dis->hDC, &rc, GetSysColorBrush(COLOR_HIGHLIGHT));
ImageList_DrawEx(pimi->parent->m_hMenuIcons, pimi->iconId, dis->hDC, 2, y, 0, 0, CLR_NONE, CLR_DEFAULT, ILD_SELECTED);
}
@@ -168,8 +168,8 @@ int MO_DrawMenuItem(LPDRAWITEMSTRUCT dis) else {
if (dis->itemState & ODS_CHECKED) {
RECT rc;
- rc.left = 0; rc.right = GetSystemMetrics(SM_CXSMICON) + 4;
- rc.top = y - 2; rc.bottom = rc.top + GetSystemMetrics(SM_CYSMICON) + 4;
+ rc.left = 0; rc.right = g_iIconSX + 4;
+ rc.top = y - 2; rc.bottom = rc.top + g_iIconSY + 4;
DrawEdge(dis->hDC, &rc, BDR_SUNKENOUTER, BF_RECT);
InflateRect(&rc, -1, -1);
COLORREF menuCol = GetSysColor(COLOR_MENU);
@@ -525,7 +525,7 @@ INT_PTR MO_CreateNewMenuObject(WPARAM wParam, LPARAM lParam) p->ptszDisplayName = mir_a2t(LPCSTR(wParam));
p->CheckService = mir_strdup(pmp->CheckService);
p->ExecService = mir_strdup(pmp->ExecService);
- p->m_hMenuIcons = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 15, 100);
+ p->m_hMenuIcons = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 15, 100);
g_menus.insert(p);
return p->id;
}
diff --git a/src/mir_app/src/genmenuopt.cpp b/src/mir_app/src/genmenuopt.cpp index 8a1cbf497c..424488d4ea 100644 --- a/src/mir_app/src/genmenuopt.cpp +++ b/src/mir_app/src/genmenuopt.cpp @@ -296,7 +296,7 @@ public: { iInitMenuValue = db_get_b(NULL, "CList", "MoveProtoMenus", TRUE); - HIMAGELIST himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2); + HIMAGELIST himlCheckBoxes = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 2, 2); ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_NOTICK); ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_TICK); m_menuItems.SetImageList(himlCheckBoxes, TVSIL_NORMAL); diff --git a/src/mir_app/src/headerbar.cpp b/src/mir_app/src/headerbar.cpp index b321a7853b..316f085ca0 100644 --- a/src/mir_app/src/headerbar.cpp +++ b/src/mir_app/src/headerbar.cpp @@ -197,7 +197,7 @@ static LRESULT MHeaderbar_OnPaint(HWND hwndDlg, MHeaderbarCtrl *mit) textRect.left = 50;
textRect.right = mit->width;
textRect.top = 2 + iTopSpace;
- textRect.bottom = GetSystemMetrics(SM_CYICON) - 2 + iTopSpace;
+ textRect.bottom = g_iIconY - 2 + iTopSpace;
if (IsAeroMode()) {
DTTOPTS dto = { 0 };
diff --git a/src/mir_app/src/hotkey_opts.cpp b/src/mir_app/src/hotkey_opts.cpp index 8224fd7ee0..cd7d542a7e 100644 --- a/src/mir_app/src/hotkey_opts.cpp +++ b/src/mir_app/src/hotkey_opts.cpp @@ -487,19 +487,19 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, { RECT rc; GetClientRect(hwndHotkey, &rc); - colWidth = rc.right - GetSystemMetrics(SM_CXHTHUMB) - 3 * GetSystemMetrics(SM_CXSMICON) - 5; + colWidth = rc.right - GetSystemMetrics(SM_CXHTHUMB) - 3 * g_iIconSX - 5; LVCOLUMN lvc; lvc.mask = LVCF_WIDTH; lvc.cx = colWidth * 2 / 3; ListView_InsertColumn(hwndHotkey, COL_NAME, &lvc); - lvc.cx = GetSystemMetrics(SM_CXSMICON); + lvc.cx = g_iIconSX; ListView_InsertColumn(hwndHotkey, COL_TYPE, &lvc); lvc.cx = colWidth / 3; ListView_InsertColumn(hwndHotkey, COL_KEY, &lvc); - lvc.cx = GetSystemMetrics(SM_CXSMICON); + lvc.cx = g_iIconSX; ListView_InsertColumn(hwndHotkey, COL_RESET, &lvc); - lvc.cx = GetSystemMetrics(SM_CXSMICON); + lvc.cx = g_iIconSX; ListView_InsertColumn(hwndHotkey, COL_ADDREMOVE, &lvc); for (int i = 0; i < hotkeys.getCount(); i++) { diff --git a/src/mir_app/src/icolib.cpp b/src/mir_app/src/icolib.cpp index eb85a2ebd9..ad35eb3509 100644 --- a/src/mir_app/src/icolib.cpp +++ b/src/mir_app/src/icolib.cpp @@ -382,25 +382,24 @@ IconSourceItem* CreateStaticIconSourceItem(int cxIcon, int cyIcon) return newItem;
}
-int IconSourceItem_Release(IconSourceItem** pitem)
+int IconSourceItem_Release(IconSourceItem* &pitem)
{
- if (pitem && *pitem && (*pitem)->ref_count) {
- IconSourceItem* item = *pitem;
- item->ref_count--;
- if (!item->ref_count) {
- int indx;
- if ((indx = iconSourceList.getIndex(item)) != -1) {
- IconSourceFile_Release(&item->file);
- SafeDestroyIcon(&item->icon);
- SAFE_FREE((void**)&item->icon_data);
- iconSourceList.remove(indx);
- SAFE_FREE((void**)&item);
- }
+ if (pitem == NULL || pitem->ref_count == 0)
+ return 1;
+
+ pitem->ref_count--;
+ if (!pitem->ref_count) {
+ int indx;
+ if ((indx = iconSourceList.getIndex(pitem)) != -1) {
+ IconSourceFile_Release(&pitem->file);
+ SafeDestroyIcon(&pitem->icon);
+ SAFE_FREE((void**)&pitem->icon_data);
+ iconSourceList.remove(indx);
+ SAFE_FREE((void**)&pitem);
}
- *pitem = NULL;
- return 0;
}
- return 1;
+ pitem = NULL;
+ return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -485,9 +484,9 @@ static void IcoLib_FreeIcon(IcolibItem* icon) IcoLib_RemoveSection(icon->section);
icon->section = NULL;
}
- IconSourceItem_Release(&icon->source_small);
- IconSourceItem_Release(&icon->source_big);
- IconSourceItem_Release(&icon->default_icon);
+ IconSourceItem_Release(icon->source_small);
+ IconSourceItem_Release(icon->source_big);
+ IconSourceItem_Release(icon->default_icon);
SafeDestroyIcon(&icon->temp_icon);
}
@@ -549,11 +548,11 @@ MIR_APP_DLL(HANDLE) IcoLib_AddIcon(SKINICONDESC *sid, int hLangpack) item->default_icon->ref_count++;
}
else {
- int cx = item->cx ? item->cx : GetSystemMetrics(SM_CXSMICON);
- int cy = item->cy ? item->cy : GetSystemMetrics(SM_CYSMICON);
+ int cx = item->cx ? item->cx : g_iIconSX;
+ int cy = item->cy ? item->cy : g_iIconSY;
item->default_icon = CreateStaticIconSourceItem(cx, cy);
if (GetIconData(sid->hDefaultIcon, &item->default_icon->icon_data, &item->default_icon->icon_size))
- IconSourceItem_Release(&item->default_icon);
+ IconSourceItem_Release(item->default_icon);
}
}
@@ -655,41 +654,39 @@ HICON IconItem_GetDefaultIcon(IcolibItem* item, bool big) HICON hIcon = NULL;
if (item->default_icon && !big) {
- IconSourceItem_Release(&item->source_small);
+ IconSourceItem_Release(item->source_small);
item->source_small = item->default_icon;
item->source_small->ref_count++;
hIcon = IconSourceItem_GetIcon(item->source_small);
}
if (!hIcon && item->default_file) {
- int cx = item->cx ? item->cx : GetSystemMetrics(big ? SM_CXICON : SM_CXSMICON);
- int cy = item->cy ? item->cy : GetSystemMetrics(big ? SM_CYICON : SM_CYSMICON);
- IconSourceItem* def_icon = GetIconSourceItem(item->default_file, item->default_indx, cx, cy);
+ int cx = item->cx ? item->cx : (big ? g_iIconX : g_iIconSX);
+ int cy = item->cy ? item->cy : (big ? g_iIconY : g_iIconSY);
+ IconSourceItem *def_icon = GetIconSourceItem(item->default_file, item->default_indx, cx, cy);
if (big) {
if (def_icon != item->source_big) {
- IconSourceItem_Release(&item->source_big);
+ IconSourceItem_Release(item->source_big);
item->source_big = def_icon;
if (def_icon) {
def_icon->ref_count++;
hIcon = IconSourceItem_GetIcon(def_icon);
}
}
- else
- IconSourceItem_Release(&def_icon);
+ else IconSourceItem_Release(def_icon);
}
else {
if (def_icon != item->default_icon) {
- IconSourceItem_Release(&item->default_icon);
+ IconSourceItem_Release(item->default_icon);
item->default_icon = def_icon;
if (def_icon) {
- IconSourceItem_Release(&item->source_small);
+ IconSourceItem_Release(item->source_small);
item->source_small = def_icon;
def_icon->ref_count++;
hIcon = IconSourceItem_GetIcon(def_icon);
}
}
- else
- IconSourceItem_Release(&def_icon);
+ else IconSourceItem_Release(def_icon);
}
}
return hIcon;
@@ -711,8 +708,8 @@ HICON IconItem_GetIcon(HANDLE hIcoLib, bool big) if (!source && !db_get_ts(NULL, "SkinIcons", item->name, &dbv)) {
TCHAR tszFullPath[MAX_PATH];
PathToAbsoluteT(dbv.ptszVal, tszFullPath);
- int cx = item->cx ? item->cx : GetSystemMetrics(big ? SM_CXICON : SM_CXSMICON);
- int cy = item->cy ? item->cy : GetSystemMetrics(big ? SM_CYICON : SM_CYSMICON);
+ int cx = item->cx ? item->cx : (big ? g_iIconX : g_iIconSX);
+ int cy = item->cy ? item->cy : (big ? g_iIconY : g_iIconSY);
source = GetIconSourceItemFromPath(tszFullPath, cx, cy);
db_free(&dbv);
}
@@ -753,7 +750,7 @@ MIR_APP_DLL(HICON) IcoLib_GetIcon(const char* pszIconName, bool big) // IcoLib_GetIconHandle
// lParam: pszIconName
-MIR_APP_DLL(HANDLE) IcoLib_GetIconHandle(const char* pszIconName)
+MIR_APP_DLL(HANDLE) IcoLib_GetIconHandle(const char *pszIconName)
{
if (!pszIconName)
return NULL;
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp index fc5fa575b5..b8c1af1b1b 100644 --- a/src/mir_app/src/ignore.cpp +++ b/src/mir_app/src/ignore.cpp @@ -187,7 +187,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- HIMAGELIST hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 3 + IGNOREEVENT_MAX, 3 + IGNOREEVENT_MAX);
+ HIMAGELIST hIml = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 3 + IGNOREEVENT_MAX, 3 + IGNOREEVENT_MAX);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_SMALLDOT);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_FILLEDBLOB);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_EMPTYBLOB);
diff --git a/src/mir_app/src/imgconv.cpp b/src/mir_app/src/imgconv.cpp index 75974fc541..bf1486b226 100644 --- a/src/mir_app/src/imgconv.cpp +++ b/src/mir_app/src/imgconv.cpp @@ -103,8 +103,8 @@ void ConvertBufferToPARGB32(HANDLE hPaintBuffer, HDC hdc, HICON hIcon, SIZE& siz HBITMAP ConvertIconToBitmap(HICON hicon, HIMAGELIST hIml, int iconId)
{
SIZE sizIcon;
- sizIcon.cx = GetSystemMetrics(SM_CXSMICON);
- sizIcon.cy = GetSystemMetrics(SM_CYSMICON);
+ sizIcon.cx = g_iIconSX;
+ sizIcon.cy = g_iIconSY;
RECT rcIcon = { 0, 0, sizIcon.cx, sizIcon.cy };
diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index e4e40b2891..0721e6640e 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -114,8 +114,8 @@ INT_PTR Meta_LoadIcon(WPARAM wParam, LPARAM) }
return (INT_PTR)LoadImage(g_hInst, MAKEINTRESOURCE(id), IMAGE_ICON,
- GetSystemMetrics(wParam & PLIF_SMALL ? SM_CXSMICON : SM_CXICON),
- GetSystemMetrics(wParam & PLIF_SMALL ? SM_CYSMICON : SM_CYICON), 0);
+ (wParam & PLIF_SMALL) ? g_iIconX : g_iIconSX,
+ (wParam & PLIF_SMALL) ? g_iIconY : g_iIconSY, 0);
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -651,7 +651,7 @@ int Meta_ModulesLoaded(WPARAM, LPARAM) sid.szModule = META_PROTO;
sid.flags = MBF_TCHAR;
sid.tszTooltip = LPGENT("Select metacontact");
- sid.hIcon = LoadSkinnedProtoIcon(META_PROTO, ID_STATUS_ONLINE);
+ sid.hIcon = Skin_LoadProtoIcon(META_PROTO, ID_STATUS_ONLINE);
Srmm_AddIcon(&sid);
return 0;
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index b23236d6d4..a6a49fd7be 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -3,11 +3,11 @@ EXPORTS CallContactService @1
CallProtoService @2
RecalculateTime @3
-LoadSkinProtoIcon @4
-LoadSkinIcon @5
+Skin_LoadProtoIcon @4
+Skin_LoadIcon @5
Button_FreeIcon_IcoLib @6
Button_SetIcon_IcoLib @7
-GetSkinIconHandle @8
+Skin_GetIconHandle @8
IcoLib_AddIcon @9
IcoLib_GetIcon @10
IcoLib_GetIconByHandle @11
@@ -23,3 +23,4 @@ IcoLib_RemoveIcon @20 IcoLib_RemoveIconByHandle @21
IcoLib_Release @22
IcoLib_AddRef @23
+Skin_GetIconName @24
diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp index 15acd9e720..4bd366be54 100644 --- a/src/mir_app/src/miranda.cpp +++ b/src/mir_app/src/miranda.cpp @@ -54,10 +54,17 @@ HINSTANCE g_hInst; DWORD hMainThreadId;
int hLangpack = 0;
bool bModulesLoadedFired = false;
+int g_iIconX, g_iIconY, g_iIconSX, g_iIconSY;
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID)
{
- g_hInst = hinstDLL;
+ if (dwReason == DLL_PROCESS_ATTACH) {
+ g_hInst = hinstDLL;
+ g_iIconX = g_iIconX;
+ g_iIconY = g_iIconY;
+ g_iIconSX = g_iIconSX;
+ g_iIconSY = g_iIconSY;
+ }
return TRUE;
}
diff --git a/src/mir_app/src/miranda.h b/src/mir_app/src/miranda.h index 8ceb3d308d..eceac3e7c0 100644 --- a/src/mir_app/src/miranda.h +++ b/src/mir_app/src/miranda.h @@ -109,6 +109,8 @@ void KillModuleIcons(int hLangpack); /**** skinicons.cpp ********************************************************************/
+extern int g_iIconX, g_iIconY, g_iIconSX, g_iIconSY;
+
HICON LoadIconEx(HINSTANCE hInstance, LPCTSTR lpIconName, BOOL bShared);
int ImageList_AddIcon_NotShared(HIMAGELIST hIml, LPCTSTR szResource);
int ImageList_ReplaceIcon_NotShared(HIMAGELIST hIml, int iIndex, HINSTANCE hInstance, LPCTSTR szResource);
diff --git a/src/mir_app/src/movetogroup.cpp b/src/mir_app/src/movetogroup.cpp index cfc7bee71e..dabc638ad3 100644 --- a/src/mir_app/src/movetogroup.cpp +++ b/src/mir_app/src/movetogroup.cpp @@ -92,7 +92,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) mi.position = 100000;
mi.pszName = LPGEN("&Move to group");
mi.flags = CMIF_ROOTHANDLE;
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_GROUP);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUP);
hMoveToGroupItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 4bdec9d37f..cce95cfe23 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -1294,7 +1294,7 @@ static INT_PTR AddOptionsPage(WPARAM wParam, LPARAM lParam) static int OptModulesLoaded(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { sizeof(mi) };
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_OPTIONS);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.position = 1900000000;
mi.pszName = LPGEN("&Options...");
mi.pszService = "Options/OptionsCommand";
diff --git a/src/mir_app/src/options_ei.cpp b/src/mir_app/src/options_ei.cpp index 54c2d4fb25..403f76d297 100644 --- a/src/mir_app/src/options_ei.cpp +++ b/src/mir_app/src/options_ei.cpp @@ -258,7 +258,7 @@ public: ShowWindow(label, SW_SHOW);
}
- int cx = GetSystemMetrics(SM_CXSMICON);
+ int cx = g_iIconSX;
HIMAGELIST hImageList = ImageList_Create(cx, cx, ILC_COLOR32 | ILC_MASK, 2, 2);
HICON hBlankIcon = (HICON)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, cx, cx, 0);
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp index 7f7138be2f..e2ffc37f79 100644 --- a/src/mir_app/src/profilemanager.cpp +++ b/src/mir_app/src/profilemanager.cpp @@ -593,8 +593,8 @@ public: virtual void OnInitDialog() { - SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_DETAILSLOGO), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0)); - SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_DETAILSLOGO), IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0)); + SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_DETAILSLOGO), IMAGE_ICON, g_iIconSX, g_iIconSY, 0)); + SendMessage(m_hwnd, WM_SETICON, ICON_BIG, (LPARAM)LoadImage(g_hInst, MAKEINTRESOURCE(IDI_DETAILSLOGO), IMAGE_ICON, g_iIconX, g_iIconY, 0)); if (m_pd->noProfiles || shouldAutoCreate(m_pd->ptszProfile)) m_tab.ActivatePage(1); diff --git a/src/mir_app/src/protocolorder.cpp b/src/mir_app/src/protocolorder.cpp index 3f6af51b04..5f8cc25601 100644 --- a/src/mir_app/src/protocolorder.cpp +++ b/src/mir_app/src/protocolorder.cpp @@ -155,7 +155,7 @@ public: virtual void OnInitDialog()
{
- HIMAGELIST himlCheckBoxes = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 2, 2);
+ HIMAGELIST himlCheckBoxes = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 2, 2);
ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_NOTICK);
ImageList_AddIcon_IconLibLoaded(himlCheckBoxes, SKINICON_OTHER_TICK);
m_order.SetImageList(himlCheckBoxes, TVSIL_NORMAL);
diff --git a/src/mir_app/src/protoopts.cpp b/src/mir_app/src/protoopts.cpp index 8a5d0e7a15..6d042b30cc 100644 --- a/src/mir_app/src/protoopts.cpp +++ b/src/mir_app/src/protoopts.cpp @@ -302,8 +302,8 @@ static LRESULT CALLBACK AccListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA int iItem = LOWORD(SendMessage(hwnd, LB_ITEMFROMPOINT, 0, lParam));
ListBox_GetItemRect(hwnd, iItem, &dat->rcCheck);
- dat->rcCheck.right = dat->rcCheck.left + GetSystemMetrics(SM_CXSMICON) + 4;
- dat->rcCheck.bottom = dat->rcCheck.top + GetSystemMetrics(SM_CYSMICON) + 4;
+ dat->rcCheck.right = dat->rcCheck.left + g_iIconSX + 4;
+ dat->rcCheck.bottom = dat->rcCheck.top + g_iIconSY + 4;
if (PtInRect(&dat->rcCheck, pt))
dat->iItem = iItem;
else
@@ -347,8 +347,8 @@ static LRESULT CALLBACK AccListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA return 0;
ListBox_GetItemRect(hwnd, ListBox_GetCurSel(hwnd), &rc);
- rc.left += 2 * GetSystemMetrics(SM_CXSMICON) + 4;
- rc.bottom = rc.top + max(GetSystemMetrics(SM_CXSMICON), parentDat->titleHeight) + 4 - 1;
+ rc.left += 2 * g_iIconSX + 4;
+ rc.bottom = rc.top + max(g_iIconSX, parentDat->titleHeight) + 4 - 1;
++rc.top; --rc.right;
dat->hwndEdit = CreateWindow(_T("EDIT"), pa->tszAccountName, WS_CHILD | WS_BORDER | ES_AUTOHSCROLL, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hwnd, NULL, g_hInst, NULL);
@@ -518,7 +518,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM SelectObject(hdc, hfnt);
ReleaseDC(hwndDlg, hdc);
- dat->normalHeight = 4 + max(dat->titleHeight, GetSystemMetrics(SM_CYSMICON));
+ dat->normalHeight = 4 + max(dat->titleHeight, g_iIconSY);
dat->selectedHeight = dat->normalHeight + 4 + 2 * dat->textHeight;
}
@@ -559,8 +559,8 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM HBRUSH hbrBack;
SIZE sz;
{
- int cxIcon = GetSystemMetrics(SM_CXSMICON);
- int cyIcon = GetSystemMetrics(SM_CYSMICON);
+ int cxIcon = g_iIconSX;
+ int cyIcon = g_iIconSY;
LPDRAWITEMSTRUCT lps = (LPDRAWITEMSTRUCT)lParam;
PROTOACCOUNT *acc = (PROTOACCOUNT *)lps->itemData;
@@ -590,7 +590,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM else
tmp = acc->bIsEnabled ? SKINICON_OTHER_TICK : SKINICON_OTHER_NOTICK;
- HICON hIcon = LoadSkinnedIcon(tmp);
+ HICON hIcon = Skin_LoadIcon(tmp);
DrawIconEx(lps->hDC, lps->rcItem.left, lps->rcItem.top, hIcon, cxIcon, cyIcon, 0, hbrBack, DI_NORMAL);
IcoLib_ReleaseIcon(hIcon);
@@ -695,8 +695,8 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM if (iItem != LB_ERR) {
RECT rc;
ListBox_GetItemRect(hwndList, iItem, &rc);
- pt.x = rc.left + GetSystemMetrics(SM_CXSMICON) + 4;
- pt.y = rc.top + 4 + max(GetSystemMetrics(SM_CXSMICON), dat->titleHeight);
+ pt.x = rc.left + g_iIconSX + 4;
+ pt.y = rc.top + 4 + max(g_iIconSX, dat->titleHeight);
ClientToScreen(hwndList, &pt);
}
}
@@ -1019,7 +1019,7 @@ static INT_PTR OptProtosShow(WPARAM, LPARAM) int OptProtosLoaded(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { sizeof(mi) };
- mi.icolibItem = GetSkinIconHandle(SKINICON_OTHER_ACCMGR);
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_ACCMGR);
mi.position = 1900000000;
mi.pszName = LPGEN("&Accounts...");
mi.pszService = MS_PROTO_SHOWACCMGR;
diff --git a/src/mir_app/src/searchresults.cpp b/src/mir_app/src/searchresults.cpp index af1bf873b6..8a8ae3ea8f 100644 --- a/src/mir_app/src/searchresults.cpp +++ b/src/mir_app/src/searchresults.cpp @@ -64,7 +64,7 @@ void LoadColumnSizes(HWND hwndResults, const char *szProto) char szSetting[32];
bool colOrdersValid;
- defaultColumnSizes[COLUMNID_PROTO] = GetSystemMetrics(SM_CXSMICON) + 4;
+ defaultColumnSizes[COLUMNID_PROTO] = g_iIconSX + 4;
FindAddDlgData *dat = (FindAddDlgData*)GetWindowLongPtr(GetParent(hwndResults), GWLP_USERDATA);
columnCount = NUM_COLUMNID;
diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp index ace1b18781..7805550d34 100644 --- a/src/mir_app/src/skin2opts.cpp +++ b/src/mir_app/src/skin2opts.cpp @@ -89,7 +89,7 @@ HICON IconItem_GetIcon_Preview(IcolibItem* item) }
if (!hIcon && item->default_file) {
- IconSourceItem_Release(&item->default_icon);
+ IconSourceItem_Release(item->default_icon);
item->default_icon = GetIconSourceItem(item->default_file, item->default_indx, item->cx, item->cy);
if (item->default_icon) {
HICON hRefIcon = IconSourceItem_GetIcon(item->default_icon);
@@ -364,7 +364,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hwndParent = (HWND)lParam;
hPreview = GetDlgItem(hwndDlg, IDC_PREVIEW);
dragging = dragItem = 0;
- ListView_SetImageList(hPreview, ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 100), LVSIL_NORMAL);
+ ListView_SetImageList(hPreview, ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 0, 100), LVSIL_NORMAL);
ListView_SetIconSpacing(hPreview, 56, 67);
{
RECT rcThis, rcParent;
@@ -536,7 +536,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM dragging = 1;
dragItem = ((LPNMLISTVIEW)lParam)->iItem;
dropHiLite = -1;
- ImageList_BeginDrag(ListView_GetImageList(hPreview, LVSIL_NORMAL), dragItem, GetSystemMetrics(SM_CXICON) / 2, GetSystemMetrics(SM_CYICON) / 2);
+ ImageList_BeginDrag(ListView_GetImageList(hPreview, LVSIL_NORMAL), dragItem, g_iIconX / 2, g_iIconY / 2);
{
POINT pt;
RECT rc;
@@ -653,7 +653,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM //
ListView_SetUnicodeFormat(hPreview, TRUE);
ListView_SetExtendedListViewStyleEx(hPreview, LVS_EX_INFOTIP, LVS_EX_INFOTIP);
- ListView_SetImageList(hPreview, ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 30), LVSIL_NORMAL);
+ ListView_SetImageList(hPreview, ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 0, 30), LVSIL_NORMAL);
ListView_SetIconSpacing(hPreview, 56, 67);
SendMessage(hwndDlg, DM_REBUILD_CTREE, 0, 0);
@@ -911,12 +911,12 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (item->temp_reset) {
db_unset(NULL, "SkinIcons", item->name);
if (item->source_small != item->default_icon) {
- IconSourceItem_Release(&item->source_small);
+ IconSourceItem_Release(item->source_small);
}
}
else if (item->temp_file) {
db_set_ts(NULL, "SkinIcons", item->name, item->temp_file);
- IconSourceItem_Release(&item->source_small);
+ IconSourceItem_Release(item->source_small);
SafeDestroyIcon(&item->temp_icon);
}
}
diff --git a/src/mir_app/src/skinicons.cpp b/src/mir_app/src/skinicons.cpp index 63ba1b81d3..410b30a1d9 100644 --- a/src/mir_app/src/skinicons.cpp +++ b/src/mir_app/src/skinicons.cpp @@ -121,7 +121,7 @@ const char protoIconsFmt[] = LPGEN("%s icons"); // load small icon (shared) it's not need to be destroyed
static HICON LoadSmallIconShared(HINSTANCE hInstance, LPCTSTR lpIconName)
{
- int cx = GetSystemMetrics(SM_CXSMICON);
+ int cx = g_iIconSX;
return (HICON)LoadImage(hInstance, lpIconName, IMAGE_ICON, cx, cx, LR_DEFAULTCOLOR | LR_SHARED);
}
@@ -158,7 +158,7 @@ int ImageList_AddIcon_NotShared(HIMAGELIST hIml, LPCTSTR szResource) int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId)
{
- HICON hIcon = LoadSkinIcon(iconId);
+ HICON hIcon = Skin_LoadIcon(iconId);
int res = ImageList_AddIcon(hIml, hIcon);
IcoLib_ReleaseIcon(hIcon);
return res;
@@ -166,7 +166,7 @@ int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId) int ImageList_AddIcon_ProtoIconLibLoaded(HIMAGELIST hIml, const char *szProto, int iconId)
{
- HICON hIcon = LoadSkinProtoIcon(szProto, iconId);
+ HICON hIcon = Skin_LoadProtoIcon(szProto, iconId);
int res = ImageList_AddIcon(hIml, hIcon);
IcoLib_ReleaseIcon(hIcon);
return res;
@@ -189,14 +189,14 @@ int ImageList_ReplaceIcon_IconLibLoaded(HIMAGELIST hIml, int nIndex, HICON hIcon MIR_APP_DLL(void) Window_SetIcon_IcoLib(HWND hWnd, int iconId)
{
- SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinIcon(iconId, true));
- SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinIcon(iconId));
+ SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(iconId, true));
+ SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadIcon(iconId));
}
MIR_APP_DLL(void) Window_SetProtoIcon_IcoLib(HWND hWnd, const char *szProto, int iconId)
{
- SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadSkinProtoIcon(szProto, iconId, true));
- SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinProtoIcon(szProto, iconId));
+ SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadProtoIcon(szProto, iconId, true));
+ SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)Skin_LoadProtoIcon(szProto, iconId));
}
MIR_APP_DLL(void) Window_FreeIcon_IcoLib(HWND hWnd)
@@ -208,7 +208,7 @@ MIR_APP_DLL(void) Window_FreeIcon_IcoLib(HWND hWnd) MIR_APP_DLL(void) Button_SetIcon_IcoLib(HWND hwndDlg, int itemId, int iconId, const char *tooltip)
{
HWND hWnd = GetDlgItem(hwndDlg, itemId);
- SendMessage(hWnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinIcon(iconId));
+ SendMessage(hWnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadIcon(iconId));
SendMessage(hWnd, BUTTONSETASFLATBTN, TRUE, 0);
SendMessage(hWnd, BUTTONADDTOOLTIP, (WPARAM)tooltip, 0);
}
@@ -219,7 +219,7 @@ MIR_APP_DLL(void) Button_FreeIcon_IcoLib(HWND hwndDlg, int itemId) IcoLib_ReleaseIcon(hIcon);
}
-MIR_APP_DLL(HICON) LoadSkinProtoIcon(const char *szProto, int status, bool big)
+MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, bool big)
{
char iconName[MAX_PATH];
INT_PTR caps2;
@@ -336,7 +336,7 @@ MIR_APP_DLL(HICON) LoadSkinProtoIcon(const char *szProto, int status, bool big) return hIcon;
}
-MIR_APP_DLL(HANDLE) GetSkinIconHandle(int idx)
+MIR_APP_DLL(HANDLE) Skin_GetIconHandle(int idx)
{
for (int i = 0; i < SIZEOF(mainIcons); i++)
if (idx == mainIcons[i].id)
@@ -345,7 +345,7 @@ MIR_APP_DLL(HANDLE) GetSkinIconHandle(int idx) return NULL;
}
-char* GetSkinIconName(int idx)
+MIR_APP_DLL(char*) Skin_GetIconName(int idx)
{
static char szIconName[100];
@@ -358,50 +358,24 @@ char* GetSkinIconName(int idx) return NULL;
}
-MIR_APP_DLL(HICON) LoadSkinIcon(int idx, bool big)
+MIR_APP_DLL(HICON) Skin_LoadIcon(int idx, bool big)
{
// Query for global status icons
if (idx < SKINICON_EVENT_MESSAGE) {
if (idx >= SIZEOF(statusIcons))
return NULL;
- return LoadSkinProtoIcon(NULL, statusIcons[idx].id, big);
+ return Skin_LoadProtoIcon(NULL, statusIcons[idx].id, big);
}
- return IcoLib_GetIconByHandle(GetSkinIconHandle(idx), big);
+ return IcoLib_GetIconByHandle(Skin_GetIconHandle(idx), big);
}
/////////////////////////////////////////////////////////////////////////////////////////
// Initializes the icon skin module
-static INT_PTR sttLoadSkinIcon(WPARAM wParam, LPARAM lParam)
-{
- switch (lParam) {
- case 0: return (INT_PTR)LoadSkinIcon(wParam);
- case 1: return (INT_PTR)GetSkinIconHandle(wParam);
- case 2: return (INT_PTR)LoadSkinIcon(wParam, true);
- case 3: return (INT_PTR)GetSkinIconName(wParam);
- }
-
- return 0;
-}
-
-static INT_PTR sttLoadSkinProtoIcon(WPARAM wParam, LPARAM lParam)
-{
- return (INT_PTR)LoadSkinProtoIcon((char*)wParam, (int)lParam, false);
-}
-
-static INT_PTR sttLoadSkinProtoIconBig(WPARAM wParam, LPARAM lParam)
-{
- return (INT_PTR)LoadSkinProtoIcon((char*)wParam, (int)lParam, true);
-}
-
int LoadSkinIcons(void)
{
- CreateServiceFunction(MS_SKIN_LOADICON, sttLoadSkinIcon);
- CreateServiceFunction(MS_SKIN_LOADPROTOICON, sttLoadSkinProtoIcon);
- CreateServiceFunction(MS_SKIN_LOADPROTOICONBIG, sttLoadSkinProtoIconBig);
-
TCHAR modulePath[MAX_PATH];
GetModuleFileName(g_hInst, modulePath, SIZEOF(modulePath));
diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp index 5c5f85f84e..447bac6beb 100644 --- a/src/mir_app/src/visibility.cpp +++ b/src/mir_app/src/visibility.cpp @@ -138,7 +138,7 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- hIml = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 3, 3);
+ hIml = ImageList_Create(g_iIconSX, g_iIconSY, ILC_COLOR32 | ILC_MASK, 3, 3);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_SMALLDOT);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_VISIBLE_ALL);
ImageList_AddIcon_IconLibLoaded(hIml, SKINICON_OTHER_INVISIBLE_ALL);
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);
}
|