diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/YAMN | |
parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (diff) |
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN')
-rw-r--r-- | plugins/YAMN/src/browser/badconnect.cpp | 4 | ||||
-rw-r--r-- | plugins/YAMN/src/browser/mailbrowser.cpp | 43 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3comm.cpp | 4 | ||||
-rw-r--r-- | plugins/YAMN/src/services.cpp | 14 |
4 files changed, 32 insertions, 33 deletions
diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index 7662e0bfd3..06e080d274 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -117,7 +117,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg,UINT msg,WPARAM wParam,LPARA #ifdef DEBUG_SYNCHRO
DebugLog(SynchroFile,"BadConnect:ActualAccountSO-read enter\n");
#endif
- int size = strlen(ActualAccount->Name)+strlen(Translate(BADCONNECTTITLE));
+ int size = (int)(strlen(ActualAccount->Name)+strlen(Translate(BADCONNECTTITLE)));
TitleStrA = new char[size];
mir_snprintf(TitleStrA, size, Translate(BADCONNECTTITLE), ActualAccount->Name);
@@ -127,7 +127,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg,UINT msg,WPARAM wParam,LPARA if (ShowPopup)
{
- BadConnectPopup.lchContact=ActualAccount;
+ BadConnectPopup.lchContact=(HCONTACT)ActualAccount;
BadConnectPopup.lchIcon=g_LoadIconEx(3);
BadConnectPopup.colorBack=ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupB : GetSysColor(COLOR_BTNFACE);
BadConnectPopup.colorText=ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index bc306c1a4b..83bc7a02e3 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -510,7 +510,7 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb lfoundi=0;
}
- NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : ActualAccount;
+ NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (HCONTACT)ActualAccount;
NewMailPopup.lchIcon=g_LoadIconEx(2);
NewMailPopup.colorBack=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupB : GetSysColor(COLOR_BTNFACE);
NewMailPopup.colorText=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
@@ -681,7 +681,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR {
POPUPDATAT NewMailPopup ={0};
- NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : ActualAccount;
+ NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (HCONTACT)ActualAccount;
NewMailPopup.lchIcon=g_LoadIconEx(2);
NewMailPopup.colorBack=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupB : GetSysColor(COLOR_BTNFACE);
NewMailPopup.colorText=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
@@ -784,7 +784,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR {
POPUPDATAT NoNewMailPopup;
- NoNewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : ActualAccount;
+ NoNewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (HCONTACT)ActualAccount;
NoNewMailPopup.lchIcon=g_LoadIconEx(1);
NoNewMailPopup.colorBack=ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC ? ActualAccount->NoNewMailN.PopupB : GetSysColor(COLOR_BTNFACE);
NoNewMailPopup.colorText=ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC ? ActualAccount->NoNewMailN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
@@ -830,7 +830,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam //if clicked and it's new mail popup window
if ((HIWORD(wParam)==STN_CLICKED) && (-1 != (PluginParam=CallService(MS_POPUP_GETPLUGINDATA,(WPARAM)hWnd,(LPARAM)&PluginParam))))
{
- HANDLE hContact = 0;
+ HCONTACT hContact = 0;
HACCOUNT Account;
if (PluginParam) {
PYAMN_MAILSHOWPARAM MailParam = new YAMN_MAILSHOWPARAM;
@@ -849,15 +849,15 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam } else {
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((HCONTACT)hContact,YAMN_DBMODULE,"Id",&dbv))
{
Account=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
}
else
- Account = (HACCOUNT) hContact; //????
+ Account = (HACCOUNT)hContact; //????
#ifdef DEBUG_SYNCHRO
@@ -900,7 +900,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam break;
case UM_FREEPLUGINDATA:{
PYAMN_MAILSHOWPARAM mpd = (PYAMN_MAILSHOWPARAM)PUGetPluginData(hWnd);
- HANDLE hContact = 0;
+ HCONTACT hContact = 0;
if ((mpd) && (INT_PTR)mpd != -1)free(mpd);
return FALSE;
}
@@ -914,12 +914,12 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam case WM_YAMN_STOPACCOUNT:
{
HACCOUNT ActualAccount;
- HANDLE hContact;
+ HCONTACT hContact;
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((HCONTACT) hContact,YAMN_DBMODULE,"Id",&dbv))
{
ActualAccount=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
@@ -947,12 +947,12 @@ LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPar if ((HIWORD(wParam)==STN_CLICKED) && (msg==WM_COMMAND))
{
HACCOUNT ActualAccount;
- HANDLE hContact;
+ HCONTACT hContact;
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((HCONTACT)hContact,YAMN_DBMODULE,"Id",&dbv))
{
ActualAccount=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
@@ -1014,12 +1014,12 @@ LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPar case WM_YAMN_STOPACCOUNT:
{
HACCOUNT ActualAccount;
- HANDLE hContact;
+ HCONTACT hContact;
DBVARIANT dbv;
- hContact=(HANDLE)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HANDLE) hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((HCONTACT) hContact,YAMN_DBMODULE,"Id",&dbv))
{
ActualAccount=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
@@ -1465,12 +1465,11 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM if (MailParam->mail->Flags & YAMN_MSG_UNSEEN) {
MailParam->mail->Flags&=~YAMN_MSG_UNSEEN; //mark the message as seen
HWND hMailBrowser;
- if (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd,MailParam->account)) {
+ if (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd, (HCONTACT)MailParam->account)) {
struct CChangeContent Params={MailParam->account->NewMailN.Flags|YAMN_ACC_MSGP,MailParam->account->NoNewMailN.Flags|YAMN_ACC_MSGP};
SendMessageW(hMailBrowser,WM_YAMN_CHANGECONTENT,(WPARAM)MailParam->account,(LPARAM)&Params);
- } else {
- UpdateMails(NULL,MailParam->account,MailParam->account->NewMailN.Flags,MailParam->account->NoNewMailN.Flags);
}
+ else UpdateMails(NULL,MailParam->account,MailParam->account->NewMailN.Flags,MailParam->account->NoNewMailN.Flags);
}
}
ShowWindow(GetDlgItem(hDlg, IDC_SPLITTER),(MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED)?SW_SHOW:SW_HIDE);
@@ -1737,7 +1736,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM ReadDoneFcn(ActualAccount->AccountAccessSO);
WindowList_Add(YAMNVar.MessageWnds,hDlg,NULL);
- WindowList_Add(YAMNVar.NewMailAccountWnd,hDlg,ActualAccount);
+ WindowList_Add(YAMNVar.NewMailAccountWnd,hDlg, (HCONTACT)ActualAccount);
{
TCHAR accstatus[512];
@@ -2510,7 +2509,7 @@ DWORD WINAPI MailBrowser(LPVOID Param) #endif
ReadDoneFcn(ActualAccount->AccountAccessSO);
- if (NULL != (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd,ActualAccount)))
+ if (NULL != (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd, (HCONTACT)ActualAccount)))
WndFound=TRUE;
if ((hMailBrowser==NULL) && ((MyParam.nflags & YAMN_ACC_MSG) || (MyParam.nflags & YAMN_ACC_ICO) || (MyParam.nnflags & YAMN_ACC_MSG)))
{
diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp index 16bbafd65a..ebd9c90d2c 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp @@ -276,7 +276,7 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) for (Finder=POP3Plugin->FirstAccount;Finder != NULL;Finder=Finder->Next) {
Finder->hContact = NULL;
- for (HANDLE hContact = db_find_first(YAMN_DBMODULE); hContact; hContact = db_find_next(hContact, YAMN_DBMODULE)) {
+ for (HCONTACT hContact = db_find_first(YAMN_DBMODULE); hContact; hContact = db_find_next(hContact, YAMN_DBMODULE)) {
if (!db_get_s(hContact,YAMN_DBMODULE,"Id",&dbv)) {
if ( strcmp( dbv.pszVal, Finder->Name) == 0) {
Finder->hContact = hContact;
@@ -294,7 +294,7 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) if (Finder->hContact == NULL && (Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) {
//No account contact found, have to create one
- Finder->hContact =(HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ Finder->hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)Finder->hContact,(LPARAM)YAMN_DBMODULE);
db_set_s(Finder->hContact,YAMN_DBMODULE,"Id",Finder->Name);
db_set_s(Finder->hContact,YAMN_DBMODULE,"Nick",Finder->Name);
diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index 21d565ba4d..40484f73e0 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -65,12 +65,12 @@ static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam) static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HANDLE)wParam);
+ char *szProto = GetContactProto((HCONTACT)wParam);
if ( lstrcmpA(szProto, YAMN_DBMODULE))
return 0;
DBVARIANT dbv;
- if ( db_get((HANDLE) wParam, YAMN_DBMODULE, "Id", &dbv))
+ if ( db_get((HCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv))
return 0;
HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal);
@@ -168,12 +168,12 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam) static INT_PTR ContactMailCheck(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HANDLE)wParam);
+ char *szProto = GetContactProto((HCONTACT)wParam);
if ( lstrcmpA(szProto, YAMN_DBMODULE))
return 0;
DBVARIANT dbv;
- if ( db_get((HANDLE) wParam, YAMN_DBMODULE, "Id", &dbv))
+ if ( db_get((HCONTACT) wParam, YAMN_DBMODULE, "Id", &dbv))
return 0;
HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal);
@@ -227,12 +227,12 @@ void MainMenuAccountClicked(WPARAM wParam, LPARAM lParam) /*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HANDLE)wParam);
+ char *szProto = GetContactProto((HCONTACT)wParam);
if ( lstrcmpA(szProto, YAMN_DBMODULE))
return;
DBVARIANT dbv;
- if ( db_get(( HANDLE )wParam, YAMN_DBMODULE, "Id", &dbv))
+ if ( db_get((HCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv))
return;
HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal);
@@ -483,7 +483,7 @@ void RefreshContact(void) db_set_b(Finder->hContact, "CList", "Hidden", 1);
}
else if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) {
- Finder->hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ Finder->hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)Finder->hContact, (LPARAM)YAMN_DBMODULE);
db_set_s(Finder->hContact, YAMN_DBMODULE, "Id", Finder->Name);
db_set_s(Finder->hContact, YAMN_DBMODULE, "Nick", Finder->Name);
|