ADD: Some code for Unicode support under Windows

This commit is contained in:
Alexander Koblov 2008-05-19 09:26:45 +00:00
commit 6843df9fd1
3 changed files with 16 additions and 20 deletions

View file

@ -27,7 +27,6 @@ object frmMain: TfrmMain
OnShow = frmMainShow
Position = poDesktopCenter
ShowHint = True
LCLVersion = '0.9.25'
object pnlSyncSize: TPanel
Height = 26
Top = 24

View file

@ -2337,20 +2337,17 @@ end;
procedure TfrmMain.actEditNewExecute(Sender: TObject);
var
sNewFile:String;
f:TextFile;
sNewFile: String;
hFile: Integer;
begin
sNewFile:=ActiveFrame.ActiveDir + rsEditNewFile;
if not InputQuery(rsEditNewOpen, rsEditNewFileName, sNewFile) then Exit;
if not FileExists(sNewFile) then
begin
assignFile(f,sNewFile);
if not mbFileExists(sNewFile) then
try
rewrite(f);
hFile:= mbFileCreate(sNewFile);
finally
CloseFile(f);
end;
end;
FileClose(hFile);
end;
try
ShowEditorByGlob(sNewFile);
finally

View file

@ -150,18 +150,18 @@ end;
procedure TExts.LoadFromFile(const sName:String);
var
extfile : TextFile;
sLine, s, sExt :String;
extcmd : TExtAction;
iIndex : Integer;
extFile: TStringList;
sLine, s, sExt: String;
extcmd: TExtAction;
I, iIndex: Integer;
begin
Assign(extfile, sName);
Reset(extfile);
extFile:= TStringList.Create;
extFile.LoadFromFile(sName);
extcmd:=nil;
while not eof(extfile) do
for I:= 0 to extFile.Count - 1 do
begin
readln(extfile,sLine);
sLine:=Trim(sLine);
sLine:= extFile.Strings[I];
sLine:= Trim(sLine);
if (sLine='') or (sLine[1]='#') then Continue;
// writeln(sLine);
if sLine[1]='[' then
@ -217,7 +217,7 @@ begin
extCmd.Actions.Add(sLine);
end;
end;
CloseFile(extfile);
extFile.Free;
end;
function TExts.GetNewSectionName(Index: Integer): String;