summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2013-09-21 20:39:17 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2013-09-21 20:39:17 +0000
commit4d970faf406c59e807a9ffd4d7a51f1aaad6636a (patch)
treedbc0f6ff815fa7c357ce0df22cf84417794d3c80 /plugins
parent52824c91bac6d6cc0f04e242b07d9031477b6362 (diff)
translation fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@6171 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Non-IM Contact/res/resource.rc133
-rw-r--r--plugins/Non-IM Contact/src/contactinfo.cpp51
-rw-r--r--plugins/Non-IM Contact/src/dialog.cpp36
-rw-r--r--plugins/Non-IM Contact/src/files.cpp46
-rw-r--r--plugins/Non-IM Contact/src/http.cpp13
5 files changed, 127 insertions, 152 deletions
diff --git a/plugins/Non-IM Contact/res/resource.rc b/plugins/Non-IM Contact/res/resource.rc
index b92a412734..a21eb06175 100644
--- a/plugins/Non-IM Contact/res/resource.rc
+++ b/plugins/Non-IM Contact/res/resource.rc
@@ -1,4 +1,4 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
#include "../src/resource.h"
@@ -13,60 +13,52 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
+// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
-IDD_ADD_FILE DIALOG DISCARDABLE 0, 0, 283, 190
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION |
- WS_SYSMENU
+IDD_ADD_FILE DIALOG 0, 0, 283, 190
+STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "View/Edit Files"
FONT 8, "MS Sans Serif"
BEGIN
- COMBOBOX IDC_FILE_LIST,54,4,222,99,CBS_DROPDOWNLIST |
- CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_FILE_LIST,54,4,222,99,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_URL,54,20,222,12,ES_AUTOHSCROLL
EDITTEXT IDC_WWW_TIMER,82,37,30,12,ES_NUMBER
PUSHBUTTON "Add File",IDC_ADD_FILE,202,37,34,12
PUSHBUTTON "Add URL",IDC_ADD_URL,238,37,38,12
PUSHBUTTON "Remove Selected File",IDC_DEL_FILE,202,52,73,12
- LISTBOX IDC_FILE_CONTENTS,4,70,272,113,LBS_NOINTEGRALHEIGHT |
- LBS_DISABLENOSCROLL | WS_VSCROLL | WS_HSCROLL |
- WS_TABSTOP
+ LISTBOX IDC_FILE_CONTENTS,4,70,272,113,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
LTEXT "file(#)",IDC_STATIC,4,6,28,8
EDITTEXT IDC_FN,33,4,16,12,ES_READONLY | ES_NUMBER
LTEXT "URL",IDC_STATIC,4,22,41,8
LTEXT "Update URL every",IDC_STATIC,4,39,75,8
LTEXT "Intervals",IDC_STATIC,117,39,33,8
- LTEXT "If the protocol timer is disabled web pages wont be updated",
- IDC_STATIC,4,52,188,8
+ LTEXT "If the protocol timer is disabled web pages wont be updated",IDC_STATIC,4,52,188,8
END
-IDD_CONTACT_INFO DIALOG DISCARDABLE 0, 0, 283, 190
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+IDD_CONTACT_INFO DIALOG 0, 0, 283, 190
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "contact display info"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_DISPLAY_NAME,88,6,188,12,ES_AUTOHSCROLL
- EDITTEXT IDC_TOOLTIP,7,40,269,143,ES_MULTILINE | ES_AUTOVSCROLL |
- ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
+ EDITTEXT IDC_TOOLTIP,7,40,269,143,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
LTEXT "Contacts display name",IDC_STATIC,7,8,72,8
LTEXT "Contacts Tooltip",IDC_STATIC,7,26,52,8
END
-IDD_OTHER_STUFF DIALOG DISCARDABLE 0, 0, 283, 190
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+IDD_OTHER_STUFF DIALOGEX 0, 0, 283, 190
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "other settings"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
LTEXT "Link",IDC_STATIC,12,18,27,8
EDITTEXT IDC_LINK,42,16,230,12,ES_AUTOHSCROLL
@@ -76,60 +68,43 @@ BEGIN
PUSHBUTTON "O&pen Folder",IDC_OPEN_FOLDER,216,47,56,14
GROUPBOX "Link Settings",IDC_STATIC,7,4,269,60
GROUPBOX "CList Settings",IDC_STATIC,7,68,269,64
- COMBOBOX IDC_GROUP,43,79,158,74,CBS_DROPDOWN | CBS_AUTOHSCROLL |
- CBS_SORT | WS_VSCROLL | WS_TABSTOP
- CONTROL "",CHK_ONLINE,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE |
- WS_TABSTOP,71,95,16,16
- CONTROL "",CHK_AWAY,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,90,95,16,16
- CONTROL "",CHK_NA,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,109,95,16,16
- CONTROL "",CHK_OCC,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,128,95,16,16
- CONTROL "",CHK_DND,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,147,95,16,16
- CONTROL "",CHK_FFC,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,166,95,16,16
- CONTROL "",CHK_INVISIBLE,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,185,95,16,16
- CONTROL "",CHK_PHONE,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,204,95,16,16
- CONTROL "",CHK_LUNCH,"Button",BS_AUTORADIOBUTTON | BS_ICON |
- BS_PUSHLIKE | WS_TABSTOP,223,95,16,16
+ COMBOBOX IDC_GROUP,43,79,158,74,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",CHK_ONLINE,"Button",BS_AUTORADIOBUTTON | BS_PUSHLIKE | WS_TABSTOP,71,95,16,16
+ CONTROL "",CHK_AWAY,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,90,95,16,16
+ CONTROL "",CHK_NA,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,109,95,16,16
+ CONTROL "",CHK_OCC,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,128,95,16,16
+ CONTROL "",CHK_DND,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,147,95,16,16
+ CONTROL "",CHK_FFC,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,166,95,16,16
+ CONTROL "",CHK_INVISIBLE,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,185,95,16,16
+ CONTROL "",CHK_PHONE,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,204,95,16,16
+ CONTROL "",CHK_LUNCH,"Button",BS_AUTORADIOBUTTON | BS_ICON | BS_PUSHLIKE | WS_TABSTOP,223,95,16,16
LTEXT "Group:",IDC_STATIC,12,81,29,8
LTEXT "Status Icon",IDC_STATIC,12,99,54,8
LTEXT "Group\\Sub-Group",IDC_STATIC,205,81,67,8
GROUPBOX "Timer Settings",IDC_STATIC,7,139,269,44
- CONTROL "Use Timer",CHK_USE_TIMER,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,12,148,108,10
+ CONTROL "Use Timer",CHK_USE_TIMER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,148,108,10
EDITTEXT IDC_TIMER,22,162,35,12,ES_NUMBER | WS_DISABLED
- CONTROL "Contact is always visible",IDC_ALWAYS_VISIBLE,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,12,115,92,10
- CONTROL "Unless Non-IM Contacts protocol is OFFLINE",
- IDC_VISIBLE_UNLESS_OFFLINE,"Button",BS_AUTOCHECKBOX |
- WS_DISABLED | WS_TABSTOP,112,115,158,10
- LTEXT "Timer Intervals. ",IDC_TIMER_INTERVAL_MSG,61,166,205,8
+ CONTROL "Contact is always visible",IDC_ALWAYS_VISIBLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,115,92,10
+ CONTROL "Unless Non-IM Contacts protocol is OFFLINE",IDC_VISIBLE_UNLESS_OFFLINE,
+ "Button",BS_AUTOCHECKBOX | WS_DISABLED | WS_TABSTOP,112,115,158,10
+ LTEXT "Timer Intervals. ",IDC_TIMER_INTERVAL_MSG,61,166,211,8
END
-IDD_OPTIONS DIALOG DISCARDABLE 0, 0, 291, 180
-STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+IDD_OPTIONS DIALOG 0, 0, 291, 180
+STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
- CONTROL "Away as another status",IDC_AWAYISNOTONLINE,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,7,42,169,10
- CONTROL "Disable timer",IDC_DISABLETIMER,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,13,99,106,10
+ CONTROL "Away as another status",IDC_AWAYISNOTONLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,42,169,10
+ CONTROL "Disable timer",IDC_DISABLETIMER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,99,106,10
LTEXT "Timer interval (in seconds)",IDC_TIMER_TEXT,13,111,83,8
EDITTEXT IDC_TIMER_INT,102,109,20,12,ES_NUMBER
- LTEXT "This will take affect after Non-IM Contacts' status is changed",
- IDC_TIMER_MSG,13,123,215,8
+ LTEXT "This will take affect after Non-IM Contacts' status is changed",IDC_TIMER_MSG,13,123,215,8
GROUPBOX "Timer Options",IDC_STATIC,7,87,277,49
END
-IDD_TEST_LINE DIALOG DISCARDABLE 0, 0, 435, 119
-STYLE DS_MODALFRAME | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
+IDD_TEST_LINE DIALOG 0, 0, 435, 119
+STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "String Maker"
FONT 8, "MS Sans Serif"
BEGIN
@@ -138,8 +113,7 @@ BEGIN
PUSHBUTTON "&Exit",IDCANCEL,385,92,43,14
GROUPBOX "String to test",IDC_STATIC,7,7,421,41
GROUPBOX "Returns....",IDC_STATIC,7,51,371,61
- EDITTEXT IDC_ANSWER,15,62,353,43,ES_MULTILINE | ES_AUTOHSCROLL |
- ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
+ EDITTEXT IDC_ANSWER,15,62,353,43,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL
LTEXT "line()",IDC_LINE,73,36,16,8,WS_DISABLED
LTEXT "start()",IDC_START,32,36,18,8,WS_DISABLED
LTEXT "end()",IDC_END,53,36,17,8,WS_DISABLED
@@ -150,7 +124,7 @@ BEGIN
PUSHBUTTON "Help",IDC_HELPMSG,385,73,43,14
END
-IDD_HELP DIALOGEX DISCARDABLE 0, 0, 267, 218
+IDD_HELP DIALOGEX 0, 0, 267, 218
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Help"
FONT 9, "MS Sans Serif", 0, 0, 0x0
@@ -166,7 +140,7 @@ END
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
+GUIDELINES DESIGNINFO
BEGIN
IDD_ADD_FILE, DIALOG
BEGIN
@@ -237,7 +211,6 @@ BEGIN
IDD_HELP, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 273
TOPMARGIN, 7
BOTTOMMARGIN, 154
END
@@ -251,18 +224,18 @@ END
// TEXTINCLUDE
//
-1 TEXTINCLUDE DISCARDABLE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE DISCARDABLE
+2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
-3 TEXTINCLUDE DISCARDABLE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
@@ -278,8 +251,8 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_MAIN ICON DISCARDABLE "star8.ico"
-#endif // English (U.S.) resources
+IDI_MAIN ICON "star8.ico"
+#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
@@ -287,30 +260,26 @@ IDI_MAIN ICON DISCARDABLE "star8.ico"
// English (Australia) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
-#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
#pragma code_page(1252)
-#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
-IDD_CONTACT_COPYEXPORT DIALOG DISCARDABLE 0, 0, 283, 190
-STYLE DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
+IDD_CONTACT_COPYEXPORT DIALOGEX 0, 0, 283, 190
+STYLE DS_SETFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Copy / Export contact"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_STRING_REPLACE,13,43,254,108,ES_MULTILINE |
- ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL
+ EDITTEXT IDC_STRING_REPLACE,13,43,254,108,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL
PUSHBUTTON "&Export Non-IM Contact",IDC_EXPORT,13,159,94,14
PUSHBUTTON "Co&py Non-IM Contact",IDC_DOIT,173,159,94,14
GROUPBOX "",IDC_STATIC,7,7,269,176
- CONTROL "Type one replace string per line in the format ""origional text,new text""",
- IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,13,18,
- 243,10
- LTEXT "EXAMPLE: %fn1,%fn2",IDC_STATIC,13,31,71,8
+ CONTROL "Type one replace string per line in the format ""original text,new text""",IDC_STATIC,
+ "Static",SS_LEFTNOWORDWRAP | WS_GROUP,13,18,254,10
+ LTEXT "EXAMPLE: %fn1,%fn2",IDC_STATIC,13,31,254,8
END
@@ -320,7 +289,7 @@ END
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
+GUIDELINES DESIGNINFO
BEGIN
IDD_CONTACT_COPYEXPORT, DIALOG
BEGIN
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp
index c55ea4f159..abb04ea98b 100644
--- a/plugins/Non-IM Contact/src/contactinfo.cpp
+++ b/plugins/Non-IM Contact/src/contactinfo.cpp
@@ -112,35 +112,42 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
switch(msg) {
case WM_INITDIALOG:
{
- int i;
- char string[512];
HANDLE hContact = (HANDLE)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)(HANDLE)hContact);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
if (!hContact)
break;
/* link*/
- if (db_get_static(hContact, MODNAME, "ProgramString", string))
- SetDlgItemTextA(hwnd, IDC_LINK, string);
+ DBVARIANT dbv;
+ if (!db_get_ts(hContact, MODNAME, "ProgramString", &dbv))
+ {
+ SetDlgItemText(hwnd, IDC_LINK, dbv.ptszVal);
+ db_free(&dbv);
+ }
- if (db_get_static(hContact, MODNAME, "ProgramParamsString", string))
- SetDlgItemTextA(hwnd, IDC_PARAMS, string);
+ if (!db_get_ts(hContact, MODNAME, "ProgramParamsString", &dbv))
+ {
+ SetDlgItemText(hwnd, IDC_PARAMS, dbv.ptszVal);
+ db_free(&dbv);
+ }
/* group*/
TCHAR *szGroup;
- for (i=1; (szGroup = pcli->pfnGetGroupName(i, NULL)) != NULL; i++)
- SendMessage(GetDlgItem(hwnd, IDC_GROUP), CB_INSERTSTRING,0, LPARAM(szGroup));
+ for (int i=1; (szGroup = pcli->pfnGetGroupName(i, NULL)) != NULL; i++)
+ SendDlgItemMessage(hwnd, IDC_GROUP, CB_INSERTSTRING,0, LPARAM(szGroup));
- DBVARIANT dbv;
- if (!db_get(hContact, "CList", "Group", &dbv))
- SetDlgItemTextA(hwnd, IDC_GROUP, dbv.pszVal);
+ if (!db_get_ts(hContact, "CList", "Group", &dbv))
+ {
+ SetDlgItemText(hwnd, IDC_GROUP, dbv.ptszVal);
+ db_free(&dbv);
+ }
/* icons */
CheckRadioButton(hwnd, 40072, 40080, db_get_w(hContact, MODNAME, "Icon", ID_STATUS_ONLINE));
SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_USERDATA, (LONG)LoadSkinnedProtoIcon(MODNAME, ID_STATUS_ONLINE));
g_PrevBtnWndProc = (WNDPROC)SetWindowLongPtr(GetDlgItem(hwnd, CHK_ONLINE), GWLP_WNDPROC, (LPARAM)ButtWndProc);
- for (i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
+ for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_USERDATA, (LPARAM)LoadSkinnedProtoIcon(MODNAME, i));
SetWindowLongPtr(GetDlgItem(hwnd, i), GWLP_WNDPROC, (LPARAM)ButtWndProc);
}
@@ -150,12 +157,13 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
if (db_get_w(hContact, MODNAME ,"Timer", 15)) {
CheckDlgButton(hwnd, CHK_USE_TIMER,1);
EnableWindow(GetDlgItem(hwnd, IDC_TIMER), 1);
- SetDlgItemTextA(hwnd, IDC_TIMER, _itoa(db_get_w(hContact, MODNAME ,"Timer", 15), string, 10));
+ TCHAR string[512];
+ SetDlgItemText(hwnd, IDC_TIMER, _itot(db_get_w(hContact, MODNAME ,"Timer", 15), string, 10));
if (!db_get_w(NULL, MODNAME ,"Timer", 1))
- SetDlgItemTextA(hwnd,IDC_TIMER_INTERVAL_MSG, "Non-IM Contact protocol timer is Disabled");
+ SetDlgItemText(hwnd,IDC_TIMER_INTERVAL_MSG, TranslateT("Non-IM Contact protocol timer is Disabled"));
else {
- mir_snprintf(string, sizeof(string), "Timer intervals... Non-IM Contact Protocol timer is %d seconds",db_get_w(NULL, MODNAME ,"Timer", 1));
- SetDlgItemTextA(hwnd,IDC_TIMER_INTERVAL_MSG, string);
+ mir_sntprintf(string, SIZEOF(string), TranslateT("Timer intervals... Non-IM Contact Protocol timer is %d seconds"),db_get_w(NULL, MODNAME ,"Timer", 1));
+ SetDlgItemText(hwnd,IDC_TIMER_INTERVAL_MSG, string);
}
}
/* always visible */
@@ -253,9 +261,9 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
if (IsDlgButtonChecked(hwnd, CHK_USE_TIMER)) {
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_TIMER))) {
- char text[512];
- GetDlgItemTextA(hwnd,IDC_TIMER,text,sizeof(text));
- db_set_w(hContact, MODNAME, "Timer", (WORD)atoi(text));
+ TCHAR text[512];
+ GetDlgItemText(hwnd,IDC_TIMER,text,SIZEOF(text));
+ db_set_w(hContact, MODNAME, "Timer", (WORD)_ttoi(text));
}
else db_set_w(hContact, MODNAME, "Timer", 15);
}
@@ -446,7 +454,6 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
void ExportContact(HANDLE hContact)
{
- FILE* file;
char szFileName[MAX_PATH];
char DBVar[1024];
int tmp;
@@ -456,7 +463,7 @@ void ExportContact(HANDLE hContact)
// if (tmp = MessageBox(0, "Do you want to overwrite the contents of the file?\r\n\r\nPressing No will append this contact to the end of the file.",modFullname, MB_YESNO) == IDYES)
// file = fopen(szFileName, "w");
// else
- file = fopen(szFileName, "a");
+ FILE *file = fopen(szFileName, "a");
if (file)
{
if (db_get_static(hContact, MODNAME, "Name", DBVar))
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp
index 8afb13b879..34a0e7dd4e 100644
--- a/plugins/Non-IM Contact/src/dialog.cpp
+++ b/plugins/Non-IM Contact/src/dialog.cpp
@@ -1,18 +1,18 @@
#include "commonheaders.h"
-#define NIM_HELP_TEXT LPGEN("String replacing variables....\r\nThe following are all the valid variables that can be used. Refer to the readme for a proper explanation.\r\n\r\n\
+#define NIM_HELP_TEXT TranslateT("String replacing variables....\r\nThe following are all the valid variables that can be used. Refer to the readme for a proper explanation.\r\n\r\n\
file(X)\t\t<- specifies the file to read from. MUST be followed by either start() or end() or wholeline()\r\n\
-filename(X)\t<- copyies the filename of file X.\r\n\
+filename(X)\t<- copies the filename of file X.\r\n\
start(...)\t\t<- specifies where to start copying from.\r\n\
end(...)\t\t<- specifies where to stop copying.\r\n\
wholeline(line(...))\t<- specifies a whole line to copy\r\n\r\n\
start() and end() explained\r\n.........................\r\n\
-MUST start with line() followed by a number or a string inside \" marks, OR csv(seperatorX) variable. The number specifies which character in the line to start/end copying. The string specifies a string in the line to start/end copying.\r\n\r\n\
+MUST start with line() followed by a number or a string inside \" marks, OR csv(separatorX) variable. The number specifies which character in the line to start/end copying. The string specifies a string in the line to start/end copying.\r\n\r\n\
csv(seperatorX) explained...\r\nSeperator is either \"tab\" or \"space\" or any SINGLE character. X is the Xth seperator to pass before copying, (or to stop before).\r\n\r\n\
Lastly the line(...) variable...\r\n\
Inside the brackets must be either a number (to specify the line number), or a string inside \" marks (to use the line with that string), or lastline(X). The X in lastline is the Xth line above the last line. i.e lastline(1) will use the 2nd last line of the file. If searching for a line with \"some words\" you may put a + or - X after the closing ) i.e line(\"some words\")+3 to go 3 lines after the line with \"some words\".\r\n\r\n\
-Some Expamples...\r\n\
-filename(0) <- will display the filename of the 0th file\r\nfile(0)wholeline(line(0))) <- will display the whole first line of the 0th file\r\nfile(0)wholeline(line(\"hello\")-1))) <- the wholeline above the first occurance of \"hello\" in the file\r\nfile(0)start(line(lastline(1))csv(tab2))end(line(lastline())csv(tab4))) <- starts at the 2nd last line of the file, from the 2nd tab variable, untill the 4th tab variable in the last line (in the 0th file)\r\nfile(0)start(line(\"hello\")+1\"zzzz\")end(line(6)17)) <- starts from the first occurance of zzzz in the line after the first occurance of hello, untill the 17th character in the 6th line (starting from line 0) of the 0th file.\r\n")
+Some Examples...\r\n\
+filename(0) <- will display the filename of the 0th file\r\nfile(0)wholeline(line(0))) <- will display the whole first line of the 0th file\r\nfile(0)wholeline(line(\"hello\")-1))) <- the wholeline above the first occurance of \"hello\" in the file\r\nfile(0)start(line(lastline(1))csv(tab2))end(line(lastline())csv(tab4))) <- starts at the 2nd last line of the file, from the 2nd tab variable, until the 4th tab variable in the last line (in the 0th file)\r\nfile(0)start(line(\"hello\")+1\"zzzz\")end(line(6)17)) <- starts from the first occurance of zzzz in the line after the first occurance of hello, untill the 17th character in the 6th line (starting from line 0) of the 0th file.\r\n")
INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -20,13 +20,13 @@ INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
switch(msg) {
case WM_INITDIALOG:
{
- char tmp[5];
+ TCHAR tmp[5];
TranslateDialogDefault(hwnd);
CheckDlgButton(hwnd, IDC_AWAYISNOTONLINE, db_get_b(NULL, MODNAME, "AwayAsStatus", 0));
if (db_get_w(NULL, MODNAME, "Timer", 1))
{
EnableWindow(GetDlgItem(hwnd,IDC_TIMER_INT),1);
- SetDlgItemTextA(hwnd, IDC_TIMER_INT, _itoa(db_get_w(NULL, MODNAME, "Timer", 1),tmp,10));
+ SetDlgItemText(hwnd, IDC_TIMER_INT, _itot(db_get_w(NULL, MODNAME, "Timer", 1),tmp,10));
EnableWindow(GetDlgItem(hwnd,IDC_TIMER_TEXT),1);
}
else
@@ -52,7 +52,7 @@ INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
EnableWindow(GetDlgItem(hwnd,IDC_TIMER_TEXT),1);
EnableWindow(GetDlgItem(hwnd,IDC_TIMER_INT),1);
if (!GetWindowTextLength(GetDlgItem(hwnd, IDC_TIMER_INT)))
- SetDlgItemTextA(hwnd, IDC_TIMER_INT,"1");
+ SetDlgItemText(hwnd, IDC_TIMER_INT,_T("1"));
}
break;
@@ -65,11 +65,11 @@ INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- char tmp[5];
+ TCHAR tmp[5];
db_set_b(NULL, MODNAME, "AwayAsStatus", (BYTE)IsDlgButtonChecked(hwnd, IDC_AWAYISNOTONLINE));
if (!IsDlgButtonChecked(hwnd, IDC_DISABLETIMER) && GetWindowTextLength(GetDlgItem(hwnd, IDC_TIMER_INT))) {
- GetDlgItemTextA(hwnd, IDC_TIMER_INT, tmp, 4);
- db_set_w(NULL, MODNAME, "Timer",(WORD)atoi(tmp));
+ GetDlgItemText(hwnd, IDC_TIMER_INT, tmp, 4);
+ db_set_w(NULL, MODNAME, "Timer",(WORD)_ttoi(tmp));
}
else db_set_w(NULL, MODNAME, "Timer",0);
return TRUE;
@@ -105,7 +105,7 @@ INT_PTR CALLBACK HelpWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
{
switch(msg) {
case WM_INITDIALOG:
- SetDlgItemTextA(hwnd, IDC_HELPTEXT, NIM_HELP_TEXT);
+ SetDlgItemText(hwnd, IDC_HELPTEXT, NIM_HELP_TEXT);
TranslateDialogDefault(hwnd);
return TRUE;
@@ -251,7 +251,7 @@ void DoPropertySheet(HANDLE hContact, HINSTANCE hInst)
psp[0].pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_INFO);
psp[0].pszIcon = NULL;
psp[0].pfnDlgProc = DlgProcContactInfo;
- psp[0].pszTitle = "Contacts Display Info";
+ psp[0].pszTitle = Translate("Contacts Display Info");
psp[0].lParam = (LPARAM)hContact;
psp[0].pfnCallback = NULL;
@@ -262,7 +262,7 @@ void DoPropertySheet(HANDLE hContact, HINSTANCE hInst)
psp[1].pszTemplate = MAKEINTRESOURCEA(IDD_OTHER_STUFF);
psp[1].pszIcon = NULL;
psp[1].pfnDlgProc = DlgProcOtherStuff;
- psp[1].pszTitle = "Link and CList Settings";
+ psp[1].pszTitle = Translate("Link and CList Settings");
psp[1].lParam = (LPARAM)hContact;
psp[1].pfnCallback = NULL;
@@ -273,7 +273,7 @@ void DoPropertySheet(HANDLE hContact, HINSTANCE hInst)
psp[2].pszTemplate = MAKEINTRESOURCEA(IDD_CONTACT_COPYEXPORT);
psp[2].pszIcon = NULL;
psp[2].pfnDlgProc = DlgProcCopy;
- psp[2].pszTitle = "Copy Contact";
+ psp[2].pszTitle = Translate("Copy Contact");
psp[2].lParam = (LPARAM)hContact;
psp[2].pfnCallback = NULL;
@@ -284,7 +284,7 @@ void DoPropertySheet(HANDLE hContact, HINSTANCE hInst)
psp[3].pszTemplate = MAKEINTRESOURCEA(IDD_ADD_FILE);
psp[3].pszIcon = NULL;
psp[3].pfnDlgProc = DlgProcFiles;
- psp[3].pszTitle = "Files";
+ psp[3].pszTitle = Translate("Files");
psp[3].lParam = 0;
psp[3].pfnCallback = NULL;
@@ -294,7 +294,7 @@ void DoPropertySheet(HANDLE hContact, HINSTANCE hInst)
psh.hInstance = hInst;
psh.pszIcon = MAKEINTRESOURCEA(IDI_MAIN);
db_get_static(hContact, MODNAME, "Nick", nick);
- mir_snprintf(title, SIZEOF(title), "Edit Non-IM Contact \"%s\"", nick);
+ mir_snprintf(title, SIZEOF(title), Translate("Edit Non-IM Contact \"%s\""), nick);
psh.pszCaption = title;
psh.nPages = SIZEOF(psp);
psh.ppsp = (LPCPROPSHEETPAGEA)&psp;
@@ -310,7 +310,7 @@ INT_PTR addContact(WPARAM wParam,LPARAM lParam)
HANDLE hContact = (HANDLE) 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"));
+ db_set_ts(hContact, MODNAME, "Nick", TranslateT("New Non-IM Contact"));
DoPropertySheet(hContact, hInst);
if (!db_get_static(hContact, MODNAME, "Name", tmp))
CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp
index fc3174e7ad..70db1be310 100644
--- a/plugins/Non-IM Contact/src/files.cpp
+++ b/plugins/Non-IM Contact/src/files.cpp
@@ -7,7 +7,7 @@ INT_PTR exportContacts(WPARAM wParam,LPARAM lParam)
return 0;
FILE* file;
- if (MessageBoxA(0, "Do you want to overwrite the contents of the file?\r\n\r\nPressing No will append these contacts to the end of the file.",modFullname, MB_YESNO) == IDYES)
+ if (MessageBox(0, TranslateT("Do you want to overwrite the contents of the file?\r\n\r\nPressing No will append these contacts to the end of the file."),_T(modFullname), MB_YESNO) == IDYES)
file = fopen(fn, "w");
else
file = fopen(fn, "a");
@@ -107,7 +107,7 @@ void readFile(HWND hwnd)
int lineNumber, fileLength=0, width=0;
char temp[MAX_STRING_LENGTH], szFileName[512], temp1[MAX_STRING_LENGTH], fn[8];
FILE* filen;
- int fileNumber = SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_GETCURSEL, 0,0);
+ int fileNumber = SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_GETCURSEL, 0,0);
mir_snprintf(fn, SIZEOF(fn), "fn%d", fileNumber);
if (!db_get_static(NULL, MODNAME, fn, szFileName)) {
msg(Translate("File couldn't be opened"),fn);
@@ -123,7 +123,7 @@ void readFile(HWND hwnd)
return;
}
lineNumber = 0;
- SendMessage(GetDlgItem(hwnd, IDC_FILE_CONTENTS),LB_RESETCONTENT, 0,0);
+ SendDlgItemMessage(hwnd, IDC_FILE_CONTENTS,LB_RESETCONTENT, 0,0);
while (lineNumber < (MAXLINES) && (fgets(temp, MAX_STRING_LENGTH, filen)))
{
if (temp[0] == '\t') temp[0] = ' ';
@@ -133,11 +133,11 @@ void readFile(HWND hwnd)
temp[strlen(temp)-1]='\0';
else temp[strlen(temp)]='\0';
mir_snprintf(temp1, SIZEOF(temp1), Translate("line(%-3d) = | %s"), lineNumber, temp);
- SendMessageA(GetDlgItem(hwnd, IDC_FILE_CONTENTS),LB_ADDSTRING,0,(LPARAM)(char*)temp1);
+ SendDlgItemMessageA(hwnd, IDC_FILE_CONTENTS,LB_ADDSTRING,0,(LPARAM)temp1);
lineNumber++;
fileLength++;
- if ((unsigned int)SendMessage(GetDlgItem(hwnd, IDC_FILE_CONTENTS),LB_GETHORIZONTALEXTENT,0,0) <= (strlen(temp1)*db_get_b(NULL, MODNAME, "WidthMultiplier", 5)))
- SendMessage(GetDlgItem(hwnd, IDC_FILE_CONTENTS),LB_SETHORIZONTALEXTENT,(strlen(temp1)*db_get_b(NULL, MODNAME, "WidthMultiplier", 5)),0);
+ if ((unsigned int)SendDlgItemMessage(hwnd, IDC_FILE_CONTENTS,LB_GETHORIZONTALEXTENT,0,0) <= (strlen(temp1)*db_get_b(NULL, MODNAME, "WidthMultiplier", 5)))
+ SendDlgItemMessage(hwnd, IDC_FILE_CONTENTS,LB_SETHORIZONTALEXTENT,(strlen(temp1)*db_get_b(NULL, MODNAME, "WidthMultiplier", 5)),0);
}
fclose(filen);
@@ -153,9 +153,9 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
char fn[MAX_PATH], string[MAX_STRING_LENGTH], tmp[MAX_STRING_LENGTH];
reloadFiles(GetDlgItem(hwnd, IDC_FILE_LIST));
- int i = SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_GETCURSEL, 0 ,0);
+ int i = SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_GETCURSEL, 0 ,0);
mir_snprintf(fn, SIZEOF(fn), "fn%d", i);
- SendMessage(GetDlgItem(hwnd, IDC_FILE_CONTENTS),LB_RESETCONTENT, 0,0);
+ SendDlgItemMessage(hwnd, IDC_FILE_CONTENTS,LB_RESETCONTENT, 0,0);
if (db_get_static(NULL, MODNAME, fn, string) )
{
if ( (!strncmp("http://", string, strlen("http://"))) || (!strncmp("https://", string, strlen("https://"))) )
@@ -230,8 +230,8 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
db_set_s(NULL, MODNAME, fn, file);
index = SendMessageA(GetDlgItem(hwnd, IDC_FILE_LIST),CB_ADDSTRING,0,(LPARAM)(char*)file);
- SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_SETITEMDATA,index,(LPARAM)(int)i);
- SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_SETCURSEL, index ,0);
+ SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_SETITEMDATA,index,(LPARAM)(int)i);
+ SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_SETCURSEL, index ,0);
SetDlgItemTextA(hwnd, IDC_FN, _itoa(i, fn, 10));
mir_snprintf(fn, SIZEOF(fn), "fn%d", index);
readFile(hwnd);
@@ -241,18 +241,18 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
break;
case IDC_DEL_FILE:
{
- int index = SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_GETCURSEL, 0,0),i= (int)SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_GETITEMDATA, index,0);
+ int index = SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_GETCURSEL, 0,0),i= (int)SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_GETITEMDATA, index,0);
char fn[6], fn1[4], tmp[256];
- int count = SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_GETCOUNT, 0,0) -1;
+ int count = SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_GETCOUNT, 0,0) -1;
if (index == count)
{
mir_snprintf(fn, SIZEOF(fn), "fn%d", index);
db_unset(NULL, MODNAME, fn);
- SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_DELETESTRING, index ,0);
+ SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_DELETESTRING, index ,0);
SendMessage(hwnd, WM_RELOADWINDOW, 0,0);
if (!index) {
- SetDlgItemTextA(hwnd, IDC_FN,"");
- SetDlgItemTextA(hwnd, IDC_FILE_CONTENTS,"");
+ SetDlgItemText(hwnd, IDC_FN,_T(""));
+ SetDlgItemText(hwnd, IDC_FILE_CONTENTS,_T(""));
}
}
@@ -267,7 +267,7 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
mir_snprintf(fn, SIZEOF(fn), "fn%d", --i);
db_unset(NULL, MODNAME, fn);
- SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_DELETESTRING, index ,0);
+ SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_DELETESTRING, index ,0);
SendMessage(hwnd, WM_RELOADWINDOW, 0,0);
}
@@ -278,7 +278,7 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case IDC_FILE_LIST:
if (HIWORD(wParam) == CBN_SELCHANGE )
{
- int index = SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_GETCURSEL, 0,0);
+ int index = SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_GETCURSEL, 0,0);
char fn[6], tmp[MAX_PATH];
SetDlgItemTextA(hwnd, IDC_FN, _itoa(index, fn, 10));
mir_snprintf(fn, SIZEOF(fn), "fn%d", index);
@@ -291,8 +291,8 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
else
{
- SetDlgItemTextA(hwnd,IDC_URL, "");
- SetDlgItemTextA(hwnd, IDC_WWW_TIMER,"");
+ SetDlgItemText(hwnd,IDC_URL, _T(""));
+ SetDlgItemText(hwnd, IDC_WWW_TIMER,_T(""));
}
readFile(hwnd);
}
@@ -309,14 +309,14 @@ INT_PTR CALLBACK DlgProcFiles(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- int i = SendMessage(GetDlgItem(hwnd, IDC_FILE_LIST),CB_GETCURSEL, 0 ,0);
+ int i = SendDlgItemMessage(hwnd, IDC_FILE_LIST,CB_GETCURSEL, 0 ,0);
int timer;
char fn[MAX_PATH], string[1000];
mir_snprintf(fn, SIZEOF(fn), "fn%d", i);
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_WWW_TIMER))) {
- char text[5];
- GetDlgItemTextA(hwnd,IDC_WWW_TIMER,text,sizeof(text));
- timer = atoi(text);
+ TCHAR text[5];
+ GetDlgItemText(hwnd,IDC_WWW_TIMER,text,SIZEOF(text));
+ timer = _ttoi(text);
}
else timer = 60;
diff --git a/plugins/Non-IM Contact/src/http.cpp b/plugins/Non-IM Contact/src/http.cpp
index f4b8b006d8..5c300de80e 100644
--- a/plugins/Non-IM Contact/src/http.cpp
+++ b/plugins/Non-IM Contact/src/http.cpp
@@ -31,9 +31,9 @@ HANDLE hNetlibUser;
// szUrl = URL of the webpage to be retrieved
// return value = 0 for success, 1 or HTTP error code for failure
// global var used: szData, szInfo = containing the retrieved data
-int InternetDownloadFile (CHAR *szUrl)
+int InternetDownloadFile (char *szUrl)
{
- NETLIBHTTPREQUEST nlhr={0}, *nlhrReply;
+ NETLIBHTTPREQUEST nlhr={0};
// initialize the netlib request
nlhr.cbSize=sizeof(nlhr);
@@ -48,11 +48,11 @@ int InternetDownloadFile (CHAR *szUrl)
nlhr.headers[nlhr.headersCount-1].szValue="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
// download the page
- nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlibUser,(LPARAM)&nlhr);
+ NETLIBHTTPREQUEST *nlhrReply=(NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION,(WPARAM)hNetlibUser,(LPARAM)&nlhr);
if (nlhrReply) {
// return error code if the recieved code is neither 200 OK or 302 Moved
if (nlhrReply->resultCode != 200 && nlhrReply->resultCode != 302)
- return (int)nlhrReply->resultCode;
+ return nlhrReply->resultCode;
// if the recieved code is 200 OK
else if (nlhrReply->resultCode == 200)
{
@@ -92,12 +92,11 @@ int InternetDownloadFile (CHAR *szUrl)
//============ NETLIB INITIALIZATION ============
-// initialize netlib support from weather protocol
void NetlibInit() {
NETLIBUSER nlu={0};
nlu.cbSize=sizeof(nlu);
- nlu.flags=NUF_OUTGOING|NUF_HTTPCONNS|NUF_NOHTTPSOPTION;
+ nlu.flags=NUF_OUTGOING|NUF_HTTPCONNS|NUF_NOHTTPSOPTION|NUF_TCHAR;
nlu.szSettingsModule= MODNAME;
- nlu.szDescriptiveName= Translate("Non-IM Contacts");
+ nlu.ptszDescriptiveName= TranslateT("Non-IM Contacts");
hNetlibUser=(HANDLE)CallService(MS_NETLIB_REGISTERUSER,0,(LPARAM)&nlu);
}