From fd8eefffc4b86f389c72e9cb88cf34533c759657 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 14 Mar 2013 14:01:46 +0000 Subject: try to add unicode support git-svn-id: http://svn.miranda-ng.org/main/trunk@4024 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WhoUsesMyFiles/src/list.cpp | 32 +++++------ plugins/WhoUsesMyFiles/src/resizer.cpp | 4 +- plugins/WhoUsesMyFiles/src/wumf.cpp | 45 +++++++--------- plugins/WhoUsesMyFiles/src/wumf.h | 27 +++++----- plugins/WhoUsesMyFiles/src/wumfplug.cpp | 95 ++++++++++++++++----------------- plugins/WhoUsesMyFiles/wumf_10.vcxproj | 8 +-- plugins/WhoUsesMyFiles/wumf_11.vcxproj | 8 +-- 7 files changed, 106 insertions(+), 113 deletions(-) (limited to 'plugins/WhoUsesMyFiles') diff --git a/plugins/WhoUsesMyFiles/src/list.cpp b/plugins/WhoUsesMyFiles/src/list.cpp index 1f635837ca..6044021819 100644 --- a/plugins/WhoUsesMyFiles/src/list.cpp +++ b/plugins/WhoUsesMyFiles/src/list.cpp @@ -10,31 +10,33 @@ PWumf new_wumf( DWORD dwID, DWORD dwAttr) { PWumf w; - CHAR szID[10]; + //TCHAR szID[10]; w = (PWumf)malloc(sizeof(Wumf)); if(!w)return NULL; - #define SCPY(X) if(X){w->X = (LPSTR)malloc(1+strlen(X));if(!w->X)return NULL;strcpy(w->X, X);} else { w->X = NULL;} - #define SCPYW(X) if(X){w->X = (LPSTR)malloc(1+lstrlenW((LPWSTR)X));if(!w->X)return NULL;wsprintfA(w->X, "%S", X);} else { w->X = NULL;} + //#define SCPY(X) if(X){w->X = (LPTSTR)malloc(1+_tcslen(X));if(!w->X)return NULL;_tcscpy(w->X, X);} else { w->X = NULL;} + //#define SCPYW(X) if(X){w->X = (LPTSTR)malloc(1+lstrlenW((LPWSTR)X));if(!w->X)return NULL;wsprintfA(w->X, "%S", X);} else { w->X = NULL;} - #define SCCPY(X, Y) w->X = (LPSTR)malloc(1+strlen(Y));if(!w->X)return NULL;strcpy(w->X, Y) + //#define SCCPY(X, Y) w->X = (LPSTR)malloc(1+strlen(Y));if(!w->X)return NULL;strcpy(w->X, Y) + + _tcscpy(w->szUser, szUser); + _tcscpy(w->szPath, szPath); + _tcscpy(w->szComp, szComp); + _tcscpy(w->szUNC, szUNC); - SCPYW(szUser); - SCPYW(szPath); - SCPYW(szComp); - SCPYW(szUNC); switch(dwPerm) { - case PERM_FILE_READ: SCCPY(szPerm, "Read");break; - case PERM_FILE_WRITE: SCCPY(szPerm, "Write");break; - case PERM_FILE_CREATE: SCCPY(szPerm, "Create");break; - default: SCCPY(szPerm, "Execute");//w->szPerm = NULL; + case PERM_FILE_READ: _tcscpy(w->szPerm, _T("Read"));break; + case PERM_FILE_WRITE: _tcscpy(w->szPerm, _T("Write"));break; + case PERM_FILE_CREATE: _tcscpy(w->szPerm, _T("Create"));break; + default: _tcscpy(w->szPerm, _T("Execute"));//w->szPerm = NULL; }; - wsprintf(szID, "%i", dwID); - SCPY(szID); + wsprintf(w->szID, _T("%i"), dwID); + //_tcscpy(w->szID, szID); + //SCPY(szID); - #undef SCPY + //#undef SCPY w->dwID = dwID; w->dwSess = dwSess; w->dwAttr = dwAttr; diff --git a/plugins/WhoUsesMyFiles/src/resizer.cpp b/plugins/WhoUsesMyFiles/src/resizer.cpp index 17121b1e9f..a29d5e7cc2 100644 --- a/plugins/WhoUsesMyFiles/src/resizer.cpp +++ b/plugins/WhoUsesMyFiles/src/resizer.cpp @@ -24,7 +24,7 @@ typedef struct { short cy; } START_OF_DLGTEMPLATEEX; -int ResizeDialog(WPARAM wParam,LPARAM lParam) +int ResizeDialog(WPARAM wParam, LPARAM lParam) { UTILRESIZEDIALOG *urd=(UTILRESIZEDIALOG*)lParam; HDWP hDwp; @@ -42,7 +42,7 @@ int ResizeDialog(WPARAM wParam,LPARAM lParam) if(urd->cbSize != sizeof(UTILRESIZEDIALOG)) return 1; - pTemplate = (DLGTEMPLATE*)LockResource(LoadResource(urd->hInstance,FindResource(urd->hInstance,urd->lpTemplate,RT_DIALOG))); + pTemplate = (DLGTEMPLATE*)LockResource(LoadResource(urd->hInstance, FindResourceA(urd->hInstance, urd->lpTemplate, MAKEINTRESOURCEA(5)))); pTemplateEx = (START_OF_DLGTEMPLATEEX*)pTemplate; extendedDlg = pTemplateEx->signature == 0xFFFF; if(extendedDlg && pTemplateEx->dlgVer!=1) diff --git a/plugins/WhoUsesMyFiles/src/wumf.cpp b/plugins/WhoUsesMyFiles/src/wumf.cpp index 4deb46a1b6..ee784a735a 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.cpp +++ b/plugins/WhoUsesMyFiles/src/wumf.cpp @@ -73,11 +73,6 @@ int CALLBACK ConnDlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { UTILRESIZEDIALOG urd={0}; LV_COLUMN lvc = { 0 }; - char col0[] = "ID"; - char col1[] = "User"; - char col2[] = "File"; - char col3[] = "Access"; -// char buff[256]; HWND hList; switch( Msg ) { @@ -88,27 +83,23 @@ int CALLBACK ConnDlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) lvc.mask = LVCF_TEXT|LVCF_FMT|LVCF_WIDTH; lvc.fmt = LVCFMT_LEFT; lvc.cx = 40; - lvc.pszText = col0; - lvc.cchTextMax = sizeof(col0); + lvc.pszText = TranslateT("ID"); ListView_InsertColumn(hList, 0, &lvc); lvc.cx = 50; - lvc.pszText = col1; - lvc.cchTextMax = sizeof(col1); + lvc.pszText = TranslateT("User"); ListView_InsertColumn(hList, 1, &lvc); lvc.cx = 250; - lvc.pszText = col2; - lvc.cchTextMax = sizeof(col2); + lvc.pszText = TranslateT("File"); ListView_InsertColumn(hList, 2, &lvc); lvc.cx = 50; - lvc.pszText = col3; - lvc.cchTextMax = sizeof(col3); + lvc.pszText = TranslateT("Access"); ListView_InsertColumn(hList, 3, &lvc); KillTimer(NULL, 777); lst = cpy_list(&list); if (IsUserAnAdmin()) { SetTimer(NULL, 777, TIME,(TIMERPROC) TimerProc); } else { - MessageBox(NULL, "Plugin WhoUsesMyFiles requires admin privileges in order to work.", "Miranda NG", MB_OK); + MessageBox(NULL, TranslateT("Plugin WhoUsesMyFiles requires admin privileges in order to work."), _T("Miranda NG"), MB_OK); } ShowList(lst, hList); Utils_RestoreWindowPosition(hWnd, NULL, ModuleName,"conn"); @@ -129,7 +120,7 @@ int CALLBACK ConnDlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) urd.cbSize=sizeof(urd); urd.hwndDlg=hWnd; urd.hInstance=hInst; - urd.lpTemplate=MAKEINTRESOURCE(IDD_CONNLIST); + urd.lpTemplate = MAKEINTRESOURCEA(IDD_CONNLIST); urd.lParam=(LPARAM)NULL; urd.pfnResizer=DlgResizer; ResizeDialog(0,(LPARAM)&urd); @@ -158,10 +149,10 @@ int CALLBACK ConnDlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) void LogWumf(PWumf w) { - char str[256]; + TCHAR str[256]; LPTSTR lpstr; - char lpDateStr[20]; - char lpTimeStr[20]; + TCHAR lpDateStr[20]; + TCHAR lpTimeStr[20]; SYSTEMTIME time; DWORD bytes; @@ -186,17 +177,17 @@ void LogWumf(PWumf w) (LPTSTR) &lpstr, 0, NULL); - wsprintf(str, "Can't open log file %s\nError:%s", WumfOptions.LogFile, lpstr); + mir_sntprintf(str, SIZEOF(str), _T("Can't open log file %s\nError:%s"), WumfOptions.LogFile, lpstr); LocalFree(lpstr); - MessageBox( NULL, str, "Error opening file", MB_OK | MB_ICONSTOP); + MessageBox( NULL, str, TranslateT("Error opening file"), MB_OK | MB_ICONSTOP); WumfOptions.LogToFile = FALSE; } } GetLocalTime(&time); - GetDateFormat(LOCALE_USER_DEFAULT,DATE_SHORTDATE, &time,NULL, lpDateStr, 20); - GetTimeFormat(LOCALE_USER_DEFAULT,TIME_FORCE24HOURFORMAT|TIME_NOTIMEMARKER, &time,NULL, lpTimeStr, 20); - wsprintf(str ,"%s %s %20s\t%s\r\n\0",lpDateStr, lpTimeStr, w->szUser, w->szPath); - SetFilePointer (hLog, 0, NULL, FILE_END); + GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, &time, NULL, lpDateStr, 20); + GetTimeFormat(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT | TIME_NOTIMEMARKER, &time, NULL, lpTimeStr, 20); + mir_sntprintf(str, SIZEOF(str), _T("%s %s %20s\t%s\r\n\0"), lpDateStr, lpTimeStr, w->szUser, w->szPath); + SetFilePointer(hLog, 0, NULL, FILE_END); WriteFile(hLog, str, (DWORD)_tcslen(str), &bytes, NULL); } @@ -275,7 +266,7 @@ void process_session(SESSION_INFO_1 s_info) LPFILE_INFO_3 f_info = NULL; DWORD ent_read = 0, ent_total = 0, res_handle = 0, i = 0; NET_API_STATUS res = NERR_Success; - if( (res = NetFileEnum(NULL, NULL, s_info.sesi1_username, 3, (LPBYTE *)&f_info, MAX_PREFERRED_LENGTH, &ent_read, &ent_total, &res_handle)) == NERR_Success || + if( (res = NetFileEnum(NULL, NULL, s_info.sesi1_username, 3, (LPBYTE *)&f_info, MAX_PREFERRED_LENGTH, &ent_read, &ent_total, (PDWORD_PTR)&res_handle)) == NERR_Success || res == ERROR_MORE_DATA) { for(i = 0; i < ent_read; i++) @@ -293,10 +284,10 @@ void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info) PWumf w = fnd_cell(&list, f_info.fi3_id); if(!w) { - w = new_wumf(f_info.fi3_id, (LPSTR)f_info.fi3_username, (LPSTR)f_info.fi3_pathname, (LPSTR)s_info.sesi1_cname, NULL, 0, f_info.fi3_permissions, GetFileAttributes((LPSTR)f_info.fi3_pathname)); + w = new_wumf(f_info.fi3_id, f_info.fi3_username, f_info.fi3_pathname, s_info.sesi1_cname, NULL, 0, f_info.fi3_permissions, GetFileAttributes(f_info.fi3_pathname)); w->mark = FALSE; if(!add_cell(&list, w)){ - msg("Error memory allocation"); + msg(TranslateT("Error memory allocation")); }; if(WumfOptions.PopupsEnabled) ShowWumfPopUp(w); if(WumfOptions.LogToFile) LogWumf(w); diff --git a/plugins/WhoUsesMyFiles/src/wumf.h b/plugins/WhoUsesMyFiles/src/wumf.h index f817d6dbf9..173a09703f 100644 --- a/plugins/WhoUsesMyFiles/src/wumf.h +++ b/plugins/WhoUsesMyFiles/src/wumf.h @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -71,17 +72,17 @@ typedef struct BOOL LogComp; BOOL AlertComp; - char LogFile[255]; + TCHAR LogFile[255]; } WUMF_OPTIONS; typedef struct _WUMF{ DWORD dwID; - LPSTR szID; - LPSTR szUser; - LPSTR szPath; - LPSTR szComp; - LPSTR szUNC; - LPSTR szPerm; + LPTSTR szID; + LPTSTR szUser; + LPTSTR szPath; + LPTSTR szComp; + LPTSTR szUNC; + LPTSTR szPerm; DWORD dwSess; DWORD dwLocks; DWORD dwAttr; @@ -92,10 +93,10 @@ typedef struct _WUMF{ PWumf new_wumf( DWORD dwID, - LPSTR szUser, - LPSTR szPath, - LPSTR szComp, - LPSTR szUNC, + LPTSTR szUser, + LPTSTR szPath, + LPTSTR szComp, + LPTSTR szUNC, DWORD szSess, DWORD dwPerm, DWORD dwAttr); @@ -120,14 +121,14 @@ VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD); int CALLBACK ConnDlgProc(HWND, UINT, WPARAM, LPARAM); int ResizeDialog(WPARAM wParam,LPARAM lParam); -void ShowThePopUp(PWumf w, LPSTR, LPSTR); +void ShowThePopUp(PWumf w, LPTSTR, LPTSTR); void ShowWumfPopUp(PWumf w); void process_session(SESSION_INFO_1 s_info); void process_file(SESSION_INFO_1 s_info, FILE_INFO_3 f_info); void printError(DWORD res); -#define msg(X) MessageBox(NULL, X, "WUMF", MB_OK|MB_ICONSTOP) +#define msg(X) MessageBox(NULL, X, _T("WUMF"), MB_OK|MB_ICONSTOP) #define MS_WUMF_SWITCHPOPUP "WUMF/SwitchPopup" #define MS_WUMF_CONNECTIONSSHOW "WUMF/ShowConnections" diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp index 9dd9c58c93..7c206e9489 100644 --- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp +++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp @@ -23,11 +23,11 @@ static PLUGININFOEX pluginInfo = { void LoadOptions() { DBVARIANT dbv = { 0 }; - dbv.type = DBVT_ASCIIZ; + dbv.type = DBVT_TCHAR; ZeroMemory(&WumfOptions, sizeof(WumfOptions)); if (DBGetContactSetting(NULL, ModuleName, OPT_FILE, &dbv) == 0) { - strncpy(WumfOptions.LogFile, dbv.pszVal, 255); + _tcsncpy(WumfOptions.LogFile, dbv.ptszVal, 255); } else { @@ -71,14 +71,14 @@ void ExecuteMenu(HWND hWnd) hMenu=CreatePopupMenu(); if(!hMenu) { - MessageBox(NULL, "Error crerating menu", "WUMF",MB_OK); + msg(TranslateT("Error crerating menu")); return; }; - AppendMenu(hMenu,MF_STRING,IDM_ABOUT, "About\0"); - AppendMenu(hMenu,MF_SEPARATOR,0,NULL);//------------------ - AppendMenu(hMenu,MF_STRING,IDM_SHOW, "Show connections\0"); - AppendMenu(hMenu,MF_SEPARATOR,0,NULL);//------------------ - AppendMenu(hMenu,MF_STRING,IDM_EXIT, "Dismiss popup\0"); + AppendMenu(hMenu, MF_STRING, IDM_ABOUT, _T("About\0")); + AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);//------------------ + AppendMenu(hMenu, MF_STRING, IDM_SHOW, _T("Show connections\0")); + AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);//------------------ + AppendMenu(hMenu, MF_STRING, IDM_EXIT, _T("Dismiss popup\0")); GetCursorPos (&point); SetForegroundWindow (hWnd); @@ -130,16 +130,16 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM void ShowWumfPopUp(PWumf w) { - char text[512], title[512]; + TCHAR text[512], title[512]; if(!WumfOptions.AlertFolders && (w->dwAttr & FILE_ATTRIBUTE_DIRECTORY)) return; - mir_snprintf(title, sizeof(title)/sizeof(title[0]), "%s (%s)", w->szComp, w->szUser); - mir_snprintf(text, sizeof(text)/sizeof(text[0]), "%s (%s)", w->szPath, w->szPerm); + mir_sntprintf(title, SIZEOF(title), _T("%s (%s)"), w->szComp, w->szUser); + mir_sntprintf(text, SIZEOF(text), _T("%s (%s)"), w->szPath, w->szPerm); ShowThePopUp(w, title, text); } -void ShowThePopUp(PWumf w, LPSTR title, LPSTR text) +void ShowThePopUp(PWumf w, LPTSTR title, LPTSTR text) { - POPUPDATAEX ppd = { 0 }; + POPUPDATAT ppd = { 0 }; COLORREF colorBack; COLORREF colorText; @@ -163,8 +163,8 @@ void ShowThePopUp(PWumf w, LPSTR title, LPSTR text) ppd.iSeconds = WumfOptions.DelaySec; } - lstrcpyn(ppd.lpzContactName, title, 128); - lstrcpyn(ppd.lpzText, text, 128); + lstrcpyn(ppd.lptzContactName, title, 128); + lstrcpyn(ppd.lptzText, text, 128); if(WumfOptions.UseWinColor) { ppd.colorBack = GetSysColor(COLOR_WINDOW); @@ -191,35 +191,35 @@ void ShowThePreview() { if(!ServiceExists(MS_POPUP_ADDPOPUP)) { - MessageBox(NULL,"PopUp plugin not found!", "WUMF plugin", MB_OK|MB_ICONSTOP); + MessageBox(NULL, TranslateT("PopUp plugin not found!"), TranslateT("WUMF plugin"), MB_OK|MB_ICONSTOP); return; }; if(WumfOptions.AlertFolders) { - ShowThePopUp(NULL, "Guest", "C:\\My Share"); + ShowThePopUp(NULL, _T("Guest"), _T("C:\\My Share")); Sleep(300); - ShowThePopUp(NULL, "Guest", "C:\\My Share\\Photos"); + ShowThePopUp(NULL, _T("Guest"), _T("C:\\My Share\\Photos")); Sleep(300); } - ShowThePopUp(NULL, "Guest", "C:\\Share\\My Photos\\photo.jpg"); + ShowThePopUp(NULL, _T("Guest"), _T("C:\\Share\\My Photos\\photo.jpg")); Sleep(300); if(WumfOptions.AlertFolders) { - ShowThePopUp(NULL, "User", "C:\\My Share"); + ShowThePopUp(NULL, _T("User"), _T("C:\\My Share")); Sleep(300); - ShowThePopUp(NULL, "User", "C:\\My Share\\Movies"); + ShowThePopUp(NULL, _T("User"), _T("C:\\My Share\\Movies")); Sleep(300); } - ShowThePopUp(NULL, "User", "C:\\My Share\\Movies\\The Two Towers.avi"); + ShowThePopUp(NULL, _T("User"), _T("C:\\My Share\\Movies\\The Two Towers.avi")); Sleep(300); if(WumfOptions.AlertFolders) { - ShowThePopUp(NULL, "Administrator", "C:\\Distributives"); + ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives")); Sleep(300); - ShowThePopUp(NULL, "Administrator", "C:\\Distributives\\Win2k"); + ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives\\Win2k")); Sleep(300); } - ShowThePopUp(NULL, "Administrator", "C:\\Distributives\\Win2k\\setup.exe"); + ShowThePopUp(NULL, _T("Administrator"), _T("C:\\Distributives\\Win2k\\setup.exe")); }; @@ -304,17 +304,16 @@ void DisableDelayOptions(HWND hwndDlg) } void ChooseFile(HWND hDlg) { - OPENFILENAME ofn; // common dialog box structure - char szFile[260]; // buffer for filename + OPENFILENAME ofn = {0}; // common dialog box structure + TCHAR szFile[260]; // buffer for filename HANDLE hf; // file handle // Initialize OPENFILENAME - ZeroMemory(&ofn, sizeof(OPENFILENAME)); ofn.lStructSize = sizeof(OPENFILENAME); - ofn.hwndOwner =hDlg; + ofn.hwndOwner = hDlg; szFile[0]=0; ofn.lpstrFile = szFile; ofn.nMaxFile = 260; - ofn.lpstrFilter = "All files (*.*)\0*.*\0Text files (*.txt)\0*.txt\0Log files (*.log)\0*.log\0\0"; + ofn.lpstrFilter = _T("All files (*.*)\0*.*\0Text files (*.txt)\0*.txt\0Log files (*.log)\0*.log\0\0"); ofn.nFilterIndex = 2; ofn.lpstrFileTitle = NULL; ofn.nMaxFileTitle = 0; @@ -339,9 +338,9 @@ void ChooseFile(HWND hDlg) } else if(CommDlgExtendedError()!=0L) { - char str[256]; - wsprintf(str,"Common Dialog Error 0x%lx",CommDlgExtendedError()); - MessageBox(hDlg,str,"Wumf plugin",MB_OK|MB_ICONSTOP); + TCHAR str[256]; + mir_sntprintf(str, SIZEOF(str), TranslateT("Common Dialog Error 0x%lx"), CommDlgExtendedError()); + MessageBox(hDlg, str, TranslateT("Wumf plugin"), MB_OK | MB_ICONSTOP); }; }; @@ -395,7 +394,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara CheckDlgButton(hwndDlg,IDC_LOG_INTO_FILE,BST_UNCHECKED); EnableWindow(GetDlgItem(hwndDlg, IDC_FILE), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_SEL_FILE), FALSE); - SetDlgItemText(hwndDlg,IDC_FILE,""); + SetDlgItemText(hwndDlg, IDC_FILE, _T("")); }; break; @@ -432,7 +431,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara case IDC_ALERT_COMP: case IDC_LOG_UNC: case IDC_ALERT_UNC: - MessageBox(NULL, "Not implemented yet...", "WUMF", MB_OK|MB_ICONINFORMATION); + MessageBox(NULL, TranslateT("Not implemented yet..."), _T("WUMF"), MB_OK | MB_ICONINFORMATION); break; /* end */ case IDC_LOG_INTO_FILE: @@ -530,8 +529,8 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wparam,LPARAM lpara DBWriteContactSettingByte(NULL,ModuleName, ALERT_UNC, (BYTE)WumfOptions.AlertUNC); DBWriteContactSettingByte(NULL,ModuleName, LOG_COMP, (BYTE)WumfOptions.LogComp); DBWriteContactSettingByte(NULL,ModuleName, ALERT_COMP, (BYTE)WumfOptions.AlertComp); - GetDlgItemText(hwndDlg,IDC_FILE,WumfOptions.LogFile, 255); - DBWriteContactSettingString(NULL,ModuleName, OPT_FILE, WumfOptions.LogFile); + GetDlgItemText(hwndDlg, IDC_FILE, WumfOptions.LogFile, 255); + DBWriteContactSettingTString(NULL, ModuleName, OPT_FILE, WumfOptions.LogFile); break; } break; @@ -553,19 +552,19 @@ int InitTopToolbar(WPARAM wparam,LPARAM lparam) return 0; } -int OptionsInit(WPARAM wparam,LPARAM lparam) +int OptionsInit(WPARAM wparam, LPARAM lparam) { - OPTIONSDIALOGPAGE odp = { 0 }; + OPTIONSDIALOGPAGE odp = {0}; - odp.cbSize=sizeof(odp); - odp.position=945000000; - odp.hInstance=hInst; - odp.pszTemplate=MAKEINTRESOURCE(IDD_OPTIONS); - odp.pszTitle=LPGEN("Wumf"); - odp.pfnDlgProc=OptionsDlgProc; - odp.pszGroup=LPGEN("Services"); - odp.flags=ODPF_BOLDGROUPS; + odp.cbSize = sizeof(odp); + odp.position = 945000000; + odp.hInstance = hInst; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS); + odp.pszTitle = LPGEN("Wumf"); + odp.pfnDlgProc = OptionsDlgProc; + odp.pszGroup = LPGEN("Services"); + odp.flags = ODPF_BOLDGROUPS; Options_AddPage(wparam, &odp); return 0; } @@ -609,7 +608,7 @@ extern "C" __declspec(dllexport) int Load(void) if (IsUserAnAdmin()) { SetTimer(NULL, 777, TIME,(TIMERPROC) TimerProc); } else { - MessageBox(NULL, "Plugin WhoUsesMyFiles requires admin privileges in order to work.", "Miranda NG", MB_OK); + MessageBox(NULL, TranslateT("Plugin WhoUsesMyFiles requires admin privileges in order to work."), _T("Miranda NG"), MB_OK); } return 0; diff --git a/plugins/WhoUsesMyFiles/wumf_10.vcxproj b/plugins/WhoUsesMyFiles/wumf_10.vcxproj index 7b37a26c10..f9fc424bcd 100644 --- a/plugins/WhoUsesMyFiles/wumf_10.vcxproj +++ b/plugins/WhoUsesMyFiles/wumf_10.vcxproj @@ -25,21 +25,21 @@ DynamicLibrary - MultiByte + Unicode true DynamicLibrary - MultiByte + Unicode true DynamicLibrary - MultiByte + Unicode DynamicLibrary - MultiByte + Unicode diff --git a/plugins/WhoUsesMyFiles/wumf_11.vcxproj b/plugins/WhoUsesMyFiles/wumf_11.vcxproj index 6b2f4b4c72..f2d30d8dff 100644 --- a/plugins/WhoUsesMyFiles/wumf_11.vcxproj +++ b/plugins/WhoUsesMyFiles/wumf_11.vcxproj @@ -25,24 +25,24 @@ DynamicLibrary - MultiByte + Unicode true v110_xp DynamicLibrary - MultiByte + Unicode true v110_xp DynamicLibrary - MultiByte + Unicode v110_xp DynamicLibrary - MultiByte + Unicode v110_xp -- cgit v1.2.3