summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact
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/Non-IM Contact
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/Non-IM Contact')
-rw-r--r--plugins/Non-IM Contact/src/commonheaders.h10
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp30
-rw-r--r--plugins/Non-IM Contact/src/dialog.cpp8
-rw-r--r--plugins/Non-IM Contact/src/files.cpp2
-rw-r--r--plugins/Non-IM Contact/src/main.cpp6
-rw-r--r--plugins/Non-IM Contact/src/namereplacing.cpp12
-rw-r--r--plugins/Non-IM Contact/src/services.cpp4
-rw-r--r--plugins/Non-IM Contact/src/timer.cpp2
8 files changed, 37 insertions, 37 deletions
diff --git a/plugins/Non-IM Contact/src/commonheaders.h b/plugins/Non-IM Contact/src/commonheaders.h
index f40bdb8649..d7205aa895 100644
--- a/plugins/Non-IM Contact/src/commonheaders.h
+++ b/plugins/Non-IM Contact/src/commonheaders.h
@@ -101,13 +101,13 @@ INT_PTR exportContacts(WPARAM wParam,LPARAM lParam) ;
INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-void ExportContact(HCONTACT hContact);
+void ExportContact(MCONTACT hContact);
INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam);
// stringreplacer.c
-int stringReplacer(const char* oldString, char* newString, HCONTACT hContact);
-void replaceAllStrings(HCONTACT hContact);
-void WriteSetting(HCONTACT hContact, char* module1, char* setting1 , char* module12, char* setting2);
+int stringReplacer(const char* oldString, char* newString, MCONTACT hContact);
+void replaceAllStrings(MCONTACT hContact);
+void WriteSetting(MCONTACT hContact, char* module1, char* setting1 , char* module12, char* setting2);
//timer.c
extern UINT_PTR timerId;
@@ -122,7 +122,7 @@ extern char *szInfo;
extern char *szData;
extern HANDLE hNetlibUser;
-int db_get_static(HCONTACT hContact, const char *moduleName, const char *fn, char *buf);
+int db_get_static(MCONTACT hContact, const char *moduleName, const char *fn, char *buf);
#endif
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index 19f58a58d6..2daea133e2 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -5,7 +5,7 @@ INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
switch(msg) {
case WM_INITDIALOG:
{
- HCONTACT hContact = (HCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
char name[2048];
TranslateDialogDefault(hwnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)(HANDLE)hContact);
@@ -26,7 +26,7 @@ INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_DISPLAY_NAME))) {
char text[512];
GetDlgItemTextA(hwnd,IDC_DISPLAY_NAME,text,sizeof(text));
@@ -112,7 +112,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
switch(msg) {
case WM_INITDIALOG:
{
- HCONTACT hContact = (HCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
if (!hContact)
@@ -180,7 +180,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
switch(LOWORD(wParam)) {
case IDC_ALWAYS_VISIBLE:
if (IsDlgButtonChecked(hwnd, IDC_ALWAYS_VISIBLE)) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
EnableWindow(GetDlgItem(hwnd, IDC_VISIBLE_UNLESS_OFFLINE),1);
CheckDlgButton(hwnd, IDC_VISIBLE_UNLESS_OFFLINE, db_get_b(hContact, MODNAME ,"VisibleUnlessOffline", 1));
}
@@ -189,7 +189,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case CHK_USE_TIMER:
if (IsDlgButtonChecked(hwnd, CHK_USE_TIMER)) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
char string[4];
EnableWindow(GetDlgItem(hwnd, IDC_TIMER), 1);
SetDlgItemTextA(hwnd, IDC_TIMER, _itoa(db_get_w(hContact, MODNAME ,"Timer", 15), string, 10));
@@ -223,7 +223,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
int status = GetLCStatus(0,0);
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_LINK))) {
char text[512];
@@ -304,7 +304,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
switch(msg) {
case WM_INITDIALOG:
{
- HCONTACT hContact = (HCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
}
@@ -314,7 +314,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
switch(LOWORD(wParam)) {
case IDC_EXPORT:
- ExportContact((HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA));
+ ExportContact((MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA));
break;
case IDC_DOIT:
@@ -324,7 +324,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
char dbVar1[2000], dbVar2[2000];
int i=0,j=0, k=0;
char *string = oldString[k];
- HCONTACT hContact1 = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
+ MCONTACT hContact1 = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
GetDlgItemTextA(hwnd, IDC_STRING_REPLACE, replace, GetWindowTextLength(GetDlgItem(hwnd, IDC_STRING_REPLACE)) +1);
if (db_get_static(hContact1, MODNAME, "Name", dbVar1)) {
// get the list of replace strings
@@ -347,7 +347,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
i++;
}
- hContact2 =(HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact2 =(MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact2,(LPARAM)MODNAME);
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact2, IGNOREEVENT_USERONLINE);
db_set_s(hContact2, MODNAME, "Nick", Translate("New Non-IM Contact"));
@@ -401,9 +401,9 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
else {
char dbVar1[2000];
- HCONTACT hContact1 = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
+ MCONTACT hContact1 = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
if (db_get_static(hContact1, MODNAME, "Name", dbVar1)) {
- if (!(hContact2 = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0))) {
+ if (!(hContact2 = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0))) {
msg("contact did not get created","");
return 0;
}
@@ -452,7 +452,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return FALSE;
}
-void ExportContact(HCONTACT hContact)
+void ExportContact(MCONTACT hContact)
{
char szFileName[MAX_PATH];
char DBVar[1024];
@@ -495,7 +495,7 @@ void ExportContact(HCONTACT hContact)
INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char name[256] = "", program[256] = "", programparam[256] = "", group[256] = "", tooltip[3000] = "", line[2001] = "";
int icon = 40072, usetimer = 0, minutes = 1, timer = 0;
char fn[MAX_PATH];
@@ -631,7 +631,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam)
}
if (MessageBoxA(0,msg,modFullname,MB_YESNO) == IDYES) {
- if (!(hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0))) {
+ if (!(hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0))) {
msg("contact did get created","");
continue;
}
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp
index 6e12327403..8e7e7d2c04 100644
--- a/plugins/Non-IM Contact/src/dialog.cpp
+++ b/plugins/Non-IM Contact/src/dialog.cpp
@@ -239,7 +239,7 @@ static int CALLBACK PropSheetProc(HWND hwnd, UINT uMsg, LPARAM lParam)
return 0;
}
-void DoPropertySheet(HCONTACT hContact, HINSTANCE hInst)
+void DoPropertySheet(MCONTACT hContact, HINSTANCE hInst)
{
char title[256], nick[256];
PROPSHEETPAGEA psp[4] = { 0 };
@@ -307,7 +307,7 @@ void DoPropertySheet(HCONTACT hContact, HINSTANCE hInst)
INT_PTR addContact(WPARAM wParam,LPARAM lParam)
{
char tmp[256];
- 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)MODNAME);
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
db_set_ts(hContact, MODNAME, "Nick", TranslateT("New Non-IM Contact"));
@@ -320,10 +320,10 @@ INT_PTR addContact(WPARAM wParam,LPARAM lParam)
INT_PTR editContact(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char tmp[256];
if (!hContact) {
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)MODNAME);
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
db_set_s(hContact, MODNAME, "Nick", Translate("New Non-IM Contact"));
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp
index 81f4dc3ca6..f5202e5b6d 100644
--- a/plugins/Non-IM Contact/src/files.cpp
+++ b/plugins/Non-IM Contact/src/files.cpp
@@ -14,7 +14,7 @@ INT_PTR exportContacts(WPARAM wParam,LPARAM lParam)
if (!file)
return 0;
- for (HCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
+ for (MCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
int tmp;
char DBVar[1024];
if (db_get_static(hContact, MODNAME, "Name", DBVar)) {
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 3aecdbb073..1d8b9cf623 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -28,13 +28,13 @@ INT_PTR doubleClick(WPARAM wParam,LPARAM lParam)
{
char program[MAX_PATH], params[MAX_PATH];
int shellEXEerror = 0;
- char* proto = GetContactProto((HCONTACT)wParam);
+ char* proto = GetContactProto((MCONTACT)wParam);
if (proto && !strcmp(proto, MODNAME)) {
if (GetKeyState(VK_CONTROL)&0x8000) // ctrl is pressed
editContact((WPARAM)(HANDLE)wParam, (LPARAM)NULL); // for later when i add a second double click setting
- else if (db_get_static((HCONTACT)wParam, MODNAME, "Program", program) && strcmp(program, ""))
+ else if (db_get_static((MCONTACT)wParam, MODNAME, "Program", program) && strcmp(program, ""))
{
- if (!db_get_static((HCONTACT)wParam, MODNAME, "ProgramParams", params) )
+ if (!db_get_static((MCONTACT)wParam, MODNAME, "ProgramParams", params) )
strcpy(params, "");
if (strstr(program, "http://") || strstr(program, "https://"))
CallService(MS_UTILS_OPENURL,1,(LPARAM)program);
diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp
index 428e4a912b..d8706731d9 100644
--- a/plugins/Non-IM Contact/src/namereplacing.cpp
+++ b/plugins/Non-IM Contact/src/namereplacing.cpp
@@ -232,7 +232,7 @@ void checkStringForcompare(char *str)
}
// do save("A","B") A is DBVar name, B is value
-void checkStringForSave(HCONTACT hContact, char* str)
+void checkStringForSave(MCONTACT hContact, char* str)
{
char *A,*B,*newStr = (char*)malloc(strlen(str)),*copyOfStr = _strdup(str);
unsigned int i, j=0, s = (int)strlen(str);
@@ -258,7 +258,7 @@ void checkStringForSave(HCONTACT hContact, char* str)
}
// do load("A") A is DBVar name
-void checkStringForLoad(HCONTACT hContact, char* str)
+void checkStringForLoad(MCONTACT hContact, char* str)
{
char *A,*newStr = (char*)malloc(strlen(str)),*copyOfStr = _strdup(str);
unsigned int i, j=0, s = (int)strlen(str);
@@ -432,7 +432,7 @@ int lastChecked(char *newStr, const char *str)
// do icon(x) 0=offline, 1=online, 10=lunch
-void checkIcon(HCONTACT hContact, char* string)
+void checkIcon(MCONTACT hContact, char* string)
{
char* str = strstr(string,"icon(");
if (str) {
@@ -442,7 +442,7 @@ void checkIcon(HCONTACT hContact, char* string)
}
}
-int stringReplacer(const char* oldString, char* newString, HCONTACT hContact)
+int stringReplacer(const char* oldString, char* newString, MCONTACT hContact)
{
char var_file[8];
int tempInt;
@@ -602,7 +602,7 @@ void stripWhiteSpace(char* string)
i++;
}
}
-void WriteSetting(HCONTACT hContact, char* module1, char* setting1 , char* module2, char* setting2)
+void WriteSetting(MCONTACT hContact, char* module1, char* setting1 , char* module2, char* setting2)
{
char text[MAX_STRING_LENGTH], newString[MAX_STRING_LENGTH];
int error = 0, status = GetLCStatus(0,0);
@@ -641,7 +641,7 @@ void WriteSetting(HCONTACT hContact, char* module1, char* setting1 , char* modul
else db_set_w(hContact, MODNAME, "Status", ID_STATUS_OFFLINE);
}
-void replaceAllStrings(HCONTACT hContact)
+void replaceAllStrings(MCONTACT hContact)
{
char tmp1[256], tmp2[256], tmp3[256];
WriteSetting(hContact, MODNAME, "Name", MODNAME, "Nick");
diff --git a/plugins/Non-IM Contact/src/services.cpp b/plugins/Non-IM Contact/src/services.cpp
index 4cfb8138df..8b2348f9c9 100644
--- a/plugins/Non-IM Contact/src/services.cpp
+++ b/plugins/Non-IM Contact/src/services.cpp
@@ -3,7 +3,7 @@
//=======================================================
//db_get_static
//=======================================================
-int db_get_static(HCONTACT hContact, const char *szModule, const char *szSetting, char *value)
+int db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *value)
{
DBVARIANT dbv;
if (!db_get(hContact, szModule, szSetting, &dbv))
@@ -79,7 +79,7 @@ int SetLCStatus(WPARAM wParam,LPARAM lParam)
else if (db_get_w(NULL, MODNAME, "Timer",1))
startTimer(TIMER);
- for (HCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (proto == NULL || strcmp(proto, MODNAME))
continue;
diff --git a/plugins/Non-IM Contact/src/timer.cpp b/plugins/Non-IM Contact/src/timer.cpp
index 5b2af5798b..be73097219 100644
--- a/plugins/Non-IM Contact/src/timer.cpp
+++ b/plugins/Non-IM Contact/src/timer.cpp
@@ -40,7 +40,7 @@ void timerFunc(LPVOID di)
}
/* update all the contacts */
- for (HCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
+ for (MCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
int timer = db_get_w(hContact, MODNAME, "Timer", 15);
if (timer && !(timerCount % timer))
if (db_get_static(hContact, MODNAME, "Name", text))