This commit is contained in:
Alexander Koblov 2008-05-15 20:10:14 +00:00
commit c160899dc4
8 changed files with 25 additions and 25 deletions

View file

@ -320,14 +320,14 @@ var
iIndex:Integer;
begin
cmbPredefined.Clear;
if FindFirstEx(gpIniDir+'*.col', faAnyFile, fr)<>0 then
if FindFirst(gpIniDir+'*.col', faAnyFile, fr)<>0 then
begin
FindClose(fr);
Exit;
end;
repeat
cmbPredefined.Items.Add(fr.Name);
until FindNextEx(fr)<>0;
until FindNext(fr)<>0;
FindClose(fr);
if cmbPredefined.Items.Count>0 then

View file

@ -322,7 +322,7 @@ implementation
uses
uLng, uGlobs, uGlobsPaths, uPixMapManager, fMain, ActnList, LCLProc, menus,
uColorExt, uWCXModule, uWFXmodule, uDCUtils, uOSUtils,fColumnsSetConf, uFindEx;
uColorExt, uWCXModule, uWFXmodule, uDCUtils, uOSUtils,fColumnsSetConf;
procedure TfrmOptions.FormCreate(Sender: TObject);
begin
@ -614,7 +614,7 @@ var
begin
lngList.Clear;
DebugLn('Language dir: ' + gpLngDir);
if FindFirstEx(gpLngDir+'*.po', faAnyFile, fr)<>0 then
if FindFirst(gpLngDir+'*.po', faAnyFile, fr)<>0 then
begin
FindClose(fr);
Exit;
@ -622,7 +622,7 @@ begin
repeat
sLangName := GetLanguageName(gpLngDir + fr.Name);
lngList.Items.Add(Format('%s = (%s)', [fr.Name, sLangName]));
until FindNextEx(fr)<>0;
until FindNext(fr)<>0;
FindClose(fr);

View file

@ -13,7 +13,7 @@ procedure LoadPaths;
implementation
uses
LCLProc, SysUtils, IniFiles, uOSUtils;
LCLProc, SysUtils, IniFiles;
function GetAppName : String;
begin
@ -38,7 +38,7 @@ begin
begin
OnGetApplicationName := @GetAppName;
gpIniDir := GetAppConfigDir(False);
if not mbDirectoryExists(gpIniDir) then
if not DirectoryExists(gpIniDir) then
ForceDirectories(gpIniDir);
OnGetApplicationName := nil;
gpIniDir := IncludeTrailingPathDelimiter(gpIniDir); // add if need path delimiter

View file

@ -48,7 +48,7 @@ var
Buffer: PChar;
begin
Result:=False;
if not mbFileExists(sSrc) then Exit;
if not FileExists(sSrc) then Exit;
dst:=nil; // for safety exception handling
GetMem(Buffer,cBlockSize+1);

View file

@ -263,22 +263,22 @@ begin
{ Create default configuration files if need }
// main ini file
if not mbFileExists(gpIniDir + 'doublecmd.ini') then
if not FileExists(gpIniDir + 'doublecmd.ini') then
CopyFile(gpCfgDir + 'doublecmd.ini', gpIniDir + 'doublecmd.ini');
// toolbar file
if not mbFileExists(gpIniDir + 'default.bar') then
if not FileExists(gpIniDir + 'default.bar') then
CopyFile(gpCfgDir + 'default.bar', gpIniDir + 'default.bar');
// extension file
if not mbFileExists(gpIniDir + 'doublecmd.ext') then
if not FileExists(gpIniDir + 'doublecmd.ext') then
CopyFile(gpCfgDir + 'doublecmd.ext', gpIniDir + 'doublecmd.ext');
// pixmaps file
if not mbFileExists(gpIniDir + 'pixmaps.txt') then
if not FileExists(gpIniDir + 'pixmaps.txt') then
CopyFile(gpCfgDir + 'pixmaps.txt', gpIniDir + 'pixmaps.txt');
// editor highlight file1
if not mbFileExists(gpIniDir + 'editor.col') then
if not FileExists(gpIniDir + 'editor.col') then
CopyFile(gpCfgDir + 'editor.col', gpIniDir + 'editor.col');
// editor highlight file2
if not mbFileExists(gpIniDir + 'twilight.col') then
if not FileExists(gpIniDir + 'twilight.col') then
CopyFile(gpCfgDir + 'twilight.col', gpIniDir + 'twilight.col');
gIni := TIniFile.Create(gpIniDir + 'doublecmd.ini');
@ -414,13 +414,13 @@ begin
gCutTextToColWidth := gIni.ReadBool('Configuration', 'CutTextToColWidth', False);
if mbFileExists(gpIniDir + 'doublecmd.ext') then
if FileExists(gpIniDir + 'doublecmd.ext') then
gExts.LoadFromFile(gpIniDir + 'doublecmd.ext');
if mbFileExists(gpIniDir + 'dirhistory.txt') then
if FileExists(gpIniDir + 'dirhistory.txt') then
LoadStringsFromFile(glsDirHistory,gpIniDir + 'dirhistory.txt');
if mbFileExists(gpIniDir + 'maskhistory.txt') then
if FileExists(gpIniDir + 'maskhistory.txt') then
LoadStringsFromFile(glsMaskHistory, gpIniDir + 'maskhistory.txt');
gColorExt.Load;
@ -443,7 +443,7 @@ begin
Assert(list <> nil,'LoadStringsFromFile: list=nil');
list.Clear;
Result:=False;
if not mbFileExists(sFileName) then Exit;
if not FileExists(sFileName) then Exit;
list.LoadFromFile(sFileName);
for i:=list.Count-1 downto 0 do
if i>cMaxStringItems then

View file

@ -179,7 +179,7 @@ procedure DoLoadLng;
implementation
uses
Classes, SysUtils, GetText, Translations, uGlobs, uGlobsPaths, uTranslator, LCLProc, uOSUtils;
Classes, SysUtils, GetText, Translations, uGlobs, uGlobsPaths, uTranslator, LCLProc;
function GetLanguageName(poFileName : String) : String;
var
@ -222,17 +222,17 @@ begin
DebugLn('Loading lng file: ' + gpLngDir + sFileName);
gPOFileName := sFileName;
if not mbFileExists(gpLngDir + gPOFileName) then
if not FileExists(gpLngDir + gPOFileName) then
begin
gPOFileName := 'doublecmd.%s.po';
GetLanguageIDs(Lang, FallbackLang);
gPOFileName := Format(gPOFileName,[FallbackLang]);
end;
if not mbFileExists(gpLngDir + gPOFileName) then
if not FileExists(gpLngDir + gPOFileName) then
begin
gPOFileName := Format(gPOFileName,[Lang]);
end;
if mbFileExists(gpLngDir + gPOFileName) then
if FileExists(gpLngDir + gPOFileName) then
begin
Translations.TranslateUnitResourceStrings('uLng', gpLngDir + gPOFileName);
LRSTranslator := TTranslator.Create(gpLngDir + gPOFileName);

View file

@ -57,7 +57,7 @@ procedure logWrite(Thread : TThread; const sText:String; LogMsgType : TLogMsgTyp
implementation
uses
SysUtils, LCLProc, fMain, uGlobs, uOSUtils;
SysUtils, LCLProc, fMain, uGlobs;
procedure logWrite(const sText:String; LogMsgType : TLogMsgType);
var
@ -73,7 +73,7 @@ begin
begin
AssignFile(LogFile, gLogFileName);
try
if mbFileExists(gLogFileName) then
if FileExists(gLogFileName) then
Append(LogFile)
else
Rewrite(LogFile);

View file

@ -431,7 +431,7 @@ begin
end;
{/ Load icons from doublecmd.ext }
if mbFileExists(sFileName) then
if FileExists(sFileName) then
begin
assignFile(f,sFileName);
reset(f);