diff options
author | George Hazan <george.hazan@gmail.com> | 2016-06-05 16:11:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-06-05 16:11:08 +0000 |
commit | eec361608fde60d63fe4511e26e3b95c7f72be13 (patch) | |
tree | 0263d1829438c7778a713ee2ae6bbda27c0d260a /protocols/Yahoo | |
parent | 7e822f45eccd034e7acd8d868ce5dc8c55458ff0 (diff) |
- fix for #1059;
- direct unsafe work with icons replaces with Window_SetIcon_IcoLib / Window_SetSkinIcon_IcoLib;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16917 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo')
-rw-r--r-- | protocols/Yahoo/src/chat.cpp | 12 | ||||
-rw-r--r-- | protocols/Yahoo/src/services.cpp | 9 | ||||
-rw-r--r-- | protocols/Yahoo/src/stdafx.h | 1 | ||||
-rw-r--r-- | protocols/Yahoo/src/user_info.cpp | 4 |
4 files changed, 7 insertions, 19 deletions
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index f80fa58e97..6071675b01 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -423,8 +423,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
param = (InviteChatParam*)lParam;
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)param->ppro->LoadIconEx("yahoo", true));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)param->ppro->LoadIconEx("yahoo"));
+ Window_SetIcon_IcoLib(hwndDlg, param->ppro->GetIconHandle(IDI_YAHOO));
SetDlgItemTextA(hwndDlg, IDC_ROOMNAME, param->room);
SetDlgItemText(hwndDlg, IDC_MSG, TranslateT("Join My Conference..."));
@@ -435,8 +434,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR break;
case WM_NCDESTROY:
- param->ppro->ReleaseIconEx("yahoo", true);
- param->ppro->ReleaseIconEx("yahoo");
+ Window_FreeIcon_IcoLib(hwndDlg);
delete param;
break;
@@ -516,8 +514,7 @@ INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
param = (InviteChatReqParam*)lParam;
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)param->ppro->LoadIconEx("yahoo", true));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)param->ppro->LoadIconEx("yahoo"));
+ Window_SetIcon_IcoLib(hwndDlg, param->ppro->GetIconHandle(IDI_YAHOO));
SetDlgItemTextA(hwndDlg, IDC_SCREENNAME, param->who);
SetDlgItemText(hwndDlg, IDC_MSG, param->msg);
@@ -529,8 +526,7 @@ INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA break;
case WM_NCDESTROY:
- param->ppro->ReleaseIconEx("yahoo", true);
- param->ppro->ReleaseIconEx("yahoo");
+ Window_FreeIcon_IcoLib(hwndDlg);
delete param;
break;
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index 7e25b7c459..9e4635ab47 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -120,8 +120,7 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam CYahooProto* ppro = (CYahooProto*)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->LoadIconEx("yahoo", true));
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->LoadIconEx("yahoo"));
+ Window_SetIcon_IcoLib(hwndDlg, ppro->GetIconHandle(IDI_YAHOO));
if (!ppro->getString(YAHOO_CUSTSTATDB, &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, dbv.pszVal);
@@ -185,11 +184,7 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam break;
case WM_DESTROY:
- {
- CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- ppro->ReleaseIconEx("yahoo", true);
- ppro->ReleaseIconEx("yahoo");
- }
+ Window_FreeIcon_IcoLib(hwndDlg);
break;
}
return FALSE;
diff --git a/protocols/Yahoo/src/stdafx.h b/protocols/Yahoo/src/stdafx.h index 1a15b46d58..cd3dc79f7d 100644 --- a/protocols/Yahoo/src/stdafx.h +++ b/protocols/Yahoo/src/stdafx.h @@ -39,6 +39,7 @@ #include <m_database.h>
#include <m_netlib.h>
#include <m_idle.h>
+#include <m_icolib.h>
#include <m_clist.h>
#include <m_protosvc.h>
#include <m_protoint.h>
diff --git a/protocols/Yahoo/src/user_info.cpp b/protocols/Yahoo/src/user_info.cpp index a6a8c89f1a..016053a9ad 100644 --- a/protocols/Yahoo/src/user_info.cpp +++ b/protocols/Yahoo/src/user_info.cpp @@ -27,10 +27,6 @@ static INT_PTR CALLBACK YahooUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPA case WM_INITDIALOG:
// lParam is hContact
TranslateDialogDefault(hwndDlg);
-
- //SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_LoadIcon(SKINICON_OTHER_USERDETAILS));
-
-
break;
case WM_NOTIFY:
|