summaryrefslogtreecommitdiff
path: root/plugins/WebView/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
commit68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch)
treefcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/WebView/src
parent7193759b046338c6f47ff2edb34743a1465791cd (diff)
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WebView/src')
-rw-r--r--plugins/WebView/src/main.cpp2
-rw-r--r--plugins/WebView/src/webview.cpp24
-rw-r--r--plugins/WebView/src/webview.h10
-rw-r--r--plugins/WebView/src/webview_alerts.cpp42
-rw-r--r--plugins/WebView/src/webview_datawnd.cpp12
-rw-r--r--plugins/WebView/src/webview_getdata.cpp2
-rw-r--r--plugins/WebView/src/webview_opts.cpp20
-rw-r--r--plugins/WebView/src/webview_services.cpp26
8 files changed, 69 insertions, 69 deletions
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index 1432bb4c4e..0778402772 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -96,7 +96,7 @@ void ChangeContactStatus(int con_stat)
if (con_stat == 3)
status_code = ID_STATUS_NA;
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
db_set_w(hContact, MODULENAME, "Status", status_code);
}
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp
index a176e7b81a..46d70533f1 100644
--- a/plugins/WebView/src/webview.cpp
+++ b/plugins/WebView/src/webview.cpp
@@ -104,7 +104,7 @@ void FillFontListThread(void *param)
/*****************************************************************************/
void TxtclrLoop()
{
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
InvalidateRect(hwndDlg, NULL, 1);
@@ -114,7 +114,7 @@ void TxtclrLoop()
/*****************************************************************************/
void BGclrLoop()
{
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = (WindowList_Find(hWindowList, hContact));
SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
SendMessage(GetDlgItem(hwndDlg, IDC_DATA), EM_SETBKGNDCOLOR, 0, BackgoundClr);
@@ -128,7 +128,7 @@ void StartUpdate(void *dummy)
StartUpDelay = 1;
Sleep(((db_get_dw(NULL, MODULENAME, START_DELAY_KEY, 0)) * SECOND));
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
GetData((void*)hContact);
StartUpDelay = 0;
@@ -138,7 +138,7 @@ void StartUpdate(void *dummy)
void ContactLoop(void *dummy)
{
if (StartUpDelay == 0) {
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
GetData((void*)hContact);
Sleep(10); // avoid 100% CPU
}
@@ -176,7 +176,7 @@ void InitialiseGlobals(void)
/*****************************************************************************/
int Doubleclick(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *szProto = GetContactProto(hContact);
if ( lstrcmpA(MODULENAME, szProto))
return 0;
@@ -371,7 +371,7 @@ int ModulesLoaded(WPARAM, LPARAM)
/*****************************************************************************/
INT_PTR DataWndMenuCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
if (hwndDlg != NULL) {
DestroyWindow(hwndDlg);
@@ -432,7 +432,7 @@ INT_PTR AddContactMenuCommand(WPARAM, LPARAM)
}
/*****************************************************************************/
-int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact)
+int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact)
{
int ontop = 0;
int done = 0;
@@ -455,7 +455,7 @@ int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact)
/*****************************************************************************/
INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT url( db_get_tsa(hContact, MODULENAME, "URL"));
if (url)
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
@@ -465,7 +465,7 @@ INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM lParam)
}
/*****************************************************************************/
-int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact)
+int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact)
{
mir_forkthread(GetData, (void*)singlecontact);
return 0;
@@ -474,14 +474,14 @@ int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact)
/*****************************************************************************/
int ContactMenuItemUpdateData(WPARAM wParam, LPARAM lParam)
{
- UpdateMenuCommand(wParam, lParam, (HCONTACT)wParam);
+ UpdateMenuCommand(wParam, lParam, (MCONTACT)wParam);
return 0;
}
/*****************************************************************************/
INT_PTR CntOptionsMenuCommand(WPARAM wParam, LPARAM)
{
- HWND hwndDlg = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwndDlg = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwndDlg) {
DestroyWindow(hwndDlg);
return 0;
@@ -496,7 +496,7 @@ INT_PTR CntOptionsMenuCommand(WPARAM wParam, LPARAM)
/*****************************************************************************/
INT_PTR CntAlertMenuCommand(WPARAM wParam, LPARAM)
{
- HWND hwndDlg = WindowList_Find(hWindowList, (HCONTACT) wParam);
+ HWND hwndDlg = WindowList_Find(hWindowList, (MCONTACT) wParam);
if (hwndDlg) {
DestroyWindow(hwndDlg);
return 0;
diff --git a/plugins/WebView/src/webview.h b/plugins/WebView/src/webview.h
index 73c410bf7d..8884763804 100644
--- a/plugins/WebView/src/webview.h
+++ b/plugins/WebView/src/webview.h
@@ -190,8 +190,8 @@ INT_PTR ShowHideContactCommand(WPARAM wParam, LPARAM lParam);
INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam);
INT_PTR StpPrcssMenuCommand(WPARAM wParam, LPARAM lParam);
-int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact);
-int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact);
+int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact);
+int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact);
//
void ChangeContactStatus(int con_stat);
@@ -206,7 +206,7 @@ void RemoveTabs(char *truncated);
void FastTagFilter(char *truncated);
void EraseBlock(char *truncated);
void EraseSymbols(char *truncated);
-int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent);
+int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent);
INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -223,8 +223,8 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
void AckFunc(void *dummy);
int SiteDeleted(WPARAM wParam, LPARAM lParam);
-int WErrorPopup(HCONTACT hContact, TCHAR *textdisplay);
-int WAlertPopup(HCONTACT hContact, TCHAR *displaytext);
+int WErrorPopup(MCONTACT hContact, TCHAR *textdisplay);
+int WAlertPopup(MCONTACT hContact, TCHAR *displaytext);
//////////////////////
// wrappers
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp
index 5a3bca1cb4..946856a3ab 100644
--- a/plugins/WebView/src/webview_alerts.cpp
+++ b/plugins/WebView/src/webview_alerts.cpp
@@ -29,7 +29,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
switch (message) {
case WM_COMMAND:
case WM_CONTEXTMENU:
- HCONTACT hContact = PUGetContact(hWnd);
+ MCONTACT hContact = PUGetContact(hWnd);
ptrT url( db_get_tsa(hContact, MODULENAME, URL_KEY));
if (message == WM_COMMAND) { // left click
@@ -44,7 +44,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if ( db_get_b(NULL, MODULENAME, LCLK_WEB_PGE_KEY, 0)) {
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
PUDeletePopup(hWnd);
- db_set_w((HCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
+ db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
}
// dismiss
if ( db_get_b(NULL, MODULENAME, LCLK_DISMISS_KEY, 1))
@@ -65,7 +65,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if ( db_get_b(NULL, MODULENAME, RCLK_WEB_PGE_KEY, 1)) {
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
PUDeletePopup(hWnd);
- db_set_w((HCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
+ db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
}
// dismiss
if ( db_get_b(NULL, MODULENAME, RCLK_DISMISS_KEY, 0))
@@ -81,28 +81,28 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
}
/*****************************************************************************/
-int WDisplayDataAlert(HCONTACT hContact)
+int WDisplayDataAlert(MCONTACT hContact)
{
NotifyEventHooks(hHookDisplayDataAlert, (WPARAM)hContact, 0);
return 0;
}
/*****************************************************************************/
-int WAlertPopup(HCONTACT hContact, TCHAR *displaytext)
+int WAlertPopup(MCONTACT hContact, TCHAR *displaytext)
{
NotifyEventHooks(hHookAlertPopup, (WPARAM)hContact, (LPARAM)displaytext);
return 0;
}
/*****************************************************************************/
-int WErrorPopup(HCONTACT hContact, TCHAR *textdisplay)
+int WErrorPopup(MCONTACT hContact, TCHAR *textdisplay)
{
NotifyEventHooks(hHookErrorPopup, (WPARAM)hContact, (LPARAM) textdisplay);
return 0;
}
/*****************************************************************************/
-int WAlertOSD(HCONTACT hContact, TCHAR *displaytext)
+int WAlertOSD(MCONTACT hContact, TCHAR *displaytext)
{
NotifyEventHooks(hHookAlertOSD, (WPARAM)hContact, (LPARAM) displaytext);
return 0;
@@ -115,13 +115,13 @@ int WPopupAlert(WPARAM wParam, LPARAM lParam)
if( ((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- db_get_ts((HCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
+ db_get_ts((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
lstrcpyn(ppd.lptzContactName, dbv.ptszVal, SIZEOF(ppd.lptzContactName));
db_free(&dbv);
}
else lstrcpy(ppd.lptzContactName, _A2T(MODULENAME));
- ppd.lchContact = (HCONTACT)wParam;
+ ppd.lchContact = (MCONTACT)wParam;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
TCHAR *displaytext = (TCHAR*)lParam;
@@ -158,7 +158,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam)
POPUPDATA ppd = { 0 };
if (((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- if ( !db_get_s((HCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if ( !db_get_s((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
lstrcpynA(ppd.lptzContactName, dbv.pszVal, SIZEOF(ppd.lptzContactName));
db_free(&dbv);
}
@@ -166,7 +166,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam)
if (ppd.lptzContactName[0] == 0)
strncpy_s(ppd.lptzContactName, SIZEOF(ppd.lptzContactName), MODULENAME, _TRUNCATE);
- ppd.lchContact = (HCONTACT)wParam;
+ ppd.lchContact = (MCONTACT)wParam;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
char *displaytext = (char*)lParam;
@@ -205,7 +205,7 @@ int OSDAlert(WPARAM wParam, LPARAM lParam)
if (((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- if ( !db_get_s((HCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if ( !db_get_s((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
strncpy_s(contactname, SIZEOF(contactname), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -225,7 +225,7 @@ int OSDAlert(WPARAM wParam, LPARAM lParam)
/*****************************************************************************/
int ErrorMsgs(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TCHAR newdisplaytext[2000], *displaytext = (TCHAR*)lParam;
if ( db_get_b(NULL, MODULENAME, SUPPRESS_ERR_KEY, 0))
@@ -254,7 +254,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam)
}
/*****************************************************************************/
-void SaveToFile(HCONTACT hContact, char *truncated)
+void SaveToFile(MCONTACT hContact, char *truncated)
{
char *mode;
if (!db_get_b(hContact, MODULENAME, APPEND_KEY, 0))
@@ -299,7 +299,7 @@ void SaveToFile(HCONTACT hContact, char *truncated)
}
/*****************************************************************************/
-int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent)
+int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent)
{
char alertstring[255];
TCHAR displaystring[300];
@@ -479,7 +479,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn
// file exists?
if ( _taccess(newcachepath, 0) != -1) {
if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot read from file"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot read from file"));
else {
ZeroMemory(&cachecompare, sizeof(cachecompare));
fread(cachecompare, sizeof(cachecompare), 1, pcachefile);
@@ -488,7 +488,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn
}
// write to cache
if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot write to file 1"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot write to file 1"));
else {
fwrite(tempraw, strlen(tempraw), 1, pcachefile); //smaller cache
fclose(pcachefile);
@@ -691,7 +691,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn
// file exists?
if ( _taccess(newcachepath, 0) != -1) {
if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot read from file"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot read from file"));
else {
ZeroMemory(&cachecompare, sizeof(cachecompare));
fread(cachecompare, sizeof(cachecompare), 1, pcachefile);
@@ -700,7 +700,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn
}
// write to cache
if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot write to file 2"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot write to file 2"));
else {
fwrite(raw, strlen(raw), 1, pcachefile); //smaller cache
db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
@@ -814,7 +814,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn
/*****************************************************************************/
int DataWndAlertCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if ( WindowList_Find(hWindowList, hContact))
return 0;
@@ -838,7 +838,7 @@ int DataWndAlertCommand(WPARAM wParam, LPARAM lParam)
/*****************************************************************************/
void ReadFromFile(void *param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
DBVARIANT dbv;
char truncated[MAXSIZE1];
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp
index 24ba98a50b..1f13631e52 100644
--- a/plugins/WebView/src/webview_datawnd.cpp
+++ b/plugins/WebView/src/webview_datawnd.cpp
@@ -119,16 +119,16 @@ INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
static TCHAR tszSizeString[] = _T("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
-static HCONTACT FindContactByUrl(HWND hwndDlg)
+static MCONTACT FindContactByUrl(HWND hwndDlg)
{
- HCONTACT res = NULL;
+ MCONTACT res = NULL;
TCHAR urltext[300], titlebartxt[300];
int contactcount = 0;
GetDlgItemText(hwndDlg, IDC_OPEN_URL, urltext, SIZEOF(urltext));
GetWindowText(hwndDlg, titlebartxt, SIZEOF(titlebartxt));
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
ptrT db1( db_get_tsa(hContact, MODULENAME, URL_KEY));
ptrT db2( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
@@ -149,13 +149,13 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
DBVARIANT dbv;
RECT rc;
TCHAR url[300];
- HCONTACT hContact;
+ MCONTACT hContact;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- HCONTACT hContact2 = (HCONTACT)lParam;
+ MCONTACT hContact2 = (MCONTACT)lParam;
SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG) hContact2);
WindowList_Add(hWindowList, hwndDlg, hContact2);
@@ -339,7 +339,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case IDC_OPEN_URL:
GetDlgItemText(hwndDlg, IDC_OPEN_URL, url, SIZEOF(url));
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
- db_set_w((HCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
+ db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
break;
case IDC_UPDATE_BUTTON:
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp
index b56688180c..0c885b9012 100644
--- a/plugins/WebView/src/webview_getdata.cpp
+++ b/plugins/WebView/src/webview_getdata.cpp
@@ -29,7 +29,7 @@ int AlreadyDownloading = 0;
/*******************/
void GetData(void *param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
int statpos = 0, dispos = 0, statposend = 0;
char*pos;
DBVARIANT dbv;
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp
index fd3246dc47..168ac8c2b4 100644
--- a/plugins/WebView/src/webview_opts.cpp
+++ b/plugins/WebView/src/webview_opts.cpp
@@ -277,7 +277,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
int alertIndex = 0;
int eventIndex = 0;
static int test;
- HCONTACT hContact;
+ MCONTACT hContact;
ParentHwnd = GetParent(hwndDlg);
@@ -285,7 +285,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
case WM_INITDIALOG:
test = 0;
TranslateDialogDefault(hwndDlg);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG) hContact);
@@ -509,7 +509,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
break;
case IDC_ENABLE_ALERTS:
- hContact = (HCONTACT)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT)GetWindowLong(hwndDlg, GWLP_USERDATA);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD_DATE_NAME), (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_ALERTS)));
if ( IsDlgButtonChecked(hwndDlg, IDC_ADD_DATE_NAME)) {
@@ -631,7 +631,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
case IDC_ALERT_TYPE:
if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_EDITCHANGE) {
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
int alertIndex = SendDlgItemMessage(hwndDlg, IDC_ALERT_TYPE, CB_GETCURSEL, 0, 0);
if (HIWORD(wParam) == CBN_SELCHANGE) {
@@ -678,7 +678,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
case IDC_EVENT_TYPE:
if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_EDITCHANGE) {
- HCONTACT hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
int eventIndex = SendDlgItemMessage(hwndDlg, IDC_EVENT_TYPE, CB_GETCURSEL, 0, 0);
if (HIWORD(wParam) == CBN_SELCHANGE) {
@@ -709,7 +709,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
case IDC_ALERT_APPLY:
case IDC_OK2:
{
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
TCHAR buf[MAX_PATH];
eventIndex = db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0);
@@ -815,13 +815,13 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
HWND ParentHwnd = GetParent(hwndDlg);
static int test;
static int test2;
- HCONTACT hContact;
+ MCONTACT hContact;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- hContact = (HCONTACT) lParam;
+ hContact = (MCONTACT) lParam;
test = 0;
test2 = 0;
@@ -927,7 +927,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case IDC_CPY_STRINGS:
{
TCHAR string[128];
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_START, string, SIZEOF(string));
db_set_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, string);
@@ -1022,7 +1022,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
break;
}
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_URL, url, SIZEOF(url));
db_set_ts(hContact, MODULENAME, URL_KEY, url);
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp
index 717966f75d..94b28249d2 100644
--- a/plugins/WebView/src/webview_services.cpp
+++ b/plugins/WebView/src/webview_services.cpp
@@ -32,7 +32,7 @@ static char szInvalidChars[] = { '\\', '/', ':', '*', '?', '\"', '<', '>', '|' }
int DBSettingChanged(WPARAM wParam, LPARAM lParam)
{
// We can't upload changes to NULL contact
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -60,7 +60,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam)
for (int i=0; i < SIZEOF(szInvalidChars); i++ ) {
TCHAR *p = _tcschr(nick, szInvalidChars[i]);
if (p != NULL) {
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Invalid symbol present in contact name."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Invalid symbol present in contact name."));
*p = '_';
invalidpresent =1;
}
@@ -111,7 +111,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam)
/*****************************************************************************/
int SiteDeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (lstrcmpA(GetContactProto(hContact), MODULENAME))
return 0;
@@ -152,7 +152,7 @@ INT_PTR OpenCacheDir(WPARAM, LPARAM)
mir_sntprintf(cachedirectorypath, SIZEOF(cachedirectorypath), _T("%s")_T(MODULENAME)_T("cache\\%s"), cachepath, cacheend);
if( _taccess(cachedirectorypath, 0) != 0)
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Cache folder does not exist."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Cache folder does not exist."));
else
ShellExecute(NULL, _T("open"), cachedirectorypath, NULL, NULL, SW_SHOWNORMAL);
return 0;
@@ -163,11 +163,11 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam)
{
FILE *pfile = fopen("psite.bat", "r");
if (pfile == NULL) {
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Missing \"psite.bat\" file."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Missing \"psite.bat\" file."));
return 0;
}
- ptrT url( db_get_tsa((HCONTACT)wParam, MODULENAME, "URL"));
+ ptrT url( db_get_tsa((MCONTACT)wParam, MODULENAME, "URL"));
if (url == NULL)
return 0;
@@ -188,7 +188,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam)
/*****************************************************************************/
INT_PTR StpPrcssMenuCommand(WPARAM wParam, LPARAM)
{
- db_set_b((HCONTACT)wParam, MODULENAME, STOP_KEY, 1);
+ db_set_b((MCONTACT)wParam, MODULENAME, STOP_KEY, 1);
return 0;
}
@@ -251,7 +251,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam)
// Make sure no contact has offline status for any reason on first time run
if ( db_get_b(NULL, MODULENAME, "FirstTime", 100) == 100) {
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
db_set_b(NULL, MODULENAME, "FirstTime", 1);
@@ -341,7 +341,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
int samename = 0;
// search for existing contact
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
// check ID to see if the contact already exist in the database
if (!db_get_ts(hContact, MODULENAME, "URL", &dbv)) {
if (!lstrcmpi(psr->nick, dbv.ptszVal)) {
@@ -359,7 +359,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
}
if (psr->nick == NULL) {
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Please select site in Find/Add contacts..."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Please select site in Find/Add contacts..."));
return 0;
}
@@ -367,7 +367,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
if (psr->cbSize != sizeof(PROTOSEARCHRESULT))
return NULL;
- HCONTACT hContact = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) MODULENAME);
/////////write to db
@@ -403,7 +403,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
TCHAR *Nend = _tcschr(Newnick, '.');
if (Nend) *Nend = '\0';
- for (HCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) {
+ for (MCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) {
if (!db_get_ts(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
if (!lstrcmpi(Newnick, dbv.ptszVal)) {
// remove the flag for not on list and hidden, thus make the
@@ -461,6 +461,6 @@ INT_PTR GetInfo(WPARAM, LPARAM)
/*****************************************************************************/
void AckFunc(void *dummy)
{
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
ProtoBroadcastAck(MODULENAME, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}