mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
ADD: Some code for Unicode support under Windows
This commit is contained in:
parent
5c6bbb0be8
commit
6843df9fd1
3 changed files with 16 additions and 20 deletions
|
|
@ -27,7 +27,6 @@ object frmMain: TfrmMain
|
|||
OnShow = frmMainShow
|
||||
Position = poDesktopCenter
|
||||
ShowHint = True
|
||||
LCLVersion = '0.9.25'
|
||||
object pnlSyncSize: TPanel
|
||||
Height = 26
|
||||
Top = 24
|
||||
|
|
|
|||
15
fmain.pas
15
fmain.pas
|
|
@ -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
|
||||
|
|
|
|||
20
uexts.pas
20
uexts.pas
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue