diff options
Diffstat (limited to 'plugins/Non-IM Contact')
-rw-r--r-- | plugins/Non-IM Contact/src/commonheaders.h | 10 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/contactinfo.cpp | 32 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/dialog.cpp | 8 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/files.cpp | 2 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/main.cpp | 6 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/namereplacing.cpp | 12 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/services.cpp | 4 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/timer.cpp | 2 |
8 files changed, 38 insertions, 38 deletions
diff --git a/plugins/Non-IM Contact/src/commonheaders.h b/plugins/Non-IM Contact/src/commonheaders.h index ca593df8ab..f40bdb8649 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(HANDLE hContact);
+void ExportContact(HCONTACT hContact);
INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam);
// stringreplacer.c
-int stringReplacer(const char* oldString, char* newString, HANDLE hContact);
-void replaceAllStrings(HANDLE hContact);
-void WriteSetting(HANDLE hContact, char* module1, char* setting1 , char* module12, char* setting2);
+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);
//timer.c
extern UINT_PTR timerId;
@@ -122,7 +122,7 @@ extern char *szInfo; extern char *szData;
extern HANDLE hNetlibUser;
-int db_get_static(HANDLE hContact, const char *moduleName, const char *fn, char *buf);
+int db_get_static(HCONTACT 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 abb04ea98b..19f58a58d6 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:
{
- HANDLE hContact = (HANDLE)((PROPSHEETPAGE*)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((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:
- HANDLE hContact = (HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ HCONTACT hContact = (HCONTACT)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:
{
- HANDLE hContact = (HANDLE)((PROPSHEETPAGE*)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((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)) {
- HANDLE hContact = (HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ HCONTACT hContact = (HCONTACT)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)) {
- HANDLE hContact = (HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ HCONTACT hContact = (HCONTACT)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);
- HANDLE hContact = (HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_LINK))) {
char text[512];
@@ -304,9 +304,9 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) switch(msg) {
case WM_INITDIALOG:
{
- HANDLE hContact = (HANDLE)((PROPSHEETPAGE*)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)(HANDLE)hContact);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
}
return TRUE;
@@ -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((HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA));
+ ExportContact((HCONTACT)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];
- HANDLE hContact1 = (HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
+ HCONTACT hContact1 = (HCONTACT)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 =(HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact2 =(HCONTACT) 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];
- HANDLE hContact1 = (HANDLE)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
+ HCONTACT hContact1 = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
if (db_get_static(hContact1, MODNAME, "Name", dbVar1)) {
- if (!(hContact2 =(HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0))) {
+ if (!(hContact2 = (HCONTACT) 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(HANDLE hContact)
+void ExportContact(HCONTACT hContact)
{
char szFileName[MAX_PATH];
char DBVar[1024];
@@ -495,7 +495,7 @@ void ExportContact(HANDLE hContact) INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact;
+ HCONTACT 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 =(HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0))) {
+ if (!(hContact = (HCONTACT)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 eea83fd93c..6e12327403 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(HANDLE hContact, HINSTANCE hInst)
+void DoPropertySheet(HCONTACT hContact, HINSTANCE hInst)
{
char title[256], nick[256];
PROPSHEETPAGEA psp[4] = { 0 };
@@ -307,7 +307,7 @@ void DoPropertySheet(HANDLE hContact, HINSTANCE hInst) INT_PTR addContact(WPARAM wParam,LPARAM lParam)
{
char tmp[256];
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ HCONTACT hContact = (HCONTACT) 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)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
char tmp[256];
if (!hContact) {
- hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (HCONTACT)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 70db1be310..81f4dc3ca6 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 (HANDLE hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
+ for (HCONTACT 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 912f9c08ab..3aecdbb073 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((HANDLE)wParam);
+ char* proto = GetContactProto((HCONTACT)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((HANDLE)wParam, MODNAME, "Program", program) && strcmp(program, ""))
+ else if (db_get_static((HCONTACT)wParam, MODNAME, "Program", program) && strcmp(program, ""))
{
- if (!db_get_static((HANDLE)wParam, MODNAME, "ProgramParams", params) )
+ if (!db_get_static((HCONTACT)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 ad0748ffbe..428e4a912b 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(HANDLE hContact, char* str)
+void checkStringForSave(HCONTACT 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(HANDLE hContact, char* str) }
// do load("A") A is DBVar name
-void checkStringForLoad(HANDLE hContact, char* str)
+void checkStringForLoad(HCONTACT 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(HANDLE hContact, char* string)
+void checkIcon(HCONTACT hContact, char* string)
{
char* str = strstr(string,"icon(");
if (str) {
@@ -442,7 +442,7 @@ void checkIcon(HANDLE hContact, char* string) }
}
-int stringReplacer(const char* oldString, char* newString, HANDLE hContact)
+int stringReplacer(const char* oldString, char* newString, HCONTACT hContact)
{
char var_file[8];
int tempInt;
@@ -602,7 +602,7 @@ void stripWhiteSpace(char* string) i++;
}
}
-void WriteSetting(HANDLE hContact, char* module1, char* setting1 , char* module2, char* setting2)
+void WriteSetting(HCONTACT 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(HANDLE hContact, char* module1, char* setting1 , char* module2 else db_set_w(hContact, MODNAME, "Status", ID_STATUS_OFFLINE);
}
-void replaceAllStrings(HANDLE hContact)
+void replaceAllStrings(HCONTACT 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 b81372adb9..4cfb8138df 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(HANDLE hContact, const char *szModule, const char *szSetting, char *value)
+int db_get_static(HCONTACT 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 (HANDLE hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT 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 68d91c7c3d..5b2af5798b 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 (HANDLE hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
+ for (HCONTACT 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))
|