diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-22 20:43:19 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-22 20:43:19 +0000 |
commit | 3b664c75939fc44fdb905c1df69a6e5c57a5c0ce (patch) | |
tree | 4c27cf606a81e0bb5aaefb7a69b08f4bbe4aa998 /plugins/UserInfoEx/src/dlg_propsheet.cpp | |
parent | b02e4589fbe33a2f623f044c2056a831f47bbe37 (diff) |
fix for getting icons from icolib;
git-svn-id: http://svn.miranda-ng.org/main/trunk@7345 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/dlg_propsheet.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/dlg_propsheet.cpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 79fb013ac6..5b42e8fccc 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -79,21 +79,18 @@ _ignore(10, (LIST<TCHAR>::FTSortFunc)_tcscmp) CPsHdr::~CPsHdr()
{
- int i;
-
// delete data
- for (i = 0 ; i < _ignore.getCount(); i++)
- {
- if (_ignore[i]) mir_free(_ignore[i]);
- }
+ for (int i = 0 ; i < _ignore.getCount(); i++)
+ mir_free(_ignore[i]);
+
// delete the list
_ignore.destroy();
}
void CPsHdr::Free_pPages()
{
- for ( int i = 0 ; i < _numPages; i++)
- if (_pPages[i]) delete _pPages[i];
+ for (int i = 0; i < _numPages; i++)
+ delete _pPages[i];
_numPages = 0;
MIR_FREE(_pPages);
}
@@ -131,10 +128,9 @@ private: // check if icq is online
if (!IsProtoOnline((*_pPd)->szModuleName)) {
- TCHAR szMsg[MAX_PATH];
- LPTSTR ptszProto;
+ LPTSTR ptszProto = mir_a2t((*_pPd)->szModuleName);
- ptszProto = mir_a2t((*_pPd)->szModuleName);
+ TCHAR szMsg[MAX_PATH];
mir_sntprintf(szMsg, SIZEOF(szMsg), TranslateT("Protocol '%s' is offline"), ptszProto);
mir_free(ptszProto);
@@ -289,11 +285,10 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) return 1;
}
- hDefIcon = IcoLib_GetIcon(ICO_TREE_DEFAULT);
+ hDefIcon = Skin_GetIcon(ICO_TREE_DEFAULT);
if (!hDefIcon)
- {
hDefIcon = (HICON) LoadImage(ghInst, MAKEINTRESOURCE(IDI_DEFAULT), IMAGE_ICON, metrics.x, metrics.y, 0);
- }
+
// add the default icon to imagelist
ImageList_AddIcon(psh._hImages, hDefIcon);
@@ -576,11 +571,10 @@ void DlgContactInfoInitTreeIcons() metrics.x = GetSystemMetrics(SM_CXSMICON);
metrics.y = GetSystemMetrics(SM_CYSMICON);
if (psh._hImages = ImageList_Create(metrics.x, metrics.y, ILC_COLOR32 | ILC_MASK, 0, 1)) {
- HICON hDefIcon = IcoLib_GetIcon(ICO_TREE_DEFAULT);
+ HICON hDefIcon = Skin_GetIcon(ICO_TREE_DEFAULT);
if (!hDefIcon)
- {
hDefIcon = (HICON) LoadImage(ghInst, MAKEINTRESOURCE(IDI_DEFAULT), IMAGE_ICON, metrics.x, metrics.y, 0);
- }
+
// add the default icon to imagelist
ImageList_AddIcon(psh._hImages, hDefIcon);
}
@@ -756,7 +750,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar //
// set icons
//
- SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)IcoLib_GetIcon(ICO_COMMON_MAIN));
+ SendMessage(hDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICO_COMMON_MAIN, TRUE));
DlgProc(hDlg, HM_RELOADICONS, NULL, NULL);
//
@@ -1237,12 +1231,12 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar IcoLib_SetCtrlIcons(hDlg, idIcon, numIconsToSet);
if (hCtrl = GetDlgItem(hDlg, BTN_IMPORT)) {
- hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
+ hIcon = Skin_GetIcon(ICO_BTN_IMPORT);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
SetWindowText(hCtrl, hIcon ? _T("") : _T("I"));
}
if (hCtrl = GetDlgItem(hDlg, BTN_EXPORT)) {
- hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
+ hIcon = Skin_GetIcon(ICO_BTN_EXPORT);
SendMessage(hCtrl, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon);
SetWindowText(hCtrl, hIcon ? _T("") : _T("E"));
}
|