summaryrefslogtreecommitdiff
path: root/src/modules/database
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/database')
-rw-r--r--src/modules/database/database.cpp40
-rw-r--r--src/modules/database/dbini.cpp146
-rw-r--r--src/modules/database/dblists.cpp4
-rw-r--r--src/modules/database/dblists.h6
-rw-r--r--src/modules/database/dbutils.cpp12
-rw-r--r--src/modules/database/profilemanager.cpp66
-rw-r--r--src/modules/database/profilemanager.h2
7 files changed, 138 insertions, 138 deletions
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index 0ed1001308..e4b2663b60 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -2,7 +2,7 @@
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2010 Miranda ICQ/IM project,
+Copyright 2000-2010 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -333,9 +333,9 @@ static int getProfile(TCHAR * szProfile, size_t cch)
getProfileCmdLine(szProfile, cch, g_profileDir);
if (IsInsideRootDir(g_profileDir, true))
{
- MessageBox(NULL,
+ MessageBox(NULL,
_T("Profile cannot be placed into Miranda root folder.\n")
- _T("Please move Miranda profile to some other location."),
+ _T("Please move Miranda profile to some other location."),
_T("Miranda IM"), MB_ICONERROR | MB_OK);
return 0;
}
@@ -395,8 +395,8 @@ int makeDatabase(TCHAR * profile, DATABASELINK * link, HWND hwndDlg)
sf.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO;
mir_sntprintf(buf, SIZEOF(buf), _T("%s\0"), profile);
if ( SHFileOperation(&sf) != 0 ) {
- mir_sntprintf(buf, SIZEOF(buf),TranslateT("Couldn't move '%s' to the Recycle Bin, Please select another profile name."),file);
- MessageBox(0,buf,TranslateT("Problem moving profile"),MB_ICONINFORMATION|MB_OK);
+ mir_sntprintf(buf, SIZEOF(buf), TranslateT("Couldn't move '%s' to the Recycle Bin, Please select another profile name."), file);
+ MessageBox(0, buf, TranslateT("Problem moving profile"), MB_ICONINFORMATION|MB_OK);
return 0;
}
// now the file should be gone!
@@ -405,8 +405,8 @@ int makeDatabase(TCHAR * profile, DATABASELINK * link, HWND hwndDlg)
CreatePathToFileT(profile);
char *prf = makeFileName(profile);
if (link->makeDatabase(prf, &err)) {
- mir_sntprintf(buf, SIZEOF(buf),TranslateT("Unable to create the profile '%s', the error was %x"),file, err);
- MessageBox(hwndDlg,buf,TranslateT("Problem creating profile"),MB_ICONERROR|MB_OK);
+ mir_sntprintf(buf, SIZEOF(buf), TranslateT("Unable to create the profile '%s', the error was %x"), file, err);
+ MessageBox(hwndDlg, buf, TranslateT("Problem creating profile"), MB_ICONERROR|MB_OK);
mir_free(prf);
return 0;
}
@@ -488,7 +488,7 @@ static BOOL CALLBACK EnumMirandaWindows(HWND hwnd, LPARAM lParam)
TCHAR classname[256];
ENUMMIRANDAWINDOW * x = (ENUMMIRANDAWINDOW *)lParam;
DWORD_PTR res=0;
- if ( GetClassName(hwnd,classname,SIZEOF(classname)) && lstrcmp( _T("Miranda"),classname) == 0 ) {
+ if ( GetClassName(hwnd, classname, SIZEOF(classname)) && lstrcmp( _T("Miranda"), classname) == 0 ) {
if ( SendMessageTimeout(hwnd, x->msg, (WPARAM)x->aPath, 0, SMTO_ABORTIFHUNG, 100, &res) && res ) {
x->found++;
return FALSE;
@@ -527,9 +527,9 @@ int LoadDatabaseModule(void)
dbe.lParam = (LPARAM)szProfile;
if ( _taccess(szProfile, 0) && shouldAutoCreate( szProfile ))
- dbe.pfnEnumCallback=( int(*) (const char*,void*,LPARAM) )FindDbPluginAutoCreate;
+ dbe.pfnEnumCallback=( int(*) (const char*, void*, LPARAM) )FindDbPluginAutoCreate;
else
- dbe.pfnEnumCallback=( int(*) (const char*,void*,LPARAM) )FindDbPluginForProfile;
+ dbe.pfnEnumCallback=( int(*) (const char*, void*, LPARAM) )FindDbPluginForProfile;
// find a driver to support the given profile
bool retry;
@@ -541,9 +541,9 @@ int LoadDatabaseModule(void)
case -1: {
// no plugins at all
TCHAR buf[256];
- TCHAR* p = _tcsrchr(szProfile,'\\');
- mir_sntprintf(buf,SIZEOF(buf),TranslateT("Miranda is unable to open '%s' because you do not have any profile plugins installed.\nYou need to install dbx_3x.dll or equivalent."), p ? ++p : szProfile );
- MessageBox(0,buf,TranslateT("No profile support installed!"),MB_OK | MB_ICONERROR);
+ TCHAR* p = _tcsrchr(szProfile, '\\');
+ mir_sntprintf(buf, SIZEOF(buf), TranslateT("Miranda is unable to open '%s' because you do not have any profile plugins installed.\nYou need to install dbx_3x.dll or equivalent."), p ? ++p : szProfile );
+ MessageBox(0, buf, TranslateT("No profile support installed!"), MB_OK | MB_ICONERROR);
break;
}
case 1:
@@ -551,15 +551,15 @@ int LoadDatabaseModule(void)
if (fileExist(szProfile)) {
// file isn't locked, just no driver could open it.
TCHAR buf[256];
- TCHAR* p = _tcsrchr(szProfile,'\\');
- mir_sntprintf(buf,SIZEOF(buf),TranslateT("Miranda was unable to open '%s', it's in an unknown format.\nThis profile might also be damaged, please run DB-tool which should be installed."), p ? ++p : szProfile);
- MessageBox(0,buf,TranslateT("Miranda can't understand that profile"),MB_OK | MB_ICONERROR);
+ TCHAR* p = _tcsrchr(szProfile, '\\');
+ mir_sntprintf(buf, SIZEOF(buf), TranslateT("Miranda was unable to open '%s', it's in an unknown format.\nThis profile might also be damaged, please run DB-tool which should be installed."), p ? ++p : szProfile);
+ MessageBox(0, buf, TranslateT("Miranda can't understand that profile"), MB_OK | MB_ICONERROR);
}
else if (!FindMirandaForProfile(szProfile)) {
TCHAR buf[256];
- TCHAR* p = _tcsrchr(szProfile,'\\');
- mir_sntprintf(buf,SIZEOF(buf),TranslateT("Miranda was unable to open '%s'\nIt's inaccessible or used by other application or Miranda instance"), p ? ++p : szProfile);
- retry = MessageBox(0,buf,TranslateT("Miranda can't open that profile"),MB_RETRYCANCEL | MB_ICONERROR) == IDRETRY;
+ TCHAR* p = _tcsrchr(szProfile, '\\');
+ mir_sntprintf(buf, SIZEOF(buf), TranslateT("Miranda was unable to open '%s'\nIt's inaccessible or used by other application or Miranda instance"), p ? ++p : szProfile);
+ retry = MessageBox(0, buf, TranslateT("Miranda can't open that profile"), MB_RETRYCANCEL | MB_ICONERROR) == IDRETRY;
}
break;
}
diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp
index cecbef4dd8..ce01d20dc8 100644
--- a/src/modules/database/dbini.cpp
+++ b/src/modules/database/dbini.cpp
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -30,7 +30,7 @@ static HANDLE hIniChangeNotification;
extern TCHAR mirandabootini[MAX_PATH];
extern bool dbCreated;
-static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM lParam)
+static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message) {
case WM_INITDIALOG:
@@ -62,7 +62,7 @@ static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg,UINT message,WPARAM wPara
case IDOK:
case IDCANCEL:
case IDC_NOTOALL:
- EndDialog(hwndDlg,LOWORD(wParam));
+ EndDialog(hwndDlg, LOWORD(wParam));
break;
}
break;
@@ -70,13 +70,13 @@ static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg,UINT message,WPARAM wPara
return FALSE;
}
-static bool IsInSpaceSeparatedList(const char *szWord,const char *szList)
+static bool IsInSpaceSeparatedList(const char *szWord, const char *szList)
{
- const char *szItem,*szEnd;
+ const char *szItem, *szEnd;
int wordLen = lstrlenA(szWord);
for (szItem = szList;;) {
- szEnd = strchr(szItem,' ');
+ szEnd = strchr(szItem, ' ');
if (szEnd == NULL)
return !lstrcmpA( szItem, szWord );
if ( szEnd - szItem == wordLen ) {
@@ -93,10 +93,10 @@ struct warnSettingChangeInfo_t {
char *szUnsafeSections;
char *szName;
char *szValue;
- int warnNoMore,cancel;
+ int warnNoMore, cancel;
};
-static INT_PTR CALLBACK WarnIniChangeDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM lParam)
+static INT_PTR CALLBACK WarnIniChangeDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
static struct warnSettingChangeInfo_t *warnInfo;
@@ -108,17 +108,17 @@ static INT_PTR CALLBACK WarnIniChangeDlgProc(HWND hwndDlg,UINT message,WPARAM wP
TranslateDialogDefault(hwndDlg);
SetDlgItemText(hwndDlg, IDC_ININAME, warnInfo->szIniPath);
lstrcpyA(szSettingName, warnInfo->szSection);
- lstrcatA(szSettingName," / ");
- lstrcatA(szSettingName,warnInfo->szName);
- SetDlgItemTextA(hwndDlg,IDC_SETTINGNAME,szSettingName);
- SetDlgItemTextA(hwndDlg,IDC_NEWVALUE,warnInfo->szValue);
- if (IsInSpaceSeparatedList(warnInfo->szSection,warnInfo->szSafeSections))
+ lstrcatA(szSettingName, " / ");
+ lstrcatA(szSettingName, warnInfo->szName);
+ SetDlgItemTextA(hwndDlg, IDC_SETTINGNAME, szSettingName);
+ SetDlgItemTextA(hwndDlg, IDC_NEWVALUE, warnInfo->szValue);
+ if (IsInSpaceSeparatedList(warnInfo->szSection, warnInfo->szSafeSections))
pszSecurityInfo=LPGENT("This change is known to be safe.");
- else if (IsInSpaceSeparatedList(warnInfo->szSection,warnInfo->szUnsafeSections))
+ else if (IsInSpaceSeparatedList(warnInfo->szSection, warnInfo->szUnsafeSections))
pszSecurityInfo=LPGENT("This change is known to be potentially hazardous.");
else
pszSecurityInfo=LPGENT("This change is not known to be safe.");
- SetDlgItemText(hwndDlg,IDC_SECURITYINFO,TranslateTS(pszSecurityInfo));
+ SetDlgItemText(hwndDlg, IDC_SECURITYINFO, TranslateTS(pszSecurityInfo));
return TRUE;
}
case WM_COMMAND:
@@ -127,8 +127,8 @@ static INT_PTR CALLBACK WarnIniChangeDlgProc(HWND hwndDlg,UINT message,WPARAM wP
warnInfo->cancel=1;
case IDYES:
case IDNO:
- warnInfo->warnNoMore=IsDlgButtonChecked(hwndDlg,IDC_WARNNOMORE);
- EndDialog(hwndDlg,LOWORD(wParam));
+ warnInfo->warnNoMore=IsDlgButtonChecked(hwndDlg, IDC_WARNNOMORE);
+ EndDialog(hwndDlg, LOWORD(wParam));
break;
}
break;
@@ -136,22 +136,22 @@ static INT_PTR CALLBACK WarnIniChangeDlgProc(HWND hwndDlg,UINT message,WPARAM wP
return FALSE;
}
-static INT_PTR CALLBACK IniImportDoneDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARAM lParam)
+static INT_PTR CALLBACK IniImportDoneDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetDlgItemText(hwndDlg,IDC_ININAME,(TCHAR*)lParam);
- SetDlgItemText(hwndDlg,IDC_NEWNAME,(TCHAR*)lParam);
+ SetDlgItemText(hwndDlg, IDC_ININAME, (TCHAR*)lParam);
+ SetDlgItemText(hwndDlg, IDC_NEWNAME, (TCHAR*)lParam);
return TRUE;
case WM_COMMAND:
{ TCHAR szIniPath[MAX_PATH];
- GetDlgItemText(hwndDlg,IDC_ININAME,szIniPath,SIZEOF(szIniPath));
+ GetDlgItemText(hwndDlg, IDC_ININAME, szIniPath, SIZEOF(szIniPath));
switch(LOWORD(wParam)) {
case IDC_DELETE:
DeleteFile(szIniPath);
case IDC_LEAVE:
- EndDialog(hwndDlg,LOWORD(wParam));
+ EndDialog(hwndDlg, LOWORD(wParam));
break;
case IDC_RECYCLE:
{ SHFILEOPSTRUCT shfo={0};
@@ -161,14 +161,14 @@ static INT_PTR CALLBACK IniImportDoneDlgProc(HWND hwndDlg,UINT message,WPARAM wP
shfo.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO;
SHFileOperation(&shfo);
}
- EndDialog(hwndDlg,LOWORD(wParam));
+ EndDialog(hwndDlg, LOWORD(wParam));
break;
case IDC_MOVE:
{ TCHAR szNewPath[MAX_PATH];
- GetDlgItemText(hwndDlg,IDC_NEWNAME,szNewPath,SIZEOF(szNewPath));
- MoveFile(szIniPath,szNewPath);
+ GetDlgItemText(hwndDlg, IDC_NEWNAME, szNewPath, SIZEOF(szNewPath));
+ MoveFile(szIniPath, szNewPath);
}
- EndDialog(hwndDlg,LOWORD(wParam));
+ EndDialog(hwndDlg, LOWORD(wParam));
break;
}
break;
@@ -205,7 +205,7 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
while (!feof(fp)) {
char szLine[2048];
- if (fgets(szLine,sizeof(szLine),fp) == NULL)
+ if (fgets(szLine, sizeof(szLine), fp) == NULL)
break;
int lineLength = lstrlenA(szLine);
@@ -216,14 +216,14 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
continue;
if (szLine[0] == '[') {
- char *szEnd = strchr(szLine+1,']');
+ char *szEnd = strchr(szLine+1, ']');
if (szEnd == NULL)
continue;
if (szLine[1] == '!')
szSection[0] = '\0';
else {
- lstrcpynA(szSection,szLine+1,min(sizeof(szSection),(int)(szEnd-szLine)));
+ lstrcpynA(szSection, szLine+1, min(sizeof(szSection), (int)(szEnd-szLine)));
switch (secur) {
case 0:
warnThisSection = false;
@@ -246,10 +246,10 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
if (szLine[1] == '?') {
DBCONTACTENUMSETTINGS dbces;
dbces.pfnEnumProc=SettingsEnumProc;
- lstrcpynA(szSection,szLine+2,min(sizeof(szSection),(int)(szEnd-szLine-1)));
+ lstrcpynA(szSection, szLine+2, min(sizeof(szSection), (int)(szEnd-szLine-1)));
dbces.szModule=szSection;
dbces.ofsSettings=0;
- CallService(MS_DB_CONTACT_ENUMSETTINGS,0,(LPARAM)&dbces);
+ CallService(MS_DB_CONTACT_ENUMSETTINGS, 0, (LPARAM)&dbces);
while (setting_items) {
SettingsList *next = setting_items->next;
@@ -269,12 +269,12 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
if (szSection[0] == '\0')
continue;
- char *szValue=strchr(szLine,'=');
+ char *szValue=strchr(szLine, '=');
if ( szValue == NULL )
continue;
char szName[128];
- lstrcpynA(szName,szLine,min(sizeof(szName),(int)(szValue-szLine+1)));
+ lstrcpynA(szName, szLine, min(sizeof(szName), (int)(szValue-szLine+1)));
szValue++;
{
warnSettingChangeInfo_t warnInfo;
@@ -286,7 +286,7 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
warnInfo.szValue=szValue;
warnInfo.warnNoMore=0;
warnInfo.cancel=0;
- if (warnThisSection && IDNO == DialogBoxParam(hMirandaInst,MAKEINTRESOURCE(IDD_WARNINICHANGE),NULL,WarnIniChangeDlgProc,(LPARAM)&warnInfo))
+ if (warnThisSection && IDNO == DialogBoxParam(hMirandaInst, MAKEINTRESOURCE(IDD_WARNINICHANGE), NULL, WarnIniChangeDlgProc, (LPARAM)&warnInfo))
continue;
if (warnInfo.cancel)
break;
@@ -297,26 +297,26 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
switch(szValue[0]) {
case 'b':
case 'B':
- DBWriteContactSettingByte(NULL,szSection,szName,(BYTE)strtol(szValue+1,NULL,0));
+ DBWriteContactSettingByte(NULL, szSection, szName, (BYTE)strtol(szValue+1, NULL, 0));
break;
case 'w':
case 'W':
- DBWriteContactSettingWord(NULL,szSection,szName,(WORD)strtol(szValue+1,NULL,0));
+ DBWriteContactSettingWord(NULL, szSection, szName, (WORD)strtol(szValue+1, NULL, 0));
break;
case 'd':
case 'D':
- DBWriteContactSettingDword(NULL,szSection,szName,(DWORD)strtoul(szValue+1,NULL,0));
+ DBWriteContactSettingDword(NULL, szSection, szName, (DWORD)strtoul(szValue+1, NULL, 0));
break;
case 'l':
case 'L':
- DBDeleteContactSetting(NULL,szSection,szName);
+ DBDeleteContactSetting(NULL, szSection, szName);
break;
case 'e':
case 'E':
ConvertBackslashes(szValue+1, LangPackGetDefaultCodePage());
case 's':
case 'S':
- DBWriteContactSettingString(NULL,szSection,szName,szValue+1);
+ DBWriteContactSettingString(NULL, szSection, szName, szValue+1);
break;
case 'g':
case 'G':
@@ -329,11 +329,11 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
case 'r': *pstr='\r'; break;
default: *pstr=pstr[1]; break;
}
- MoveMemory(pstr+1,pstr+2,lstrlenA(pstr+2)+1);
+ MoveMemory(pstr+1, pstr+2, lstrlenA(pstr+2)+1);
} } }
case 'u':
case 'U':
- DBWriteContactSettingStringUtf(NULL,szSection,szName,szValue+1);
+ DBWriteContactSettingStringUtf(NULL, szSection, szName, szValue+1);
break;
case 'n':
case 'h':
@@ -341,12 +341,12 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
case 'H':
{ PBYTE buf;
int len;
- char *pszValue,*pszEnd;
+ char *pszValue, *pszEnd;
DBCONTACTWRITESETTING cws;
buf=(PBYTE)mir_alloc(lstrlenA(szValue+1));
- for (len=0,pszValue=szValue+1;;len++) {
- buf[len]=(BYTE)strtol(pszValue,&pszEnd,0x10);
+ for (len=0, pszValue=szValue+1;;len++) {
+ buf[len]=(BYTE)strtol(pszValue, &pszEnd, 0x10);
if (pszValue == pszEnd) break;
pszValue=pszEnd;
}
@@ -355,12 +355,12 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
cws.value.type=DBVT_BLOB;
cws.value.pbVal=buf;
cws.value.cpbVal=len;
- CallService(MS_DB_CONTACT_WRITESETTING,(WPARAM)(HANDLE)NULL,(LPARAM)&cws);
+ CallService(MS_DB_CONTACT_WRITESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cws);
mir_free(buf);
}
break;
default:
- MessageBox(NULL,TranslateT("Invalid setting type. The first character of every value must be b, w, d, l, s, e, u, g, h or n."),TranslateT("Install Database Settings"),MB_OK);
+ MessageBox(NULL, TranslateT("Invalid setting type. The first character of every value must be b, w, d, l, s, e, u, g, h or n."), TranslateT("Install Database Settings"), MB_OK);
break;
}
}
@@ -375,20 +375,20 @@ static void DoAutoExec(void)
char *szSafeSections, *szUnsafeSections;
int secur;
- GetPrivateProfileString(_T("AutoExec"),_T("Use"),_T("prompt"),szUse,SIZEOF(szUse),mirandabootini);
- if (!lstrcmpi(szUse,_T("no"))) return;
- GetPrivateProfileString(_T("AutoExec"),_T("Safe"),_T("CLC Icons CLUI CList SkinSounds"),buf,SIZEOF(buf),mirandabootini);
+ GetPrivateProfileString(_T("AutoExec"), _T("Use"), _T("prompt"), szUse, SIZEOF(szUse), mirandabootini);
+ if (!lstrcmpi(szUse, _T("no"))) return;
+ GetPrivateProfileString(_T("AutoExec"), _T("Safe"), _T("CLC Icons CLUI CList SkinSounds"), buf, SIZEOF(buf), mirandabootini);
szSafeSections = mir_t2a(buf);
- GetPrivateProfileString(_T("AutoExec"),_T("Unsafe"),_T("ICQ MSN"),buf,SIZEOF(buf),mirandabootini);
+ GetPrivateProfileString(_T("AutoExec"), _T("Unsafe"), _T("ICQ MSN"), buf, SIZEOF(buf), mirandabootini);
szUnsafeSections = mir_t2a(buf);
- GetPrivateProfileString(_T("AutoExec"),_T("Warn"),_T("notsafe"),szSecurity,SIZEOF(szSecurity),mirandabootini);
- if (!lstrcmpi(szSecurity,_T("none"))) secur = 0;
- else if (!lstrcmpi(szSecurity,_T("notsafe"))) secur = 1;
- else if (!lstrcmpi(szSecurity,_T("onlyunsafe"))) secur = 2;
-
- GetPrivateProfileString(_T("AutoExec"),_T("OverrideSecurityFilename"),_T(""),szOverrideSecurityFilename,SIZEOF(szOverrideSecurityFilename),mirandabootini);
- GetPrivateProfileString(_T("AutoExec"),_T("OnCreateFilename"),_T(""),szOnCreateFilename,SIZEOF(szOnCreateFilename),mirandabootini);
- GetPrivateProfileString(_T("AutoExec"),_T("Glob"),_T("autoexec_*.ini"),szFindPath,SIZEOF(szFindPath),mirandabootini);
+ GetPrivateProfileString(_T("AutoExec"), _T("Warn"), _T("notsafe"), szSecurity, SIZEOF(szSecurity), mirandabootini);
+ if (!lstrcmpi(szSecurity, _T("none"))) secur = 0;
+ else if (!lstrcmpi(szSecurity, _T("notsafe"))) secur = 1;
+ else if (!lstrcmpi(szSecurity, _T("onlyunsafe"))) secur = 2;
+
+ GetPrivateProfileString(_T("AutoExec"), _T("OverrideSecurityFilename"), _T(""), szOverrideSecurityFilename, SIZEOF(szOverrideSecurityFilename), mirandabootini);
+ GetPrivateProfileString(_T("AutoExec"), _T("OnCreateFilename"), _T(""), szOnCreateFilename, SIZEOF(szOnCreateFilename), mirandabootini);
+ GetPrivateProfileString(_T("AutoExec"), _T("Glob"), _T("autoexec_*.ini"), szFindPath, SIZEOF(szFindPath), mirandabootini);
if (dbCreated && szOnCreateFilename[0]) {
str2 = Utils_ReplaceVarsT(szOnCreateFilename);
@@ -415,11 +415,11 @@ static void DoAutoExec(void)
else str2[1] = 0;
do {
- bool secFN = lstrcmpi(fd.cFileName,szOverrideSecurityFilename) == 0;
+ bool secFN = lstrcmpi(fd.cFileName, szOverrideSecurityFilename) == 0;
mir_sntprintf(szIniPath, SIZEOF(szIniPath), _T("%s%s"), szFindPath, fd.cFileName);
- if (!lstrcmpi(szUse,_T("prompt")) && !secFN) {
- int result=DialogBoxParam(hMirandaInst,MAKEINTRESOURCE(IDD_INSTALLINI),NULL,InstallIniDlgProc,(LPARAM)szIniPath);
+ if (!lstrcmpi(szUse, _T("prompt")) && !secFN) {
+ int result=DialogBoxParam(hMirandaInst, MAKEINTRESOURCE(IDD_INSTALLINI), NULL, InstallIniDlgProc, (LPARAM)szIniPath);
if (result == IDC_NOTOALL) break;
if (result == IDCANCEL) continue;
}
@@ -430,10 +430,10 @@ static void DoAutoExec(void)
DeleteFile(szIniPath);
else {
TCHAR szOnCompletion[8];
- GetPrivateProfileString(_T("AutoExec"),_T("OnCompletion"),_T("recycle"),szOnCompletion,SIZEOF(szOnCompletion),mirandabootini);
- if (!lstrcmpi(szOnCompletion,_T("delete")))
+ GetPrivateProfileString(_T("AutoExec"), _T("OnCompletion"), _T("recycle"), szOnCompletion, SIZEOF(szOnCompletion), mirandabootini);
+ if (!lstrcmpi(szOnCompletion, _T("delete")))
DeleteFile(szIniPath);
- else if (!lstrcmpi(szOnCompletion,_T("recycle"))) {
+ else if (!lstrcmpi(szOnCompletion, _T("recycle"))) {
SHFILEOPSTRUCT shfo={0};
shfo.wFunc=FO_DELETE;
shfo.pFrom=szIniPath;
@@ -441,17 +441,17 @@ static void DoAutoExec(void)
shfo.fFlags=FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO;
SHFileOperation(&shfo);
}
- else if (!lstrcmpi(szOnCompletion,_T("rename"))) {
+ else if (!lstrcmpi(szOnCompletion, _T("rename"))) {
TCHAR szRenamePrefix[MAX_PATH];
TCHAR szNewPath[MAX_PATH];
- GetPrivateProfileString(_T("AutoExec"),_T("RenamePrefix"),_T("done_"),szRenamePrefix,SIZEOF(szRenamePrefix),mirandabootini);
- lstrcpy(szNewPath,szFindPath);
- lstrcat(szNewPath,szRenamePrefix);
- lstrcat(szNewPath,fd.cFileName);
- MoveFile(szIniPath,szNewPath);
+ GetPrivateProfileString(_T("AutoExec"), _T("RenamePrefix"), _T("done_"), szRenamePrefix, SIZEOF(szRenamePrefix), mirandabootini);
+ lstrcpy(szNewPath, szFindPath);
+ lstrcat(szNewPath, szRenamePrefix);
+ lstrcat(szNewPath, fd.cFileName);
+ MoveFile(szIniPath, szNewPath);
}
- else if (!lstrcmpi(szOnCompletion,_T("ask")))
- DialogBoxParam(hMirandaInst,MAKEINTRESOURCE(IDD_INIIMPORTDONE),NULL,IniImportDoneDlgProc,(LPARAM)szIniPath);
+ else if (!lstrcmpi(szOnCompletion, _T("ask")))
+ DialogBoxParam(hMirandaInst, MAKEINTRESOURCE(IDD_INIIMPORTDONE), NULL, IniImportDoneDlgProc, (LPARAM)szIniPath);
}
} while (FindNextFile(hFind, &fd));
FindClose(hFind);
@@ -485,6 +485,6 @@ int InitIni(void)
void UninitIni(void)
{
if ( !bModuleInitialized ) return;
- CallService(MS_SYSTEM_REMOVEWAIT,(WPARAM)hIniChangeNotification,0);
+ CallService(MS_SYSTEM_REMOVEWAIT, (WPARAM)hIniChangeNotification, 0);
FindCloseChangeNotification(hIniChangeNotification);
}
diff --git a/src/modules/database/dblists.cpp b/src/modules/database/dblists.cpp
index 491a6ed33b..c4dabf8fae 100644
--- a/src/modules/database/dblists.cpp
+++ b/src/modules/database/dblists.cpp
@@ -2,7 +2,7 @@
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
diff --git a/src/modules/database/dblists.h b/src/modules/database/dblists.h
index 30886973a4..160e45eca3 100644
--- a/src/modules/database/dblists.h
+++ b/src/modules/database/dblists.h
@@ -2,7 +2,7 @@
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -36,4 +36,4 @@ int List_InsertPtr( SortedList* list, void* p );
int List_RemovePtr( SortedList* list, void* p );
void List_Copy( SortedList*, SortedList*, size_t );
-void List_ObjCopy( SortedList*, SortedList*, size_t ); \ No newline at end of file
+void List_ObjCopy( SortedList*, SortedList*, size_t );
diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp
index 7d644b02eb..6cbf8ca781 100644
--- a/src/modules/database/dbutils.cpp
+++ b/src/modules/database/dbutils.cpp
@@ -2,7 +2,7 @@
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -337,11 +337,11 @@ int InitUtils()
CreateServiceFunction(MS_DB_MODULE_DELETE, DbDeleteModule);
- CreateServiceFunction(MS_DB_GETPROFILEPATH,GetProfilePath);
- CreateServiceFunction(MS_DB_GETPROFILENAME,GetProfileName);
+ CreateServiceFunction(MS_DB_GETPROFILEPATH, GetProfilePath);
+ CreateServiceFunction(MS_DB_GETPROFILENAME, GetProfileName);
#if defined( _UNICODE )
- CreateServiceFunction(MS_DB_GETPROFILEPATHW,GetProfilePathW);
- CreateServiceFunction(MS_DB_GETPROFILENAMEW,GetProfileNameW);
+ CreateServiceFunction(MS_DB_GETPROFILEPATHW, GetProfilePathW);
+ CreateServiceFunction(MS_DB_GETPROFILENAMEW, GetProfileNameW);
#endif
return 0;
}
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp
index b764a43ff3..cf1521872d 100644
--- a/src/modules/database/profilemanager.cpp
+++ b/src/modules/database/profilemanager.cpp
@@ -2,7 +2,7 @@
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -110,9 +110,9 @@ static LRESULT CALLBACK ProfileNameValidate(HWND edit, UINT msg, WPARAM wParam,
if ( msg == WM_CHAR ) {
if ( _tcschr( _T(".?/\\#' "), (TCHAR)wParam) != 0 )
return 0;
- PostMessage(GetParent(edit),WM_INPUTCHANGED,0,0);
+ PostMessage(GetParent(edit), WM_INPUTCHANGED, 0, 0);
}
- return CallWindowProc((WNDPROC)GetWindowLongPtr(edit,GWLP_USERDATA),edit,msg,wParam,lParam);
+ return CallWindowProc((WNDPROC)GetWindowLongPtr(edit, GWLP_USERDATA), edit, msg, wParam, lParam);
}
static int FindDbProviders(const char*, DATABASELINK * dblink, LPARAM lParam)
@@ -121,7 +121,7 @@ static int FindDbProviders(const char*, DATABASELINK * dblink, LPARAM lParam)
HWND hwndCombo = GetDlgItem(hwndDlg, IDC_PROFILEDRIVERS);
char szName[64];
- if ( dblink->getFriendlyName(szName,SIZEOF(szName),1) == 0 ) {
+ if ( dblink->getFriendlyName(szName, SIZEOF(szName), 1) == 0 ) {
// add to combo box
TCHAR* p = LangPackPcharToTchar( szName );
LRESULT index = SendMessage( hwndCombo, CB_ADDSTRING, 0, (LPARAM)p );
@@ -133,7 +133,7 @@ static int FindDbProviders(const char*, DATABASELINK * dblink, LPARAM lParam)
static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- struct DlgProfData * dat = (struct DlgProfData *)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
+ struct DlgProfData * dat = (struct DlgProfData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault( hwndDlg );
@@ -143,7 +143,7 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
// fill in the db plugins present
PLUGIN_DB_ENUM dbe;
dbe.cbSize = sizeof(dbe);
- dbe.pfnEnumCallback = (int(*)(const char*,void*,LPARAM))FindDbProviders;
+ dbe.pfnEnumCallback = (int(*)(const char*, void*, LPARAM))FindDbProviders;
dbe.lParam = (LPARAM)hwndDlg;
if ( CallService( MS_PLUGINS_ENUMDBPLUGINS, 0, ( LPARAM )&dbe ) == -1 ) {
// no plugins?!
@@ -158,8 +158,8 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
{
HWND hwndProfile = GetDlgItem(hwndDlg, IDC_PROFILENAME);
WNDPROC proc = (WNDPROC)GetWindowLongPtr(hwndProfile, GWLP_WNDPROC);
- SetWindowLongPtr(hwndProfile,GWLP_USERDATA,(LONG_PTR)proc);
- SetWindowLongPtr(hwndProfile,GWLP_WNDPROC,(LONG_PTR)ProfileNameValidate);
+ SetWindowLongPtr(hwndProfile, GWLP_USERDATA, (LONG_PTR)proc);
+ SetWindowLongPtr(hwndProfile, GWLP_WNDPROC, (LONG_PTR)ProfileNameValidate);
}
// decide if there is a default profile name given in the INI and if it should be used
@@ -202,7 +202,7 @@ static INT_PTR CALLBACK DlgProfileNew(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
NMHDR* hdr = ( NMHDR* )lParam;
if ( hdr && hdr->code == PSN_APPLY && dat && IsWindowVisible( hwndDlg )) {
TCHAR szName[MAX_PATH];
- LRESULT curSel = SendDlgItemMessage(hwndDlg,IDC_PROFILEDRIVERS,CB_GETCURSEL,0,0);
+ LRESULT curSel = SendDlgItemMessage(hwndDlg, IDC_PROFILEDRIVERS, CB_GETCURSEL, 0, 0);
if ( curSel == CB_ERR ) break; // should never happen
GetDlgItemText(hwndDlg, IDC_PROFILENAME, szName, SIZEOF( szName ));
if ( szName[0] == 0 )
@@ -271,11 +271,11 @@ BOOL EnumProfilesForList(TCHAR * fullpath, TCHAR * profile, LPARAM lParam)
if ( _tstat(fullpath, &statbuf) == 0) {
if ( statbuf.st_size > 1000000 ) {
- mir_sntprintf(sizeBuf,SIZEOF(sizeBuf), _T("%.3lf"), (double)statbuf.st_size / 1048576.0 );
+ mir_sntprintf(sizeBuf, SIZEOF(sizeBuf), _T("%.3lf"), (double)statbuf.st_size / 1048576.0 );
_tcscpy(sizeBuf+5, _T(" MB"));
}
else {
- mir_sntprintf(sizeBuf,SIZEOF(sizeBuf), _T("%.3lf"), (double)statbuf.st_size / 1024.0 );
+ mir_sntprintf(sizeBuf, SIZEOF(sizeBuf), _T("%.3lf"), (double)statbuf.st_size / 1024.0 );
_tcscpy(sizeBuf+5, _T(" KB"));
}
bFileExists = TRUE;
@@ -303,7 +303,7 @@ BOOL EnumProfilesForList(TCHAR * fullpath, TCHAR * profile, LPARAM lParam)
item2.iItem = iItem;
dbe.cbSize = sizeof(dbe);
- dbe.pfnEnumCallback = (int(*)(const char*,void*,LPARAM))DetectDbProvider;
+ dbe.pfnEnumCallback = (int(*)(const char*, void*, LPARAM))DetectDbProvider;
dbe.lParam = (LPARAM)szPath;
_tcscpy(szPath, fullpath);
if ( CallService( MS_PLUGINS_ENUMDBPLUGINS, 0, ( LPARAM )&dbe ) == 1 ) {
@@ -406,7 +406,7 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam,
// LV will destroy the image list
SetWindowLongPtr(hwndList, GWL_STYLE, GetWindowLongPtr(hwndList, GWL_STYLE) | LVS_SORTASCENDING);
ListView_SetImageList(hwndList, hImgList, LVSIL_SMALL);
- ListView_SetExtendedListViewStyle(hwndList,
+ ListView_SetExtendedListViewStyle(hwndList,
ListView_GetExtendedListViewStyle(hwndList) | LVS_EX_DOUBLEBUFFER | LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT);
// find all the profiles
@@ -545,8 +545,8 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
struct DlgProfData * prof = (struct DlgProfData *)lParam;
PROPSHEETHEADER *psh = prof->psh;
TranslateDialogDefault(hwndDlg);
- SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadImage(hMirandaInst, MAKEINTRESOURCE(IDI_USERDETAILS),IMAGE_ICON,GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),0));
- SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadImage(hMirandaInst, MAKEINTRESOURCE(IDI_USERDETAILS),IMAGE_ICON,GetSystemMetrics(SM_CXICON),GetSystemMetrics(SM_CYICON),0));
+ SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadImage(hMirandaInst, MAKEINTRESOURCE(IDI_USERDETAILS), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0));
+ SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)LoadImage(hMirandaInst, MAKEINTRESOURCE(IDI_USERDETAILS), IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0));
dat = (struct DetailsData*)mir_alloc(sizeof(struct DetailsData));
dat->prof = prof;
prof->hwndOK = GetDlgItem( hwndDlg, IDOK );
@@ -571,7 +571,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
tci.mask = TCIF_TEXT;
for ( i=0; i < dat->pageCount; i++ ) {
- dat->opd[i].pTemplate = (DLGTEMPLATE *)LockResource(LoadResource(odp[i].hInstance,FindResourceA(odp[i].hInstance,odp[i].pszTemplate,MAKEINTRESOURCEA(5))));
+ dat->opd[i].pTemplate = (DLGTEMPLATE *)LockResource(LoadResource(odp[i].hInstance, FindResourceA(odp[i].hInstance, odp[i].pszTemplate, MAKEINTRESOURCEA(5))));
dat->opd[i].dlgProc = odp[i].pfnDlgProc;
dat->opd[i].hInst = odp[i].hInstance;
dat->opd[i].hwnd = NULL;
@@ -579,19 +579,19 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
tci.pszText = ( TCHAR* )odp[i].ptszTitle;
if (dat->prof->pd->noProfiles || shouldAutoCreate(dat->prof->pd->szProfile))
dat->currentPage = 1;
- TabCtrl_InsertItem( GetDlgItem(hwndDlg,IDC_TABS), i, &tci );
+ TabCtrl_InsertItem( GetDlgItem(hwndDlg, IDC_TABS), i, &tci );
} }
- GetWindowRect(GetDlgItem(hwndDlg,IDC_TABS),&dat->rcDisplay);
- TabCtrl_AdjustRect(GetDlgItem(hwndDlg,IDC_TABS),FALSE,&dat->rcDisplay);
+ GetWindowRect(GetDlgItem(hwndDlg, IDC_TABS), &dat->rcDisplay);
+ TabCtrl_AdjustRect(GetDlgItem(hwndDlg, IDC_TABS), FALSE, &dat->rcDisplay);
{
- POINT pt = {0,0};
+ POINT pt = {0, 0};
ClientToScreen( hwndDlg, &pt );
OffsetRect( &dat->rcDisplay, -pt.x, -pt.y );
}
TabCtrl_SetCurSel( GetDlgItem( hwndDlg, IDC_TABS ), dat->currentPage );
- dat->opd[dat->currentPage].hwnd = CreateDialogIndirectParam(dat->opd[dat->currentPage].hInst,dat->opd[dat->currentPage].pTemplate,hwndDlg,dat->opd[dat->currentPage].dlgProc,(LPARAM)dat->prof);
+ dat->opd[dat->currentPage].hwnd = CreateDialogIndirectParam(dat->opd[dat->currentPage].hInst, dat->opd[dat->currentPage].pTemplate, hwndDlg, dat->opd[dat->currentPage].dlgProc, (LPARAM)dat->prof);
ThemeDialogBackground( dat->opd[dat->currentPage].hwnd );
SetWindowPos( dat->opd[dat->currentPage].hwnd, HWND_TOP, dat->rcDisplay.left, dat->rcDisplay.top, 0, 0, SWP_NOSIZE );
{ PSHNOTIFY pshn;
@@ -649,7 +649,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
for ( i=0; i < dat->pageCount; i++ ) {
pshn.hdr.hwndFrom = dat->opd[i].hwnd;
if ( dat->opd[i].hwnd != NULL )
- SendMessage(dat->opd[i].hwnd,WM_NOTIFY,0,(LPARAM)&pshn);
+ SendMessage(dat->opd[i].hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
}
break;
}
@@ -675,20 +675,20 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
if ( dat->currentPage != -1 && dat->opd[dat->currentPage].hwnd != NULL )
ShowWindow( dat->opd[ dat->currentPage ].hwnd, SW_HIDE );
- dat->currentPage = TabCtrl_GetCurSel(GetDlgItem(hwndDlg,IDC_TABS));
+ dat->currentPage = TabCtrl_GetCurSel(GetDlgItem(hwndDlg, IDC_TABS));
if ( dat->currentPage != -1 ) {
if ( dat->opd[dat->currentPage].hwnd == NULL ) {
PSHNOTIFY pshn;
- dat->opd[dat->currentPage].hwnd=CreateDialogIndirectParam(dat->opd[dat->currentPage].hInst,dat->opd[dat->currentPage].pTemplate,hwndDlg,dat->opd[dat->currentPage].dlgProc,(LPARAM)dat->prof);
+ dat->opd[dat->currentPage].hwnd=CreateDialogIndirectParam(dat->opd[dat->currentPage].hInst, dat->opd[dat->currentPage].pTemplate, hwndDlg, dat->opd[dat->currentPage].dlgProc, (LPARAM)dat->prof);
ThemeDialogBackground(dat->opd[dat->currentPage].hwnd);
- SetWindowPos(dat->opd[dat->currentPage].hwnd,HWND_TOP,dat->rcDisplay.left,dat->rcDisplay.top,0,0,SWP_NOSIZE);
+ SetWindowPos(dat->opd[dat->currentPage].hwnd, HWND_TOP, dat->rcDisplay.left, dat->rcDisplay.top, 0, 0, SWP_NOSIZE);
pshn.hdr.code=PSN_INFOCHANGED;
pshn.hdr.hwndFrom=dat->opd[dat->currentPage].hwnd;
pshn.hdr.idFrom=0;
pshn.lParam=(LPARAM)0;
- SendMessage(dat->opd[dat->currentPage].hwnd,WM_NOTIFY,0,(LPARAM)&pshn);
+ SendMessage(dat->opd[dat->currentPage].hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
}
- ShowWindow(dat->opd[dat->currentPage].hwnd,SW_SHOW);
+ ShowWindow(dat->opd[dat->currentPage].hwnd, SW_SHOW);
}
break;
}
@@ -707,9 +707,9 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
for (i=0;i<dat->pageCount;i++) {
if (dat->opd[i].hwnd == NULL || !dat->opd[i].changed) continue;
pshn.hdr.hwndFrom=dat->opd[i].hwnd;
- SendMessage(dat->opd[i].hwnd,WM_NOTIFY,0,(LPARAM)&pshn);
+ SendMessage(dat->opd[i].hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
}
- EndDialog(hwndDlg,0);
+ EndDialog(hwndDlg, 0);
}
break;
@@ -748,14 +748,14 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
ShowWindow( dat->opd[dat->currentPage].hwnd, SW_SHOW );
return 0;
} }
- EndDialog(hwndDlg,1);
+ EndDialog(hwndDlg, 1);
break;
} }
break;
case WM_DESTROY:
{
- LRESULT curSel = SendDlgItemMessage(hwndDlg,IDC_SM_COMBO,CB_GETCURSEL,0,0);
+ LRESULT curSel = SendDlgItemMessage(hwndDlg, IDC_SM_COMBO, CB_GETCURSEL, 0, 0);
if ( curSel != CB_ERR ) {
int idx = SendDlgItemMessage( hwndDlg, IDC_SM_COMBO, CB_GETITEMDATA, ( WPARAM )curSel, 0 );
SetServiceModePlugin(idx);
@@ -833,7 +833,7 @@ int getProfileManager(PROFILEMANAGERDATA * pd)
DlgProfData prof;
prof.pd = pd;
prof.psh = &psh;
- int rc = DialogBoxParam(hMirandaInst,MAKEINTRESOURCE(IDD_PROFILEMANAGER),NULL,DlgProfileManager,(LPARAM)&prof);
+ int rc = DialogBoxParam(hMirandaInst, MAKEINTRESOURCE(IDD_PROFILEMANAGER), NULL, DlgProfileManager, (LPARAM)&prof);
if ( rc != -1 )
for ( int i=0; i < opi.pageCount; i++ ) {
diff --git a/src/modules/database/profilemanager.h b/src/modules/database/profilemanager.h
index fc6bd56020..f132dfad84 100644
--- a/src/modules/database/profilemanager.h
+++ b/src/modules/database/profilemanager.h
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.