From 02ed4455c23e3562d71bfc80a0e2c4fede8708f1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 14 Jun 2015 13:17:26 +0000 Subject: - all icolib services removed; - IcoLib_* functions are bound directly to the code git-svn-id: http://svn.miranda-ng.org/main/trunk@14161 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/theme.cpp | 18 ++++++------------ protocols/AimOscar/src/theme.h | 10 +++++----- protocols/AimOscar/src/ui.cpp | 18 +++++++++--------- 3 files changed, 20 insertions(+), 26 deletions(-) (limited to 'protocols/AimOscar/src') diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index b9449f78fb..6d99b8d563 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -60,14 +60,14 @@ void InitIcons(void) Icon_Register(hInstance, "Protocols/AIM/"LPGEN("Profile Editor"), iconList+14, 14, "AIM"); } -HICON LoadIconEx(const char* name, bool big) +HICON LoadIconEx(const char *name, bool big) { char szSettingName[100]; mir_snprintf(szSettingName, SIZEOF(szSettingName), "AIM_%s", name); - return Skin_GetIcon(szSettingName, big); + return IcoLib_GetIcon(szSettingName, big); } -HANDLE GetIconHandle(const char* name) +HANDLE GetIconHandle(const char *name) { for (int i=0; i < SIZEOF(iconList); i++) if ( !mir_strcmp(iconList[i].szName, name)) @@ -76,25 +76,19 @@ HANDLE GetIconHandle(const char* name) return NULL; } -void ReleaseIconEx(const char* name, bool big) +void ReleaseIconEx(const char *name, bool big) { char szSettingName[100]; mir_snprintf(szSettingName, SIZEOF(szSettingName ), "%s_%s", "AIM", name); - Skin_ReleaseIcon(szSettingName, big); + IcoLib_Release(szSettingName, big); } -void WindowSetIcon(HWND hWnd, const char* name) +void Window_SetIcon(HWND hWnd, const char* name) { SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)LoadIconEx( name, true )); SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIconEx( name )); } -void WindowFreeIcon(HWND hWnd) -{ - Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_BIG, 0)); - Skin_ReleaseIcon((HICON)SendMessage(hWnd, WM_SETICON, ICON_SMALL, 0)); -} - ///////////////////////////////////////////////////////////////////////////////////////// // Extra Icons diff --git a/protocols/AimOscar/src/theme.h b/protocols/AimOscar/src/theme.h index e2e6531174..70baf03d61 100644 --- a/protocols/AimOscar/src/theme.h +++ b/protocols/AimOscar/src/theme.h @@ -22,11 +22,11 @@ along with this program. If not, see . void InitIcons(void); void InitExtraIcons(void); -HICON LoadIconEx(const char* name, bool big = false); -HANDLE GetIconHandle(const char* name); -void ReleaseIconEx(const char* name, bool big = false); -void WindowSetIcon(HWND hWnd, const char* name); -void WindowFreeIcon(HWND hWnd); +HICON LoadIconEx(const char *name, bool big = false); +HANDLE GetIconHandle(const char *name); +void ReleaseIconEx(const char *name, bool big = false); + +void Window_SetIcon(HWND hWnd, const char *name); void add_AT_icons(CAimProto* ppro); void remove_AT_icons(CAimProto* ppro); diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index 597501892f..4904e134eb 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -1131,7 +1131,7 @@ INT_PTR CAimProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam) INT_PTR CALLBACK instant_idle_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - CAimProto* ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CAimProto *ppro = (CAimProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (msg) { case WM_INITDIALOG: @@ -1140,7 +1140,7 @@ INT_PTR CALLBACK instant_idle_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); ppro = (CAimProto*)lParam; { - WindowSetIcon(hwndDlg, "idle"); + Window_SetIcon(hwndDlg, "idle"); unsigned long it = ppro->getDword(AIM_KEY_IIT, 0); unsigned long hours = it / 60; unsigned long minutes = it % 60; @@ -1154,7 +1154,7 @@ INT_PTR CALLBACK instant_idle_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR break; case WM_DESTROY: - WindowFreeIcon(hwndDlg); + Window_FreeIcon_IcoLib(hwndDlg); break; case WM_COMMAND: @@ -1201,7 +1201,7 @@ INT_PTR CALLBACK join_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); ppro = (CAimProto*)lParam; - WindowSetIcon(hwndDlg, "aol"); + Window_SetIcon(hwndDlg, "aol"); break; case WM_CLOSE: @@ -1209,7 +1209,7 @@ INT_PTR CALLBACK join_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break; case WM_DESTROY: - WindowFreeIcon(hwndDlg); + Window_FreeIcon_IcoLib(hwndDlg); break; case WM_COMMAND: @@ -1310,7 +1310,7 @@ INT_PTR CALLBACK invite_to_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); param = (invite_chat_param*)lParam; - WindowSetIcon(hwndDlg, "aol"); + Window_SetIcon(hwndDlg, "aol"); SetDlgItemTextA(hwndDlg, IDC_ROOMNAME, param->id); SetDlgItemTextA(hwndDlg, IDC_MSG, Translate("Join me in this buddy chat!")); break; @@ -1320,7 +1320,7 @@ INT_PTR CALLBACK invite_to_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP break; case WM_NCDESTROY: - WindowFreeIcon(hwndDlg); + Window_FreeIcon_IcoLib(hwndDlg); delete param; break; @@ -1399,7 +1399,7 @@ INT_PTR CALLBACK chat_request_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); param = (invite_chat_req_param*)lParam; - WindowSetIcon(hwndDlg, "aol"); + Window_SetIcon(hwndDlg, "aol"); SetDlgItemTextA(hwndDlg, IDC_ROOMNAME, strrchr(param->cnp->id, '-') + 1); SetDlgItemTextA(hwndDlg, IDC_SCREENNAME, param->name); @@ -1411,7 +1411,7 @@ INT_PTR CALLBACK chat_request_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR break; case WM_DESTROY: - WindowFreeIcon(hwndDlg); + Window_FreeIcon_IcoLib(hwndDlg); delete param; break; -- cgit v1.2.3