Create SVN.

This commit is contained in:
Alexander Koblov 2007-02-08 19:46:07 +00:00
commit ab667f7acc
354 changed files with 73771 additions and 0 deletions

BIN
XP.or Normal file

Binary file not shown.

BIN
XP.res Normal file

Binary file not shown.

20
_clean.bat Normal file
View file

@ -0,0 +1,20 @@
del /Q *.o
del /Q *.ppu
del /Q *.a
del /Q *.bak
del /Q *.*~
del /Q *.~*
del /Q doublecmd*.exe
del /Q plugins\cpio\bin\*.*
del /Q plugins\rpm\bin\*.*
del /Q plugins\zip\bin\*.*
del /Q plugins\cpio\*.bak
del /Q plugins\rpm\*.bak
del /Q plugins\zip\*.bak
del /Q plugins\cpio\*.*~
del /Q plugins\rpm\*.*~
del /Q plugins\zip\*.*~
del /Q components\KASToolBar\lib\i386-win32\*.*
del /Q components\viewer\lib\i386-win32\*.*

4
_clean.sh Normal file
View file

@ -0,0 +1,4 @@
#/bin/sh
rm -f *.o
rm -f *.ppu
rm -f *.a

2
_pack.bat Normal file
View file

@ -0,0 +1,2 @@
strip --strip-all doublecmd.exe
upx --best --lzma doublecmd.exe

0
cmdhistory.txt Normal file
View file

13
color.ext Normal file
View file

@ -0,0 +1,13 @@
# this is color file for Seksi commander
# format of file
# each line is one ext + color
# ext: color
# lines started with # or black lines are ignored
# format of color is xxbbggrr
# where xx can be:
# 00 - color is the closest matching color in system palette
# 01 - active palette
# 02 - logical palette
# rr, gg, bb is hex value of RGB
# warning:selected items are $000000ff - red
pas: $0000ff00

View file

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<PathDelim Value="\"/>
<Name Value="KASComp"/>
<Author Value="Alexander Koblov"/>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<DelphiCompat Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Description Value="ToolBar that loading from *.ini file. Format of *.ini file
KASEdit include popup menu with operations such as cut, copy, paste, delete, etc."/>
<License Value="GNU GPL 2
"/>
<Version Major="1" Release="2" Build="1"/>
<Files Count="2">
<Item1>
<Filename Value="KAStoolbar.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="KAStoolBar"/>
</Item1>
<Item2>
<Filename Value="kasedit.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="KASEdit"/>
</Item2>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">
<Item1>
<PackageName Value="LCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item2>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -0,0 +1,22 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit KASComp;
interface
uses
KAStoolbar, KASEdit, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('KAStoolbar', @KAStoolbar.Register);
RegisterUnit('KASEdit', @KASEdit.Register);
end;
initialization
RegisterPackage('KASComp', @Register);
end.

View file

@ -0,0 +1,243 @@
{
File name: kasedit.pas
Author: Koblov Alexander (Alexx2000@mail.ru)
Edit box for Linux with popup menu
Copyright (C) 2006
contributors:
This program is free software; you can redistribute it and/or
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, 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.
You should have received a copy of the GNU General Public License
in a file called COPYING along with this program; if not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA.
}
unit KASEdit;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Menus;
type
{ TKASEdit }
TKASEdit = class(TEdit)
private
{ Private declarations }
fUndoText,
fCutText,
fCopyText,
fPasteText,
fDeleteText,
fSelectAllText,
fOldText : String;
fChange : boolean;
procedure TextUndo(Sender: TObject);
procedure TextCut(Sender: TObject);
procedure TextCopy(Sender: TObject);
procedure TextPaste(Sender: TObject);
procedure TextDelete(Sender: TObject);
procedure TextSelectAll(Sender: TObject);
procedure OnPopupMenu(Sender: TObject);
protected
{ Protected declarations }
public
{ Public declarations }
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure CreateWnd; override;
published
{ Published declarations }
property UndoText : String read fUndoText write fUndoText;
property CutText : String read fCutText write fCutText;
property CopyText : String read fCopyText write fCopyText;
property PasteText : String read fPasteText write fPasteText;
property DeleteText : String read fDeleteText write fDeleteText;
property SelectAllText : String read fSelectAllText write fSelectAllText;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('KASComponents',[TKASEdit]);
end;
{ TKASEdit }
procedure TKASEdit.TextUndo(Sender: TObject);
begin
if fChange then
Text := fOldText;
end;
procedure TKASEdit.TextCut(Sender: TObject);
begin
fChange := true;
fOldText := Text;
CutToClipboard;
end;
procedure TKASEdit.TextCopy(Sender: TObject);
begin
CopyToClipboard;
end;
procedure TKASEdit.TextPaste(Sender: TObject);
begin
fChange := true;
fOldText := Text;
PasteFromClipboard;
end;
procedure TKASEdit.TextDelete(Sender: TObject);
begin
fChange := true;
fOldText := Text;
ClearSelection;
end;
procedure TKASEdit.TextSelectAll(Sender: TObject);
begin
SelectAll;
end;
procedure TKASEdit.OnPopupMenu(Sender: TObject);
begin
if SelLength = 0 then
begin
PopUpMenu.Items.Items[1].Enabled := false;
PopUpMenu.Items.Items[2].Enabled := false;
PopUpMenu.Items.Items[4].Enabled := false;
end
else
begin
PopUpMenu.Items.Items[1].Enabled := true;
PopUpMenu.Items.Items[2].Enabled := true;
PopUpMenu.Items.Items[4].Enabled := true;
end;
if fChange then
PopUpMenu.Items.Items[0].Enabled := true
else
PopUpMenu.Items.Items[0].Enabled := false;
end;
constructor TKASEdit.Create(TheOwner: TComponent);
var
MenuItem : TMenuItem;
begin
inherited Create(TheOwner);
fChange := false;
PopUpMenu := TPopUpMenu.Create(nil);
PopUpMenu.OnPopup := @OnPopupMenu;
PopUpMenu.AutoPopup := true;
(*Undo Text*)
MenuItem := TMenuItem.Create(PopUpMenu);
//MenuItem.ShortCut := $405A; //Ctrl+Z
MenuItem.OnClick := @TextUndo;
PopUpMenu.Items.Add(MenuItem);
(*Cut Text*)
MenuItem := TMenuItem.Create(PopUpMenu);
//MenuItem.ShortCut := $4058; //Ctrl+X
MenuItem.OnClick := @TextCut;
PopUpMenu.Items.Add(MenuItem);
(*Copy Text*)
MenuItem := TMenuItem.Create(PopUpMenu);
//MenuItem.ShortCut := $4043; //Ctrl+C
MenuItem.OnClick := @TextCopy;
PopUpMenu.Items.Add(MenuItem);
(*Paste Text*)
MenuItem := TMenuItem.Create(PopUpMenu);
//MenuItem.ShortCut := $4056; //Ctrl+V
MenuItem.OnClick := @TextPaste;
PopUpMenu.Items.Add(MenuItem);
(*Delete Text*)
MenuItem := TMenuItem.Create(PopUpMenu);
MenuItem.OnClick := @TextDelete;
PopUpMenu.Items.Add(MenuItem);
(*Select All Text*)
MenuItem := TMenuItem.Create(PopUpMenu);
//MenuItem.ShortCut := $4041; //Ctrl+A
MenuItem.OnClick := @TextSelectAll;
PopUpMenu.Items.Add(MenuItem);
end;
destructor TKASEdit.Destroy;
var
I : byte;
begin
try
for I := 0 to PopupMenu.Items.Count - 1 do
PopUpMenu.Items.Items[0].Free;
PopUpMenu.Items.Free;
finally
inherited Destroy;
end;
end;
procedure TKASEdit.CreateWnd;
begin
inherited CreateWnd;
(*Caption Undo*)
if fUndoText <> '' then
PopUpMenu.Items.Items[0].Caption := fUndoText
else
PopUpMenu.Items.Items[0].Caption := 'Undo';
(*Caption Cut*)
if fCutText <> '' then
PopUpMenu.Items.Items[1].Caption := fCutText
else
PopUpMenu.Items.Items[1].Caption := 'Cut';
(*Caption Copy*)
if fCopyText <> '' then
PopUpMenu.Items.Items[2].Caption := fCopyText
else
PopUpMenu.Items.Items[2].Caption := 'Copy';
(*Caption Paste*)
if fPasteText <> '' then
PopUpMenu.Items.Items[3].Caption := fPasteText
else
PopUpMenu.Items.Items[3].Caption := 'Paste';
(*Caption Delete*)
if fDeleteText <> '' then
PopUpMenu.Items.Items[4].Caption := fDeleteText
else
PopUpMenu.Items.Items[4].Caption := 'Delete';
(*Caption Select All*)
if fSelectAllText <> '' then
PopUpMenu.Items.Items[5].Caption := fSelectAllText
else
PopUpMenu.Items.Items[5].Caption := 'SelectAll';
end;
end.

View file

@ -0,0 +1,396 @@
{
File name: kastoolbar.pas
Author: Koblov Alexander (Alexx2000@mail.ru)
Toolbar panel
Copyright (C) 2006
contributors:
This program is free software; you can redistribute it and/or
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, 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.
You should have received a copy of the GNU General Public License
in a file called COPYING along with this program; if not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA.
}
unit KAStoolBar;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls,
Graphics, Dialogs, ExtCtrls, Buttons, IniFiles, FileUtil;
type
TOnToolButtonClick = procedure (NumberOfButton : Integer) of object;
{ TKAStoolBar }
TKAStoolBar = class(TPanel)
private
FButtonsList: TList;
FCmdList,
FIconList : TStringList;
FPositionX : Integer;
FPositionY : Integer;
FMaxBtnCount : Integer;
FLineBtnCount : Integer;
FButtonSize : Integer;
FNeedMore : Boolean;
FOnToolButtonClick : TOnToolButtonClick;
FTotalBevelWidth : Integer;
FCheckToolButton : Boolean;
FFlatButtons: Boolean;
FDiskPanel: Boolean;
function LoadBtnIcon(IconPath : String) : TBitMap;
function GetButton(Index: Integer): TSpeedButton;
function GetButtonCount: Integer;
function GetCommand(Index: Integer): String;
function GetIconPath(Index: Integer): String;
procedure SetButton(Index : Integer; Value : TSpeedButton);
procedure SetCommand(Index: Integer; const AValue: String);
procedure SetIconPath(Index: Integer; const AValue: String);
procedure ToolButtonClick(Sender: TObject);
procedure UpdateButtonsTag;
protected
{ Protected declarations }
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure CreateWnd; override;
procedure LoadFromFile(FileName : String);
procedure SaveToFile(FileName : String);
function AddButton(Cmd, BtnHint, IconPath : String) : Integer;
procedure RemoveButton(Index: Integer);
procedure DeleteAllToolButtons;
property ButtonCount: Integer read GetButtonCount;
property Buttons[Index: Integer]: TSpeedButton read GetButton write SetButton;
property Commands[Index: Integer]: String read GetCommand write SetCommand;
property Icons[Index: Integer]: String read GetIconPath write SetIconPath;
property ButtonList: TList read FButtonsList;
published
{ Published declarations }
property OnToolButtonClick: TOnToolButtonClick read FOnToolButtonClick write FOnToolButtonClick;
property CheckToolButton : Boolean read FCheckToolButton write FCheckToolButton default False;
property FlatButtons : Boolean read FFlatButtons write FFlatButtons default False;
property IsDiskPanel : Boolean read FDiskPanel write FDiskPanel default False;
end;
procedure Register;
implementation
uses GraphType;
procedure Register;
begin
RegisterComponents('KASComponents',[TKAStoolBar]);
end;
function TKAStoolBar.LoadBtnIcon(IconPath: String): TBitMap;
var
PNG : TPortableNetworkGraphic;
begin
if IconPath <> '' then
if FileExists(IconPath) then
begin
if CompareFileExt(IconPath, 'png', false) = 0 then
begin
PNG := TPortableNetworkGraphic.Create;
PNG.LoadFromFile(IconPath);
Result := TBitMap(PNG);
end
else
begin
Result := TBitMap.Create;
Result.LoadFromFile(IconPath);
end;
end;
end;
function TKAStoolBar.GetButton(Index: Integer): TSpeedButton;
begin
Result := TSpeedButton(FButtonsList.Items[Index]);
end;
procedure TKAStoolBar.SetButton(Index : Integer; Value : TSpeedButton);
begin
TSpeedButton(FButtonsList.Items[Index]) := Value;
end;
procedure TKAStoolBar.SetCommand(Index: Integer; const AValue: String);
begin
FCmdList[Index] := AValue;
end;
procedure TKAStoolBar.SetIconPath(Index: Integer; const AValue: String);
var
PNG : TPortableNetworkGraphic;
begin
FIconList[Index] := AValue;
if FileExists(AValue) then
TSpeedButton(FButtonsList.Items[Index]).Glyph := LoadBtnIcon(AValue)
else
ShowMessage('File "' + AValue + '" not found!' );
end;
procedure TKAStoolBar.ToolButtonClick(Sender: TObject);
begin
inherited Click;
if Assigned(FOnToolButtonClick) then
FOnToolButtonClick((Sender as TSpeedButton).Tag);
end;
procedure TKAStoolBar.UpdateButtonsTag;
var
I :Integer;
begin
for I := 0 to FButtonsList.Count - 1 do
TSpeedButton(FButtonsList.Items[I]).Tag := I;
end;
procedure TKAStoolBar.DeleteAllToolButtons;
var
BtnCount,
I: Integer;
begin
BtnCount := FButtonsList.Count - 1;
for I := 0 to BtnCount do
begin
TSpeedButton(FButtonsList.Items[0]).Free;
FButtonsList.Delete(0);
FCmdList.Delete(0);
FIconList.Delete(0);
end;
Height := FButtonSize + FTotalBevelWidth * 2;
FLineBtnCount := 0;
FNeedMore := False;
end;
function TKAStoolBar.GetButtonCount: Integer;
begin
Result := FButtonsList.Count;
end;
function TKAStoolBar.GetCommand(Index: Integer): String;
begin
Result := FCmdList[Index];
end;
function TKAStoolBar.GetIconPath(Index: Integer): String;
begin
Result := FIconList[Index];
end;
constructor TKAStoolBar.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
FButtonsList := TList.Create;
FCmdList := TStringList.Create;
FIconList := TStringList.Create;
FNeedMore := False;
end;
destructor TKAStoolBar.Destroy;
var
I: Integer;
begin
for I := 0 to FButtonsList.Count - 1 do
if TControl(FButtonsList[I]) is TSpeedButton then
TSpeedButton(FButtonsList.Items[I]).Free;
FreeAndNil(FButtonsList);
FreeAndNil(FCmdList);
FreeAndNil(FIconList);
inherited Destroy;
end;
procedure TKAStoolBar.CreateWnd;
begin
inherited CreateWnd;
Caption := '';
if (BevelInner <> bvNone) and (BevelOuter <> bvNone) then
FTotalBevelWidth := BevelWidth * 2
else
FTotalBevelWidth := BevelWidth;
FButtonSize := Height - FTotalBevelWidth * 2;
//writeln('FButtonSize = ' + IntToStr(FButtonSize));
if Width < Height then
Width := Height;
FMaxBtnCount := (Width - FTotalBevelWidth * 2) div FButtonSize;
if not FDiskPanel then
Width := (FButtonSize * FMaxBtnCount) + FTotalBevelWidth * 2;
FPositionX := FTotalBevelWidth;
FPositionY := FTotalBevelWidth;
end;
procedure TKAStoolBar.LoadFromFile(FileName: String);
var
IniFile : Tinifile;
BtnCount, I : Integer;
begin
DeleteAllToolButtons;
FPositionX := FTotalBevelWidth;
FPositionY := FTotalBevelWidth;
FMaxBtnCount := Width div FButtonSize;
IniFile := Tinifile.Create(FileName);
BtnCount := IniFile.ReadInteger('Buttonbar', 'Buttoncount', 0);
for I := 1 to BtnCount do
AddButton(IniFile.ReadString('Buttonbar', 'cmd' + IntToStr(I), ''),
IniFile.ReadString('Buttonbar', 'menu' + IntToStr(I), ''),
IniFile.ReadString('Buttonbar', 'button' + IntToStr(I), ''));
IniFile.Free;
end;
procedure TKAStoolBar.SaveToFile(FileName: String);
var
IniFile : Tinifile;
I : Integer;
begin
IniFile := Tinifile.Create(FileName);
IniFile.WriteInteger('Buttonbar', 'Buttoncount', FButtonsList.Count);
for I := 0 to FButtonsList.Count - 1 do
begin
IniFile.WriteString('Buttonbar', 'button' + IntToStr(I + 1), FIconList[I]);
IniFile.WriteString('Buttonbar', 'cmd' + IntToStr(I + 1), FCmdList[I]);
IniFile.WriteString('Buttonbar', 'menu' + IntToStr(I + 1), TSpeedButton(FButtonsList.Items[I]).Hint);
end;
IniFile.Free;
end;
function TKAStoolBar.AddButton(Cmd, BtnHint, IconPath : String) : Integer;
var
ToolButton: TSpeedButton;
begin
ToolButton:= TSpeedButton.Create(Self);
Include(ToolButton.ComponentStyle, csSubComponent);
ToolButton.Parent:=Self;
ToolButton.Visible := True;
ToolButton.Left:=FPositionX;
ToolButton.Top := FPositionY;
ToolButton.Height := FButtonSize;
ToolButton.ParentShowHint := False;
ToolButton.ShowHint := True;
ToolButton.Hint := BtnHint;
if Assigned(OnMouseDown) then
ToolButton.OnMouseDown := OnMouseDown;
if FCheckToolButton then
ToolButton.GroupIndex := 1;
ToolButton.Flat := FFlatButtons;
if FileExists(IconPath) then
ToolButton.Glyph := LoadBtnIcon(IconPath);
if FDiskPanel then
ToolButton.Width := Self.Canvas.TextWidth(BtnHint) + ToolButton.Glyph.Width + 24
else
ToolButton.Width := FButtonSize;
ToolButton.OnClick:=TNotifyEvent(@ToolButtonClick);
FPositionX:= FPositionX + ToolButton.Width;
ToolButton.Tag := FButtonsList.Add(ToolButton);
FCmdList.Add(Cmd);
FIconList.Add(IconPath);
Inc(FLineBtnCount);
if FNeedMore then
begin
Height := Height + FButtonSize;
FNeedMore := False;
end;
if FMaxBtnCount <= FLineBtnCount then
begin
FLineBtnCount := 0;
FMaxBtnCount := Width div ToolButton.Width;
FPositionY:= FPositionY + ToolButton.Height;
FPositionX := FTotalBevelWidth;
FNeedMore := True;
end;
Result := ToolButton.Tag;
end;
procedure TKAStoolBar.RemoveButton(Index: Integer);
var
I, OldLeft, PrevLeft,
OldTop, PrevTop : integer;
begin
try
TSpeedButton(FButtonsList.Items[Index]).Visible := false;
FPositionX := FPositionX - TSpeedButton(FButtonsList.Items[Index]).Width;
OldLeft := TSpeedButton(FButtonsList.Items[Index]).Left;
OldTop := TSpeedButton(FButtonsList.Items[Index]).Top;
TSpeedButton(FButtonsList.Items[Index]).Free;
FButtonsList.Delete(Index);
UpdateButtonsTag;
FCmdList.Delete(Index);
Dec(FLineBtnCount);
if (FLineBtnCount = 0) and (FButtonsList.Count <> 0) then
begin
Height := Height - FButtonSize;
FNeedMore := True;
end
else
FNeedMore := False;
if FLineBtnCount < 0 then
begin
FLineBtnCount := FMaxBtnCount - 1;
FPositionX:= FTotalBevelWidth + FLineBtnCount * TSpeedButton(FButtonsList.Items[Index]).Width;
FPositionY:= FPositionY - TSpeedButton(FButtonsList.Items[Index]).Height;
end;
finally
for I:= Index to FButtonsList.Count-1 do
begin
PrevLeft := TSpeedButton(FButtonsList.Items[i]).Left;
PrevTop := TSpeedButton(FButtonsList.Items[i]).Top;
TSpeedButton(FButtonsList.Items[i]).Left:= OldLeft;
TSpeedButton(FButtonsList.Items[i]).Top:= OldTop;
OldLeft := PrevLeft;
OldTop := PrevTop;
end;
Repaint;
end;
end;
end.

View file

@ -0,0 +1,349 @@
{ **************************************************** }
{ MappingFile unit v1.0 for Delphi }
{ Copyright (c) Razumikhin Dmitry, 2005 }
{ E-mail: razumikhin_d@mail.ru }
{ }
{ Use under terms LGPL license: }
{ http://www.gnu.org/copyleft/lesser.html }
{ **************************************************** }
unit MappingFile;
interface
uses
SysUtils, Windows, Classes, RTLConsts;
type
EFileMappingError = class(Exception);
TMappingFile = class
private
fHandle: Integer; //file handle
fFileName: string; //file name
fMode: Word; //file open mode
fMappingHandle: THandle; //handle of mapping file
fBaseAddress: PChar; //address of file image in memory
fPos: Integer; //current position
fSize: Integer; //size of real data
fCapacity: Integer; //size of allocated memory
fExtraMem: Integer;
function GetChar(Index: Integer): Char;
procedure SetSize(const Value: Integer);
procedure SetChar(Index: Integer; const Value: Char);
procedure TryMount;
procedure ReMount;
procedure SetCapacity(const Value: Integer);
procedure SetPos(const Value: Integer);
public
property BaseAddress: PChar read fBaseAddress;
property Size: Integer read fSize write SetSize;
property Capacity: Integer read fCapacity write SetCapacity;
property ExtraMem: Integer read fExtraMem write fExtraMem;
property Ch[Index: Integer]: Char read GetChar write SetChar;
property Position: Integer read fPos write SetPos;
function Seek(Offset, Origin: Integer): Integer;
//read functions
function ReadCh(out Ch: Char): Boolean;
function ReadStr(out Str: string; Len: Integer): Boolean; overload;
function ReadStr(const Index, Len: Integer): string; overload;
function Find(Ch: Char; StartIndex: Integer = 0): Integer;
//write functions
procedure WriteCh(const Ch: Char);
procedure WriteStr(const Str: string); overload;
procedure WriteStr(const Str: string; Index: Integer); overload;
procedure WriteBuffer(const Buf: PChar; Count: Integer); overload;
procedure WriteBuffer(const Buf: PChar; Index, Count: Integer); overload;
//insert functions (expand + write)
procedure InsertBuffer(const Buf: PChar; Count: Integer); overload;
procedure InsertBuffer(const Buf: PChar; Index, Count: Integer); overload;
procedure InsertStr(const Str: string); overload;
procedure InsertStr(const Str: string; Index: Integer); overload;
constructor Create(const FileName: string; Mode: Word);
destructor Destroy; override;
end;
function FileResize(Handle: THandle; Size: Integer): LongBool;
function FileMount(var MappingHandle: THandle; const FileHandle: Integer; ReadOnly: Boolean = True): Pointer;
procedure FileUmount(MappingHandle: THandle; BaseAddress: Pointer);
implementation
{ TMappingFile }
constructor TMappingFile.Create(const FileName: string; Mode: Word);
begin
inherited Create;
fFileName:=FileName;
fMode:=Mode;
fPos:=0;
fSize:=0;
fCapacity:=0;
fExtraMem:=1024;
fBaseAddress:=nil;
if Mode = fmCreate then
begin
fHandle:=FileCreate(FileName);
if fHandle < 0 then
raise EFCreateError.CreateResFmt(@SFCreateErrorEx, [ExpandFileName(FileName), SysErrorMessage(GetLastError)]);
end
else
begin
fHandle:=FileOpen(FileName, Mode);
if fHandle < 0 then
raise EFOpenError.CreateResFmt(@SFOpenErrorEx, [ExpandFileName(FileName), SysErrorMessage(GetLastError)]);
end;
fSize:=GetFileSize(fHandle, nil);
fCapacity:=fSize;
TryMount;
end;
destructor TMappingFile.Destroy;
begin
FileUmount(fMappingHandle, fBaseAddress);
if fSize <> fCapacity then
FileResize(fHandle, fSize);
if fHandle >=0 then FileClose(fHandle);
inherited;
end;
function TMappingFile.Find(Ch: Char; StartIndex: Integer): Integer;
var
i: Integer;
begin
for i:=StartIndex to fSize-1 do
if Ch = PChar(fBaseAddress + i)^ then
begin
Result:=i;
Exit;
end;
Result:=-1;
end;
function TMappingFile.GetChar(Index: Integer): Char;
begin
Result:=PChar(fBaseAddress + Index)^; //Not control the bounds
end;
procedure TMappingFile.InsertBuffer(const Buf: PChar; Count: Integer);
begin
InsertBuffer(Buf, fPos, Count);
Inc(fPos, Count);
end;
procedure TMappingFile.InsertBuffer(const Buf: PChar; Index,
Count: Integer);
var
MoveCount: Integer;
begin
if Count <> 0 then
begin
MoveCount:=fSize - Index;
SetSize(fSize + Count);
Move(PChar(fBaseAddress + Index)^, PChar(fBaseAddress + Index + Count)^, MoveCount);
Move(Buf^, PChar(fBaseAddress + Index)^, Count);
end;
end;
procedure TMappingFile.InsertStr(const Str: string);
begin
InsertBuffer(PChar(Str), Length(Str));
end;
procedure TMappingFile.InsertStr(const Str: string; Index: Integer);
begin
InsertBuffer(PChar(Str), Index, Length(Str));
end;
function TMappingFile.ReadCh(out Ch: Char): Boolean;
begin
Result:=fPos < fSize;
if Result then
begin
Ch:=PChar(fBaseAddress + fPos)^;
Inc(fPos, SizeOf(Char));
end
else
Ch:=#0;
end;
function TMappingFile.ReadStr(out Str: string; Len: Integer): Boolean;
begin
Result:=(fPos + Len) <= fSize;
SetLength(Str, Len);
Move(PChar(fBaseAddress + fPos)^, Str[1], Len);
Inc(fPos, Len);
end;
function TMappingFile.ReadStr(const Index, Len: Integer): string;
begin
SetLength(Result, Len);
Move(PChar(fBaseAddress + Index)^, Result[1], Len);
end;
procedure TMappingFile.Remount;
begin
if Assigned(fBaseAddress) then
FileUmount(fMappingHandle, fBaseAddress);
TryMount;
end;
function TMappingFile.Seek(Offset, Origin: Integer): Integer;
var
NewPos: Integer;
begin
Result:=-1;
case Origin of
0:
begin
if Offset >= 0 then
begin
if (Offset > fSize) then
SetSize(Offset);
fPos:=Offset;
Result:=Offset;
end;
end;
1:
begin
NewPos:= fPos + Offset;
if NewPos >=0 then
begin
if (NewPos > fSize) then
SetSize(NewPos);
fPos:=NewPos;
Result:=NewPos;
end;
end;
2:
begin
NewPos:=fSize - Offset - 1;
if NewPos >=0 then
begin
if (NewPos > fSize) then
SetSize(NewPos);
fPos:=NewPos;
Result:=NewPos;
end;
end;
end;
end;
procedure TMappingFile.SetCapacity(const Value: Integer);
begin
if fCapacity <> Value then
begin
fCapacity := Value;
FileResize(fHandle, fCapacity);
Remount;
end;
end;
procedure TMappingFile.SetChar(Index: Integer; const Value: Char);
begin
PChar(fBaseAddress + Index)^:=Value; //Not control the bounds
end;
procedure TMappingFile.SetPos(const Value: Integer);
begin
Seek(Value, 0);
end;
procedure TMappingFile.SetSize(const Value: Integer);
begin
if fSize <> Value then
begin
fSize := Value;
if fPos >= fSize then fPos:=fSize - 1;
if fSize > fCapacity then
SetCapacity(fSize + fExtraMem);
end;
end;
procedure TMappingFile.TryMount;
begin
if fSize > 0 then
begin
fBaseAddress:=FileMount(fMappingHandle, fHandle, fMode = fmOpenRead);
if not Assigned(fBaseAddress) then
raise EFileMappingError.CreateFmt('Could not mapped file ''%s''',[fFileName]);
end;
end;
procedure TMappingFile.WriteBuffer(const Buf: PChar;
Count: Integer);
begin
if (fPos + Count) > fSize then
SetSize(fPos + Count);
Move(Buf^, PChar(fBaseAddress + fPos)^, Count);
fPos:=fPos + Count;
end;
procedure TMappingFile.WriteBuffer(const Buf: PChar; Index,
Count: Integer);
begin
if (Index + Count) > fSize then
SetSize(Index + Count);
Move(Buf^, PChar(fBaseAddress + Index)^, Count);
end;
procedure TMappingFile.WriteCh(const Ch: Char);
begin
WriteBuffer(@Ch, SizeOf(Char));
end;
procedure TMappingFile.WriteStr(const Str: string);
begin
WriteBuffer(PChar(Str), Length(Str));
end;
procedure TMappingFile.WriteStr(const Str: string; Index: Integer);
begin
WriteBuffer(PChar(Str), Index, Length(Str));
end;
//-----------------------------------------------------------------------
function FileMount(var MappingHandle: THandle; const FileHandle: Integer; ReadOnly: Boolean = True): Pointer;
var
FileMappingMode,
MapViewMode: DWORD;
begin
if ReadOnly then
begin
FileMappingMode:=PAGE_READONLY;
MapViewMode:=FILE_MAP_READ;
end
else
begin
FileMappingMode:=PAGE_READWRITE;
MapViewMode:=FILE_MAP_READ + FILE_MAP_WRITE;
end;
MappingHandle:=CreateFileMapping(FileHandle, nil, FileMappingMode, 0, 0, nil);
if MappingHandle <> 0 then
begin
Result:=MapViewOfFile(MappingHandle, MapViewMode, 0, 0, 0);
end
else
Result:=nil;
end;
procedure FileUmount(MappingHandle: THandle; BaseAddress: Pointer);
begin
if Assigned(BaseAddress) then
UnmapViewOfFile(BaseAddress);
if MappingHandle <> 0 then
CloseHandle(MappingHandle);
end;
function FileResize(Handle: THandle; Size: Integer): LongBool;
begin
FileSeek(Handle, Size, 0);
Result:=SetEndOfFile(Handle);
end;
end.

View file

@ -0,0 +1,847 @@
{
Component ViewerControl (Free Pascal)
show file in text (wraped or not) or bin or hex mode
This is part of Seksi Commander
To searching use uFindMmap,
to movement call Upxxxx, Downxxxx, or set Position
Realised under GNU GPL 2
author Radek Cervinka (radek.cervinka@centrum.cz)
changes:
5.7. (RC)
- selecting text with mouse
- CopyToclipBoard, SelectAll
?.6. - LoadFromStdIn and loading first 64Kb of files with size=0 :) (/proc fs ..)
17.6. (RC)
- mapfile (in error set FMappedFile=nil)
- writetext TABs fixed (tab is replaced by 9 spaces)
- set correct position for modes hex, bin (SetPosition)
21.7
- wrap text on 80 character lines works better now (by Radek Polak)
- problems with function UpLine for specific lines:
(lines of 80(=cTextWidth) character ended with ENTER (=#10)
6.2. (RC)
- ported to fpc for linux (CustomControl and gtk)
7.2. (RC)
- use temp to new implementation of LoadFromStdIn (and mmap temp file)
- faster drawing of text (I hope)
}
unit viewercontrol;
{$mode objfpc}{$H+}
interface
uses
SysUtils, Classes, controls, types, Graphics, LCLType;
type
TViewerMode=(vmBin, vmHex, vmText, vmWrap);
TDataAccess=(dtMmap, dtNothing);
TViewerControl = class(TCustomControl)
// TViewerControl = class(TGraphicControl)
private
{ Private declarations }
protected
{ Protected declarations }
FTempName: String;
FViewerMode:TViewerMode;
FFileHandle:Integer;
FFileSize:Integer;
FMappedFile:PChar;
FPosition: Integer;
FLineList:TList;
FBlockBeg:Integer;
FBlockEnd:Integer;
FMouseBlockBeg:Integer;
FSelecting:Boolean;
// this is broken ..., using constant
FTextHeight, FTextWidth:Integer; // measured values of font, rec calc at font changed
// FBitmap:TBitmap;
procedure OutText(ARect:TRect; x,y:Integer; const sText:String);
procedure WriteText(bWrap:Boolean);
procedure WriteHex;
procedure WriteBin;
Procedure AddLineOffset(iOffset:Integer);
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
function XYPos2Adr(x,y:Integer):Integer;
public
{ Public declarations }
// procedure EraseBackground(DC: HDC); override;
procedure Paint; override;
procedure Down;
procedure Up;
function UpLine:Boolean;
function DownLine:Boolean;
Function DownBy(iLines:Integer):Boolean;
Function UpBy(iLines:Integer):Boolean;
procedure PageUp;
procedure PageDown;
procedure GoHome;
procedure GoEnd;
// Function Find(const sText:String; bCase:Boolean):Boolean;
procedure SetViewerMode(Value:TViewerMode);
Function MapFile(const sFileName:String):Boolean;
procedure UnMapFile;
Function LoadFromStdin(const sCmd:String):Boolean;
Function GetDataAdr:PChar;
procedure SetPosition(Value:Integer);
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure SelectAll;
procedure CopyToClipboard;
published
{ Published declarations }
property ViewerMode:TViewerMode read FViewerMode write SetViewerMode;
property Position:Integer read FPosition write SetPosition;
property FileSize:Integer read FFileSize;
property OnMouseMove;
property OnClick;
property OnMouseDown;
property OnMouseUp;
property Font;
property Align;
property Color;
property OnMouseWheel;
property OnMouseWheelDown;
property OnMouseWheelUp;
end;
procedure Register;
implementation
uses
Clipbrd{$IFNDEF WIN32}, unix, Libc{$ENDIF};
const
cTextWidth=80; // wrap on 80 chars
cMaxTextWidth=300; // maximum of chars on one line unwrapped text
cHexWidth=16;
cTabSpaces=9; // tab stop
constructor TViewerControl.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Color:=clWindow;
// FBitmap:=TBitmap.Create;
FViewerMode:=vmBin;
FMappedFile:=nil;
FPosition:=0;
Width:=100;
Height:=100;
FTextWidth:=14; // dummy values, recalculated at the moment of assigning parent (broken)
FTextHeight:=14;
DoubleBuffered:=True;
FLineList:=TList.Create;
// MouseCapture:=True; // lazarus shoter down :(, but working without
Cursor:=crIBeam;
Font.Name:='fixed';
Font.Pitch:=fpFixed;
{ Font.Style:=[fsBold];}
Font.Size:=14;
FTempName:='';
end;
procedure TViewerControl.Paint;
var
Rct: TRect;
begin
FTextHeight:=Font.Size+2; //TextHeight('0');
with Canvas do
begin
Rct := ClientRect;
Brush.Color := Self.Color;
FillRect(Rct);
Font := Self.Font;
if not assigned(FMappedFile) then Exit;
FLineList.Clear;
FTextWidth:=TextWidth('0');
// FTextHeight:=Font.Height; //TextHeight('0');
case FViewerMode of
vmBin: WriteBin;
vmHex: WriteHex;
vmText: WriteText(False);
vmWrap: WriteText(True);
end;
end;
end;
procedure TViewerControl.SetViewerMode(Value:TViewerMode);
begin
FViewerMode:=Value;
// for hex set correct position for line begin
case Value of
vmBin: FPosition:=(FPosition div cTextWidth)* cTextWidth;
vmHex: FPosition:=(FPosition div cHexWidth)* cHexWidth;
end;
Invalidate
end;
procedure TViewerControl.Down;
begin
if DownLine then
Invalidate;
end;
function TViewerControl.UpLine:Boolean;
var
i:Integer;
iLastPos:Integer;
iRemainder:Integer;
procedure UpText(Wrap:Boolean);
begin
i:=FPosition;
if (i>1) and (FMappedFile[i-1]=#10) then
dec(i,2);
While i>0 do
begin
if (FMappedFile[i]=#10) or (i=0) then
begin
if i>0 then inc(i); // we are after #10
if Wrap then
begin
iRemainder:=(FPosition-i) mod cTextWidth;
// RADEK: special case: line of length 80 ended with #10
if (FMappedFile[FPosition-1]=#10) and (iRemainder=1) then
FPosition:=FPosition-cTextWidth-1
else
if (iRemainder=0) then
FPosition:=FPosition-cTextWidth
else
FPosition:=FPosition-iRemainder;
end
else
begin
// check for maximum of chars on one line
if ((FPosition-i)>cMaxTextWidth) then
begin
iRemainder:=(FPosition-i) mod cMaxTextWidth;
// RADEK: special case: line of max length ended with #10
if (FMappedFile[FPosition-1]=#10) and (iRemainder=1) then
FPosition:=FPosition-cMaxTextWidth-1
else
if ((FPosition-i) mod cMaxTextWidth)=0 then
FPosition:=FPosition-cMaxTextWidth
else
FPosition:=FPosition-iRemainder;
end
else // maximum not reached
FPosition:=i;
end;
Break;
end;
dec(i);
end;
if i=0 then FPosition:=0;
end;
begin
iLastPos:=FPosition;
case FViewerMode of
vmBin:
begin
if FPosition>=cTextWidth then
dec(FPosition,cTextWidth);
end;
vmHex:
begin
if FPosition>=cHexWidth then
dec(FPosition,cHexWidth);
end;
vmText: UpText(False);
vmWrap: UpText(True);
end;
Result:= (iLastPos<>FPosition);
end;
Function TViewerControl.DownBy(iLines:Integer):Boolean;
var
i:Integer;
begin
Result:=False;
for i:=1 to iLines do
begin
if DownLine then // only one line and we need repaint
Result:=True
else
Break;
end;
if Result then Invalidate;
end;
Function TViewerControl.UpBy(iLines:Integer):Boolean;
var
i:Integer;
begin
Result:=False;
for i:=1 to iLines do
begin
if UpLine then // only one line and we need repaint
Result:=True
else
Break;
end;
if Result then Invalidate;
end;
function TViewerControl.DownLine:Boolean;
var
i:Integer;
iLastPos:Integer;
procedure DownText(Wrap:Boolean);
begin
i:=FPosition;
While i<FFileSize do
begin
if (FMappedFile[i]=#10)then
begin
FPosition:=i+1;
Break;
end;
if Wrap and ((i-FPosition)>=cTextWidth) then
begin
FPosition:=i;
Break;
end;
// this is a workaround, max of unwrapped text on one line
if not Wrap and ((i-FPosition)>=cMaxTextWidth) then
begin
FPosition:=i;
Break;
end;
inc(i);
end;
if FPosition>=FFileSize then
FPosition:=iLastPos;
end;
begin
iLastPos:=FPosition;
case FViewerMode of
vmBin:
begin
if FPosition+cTextWidth<=FFileSize then
inc(FPosition,cTextWidth);
end;
vmHex:
begin
if FPosition+cHexWidth<=FFileSize then
inc(FPosition,cHexWidth);
end;
vmText:DownText(False);
vmWrap:DownText(True);
end;
Result:= iLastPos<>FPosition;
end;
procedure TViewerControl.Up;
begin
if UpLine then
Invalidate;
end;
procedure TViewerControl.PageUp;
var
H:Integer;
begin
H:= Self.Height div FTextHeight-1;
if H<=0 then H:=1;
UpBy(H);
end;
procedure TViewerControl.PageDown;
var
H:Integer;
begin
H:= Self.Height div FTextHeight-1;
if H<=0 then H:=1;
DownBy(H);
end;
procedure TViewerControl.GoHome;
begin
FPosition:=0;
Invalidate;
end;
procedure TViewerControl.GoEnd;
begin
FPosition:=FFileSize-1;
if FPosition<0 then FPosition:=0;
Up;
end;
Function TViewerControl.MapFile(const sFileName:String):Boolean;
{$IFDEF WIN32}
begin
end;
{$ELSE}
var
stat:TStatBuf;
begin
Result:=False;
if assigned(FMappedFile) then
UnMapFile; // if needed
FFileHandle:=Libc.open(PChar(sFileName), O_RDONLY);
writeln('Trying map:'+sFileName);
if FFileHandle=-1 then Exit;
if fstat(FFileHandle, stat) <> 0 then
begin
Libc.__close(FFileHandle);
Exit;
end;
FFileSize := stat.st_size;
FMappedFile:=mmap(nil,FFileSize,PROT_READ, MAP_PRIVATE{SHARED},FFileHandle,0 );
if Integer(FMappedFile)=-1 then
begin
FMappedFile:=nil;
Libc.__close(FFileHandle);
writeln('failed > try throught cat+stdin');
if FTempName<>'' then
begin
writeln('Circular mmaping, aborting.');
UnMapFile;
Exit;
end;
LoadFromStdin('cat '+sFileName);
Exit;
end;
writeln('Mmaped succesfully');
FPosition:=0;
Invalidate;
Result:=True;
end;
{$ENDIF}
procedure TViewerControl.UnMapFile;
{$IFDEF WIN32}
begin
end;
{$ELSE}
begin
writeln('Unmap file:',FTempName);
FPosition:=0;
if FTempName<>'' then
begin
DeleteFile(FTempName); // delete temp file
FTempName:='';
end;
if not assigned(FMappedFile) then Exit;
Libc.__close(FFileHandle);
munmap(FMappedFile,FFileSize);
FMappedFile:=nil;
writeln('Unmap file done');
end;
{$ENDIF}
procedure TViewerControl.WriteText(bWrap:Boolean);
var
xIndex, yIndex:Integer;
// H:Integer;
c:Char;
Rct: TRect;
iPos:Integer;
s:String;
begin
iPos:=FPosition;
with Canvas do
begin
Rct := GetClientRect;
// H:= TextHeight('0');
for yIndex:=0 to Rct.Bottom div FTextHeight do
begin
s:='';
xIndex:=0;
AddLineOffset(iPos);
while ((xIndex<cMaxTextWidth) and not bWrap) or (xIndex<cTextWidth) do
begin
inc(xIndex);
if ipos>=FFileSize then Break;
c:=FMappedFile[iPos];
inc(iPos);
if (c=#13) then Continue;
if (c=#10) then Break;
if c=#9 then
s:=s+ StringOfChar(' ',cTabSpaces-xIndex mod cTabSpaces)
else
begin
if c<' ' then c:=' ';
if c>#$F0 then c:='.';
s:=s+c;
end;
end;
// RADEK: if wrapped text ends with #10 we dont want extra empty line
if ((xIndex=cTextWidth) or (xIndex=cMaxTextWidth)) then
begin
c := FMappedFile[iPos];
if (c=#10) then
inc(iPos);
end;
if s<>'' then
OutText(Rct, 0, yIndex*FTextHeight,s);
end;
end;
end;
{function ConvertByte(b:Byte):Char;
begin
if b in [32..255] then
Result:=Chr(b)
else
Result:='.';
end;
}
Function LineFormat(const sHex, sAscii:String; iOffset:Integer):String;
var
sDummy:String;
begin
sDummy:='';
if length(sHex)<(cHexWidth*3) then
sDummy:=StringOfChar(' ',cHexWidth*3-length(sHex));
Result:=Format('%s: %s%s %s',[IntToHex(iOffset,8), sHex,sDummy,sAscii]);;
end;
procedure TViewerControl.WriteHex;
var
xIndex, yIndex:Integer;
c:Char;
Rct: TRect;
iPos, iLineBeg:Integer;
sStr,sHex:String;
begin
iPos:=FPosition;
with Canvas do
begin
Rct := GetClientRect;
// Rct := ClipRect;
// s:='';
for yIndex:=0 to Rct.Bottom div FTextHeight do
begin
// s:='';
sStr:='';
sHex:='';
iLineBeg:=iPos;
AddLineOffset(iPos);
for xIndex:=0 to cHexWidth -1 do
begin
if ipos>=FFileSize then Break;
c:=FMappedFile[ipos];
if c<' ' then
sStr:=sStr+'.'
else
sStr:=sStr+c;
sHex:=sHex+IntToHex(ord(c),2);
if xIndex=7 then
sHex:=sHex+'|'
else
sHex:=sHex+' ';
inc(iPos);
end;
if sStr<>'' then
OutText(Rct, 0, yIndex*FTextHeight,LineFormat(sHex,sStr,iLineBeg));
// TextRect(Rect(Rct.Left,yIndex*h,rct.Right,yIndex*h+H), 0, yIndex*h,LineFormat(sHex,sStr,iLineBeg));
end;
end;
end;
procedure TViewerControl.WriteBin;
var
xIndex, yIndex:Integer;
c:Char;
Rct: TRect;
iPos:Integer;
s:String;
begin
iPos:=FPosition;
with Canvas do
begin
Rct := GetClientRect;
s:='';
for yIndex:=0 to Rct.Bottom div FTextHeight do
begin
s:='';
AddLineOffset(iPos);
for xIndex:=0 to cTextWidth -1 do
begin
if ipos>=FFileSize then Break;
c:=FMappedFile[ipos];
if c<' ' then c:='.';
s:=s+c;
inc(iPos);
end;
if s<>'' then
OutText(Rct, 0, yIndex*FTextHeight,s);
end;
end;
end;
destructor TViewerControl.Destroy;
begin
UnMapFile;
if Assigned(FLineList) Then
FreeAndNil(FLineList);
inherited
end;
Function TViewerControl.GetDataAdr:PChar;
begin
Result:=FMappedFile;
end;
procedure TViewerControl.SetPosition(Value:Integer);
begin
if not assigned(FMappedFile) then Exit;
if (Value<FFileSize) and (Value>=0) then
begin
case FViewerMode of
vmBin: FPosition:=(Value div cTextWidth)* cTextWidth;
vmHex: FPosition:=(Value div cHexWidth)* cHexWidth;
vmText, vmWrap: FPosition:=Value;
end;
Invalidate;
end;
end;
Function TViewerControl.LoadFromStdin(const sCmd:String):Boolean;
{$IFDEF WIN32}
begin
end;
{$ELSE}
var
fFile:TextFile;
begin
Result:=False;
UnMapFile;
FFileSize:=0;
FPosition:=0;
FTempName:='/tmp/view.tmp';// later something different
popen(fFile,sCmd+' >'+FTempName,'w');
close(fFile);
MapFile(FTempName);
end;
{$ENDIF}
procedure TViewerControl.OutText(aRect:TRect; x,y:Integer; const sText:String);
var
pBegLine, pEndLine:Integer;
iBegDrawIndex:Integer;
iEndDrawIndex:Integer;
begin
pBegLine:=Integer(FLineList.Items[y div FTextHeight]);
pEndLine:=pBegLine+length(sText);
if ((FBlockEnd-FBlockBeg)=0) or
((FBlockBeg<pBegLine) and (FBlockEnd<pBegLine)) or // before
((FBlockBeg>pEndLine) and (FBlockEnd>pEndLine)) then //after
begin
// out of selection, draw normal
// Canvas.Font.Color:=clYellow; // test
Canvas.Font.Color:=clText;
// Canvas.TextRect(ARect, x, y,sText); //!!!
Canvas.TextOut(x, y,sText);
Exit;
end;
if (FBlockBeg-pBegLine)>0 then
begin
// begin line, not selected
// Canvas.Font.Color:=clBlue; // test
Canvas.Font.Color:=clText;
// Canvas.TextRect(ARect, x, y,Copy(sText,1,FBlockBeg-pBegLine-1)); //!!!
Canvas.TextOut(x, y,Copy(sText,1,FBlockBeg-pBegLine-1));
end;
// selected ?
if (FBlockBeg<=pBegLine) then
iBegDrawIndex:=pBegLine
else
iBegDrawIndex:=FBlockBeg;
if (FBlockEnd<pEndLine) then
iEndDrawIndex:=FBlockEnd
else
iEndDrawIndex:=pEndLine;
Canvas.Brush.Style:=bsSolid;
Canvas.Brush.Color:=clHighlight;
if iBegDrawIndex<>pBegLine then
begin
Canvas.FillRect(Rect(x+(iBegDrawIndex-pBegLine-1)*FTextWidth, y, x+(iEndDrawIndex-pBegLine)*FTextWidth, y+FTextHeight));
// Canvas.Font.Color:=clRed; // test
Canvas.Font.Color:=clLight;
// Canvas.TextRect(ARect, x+(iBegDrawIndex-pBegLine-1)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex+1));!!!
Canvas.TextOut(x+(iBegDrawIndex-pBegLine-1)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex+1));
end
else
begin
Canvas.FillRect(Rect(x+(iBegDrawIndex-pBegLine)*FTextWidth, y, x+(iEndDrawIndex-pBegLine)*FTextWidth, y+FTextHeight));
// Canvas.Font.Color:=clMaroon; // test
Canvas.Font.Color:=clLight;
// Canvas.TextRect(ARect, x+(iBegDrawIndex-pBegLine)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex));
Canvas.TextOut(x+(iBegDrawIndex-pBegLine)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex));
end;
if (pEndLine-FBlockEnd)>0 then
begin
// end of line, not selected
// Canvas.Font.Color:=clGreen; // test
Canvas.Font.Color:=clText;
// Canvas.TextRect(ARect, x+(FBlockEnd-pBegLine)*FTextWidth, y,Copy(sText,FBlockEnd-pBegLine+1,pEndLine-FBlockEnd));
Canvas.TextOut(x+(FBlockEnd-pBegLine)*FTextWidth, y,Copy(sText,FBlockEnd-pBegLine+1,pEndLine-FBlockEnd));
end;
end;
Procedure TViewerControl.AddLineOffset(iOffset:Integer);
begin
FLineList.Add(Pointer(iOffset));
end;
procedure TViewerControl.MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
if not assigned(FMappedFile) then Exit;
inherited;
if (Button=mbLeft) then
begin
FBlockBeg:=XYPos2Adr(x,y);
FMouseBlockBeg:=FBlockBeg;
FBlockEnd:=FBlockBeg;
FSelecting:=True;
end;
end;
procedure TViewerControl.MouseMove(Shift: TShiftState; X, Y: Integer);
var
iTemp:Integer;
begin
inherited;
if FSelecting and ((y mod FTextHeight=0) or (x mod FTextWidth=0)) Then
begin
if y<10 then
begin
if UpLine then
if UpLine then
UpLine;
end;
if y>Height-10 then
begin
if DownLine then
if DownLine then
DownLine;
end;
iTemp:=XYPos2Adr(x,y);
if iTemp<FMouseBlockBeg then
begin
FBlockBeg:=iTemp;
FBlockEnd:=FMouseBlockBeg;
end
else
begin
FBlockBeg:=FMouseBlockBeg;
FBlockEnd:=iTemp;
end;
Invalidate;
end;
end;
procedure TViewerControl.MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
var
iTemp:Integer;
begin
inherited;
if not FSelecting then Exit;
iTemp:=XYPos2Adr(x,y);
if iTemp<FMouseBlockBeg then
begin
FBlockBeg:=iTemp;
FBlockEnd:=FMouseBlockBeg;
end
else
begin
FBlockBeg:=FMouseBlockBeg;
FBlockEnd:=iTemp;
end;
FSelecting:=False;
CopyToClipboard; // copy selection to clipboard
Invalidate;
end;
function TViewerControl.XYPos2Adr(x,y:Integer):Integer;
var
yIndex:Integer;
begin
yIndex:=y div FTextHeight;
if yIndex>=FLineList.Count then
yIndex:=FLineList.Count-1;
if yIndex<0 then
yIndex:=0;
Result:=Integer(FLineList.Items[yIndex]);
//(FTextWidth div 2) is half of char
inc(Result, (X+FTextWidth div 2) div FTextWidth);
if yIndex<FLineList.Count-1 then
begin
if Result>=Integer(FLineList.Items[yIndex+1]) then
Result:=Integer(FLineList.Items[yIndex+1])//-1
end;
// writeln(Format('%d %d %d %d %d',[x,y,Integer(FLineList.Items[yIndex]),yIndex,Result]));
end;
procedure TViewerControl.SelectAll;
begin
FBlockBeg:=0;
FBlockEnd:=FFileSize;
Invalidate;
end;
procedure TViewerControl.CopyToClipboard;
begin
if (FBlockEnd-FBlockBeg)=0 then Exit;
Clipboard.Clear; // prevent multiple formats in Clipboard (specially synedit)
Clipboard.AsText:=Copy(FMappedFile,FBlockBeg,FBlockEnd-FBlockBeg+1);
// writeln(Clipboard.AsText);
end;
procedure Register;
begin
RegisterComponents('SeksiCmd', [TViewerControl]);
end;
end.

View file

@ -0,0 +1,848 @@
{
Component ViewerControl (Free Pascal)
show file in text (wraped or not) or bin or hex mode
This is part of Seksi Commander
To searching use uFindMmap,
to movement call Upxxxx, Downxxxx, or set Position
Realised under GNU GPL 2
author Radek Cervinka (radek.cervinka@centrum.cz)
changes:
5.7. (RC)
- selecting text with mouse
- CopyToclipBoard, SelectAll
?.6. - LoadFromStdIn and loading first 64Kb of files with size=0 :) (/proc fs ..)
17.6. (RC)
- mapfile (in error set FMappedFile=nil)
- writetext TABs fixed (tab is replaced by 9 spaces)
- set correct position for modes hex, bin (SetPosition)
21.7
- wrap text on 80 character lines works better now (by Radek Polak)
- problems with function UpLine for specific lines:
(lines of 80(=cTextWidth) character ended with ENTER (=#10)
6.2. (RC)
- ported to fpc for linux (CustomControl and gtk)
7.2. (RC)
- use temp to new implementation of LoadFromStdIn (and mmap temp file)
- faster drawing of text (I hope)
}
unit viewercontrol;
{$mode objfpc}{$H+}
interface
uses
SysUtils, Classes, controls, types, Graphics, LCLType;
type
TViewerMode=(vmBin, vmHex, vmText, vmWrap);
TDataAccess=(dtMmap, dtNothing);
TViewerControl = class(TCustomControl)
// TViewerControl = class(TGraphicControl)
private
{ Private declarations }
protected
{ Protected declarations }
FTempName: String;
FViewerMode:TViewerMode;
FFileHandle:Integer;
FFileSize:Integer;
FMappedFile:PChar;
FPosition: Integer;
FLineList:TList;
FBlockBeg:Integer;
FBlockEnd:Integer;
FMouseBlockBeg:Integer;
FSelecting:Boolean;
// this is broken ..., using constant
FTextHeight, FTextWidth:Integer; // measured values of font, rec calc at font changed
// FBitmap:TBitmap;
procedure OutText(ARect:TRect; x,y:Integer; const sText:String);
procedure WriteText(bWrap:Boolean);
procedure WriteHex;
procedure WriteBin;
Procedure AddLineOffset(iOffset:Integer);
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
function XYPos2Adr(x,y:Integer):Integer;
public
{ Public declarations }
// procedure EraseBackground(DC: HDC); override;
procedure Paint; override;
procedure Down;
procedure Up;
function UpLine:Boolean;
function DownLine:Boolean;
Function DownBy(iLines:Integer):Boolean;
Function UpBy(iLines:Integer):Boolean;
procedure PageUp;
procedure PageDown;
procedure GoHome;
procedure GoEnd;
// Function Find(const sText:String; bCase:Boolean):Boolean;
procedure SetViewerMode(Value:TViewerMode);
Function MapFile(const sFileName:String):Boolean;
procedure UnMapFile;
Function LoadFromStdin(const sCmd:String):Boolean;
Function GetDataAdr:PChar;
procedure SetPosition(Value:Integer);
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure SelectAll;
procedure CopyToClipboard;
published
{ Published declarations }
property ViewerMode:TViewerMode read FViewerMode write SetViewerMode;
property Position:Integer read FPosition write SetPosition;
property FileSize:Integer read FFileSize;
property OnMouseMove;
property OnClick;
property OnMouseDown;
property OnMouseUp;
property Font;
property Align;
property Color;
property OnMouseWheel;
property OnMouseWheelDown;
property OnMouseWheelUp;
end;
procedure Register;
implementation
uses
Clipbrd{$IFNDEF WIN32}, unix, Libc{$ENDIF};
const
cTextWidth=80; // wrap on 80 chars
cMaxTextWidth=300; // maximum of chars on one line unwrapped text
cHexWidth=16;
cTabSpaces=9; // tab stop
constructor TViewerControl.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Color:=clWindow;
// FBitmap:=TBitmap.Create;
FViewerMode:=vmBin;
FMappedFile:=nil;
FPosition:=0;
Width:=100;
Height:=100;
FTextWidth:=14; // dummy values, recalculated at the moment of assigning parent (broken)
FTextHeight:=14;
DoubleBuffered:=True;
FLineList:=TList.Create;
// MouseCapture:=True; // lazarus shoter down :(, but working without
Cursor:=crIBeam;
Font.Name:='fixed';
Font.Pitch:=fpFixed;
{ Font.Style:=[fsBold];}
Font.Size:=14;
FTempName:='';
end;
procedure TViewerControl.Paint;
var
Rct: TRect;
begin
FTextHeight:=Font.Size+2; //TextHeight('0');
with Canvas do
begin
Rct := ClientRect;
Brush.Color := Self.Color;
FillRect(Rct);
Font := Self.Font;
if not assigned(FMappedFile) then Exit;
FLineList.Clear;
FTextWidth:=TextWidth('0');
// FTextHeight:=Font.Height; //TextHeight('0');
case FViewerMode of
vmBin: WriteBin;
vmHex: WriteHex;
vmText: WriteText(False);
vmWrap: WriteText(True);
end;
end;
end;
procedure TViewerControl.SetViewerMode(Value:TViewerMode);
begin
FViewerMode:=Value;
// for hex set correct position for line begin
case Value of
vmBin: FPosition:=(FPosition div cTextWidth)* cTextWidth;
vmHex: FPosition:=(FPosition div cHexWidth)* cHexWidth;
end;
Invalidate
end;
procedure TViewerControl.Down;
begin
if DownLine then
Invalidate;
end;
function TViewerControl.UpLine:Boolean;
var
i:Integer;
iLastPos:Integer;
iRemainder:Integer;
procedure UpText(Wrap:Boolean);
begin
i:=FPosition;
if (i>1) and (FMappedFile[i-1]=#10) then
dec(i,2);
While i>0 do
begin
if (FMappedFile[i]=#10) or (i=0) then
begin
if i>0 then inc(i); // we are after #10
if Wrap then
begin
iRemainder:=(FPosition-i) mod cTextWidth;
// RADEK: special case: line of length 80 ended with #10
if (FMappedFile[FPosition-1]=#10) and (iRemainder=1) then
FPosition:=FPosition-cTextWidth-1
else
if (iRemainder=0) then
FPosition:=FPosition-cTextWidth
else
FPosition:=FPosition-iRemainder;
end
else
begin
// check for maximum of chars on one line
if ((FPosition-i)>cMaxTextWidth) then
begin
iRemainder:=(FPosition-i) mod cMaxTextWidth;
// RADEK: special case: line of max length ended with #10
if (FMappedFile[FPosition-1]=#10) and (iRemainder=1) then
FPosition:=FPosition-cMaxTextWidth-1
else
if ((FPosition-i) mod cMaxTextWidth)=0 then
FPosition:=FPosition-cMaxTextWidth
else
FPosition:=FPosition-iRemainder;
end
else // maximum not reached
FPosition:=i;
end;
Break;
end;
dec(i);
end;
if i=0 then FPosition:=0;
end;
begin
iLastPos:=FPosition;
case FViewerMode of
vmBin:
begin
if FPosition>=cTextWidth then
dec(FPosition,cTextWidth);
end;
vmHex:
begin
if FPosition>=cHexWidth then
dec(FPosition,cHexWidth);
end;
vmText: UpText(False);
vmWrap: UpText(True);
end;
Result:= (iLastPos<>FPosition);
end;
Function TViewerControl.DownBy(iLines:Integer):Boolean;
var
i:Integer;
begin
Result:=False;
for i:=1 to iLines do
begin
if DownLine then // only one line and we need repaint
Result:=True
else
Break;
end;
if Result then Invalidate;
end;
Function TViewerControl.UpBy(iLines:Integer):Boolean;
var
i:Integer;
begin
Result:=False;
for i:=1 to iLines do
begin
if UpLine then // only one line and we need repaint
Result:=True
else
Break;
end;
if Result then Invalidate;
end;
function TViewerControl.DownLine:Boolean;
var
i:Integer;
iLastPos:Integer;
procedure DownText(Wrap:Boolean);
begin
i:=FPosition;
While i<FFileSize do
begin
if (FMappedFile[i]=#10)then
begin
FPosition:=i+1;
Break;
end;
if Wrap and ((i-FPosition)>=cTextWidth) then
begin
FPosition:=i;
Break;
end;
// this is a workaround, max of unwrapped text on one line
if not Wrap and ((i-FPosition)>=cMaxTextWidth) then
begin
FPosition:=i;
Break;
end;
inc(i);
end;
if FPosition>=FFileSize then
FPosition:=iLastPos;
end;
begin
iLastPos:=FPosition;
case FViewerMode of
vmBin:
begin
if FPosition+cTextWidth<=FFileSize then
inc(FPosition,cTextWidth);
end;
vmHex:
begin
if FPosition+cHexWidth<=FFileSize then
inc(FPosition,cHexWidth);
end;
vmText:DownText(False);
vmWrap:DownText(True);
end;
Result:= iLastPos<>FPosition;
end;
procedure TViewerControl.Up;
begin
if UpLine then
Invalidate;
end;
procedure TViewerControl.PageUp;
var
H:Integer;
begin
H:= Self.Height div FTextHeight-1;
if H<=0 then H:=1;
UpBy(H);
end;
procedure TViewerControl.PageDown;
var
H:Integer;
begin
H:= Self.Height div FTextHeight-1;
if H<=0 then H:=1;
DownBy(H);
end;
procedure TViewerControl.GoHome;
begin
FPosition:=0;
Invalidate;
end;
procedure TViewerControl.GoEnd;
begin
FPosition:=FFileSize-1;
if FPosition<0 then FPosition:=0;
Up;
end;
Function TViewerControl.MapFile(const sFileName:String):Boolean;
{$IFDEF WIN32}
begin
end;
{$ELSE}
var
stat:TStatBuf;
begin
Result:=False;
if assigned(FMappedFile) then
UnMapFile; // if needed
FFileHandle:=Libc.open(PChar(sFileName), O_RDONLY);
writeln('Trying map:'+sFileName);
if FFileHandle=-1 then Exit;
if fstat(FFileHandle, stat) <> 0 then
begin
Libc.__close(FFileHandle);
Exit;
end;
FFileSize := stat.st_size;
FMappedFile:=mmap(nil,FFileSize,PROT_READ, MAP_PRIVATE{SHARED},FFileHandle,0 );
if Integer(FMappedFile)=-1 then
begin
FMappedFile:=nil;
Libc.__close(FFileHandle);
writeln('failed > try throught cat+stdin');
if FTempName<>'' then
begin
writeln('Circular mmaping, aborting.');
UnMapFile;
Exit;
end;
LoadFromStdin('cat '+sFileName);
Exit;
end;
writeln('Mmaped succesfully');
FPosition:=0;
Invalidate;
Result:=True;
end;
{$ENDIF}
procedure TViewerControl.UnMapFile;
{$IFDEF WIN32}
begin
end;
{$ELSE}
begin
writeln('Unmap file:',FTempName);
FPosition:=0;
if FTempName<>'' then
begin
DeleteFile(FTempName); // delete temp file
FTempName:='';
end;
if not assigned(FMappedFile) then Exit;
Libc.__close(FFileHandle);
munmap(FMappedFile,FFileSize);
FMappedFile:=nil;
writeln('Unmap file done');
end;
{$ENDIF}
procedure TViewerControl.WriteText(bWrap:Boolean);
var
xIndex, yIndex:Integer;
// H:Integer;
c:Char;
Rct: TRect;
iPos:Integer;
s:String;
begin
iPos:=FPosition;
with Canvas do
begin
Rct := GetClientRect;
// H:= TextHeight('0');
for yIndex:=0 to Rct.Bottom div FTextHeight do
begin
s:='';
xIndex:=0;
AddLineOffset(iPos);
while ((xIndex<cMaxTextWidth) and not bWrap) or (xIndex<cTextWidth) do
begin
inc(xIndex);
if ipos>=FFileSize then Break;
c:=FMappedFile[iPos];
inc(iPos);
if (c=#13) then Continue;
if (c=#10) then Break;
if c=#9 then
s:=s+ StringOfChar(' ',cTabSpaces-xIndex mod cTabSpaces)
else
begin
if c<' ' then c:=' ';
if c>#$F0 then c:='.';
s:=s+c;
end;
end;
// RADEK: if wrapped text ends with #10 we dont want extra empty line
if ((xIndex=cTextWidth) or (xIndex=cMaxTextWidth)) then
begin
c := FMappedFile[iPos];
if (c=#10) then
inc(iPos);
end;
if s<>'' then
OutText(Rct, 0, yIndex*FTextHeight,s);
end;
end;
end;
{function ConvertByte(b:Byte):Char;
begin
if b in [32..255] then
Result:=Chr(b)
else
Result:='.';
end;
}
Function LineFormat(const sHex, sAscii:String; iOffset:Integer):String;
var
sDummy:String;
begin
sDummy:='';
if length(sHex)<(cHexWidth*3) then
sDummy:=StringOfChar(' ',cHexWidth*3-length(sHex));
Result:=Format('%s: %s%s %s',[IntToHex(iOffset,8), sHex,sDummy,sAscii]);;
end;
procedure TViewerControl.WriteHex;
var
xIndex, yIndex:Integer;
c:Char;
Rct: TRect;
iPos, iLineBeg:Integer;
sStr,sHex:String;
begin
iPos:=FPosition;
with Canvas do
begin
Rct := GetClientRect;
// Rct := ClipRect;
// s:='';
for yIndex:=0 to Rct.Bottom div FTextHeight do
begin
// s:='';
sStr:='';
sHex:='';
iLineBeg:=iPos;
AddLineOffset(iPos);
for xIndex:=0 to cHexWidth -1 do
begin
if ipos>=FFileSize then Break;
c:=FMappedFile[ipos];
if c<' ' then
sStr:=sStr+'.'
else
sStr:=sStr+c;
sHex:=sHex+IntToHex(ord(c),2);
if xIndex=7 then
sHex:=sHex+'|'
else
sHex:=sHex+' ';
inc(iPos);
end;
if sStr<>'' then
OutText(Rct, 0, yIndex*FTextHeight,LineFormat(sHex,sStr,iLineBeg));
// TextRect(Rect(Rct.Left,yIndex*h,rct.Right,yIndex*h+H), 0, yIndex*h,LineFormat(sHex,sStr,iLineBeg));
end;
end;
end;
procedure TViewerControl.WriteBin;
var
xIndex, yIndex:Integer;
c:Char;
Rct: TRect;
iPos:Integer;
s:String;
begin
iPos:=FPosition;
with Canvas do
begin
Rct := GetClientRect;
s:='';
for yIndex:=0 to Rct.Bottom div FTextHeight do
begin
s:='';
AddLineOffset(iPos);
for xIndex:=0 to cTextWidth -1 do
begin
if ipos>=FFileSize then Break;
c:=FMappedFile[ipos];
if c<' ' then c:='.';
s:=s+c;
inc(iPos);
end;
if s<>'' then
OutText(Rct, 0, yIndex*FTextHeight,s);
end;
end;
end;
destructor TViewerControl.Destroy;
begin
{$IFNDEF WIN32}
UnMapFile;
{$ENDIF}
if Assigned(FLineList) Then
FreeAndNil(FLineList);
inherited
end;
Function TViewerControl.GetDataAdr:PChar;
begin
Result:=FMappedFile;
end;
procedure TViewerControl.SetPosition(Value:Integer);
begin
if not assigned(FMappedFile) then Exit;
if (Value<FFileSize) and (Value>=0) then
begin
case FViewerMode of
vmBin: FPosition:=(Value div cTextWidth)* cTextWidth;
vmHex: FPosition:=(Value div cHexWidth)* cHexWidth;
vmText, vmWrap: FPosition:=Value;
end;
Invalidate;
end;
end;
Function TViewerControl.LoadFromStdin(const sCmd:String):Boolean;
{$IFDEF WIN32}
begin
end;
{$ELSE}
var
fFile:TextFile;
begin
Result:=False;
UnMapFile;
FFileSize:=0;
FPosition:=0;
FTempName:='/tmp/view.tmp';// later something different
popen(fFile,sCmd+' >'+FTempName,'w');
close(fFile);
MapFile(FTempName);
end;
{$ENDIF}
procedure TViewerControl.OutText(aRect:TRect; x,y:Integer; const sText:String);
var
pBegLine, pEndLine:Integer;
iBegDrawIndex:Integer;
iEndDrawIndex:Integer;
begin
pBegLine:=Integer(FLineList.Items[y div FTextHeight]);
pEndLine:=pBegLine+length(sText);
if ((FBlockEnd-FBlockBeg)=0) or
((FBlockBeg<pBegLine) and (FBlockEnd<pBegLine)) or // before
((FBlockBeg>pEndLine) and (FBlockEnd>pEndLine)) then //after
begin
// out of selection, draw normal
// Canvas.Font.Color:=clYellow; // test
Canvas.Font.Color:=clText;
// Canvas.TextRect(ARect, x, y,sText); //!!!
Canvas.TextOut(x, y,sText);
Exit;
end;
if (FBlockBeg-pBegLine)>0 then
begin
// begin line, not selected
// Canvas.Font.Color:=clBlue; // test
Canvas.Font.Color:=clText;
// Canvas.TextRect(ARect, x, y,Copy(sText,1,FBlockBeg-pBegLine-1)); //!!!
Canvas.TextOut(x, y,Copy(sText,1,FBlockBeg-pBegLine-1));
end;
// selected ?
if (FBlockBeg<=pBegLine) then
iBegDrawIndex:=pBegLine
else
iBegDrawIndex:=FBlockBeg;
if (FBlockEnd<pEndLine) then
iEndDrawIndex:=FBlockEnd
else
iEndDrawIndex:=pEndLine;
Canvas.Brush.Style:=bsSolid;
Canvas.Brush.Color:=clHighlight;
if iBegDrawIndex<>pBegLine then
begin
Canvas.FillRect(Rect(x+(iBegDrawIndex-pBegLine-1)*FTextWidth, y, x+(iEndDrawIndex-pBegLine)*FTextWidth, y+FTextHeight));
// Canvas.Font.Color:=clRed; // test
Canvas.Font.Color:=clLight;
// Canvas.TextRect(ARect, x+(iBegDrawIndex-pBegLine-1)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex+1));!!!
Canvas.TextOut(x+(iBegDrawIndex-pBegLine-1)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex+1));
end
else
begin
Canvas.FillRect(Rect(x+(iBegDrawIndex-pBegLine)*FTextWidth, y, x+(iEndDrawIndex-pBegLine)*FTextWidth, y+FTextHeight));
// Canvas.Font.Color:=clMaroon; // test
Canvas.Font.Color:=clLight;
// Canvas.TextRect(ARect, x+(iBegDrawIndex-pBegLine)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex));
Canvas.TextOut(x+(iBegDrawIndex-pBegLine)*FTextWidth, y,Copy(sText,iBegDrawIndex-pBegLine,iEndDrawIndex-iBegDrawIndex));
end;
if (pEndLine-FBlockEnd)>0 then
begin
// end of line, not selected
// Canvas.Font.Color:=clGreen; // test
Canvas.Font.Color:=clText;
// Canvas.TextRect(ARect, x+(FBlockEnd-pBegLine)*FTextWidth, y,Copy(sText,FBlockEnd-pBegLine+1,pEndLine-FBlockEnd));
Canvas.TextOut(x+(FBlockEnd-pBegLine)*FTextWidth, y,Copy(sText,FBlockEnd-pBegLine+1,pEndLine-FBlockEnd));
end;
end;
Procedure TViewerControl.AddLineOffset(iOffset:Integer);
begin
FLineList.Add(Pointer(iOffset));
end;
procedure TViewerControl.MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
if not assigned(FMappedFile) then Exit;
inherited;
if (Button=mbLeft) then
begin
FBlockBeg:=XYPos2Adr(x,y);
FMouseBlockBeg:=FBlockBeg;
FBlockEnd:=FBlockBeg;
FSelecting:=True;
end;
end;
procedure TViewerControl.MouseMove(Shift: TShiftState; X, Y: Integer);
var
iTemp:Integer;
begin
inherited;
if FSelecting and ((y mod FTextHeight=0) or (x mod FTextWidth=0)) Then
begin
if y<10 then
begin
if UpLine then
if UpLine then
UpLine;
end;
if y>Height-10 then
begin
if DownLine then
if DownLine then
DownLine;
end;
iTemp:=XYPos2Adr(x,y);
if iTemp<FMouseBlockBeg then
begin
FBlockBeg:=iTemp;
FBlockEnd:=FMouseBlockBeg;
end
else
begin
FBlockBeg:=FMouseBlockBeg;
FBlockEnd:=iTemp;
end;
Invalidate;
end;
end;
procedure TViewerControl.MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
var
iTemp:Integer;
begin
inherited;
if not FSelecting then Exit;
iTemp:=XYPos2Adr(x,y);
if iTemp<FMouseBlockBeg then
begin
FBlockBeg:=iTemp;
FBlockEnd:=FMouseBlockBeg;
end
else
begin
FBlockBeg:=FMouseBlockBeg;
FBlockEnd:=iTemp;
end;
FSelecting:=False;
CopyToClipboard; // copy selection to clipboard
Invalidate;
end;
function TViewerControl.XYPos2Adr(x,y:Integer):Integer;
var
yIndex:Integer;
begin
yIndex:=y div FTextHeight;
if yIndex>=FLineList.Count then
yIndex:=FLineList.Count-1;
if yIndex<0 then
yIndex:=0;
Result:=Integer(FLineList.Items[yIndex]);
//(FTextWidth div 2) is half of char
inc(Result, (X+FTextWidth div 2) div FTextWidth);
if yIndex<FLineList.Count-1 then
begin
if Result>=Integer(FLineList.Items[yIndex+1]) then
Result:=Integer(FLineList.Items[yIndex+1])//-1
end;
// writeln(Format('%d %d %d %d %d',[x,y,Integer(FLineList.Items[yIndex]),yIndex,Result]));
end;
procedure TViewerControl.SelectAll;
begin
FBlockBeg:=0;
FBlockEnd:=FFileSize;
Invalidate;
end;
procedure TViewerControl.CopyToClipboard;
begin
if (FBlockEnd-FBlockBeg)=0 then Exit;
Clipboard.Clear; // prevent multiple formats in Clipboard (specially synedit)
Clipboard.AsText:=Copy(FMappedFile,FBlockBeg,FBlockEnd-FBlockBeg+1);
// writeln(Clipboard.AsText);
end;
procedure Register;
begin
RegisterComponents('SeksiCmd', [TViewerControl]);
end;
end.

View file

@ -0,0 +1,46 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<PathDelim Value="\"/>
<Name Value="viewerpackage"/>
<Author Value="Radek Èervinka"/>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="$(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\;$(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\$(LCLWidgetType)\"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Version Major="1"/>
<Files Count="1">
<Item1>
<Filename Value="viewercontrol.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="viewercontrol"/>
</Item1>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="1">
<Item1>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
</RequiredPkgs>
<UsageOptions>
<IncludePath Value="X:\linux\sccmd\viewer\"/>
<UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -0,0 +1,47 @@
<?xml version="1.0"?>
<CONFIG>
<Package Version="2">
<PathDelim Value="\"/>
<Name Value="viewerpackage"/>
<Author Value="Radek Èervinka"/>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="$(LazarusDir)\lcl\units\$(TargetCPU)\$(TargetOS)\;;X:\Prog\Lazarus\lcl\units\i386-win32\;X:\Prog\Lazarus\lcl\units\i386-win32\win32\;X:\Prog\Lazarus\units\i386-win32\;\root\Prog\lazarus\lcl\units\i386-linux\;."/>
<UnitOutputDirectory Value="lib"/>
<SrcPath Value="\root\Prog\lazarus\lcl\units\i386-linux\;;X:\Prog\Lazarus\lcl\units\i386-win32\"/>
</SearchPaths>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Version Major="1"/>
<Files Count="1">
<Item1>
<Filename Value="viewercontrol.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="viewercontrol"/>
</Item1>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="1">
<Item1>
<PackageName Value="FCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
</RequiredPkgs>
<UsageOptions>
<IncludePath Value="X:\linux\sccmd\viewer\"/>
<UnitPath Value="$(PkgOutDir)\"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
<IgnoreBinaries Value="False"/>
</PublishOptions>
</Package>
</CONFIG>

View file

@ -0,0 +1,21 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit viewerpackage;
interface
uses
viewercontrol, LazarusPackageIntf;
implementation
procedure Register;
begin
RegisterUnit('viewercontrol', @viewercontrol.Register);
end;
initialization
RegisterPackage('viewerpackage', @Register);
end.

19
default.bar Normal file
View file

@ -0,0 +1,19 @@
[Buttonbar]
Buttoncount=8
button2=/mnt/X/linux/sccmd/scfpc/pixmap/fgnome-term.png
cmd2=C:\PROGRA~1\OPENOF~1\program\soffice.exe
button3=/usr/share/opera/images/opera_16x16.png
button1=/mnt/X/linux/sccmd/scfpc/pixmap/fxmms.png
cmd1=/usr/bin/xmms
menu1=XMMS
cmd3=opera
menu3=Opera
cmd4=NOTEPAD.EXE
menu4=Áëîêíîò
cmd5=regedit.exe
menu5=Ðåäàêòîð ðååñòðà
button6=X:\Smarts.ico
cmd6=X:\Prog\Borland\PRG\Internet\Internet.exe
button7=X:\Doublecmd\pixmap\fhtml.png
cmd7=X:\Alexx\Opera\Opera.exe
menu7=Opera

0
dirhistory.txt Normal file
View file

10
dmcmd.lfm Normal file
View file

@ -0,0 +1,10 @@
object dmCommander: TdmCommander
Height = 300
HorizontalOffset = 461
VerticalOffset = 217
Width = 400
object imgList: TImageList
left = 75
top = 120
end
end

7
dmcmd.lrs Normal file
View file

@ -0,0 +1,7 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TdmCommander','FORMDATA',[
'TPF0'#12'TdmCommander'#11'dmCommander'#6'Height'#3','#1#16'HorizontalOffset'
+#3#205#1#14'VerticalOffset'#3#217#0#5'Width'#3#144#1#0#10'TImageList'#7'imgL'
+'ist'#4'left'#2'K'#3'top'#2'x'#0#0#0
]);

30
dmcmd.pas Normal file
View file

@ -0,0 +1,30 @@
unit dmCmd;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Dialogs;
type
TdmCommander = class(TDataModule)
imgList: TImageList;
private
{ private declarations }
public
{ public declarations }
end;
var
dmCommander: TdmCommander;
implementation
{ TdmCommander }
initialization
{$I dmCmd.lrs}
end.

16
dmdialogs.lfm Normal file
View file

@ -0,0 +1,16 @@
object dmDlg: TdmDlg
Height = 300
HorizontalOffset = 376
VerticalOffset = 238
Width = 400
object OpenDialog: TOpenDialog
FilterIndex = 0
left = 65
top = 72
end
object SaveDialog: TSaveDialog
FilterIndex = 0
left = 65
top = 104
end
end

8
dmdialogs.lrs Normal file
View file

@ -0,0 +1,8 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TdmDlg','FORMDATA',[
'TPF0'#6'TdmDlg'#5'dmDlg'#6'Height'#3','#1#16'HorizontalOffset'#3'x'#1#14'Ver'
+'ticalOffset'#3#238#0#5'Width'#3#144#1#0#11'TOpenDialog'#10'OpenDialog'#11'F'
+'ilterIndex'#2#0#4'left'#2'A'#3'top'#2'H'#0#0#11'TSaveDialog'#10'SaveDialog'
+#11'FilterIndex'#2#0#4'left'#2'A'#3'top'#2'h'#0#0#0
]);

29
dmdialogs.pas Normal file
View file

@ -0,0 +1,29 @@
unit dmDialogs;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Dialogs;
type
TdmDlg = class(TDataModule)
OpenDialog: TOpenDialog;
SaveDialog: TSaveDialog;
private
{ private declarations }
public
{ public declarations }
end;
var
dmDlg: TdmDlg;
implementation
initialization
{$I dmDialogs.lrs}
end.

87
dmhigh.lfm Normal file
View file

@ -0,0 +1,87 @@
object dmHighl: TdmHighl
OnCreate = dmHighlCreate
OnDestroy = dmHighlDestroy
Height = 300
HorizontalOffset = 448
VerticalOffset = 218
Width = 400
object SynPasSyn1: TSynPasSyn
Enabled = False
left = 42
top = 66
end
object SynCppSyn1: TSynCppSyn
DefaultFilter = 'C++ Files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp'
Enabled = False
left = 42
top = 104
end
object SynJavaSyn1: TSynJavaSyn
DefaultFilter = 'Java Files (*.java)|*.java'
Enabled = False
left = 41
top = 151
end
object SynHTMLSyn1: TSynHTMLSyn
DefaultFilter = 'HTML Document (*.htm,*.html)|*.htm;*.html'
Enabled = False
left = 42
top = 184
end
object SynXMLSyn1: TSynXMLSyn
WantBracesParsed = False
DefaultFilter = 'XML Document (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dtd'
Enabled = False
left = 42
top = 224
end
object SynLFMSyn1: TSynLFMSyn
DefaultFilter = 'Lazarus Form Files (*.lfm)|*.lfm'
Enabled = False
left = 41
top = 256
end
object SynUNIXShellScriptSyn1: TSynUNIXShellScriptSyn
DefaultFilter = 'UNIX Shell Scripts (*.sh)|*.sh'
Enabled = False
left = 85
top = 224
end
object SynPHPSyn1: TSynPHPSyn
DefaultFilter = 'PHP Files (*.php,*.php3,*.phtml,*.inc)|*.php;*.php3;*.phtml;*.inc'
Enabled = False
left = 85
top = 66
end
object SynTeXSyn1: TSynTeXSyn
DefaultFilter = 'TeX Files (*.tex)|*.tex'
Enabled = False
left = 85
top = 104
end
object SynSQLSyn1: TSynSQLSyn
SQLDialect = sqlSybase
DefaultFilter = 'SQL Files (*.sql)|*.sql'
Enabled = False
left = 85
top = 151
end
object SynMultiSyn1: TSynMultiSyn
Schemes = <>
Enabled = False
left = 85
top = 185
end
object SynPerlSyn1: TSynPerlSyn
DefaultFilter = 'Perl Files (*.pl,*.pm,*.cgi)|*.pl;*.pm;*.cgi'
Enabled = False
left = 88
top = 256
end
object SynCssSyn1: TSynCssSyn
DefaultFilter = 'Cascading Stylesheets (*.css)|*.css'
Enabled = False
left = 58
top = 304
end
end

30
dmhigh.lrs Normal file
View file

@ -0,0 +1,30 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TdmHighl','FORMDATA',[
'TPF0'#8'TdmHighl'#7'dmHighl'#8'OnCreate'#7#13'dmHighlCreate'#9'OnDestroy'#7
+#14'dmHighlDestroy'#6'Height'#3','#1#16'HorizontalOffset'#3#192#1#14'Vertica'
+'lOffset'#3#218#0#5'Width'#3#144#1#0#10'TSynPasSyn'#10'SynPasSyn1'#7'Enabled'
+#8#4'left'#2'*'#3'top'#2'B'#0#0#10'TSynCppSyn'#10'SynCppSyn1'#13'DefaultFilt'
+'er'#6'3C++ Files (*.c,*.cpp,*.h,*.hpp)|*.c;*.cpp;*.h;*.hpp'#7'Enabled'#8#4
+'left'#2'*'#3'top'#2'h'#0#0#11'TSynJavaSyn'#11'SynJavaSyn1'#13'DefaultFilter'
+#6#26'Java Files (*.java)|*.java'#7'Enabled'#8#4'left'#2')'#3'top'#3#151#0#0
+#0#11'TSynHTMLSyn'#11'SynHTMLSyn1'#13'DefaultFilter'#6')HTML Document (*.htm'
+',*.html)|*.htm;*.html'#7'Enabled'#8#4'left'#2'*'#3'top'#3#184#0#0#0#10'TSyn'
+'XMLSyn'#10'SynXMLSyn1'#16'WantBracesParsed'#8#13'DefaultFilter'#6'LXML Docu'
+'ment (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dtd'#7'Ena'
+'bled'#8#4'left'#2'*'#3'top'#3#224#0#0#0#10'TSynLFMSyn'#10'SynLFMSyn1'#13'De'
+'faultFilter'#6' Lazarus Form Files (*.lfm)|*.lfm'#7'Enabled'#8#4'left'#2')'
+#3'top'#3#0#1#0#0#22'TSynUNIXShellScriptSyn'#22'SynUNIXShellScriptSyn1'#13'D'
+'efaultFilter'#6#30'UNIX Shell Scripts (*.sh)|*.sh'#7'Enabled'#8#4'left'#2'U'
+#3'top'#3#224#0#0#0#10'TSynPHPSyn'#10'SynPHPSyn1'#13'DefaultFilter'#6'APHP F'
+'iles (*.php,*.php3,*.phtml,*.inc)|*.php;*.php3;*.phtml;*.inc'#7'Enabled'#8#4
+'left'#2'U'#3'top'#2'B'#0#0#10'TSynTeXSyn'#10'SynTeXSyn1'#13'DefaultFilter'#6
+#23'TeX Files (*.tex)|*.tex'#7'Enabled'#8#4'left'#2'U'#3'top'#2'h'#0#0#10'TS'
+'ynSQLSyn'#10'SynSQLSyn1'#10'SQLDialect'#7#9'sqlSybase'#13'DefaultFilter'#6
+#23'SQL Files (*.sql)|*.sql'#7'Enabled'#8#4'left'#2'U'#3'top'#3#151#0#0#0#12
+'TSynMultiSyn'#12'SynMultiSyn1'#7'Schemes'#14#0#7'Enabled'#8#4'left'#2'U'#3
+'top'#3#185#0#0#0#11'TSynPerlSyn'#11'SynPerlSyn1'#13'DefaultFilter'#6',Perl '
+'Files (*.pl,*.pm,*.cgi)|*.pl;*.pm;*.cgi'#7'Enabled'#8#4'left'#2'X'#3'top'#3
+#0#1#0#0#10'TSynCssSyn'#10'SynCssSyn1'#13'DefaultFilter'#6'#Cascading Styles'
+'heets (*.css)|*.css'#7'Enabled'#8#4'left'#2':'#3'top'#3'0'#1#0#0#0
]);

68
dmhigh.pas Normal file
View file

@ -0,0 +1,68 @@
unit dmHigh;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Dialogs,
SynEditHighlighter, SynHighlighterPas,
SynHighlighterCPP, SynHighlighterJava, SynHighlighterHTML, SynHighlighterXML,
SynHighlighterLFM, SynHighlighterUNIXShellScript, SynHighlighterPHP,
SynHighlighterTeX, SynHighlighterSQL, SynHighlighterMulti, SynHighlighterPerl,
SynHighlighterCss;
type
TdmHighl = class(TDataModule)
SynCppSyn1: TSynCppSyn;
SynCssSyn1: TSynCssSyn;
SynHTMLSyn1: TSynHTMLSyn;
SynJavaSyn1: TSynJavaSyn;
SynLFMSyn1: TSynLFMSyn;
SynMultiSyn1: TSynMultiSyn;
SynPasSyn1: TSynPasSyn;
SynPerlSyn1: TSynPerlSyn;
SynPHPSyn1: TSynPHPSyn;
SynSQLSyn1: TSynSQLSyn;
SynTeXSyn1: TSynTeXSyn;
SynUNIXShellScriptSyn1: TSynUNIXShellScriptSyn;
SynXMLSyn1: TSynXMLSyn;
procedure dmHighlCreate(Sender: TObject);
procedure dmHighlDestroy(Sender: TObject);
private
slHighLighters:TStringList;
public
{ public declarations }
function GetHighlighterByExt(const sExtension: string): TSynCustomHighlighter;
end;
var
dmHighl: TdmHighl;
implementation
uses
uHighlighterProcs;
{ TdmHighl }
procedure TdmHighl.dmHighlCreate(Sender: TObject);
begin
slHighLighters:=TStringList.Create;
GetHighlighters(self,slHighLighters, False);
end;
procedure TdmHighl.dmHighlDestroy(Sender: TObject);
begin
if assigned(slHighLighters) then
FreeAndNil(slHighLighters);
end;
function TdmHighl.GetHighlighterByExt(const sExtension: string): TSynCustomHighlighter;
begin
Result:=GetHighlighterFromFileExt(slHighLighters, sExtension);
end;
initialization
{$I dmhigh.lrs}
end.

340
doc/COPYING Normal file
View file

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or 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,
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.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

13
doc/INSTALL Normal file
View file

@ -0,0 +1,13 @@
Compiling Double Commander
What you need?
At first must download FreePascal. I use FPC 2.0.2 (or higher).
After this download Lazarus. I use Lazarus 0.9. (or higher).
For compiling Double Commander you must install in Lazarus two component packages
from "components" directory. After this open file doublecmd.lpi
Compile.

28
doc/README Normal file
View file

@ -0,0 +1,28 @@
Double Commander
****************************************************************************
File manager similar to the Total Commander.
For details of compiling see the file INSTALL.
This program is free software; you can redistribute it and/or
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,
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.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
For more details see the file COPYING.
!!!Caution on Linux thread does not work properly (problem with modal window)!!!

16
doc/README.RUS Normal file
View file

@ -0,0 +1,16 @@
Компиляция Double commander
Сначала установите 2 пакета компонентов из папки components.
После этого откройте файл doublecmd.lpi и дайте команду "Запуск->Сборка"
!!!Внимание в Lazarus не получается показать модальное окно, которое
приостанавливало бы работу потока. Данная проблема была решена косвенным путем,
но как выяснилось
данное решение подходит только для Windows, поэтому сейчас
под Linux операции выполняющиеся в потоках корректно не работают.!!!

19
doc/changelog.txt Normal file
View file

@ -0,0 +1,19 @@
20.05.2006 Added PNG icons support to file panels
26.05.2006 Create component TKASToolbar
01.06.2006 Add toolbar to main window
04.06.2006 Create component TKASEdit
18.09.2006 Ported to Windows
20.09.2006 Fixed problem with delete all files
22.09.2006 Added Disk panel
25.09.2006 Added associated icon
27.09.2006 Begin work on Total commander archive plugins support
14.10.2006 Begin work on zip plugin
23.10.2006 Added transparent for icons in file panel
07.12.2006 Change method of get associated icon
10.12.2006 Add thread support (On Windows only, on Linux has some problems)
10.12.2006 Add font configuration
12.12.2006 Some change in threads (working with modal window)
15.12.2006 Some changes in Mouse wheel

88
doc/keys.txt Normal file
View file

@ -0,0 +1,88 @@
Lines with - are planed in future
Due to porting maybe some of this (temporally) disabled (report please)
F1 : show program About information
Shift+F2 : Set focus to command line
F3 : open file for view in internal viewer (multiple files is also OK)
-F3: on directory show information about directory
F4 : open file in internal editor
Shift+F4 - new file (or open existing) in internal editor
F5 : copy items from source to target
Shift+F5 - copy items ("inline")
F6 : rename or move items
Shift+F6 - move items ("inline")
F7 : create new directory
F8, Del : delete item
F9: select main menu (hack)
Ctrl + H: invoke dir history pop up menu
Ctrl + D : directory hotlist
-Ctrl + K : combine splitted file (from Ctrl + S)
-Ctrl + L : calculate occupied space
-Ctrl + O : ????in future show terminal output ???
Ctrl + R : refresh actual panel
-Ctrl + S : split file into smaller parts (then combine with Ctrl + K)
-Ctrl + U : swap source and target panel
Ctrl+Down,
Ctrl + F8 : pull down commands combo box
CTRL+ENTER : append selected item to the command combo box text
CRTL+Shift+Enter - like CTRL+P and Alt+Enter
CTRL+P - put path to command line
CTRL+X - run terminal in current dir
CTRL+T - New tab in active panel
CTRL+W - Close actual tab
CTRL+PgDown - like Enter
CTRL+PgUp - like backspace
Ctrl+Q - Terminate Double Commander
Shift+Enter: execute command in terminal (choose in Options..)
NUM + : expand selection
NUM - : shrink selection
NUM * : invert selection
Shift+NUM+ : tag all files in current directory with same extension as focused file
Shift+NUM- : untag all files in current directory with same extension as focused file
CTRL+NUM + : select all
CTRL+NUM - : unselect all
TAB : switch between panels
LEFT : go to upper directory
RIGHT : go to selected directory
ENTER : go to selected directory / open file with VFS /
try to run file / execute not empty command line
INSERT: select file or directory
BACKSPACE : goto to the upper directory
SPACE : on file - select / deselcet item
on directory - select / deselect item and compute space occupied in dir
alfanumeric keys: write to command line
Right mouse button show popup menu with configurable commands (doublecmd.ext)
-------
Viewer
N - next file in multiple files
P - previous file in multiple files
Esc, Q ( or with any combination Ctrl, Shift, Alt) - Close
1 - show as Text
2 - show as bin
3 - show as hex
4 - show as wrapped text
-5 - try process file by external command (currently disabled)
---
Editor
many shortcuts similar to Borland IDE (80 shortcuts)
(including bookmarks Ctrl+0-9,
(un)indent Shift+Ctrl+I, U
and ...
)
+
F2, CTRL+S - save
ESC - quit
...

5
doublecmd.compiled Normal file
View file

@ -0,0 +1,5 @@
<?xml version="1.0"?>
<CONFIG>
<Compiler Value="E:\Prog\lazarus\pp\bin\i386-win32\ppc386.exe" Date="877110550"/>
<Params Value=" -S2cdgi -OG3 -gl -vewnhi -l -FiX:\linux\sccmd\viewer\ -Fu..\..\..\Prog\lazarus\components\jpeg\lib\i386-win32\ -Fucomponents\KASToolBar\lib\i386-win32\ -Fu..\..\..\Prog\lazarus\components\synedit\units\i386-win32\ -Fu..\..\..\Prog\lazarus\lcl\units\i386-win32\ -Fu..\..\..\Prog\lazarus\lcl\units\i386-win32\win32\ -Fucomponents\viewer\lib\i386-win32\ -Fu..\..\..\Prog\lazarus\packager\units\i386-win32\ -Fu. -oE:\Doublecmd\Internet\Doublecmd\doublecmd.exe -dLCL -dLCLwin32 doublecmd.lpr"/>
</CONFIG>

404
doublecmd.ext Normal file
View file

@ -0,0 +1,404 @@
# Seksi Commander extension file
# Based on Midnight Commander 3.0 extension file
#
# All lines starting with # or empty lines are thrown away.
# Syntax (command is case unsensitive)
# All commands for file is showed in Popupmenu
# [extension] or [extension1|extension2 ...] - case insensitive !!no regular expression!!
# open used with tap on Enter or DblClick
# view used only in Viewer
# other commands is showed in popup menu only
# macros (case sensitive):
# {!VFS} - for archives - use virtual file system (scvfs.in in vfs directory)
# {!EDITOR} call editor (internal or external by configuration}
# {!VIEWER} call viewer (the same)
# for View command Viewer frm Seksi Commander show stdout output from command (see zip...)
# {!SHELL} use shell from configuration to execute program (see mplayer)
# %f > filename
# %d > directory
# %p > path(directory+filename)
### Sources ###
# C
[c]
Open={!EDITOR}%p
Compile=cc -O -c %f
#Link=cc -O -o %d/`basename %f .c` %f
[exe]
Open=%p
# Fortran
[f]
Open={!EDITOR}%p
Compile=f77 -O -c %f
Compile and Link=f77 -O %f
#Pascal and Object Pascal :)
[dpr|pas|pp]
Open={!EDITOR}%p
#freepascal
#Compile={!SHELL} fpc %f
# Object
#[o]
# #Open=%var{PAGER:more} %f
# View=%view{ascii} nm %f
# Link=%var{CC:cc} -O %f
# Disassemble=%view{ascii} objdump -d -r %f
# Asm
[s]
Open={!EDITOR}%p
Assemble={!SHELL} cc -O -c %f
#Link=cc -O -o %d/`basename %f .s` %f
# C++
[C|c|cc]
Open={!EDITOR}%p
Compile={!SHELL} c++ -O -c %f
#Link=c++ -O -o %d/`basename %f .c` %f
### Documentation ###
# Texinfo
#regex/\.(te?xi|texinfo)$
# GNU Info page
#type/^Info\ text
# Open=info -f %f
[info]
Open={!SHELL} info -f %f
# Manual page
# Exception - .so libraries are not manual pages
#regex/\.(so|so\.[0-9\.]*)$
# View=%view{ascii} nm %f
#regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|n)|\.man)$
[man]
Open={!SHELL} nroff -Tlatin2 -mandoc %f | less
View=nroff -Tlatin2 -mandoc %f
# Troff with me macros.
#shell/.me
# Open=nroff -Tlatin1 -me %f | %var{PAGER:more}
# View=%view{ascii,nroff} nroff -Tlatin1 -me %f
# Troff with ms macros.
#shell/.ms
# Open=nroff -Tlatin1 -ms %f | %var{PAGER:more}
# View=%view{ascii,nroff} nroff -Tlatin1 -ms %f
# Manual page - compressed
#regex/([^0-9]|^[^\.]*)\.([1-9][a-z]?|n)\.g?[Zz]$
# Open=gzip -dc %f | nroff -Tlatin1 -mandoc | %var{PAGER:more}
# View=%view{ascii,nroff} gzip -dc %f | nroff -Tlatin1 -mandoc
#regex/([^0-9]|^[^\.]*)\.([1-9][a-z]?|n)\.bz$
# Open=bzip -dc %f | nroff -Tlatin1 -mandoc | %var{PAGER:more}
# View=%view{ascii,nroff} bzip -dc %f | nroff -Tlatin1 -mandoc
#regex/([^0-9]|^[^\.]*)\.([1-9][a-z]?|n)\.bz2$
# Open=bzip2 -dc %f | nroff -Tlatin1 -mandoc | %var{PAGER:more}
# View=%view{ascii,nroff} bzip2 -dc %f | nroff -Tlatin1 -mandoc
### Sound files ###
[wav|WAV|Wav|snd|SND|Snd|voc|VOC|Voc|au|AU|Au]
Open={!SHELL} play %f
[mod|s3m|xm]
Open=xmms %f
#Open=mikmod %f
#Open=tracker %f
[mp3]
Open={!SHELL} xmms '%p'
View=mpg123 -tn1 %f 2>&1|grep -E '^(Title|Album|Comment|MPEG|$)'
### Multimedia ###
[mpg|mpeg|avi|asf|mov]
Open=totem '%p'
#Open=xanim '%f'
#Open=aviplay '%f'
#Open=mtv '%f' 2>/dev/null&
#Open=gtv '%f' 2>/dev/null&
#Open=plaympeg '%f' 2>/dev/null&
#Open=mpeg_play '%f' &
#Open(big)=mpeg_play -dither 2x2 '%f' &
#Open(gray)=mpeg_play -dither gray '%f' &
[rm|ram]
Open={!SHELL} mplayer '%f'
#Open=realplay %f&
### Documents ###
# Postscript
[ps]
Open=gv %f
View=ps2ascii %f
View with GhostView=gv %f
# PDF
[pdf]
Open=xpdf '%f'
#Open=acroread '%f'
#Open=ghostview '%f'
View=pdftotext '%f'
# html
[html|htm]
Open=X:\Alexx\Opera_8.5\Opera.exe %p
#Open=mozilla %p
View=lynx -dump -force_html %p
#txt
[txt]
Open={!EDITOR}%p
#regex/\.([Hh]tml?|HTML?)$
# #Open=if echo "%d/%p" | grep ^ftp; then $viewer %d/%p; else $viewer file:%p; fi
# Open=if [ x$DISPLAY = x ]; then lynx -force_html %f; else (lynx %f &); fi
# View=%view{ascii} lynx -dump -force_html %f;
# Run with AppletViewer=appletviewer %f
# View with lynx=lynx file://%f
# StarOffice and OpenOffice
[sdw]
Open=soffice %f
# AbiWord
[abw]
Open=abiword %f
# Microsoft Word Document
[doc|dot|wri]
Open=soffice %f
#Open=koffice %f
View=catdoc -w %f || word2x -f text %f - || strings %f
# Microsoft Excel Worksheet
[xls|xlw]
Open=soffice %f
#Open=koffice %f
View=xls2csv %f || strings %f
# Framemaker
#type/^FrameMaker
# Open=fmclient -f %f
# DVI
[dvi]
Open=xdvi %f &
View=dvi2tty %f
Convert file to Postscript=dvips %f
# TeX
[tex]
Open={!EDITOR}%p
TeX this file=tex %f
LaTeX this file=latex %f
csTeX this file=csplain %f
csLaTeX this file=cslatex %f
### Miscellaneous ###
#shell/^RMAIL$
# Start Emacs on this RMAIL file=emacs %f
# Open=emacs %f
#type/^(M|m)ail
# Open=elm -f %f
# View=%view{ascii} mcmfmt < %f
# core
#shell/core
# Makefile
#regex/[Mm]akefile
# Open=make -f %f %{Enter parameters}
# Imakefile
#shell/Imakefile
# Open=xmkmf -a
# Executables
#type/\ executable
# Open=./%f
# Drop=%f %q
# Execute in XTerm=xterm -e %f &
# View Required Libraries=%view{ascii} ldd %f
# Strip binary=strip %f
# dbf
[dbf]
#Open={!VIEWER} dbview %f
View=dbview -b %f
# REXX script
#regex/\.(rexx|rex|cmd)$
# Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
### Archives ###
# browsing archives are handled separate in scvfs.ini
# Open=[!VFS] is needed for browsing archives
[tar]
Open={!VFS}
View=tar tvvf %f
Extract=tar xf %f
[tgz]
Open={!VFS}
View=gzip -dc %f 2>/dev/null | tar tvvf -
Extract=gzip -dc %f 2>/dev/null | tar xzf -
[bz]
Open={!VFS}
View=bzip -dc %f 2>/dev/null
Extract=bzip -dc %f 2>/dev/null
[bz2]
Open={!VFS}
View=bzip2 -dc %f 2>/dev/null
Extract=bzip2 -dc %f 2>/dev/null
# zip
[zip|jar]
Open={!VFS}
View=unzip -v %f
Extract=unzip %f
#Extract (with flags)=I=%{Enter any Unzip flags:}; if test -n "$I"; then unzip $I %f; fi
Unzip=unzip %f '*'
# zoo
[zoo]
Open={!VFS}
View=zoo l %f
Extract=zoo x %f '*'
# lha
Open={!VFS}
View=lharc l %f
Extract=lharc x %f '*'
#Extract (with flags)=I=%{Enter any LHarc flags:}; if test -n "$I"; then lharc x $I %f; fi
# arj
[arj]
#regex/\.a(rj|[0-9][0-9])$
Open={!VFS}
View=unarj l %f
Extract=unarj x %f '*'
#Extract (with flags)=I=%{Enter any Unarj flags:}; if test -n "$I"; then unarj x $I %f; fi
# ha
[ha]
Open={!VFS}
View=ha lf %f
Extract=ha xy %f '*'
# Extract (with flags)=I=%{Enter any HA flags:}; if test -n "$I"; then ha xy $I %f; fi
# rar
[rar|r00|r02|r02|r03|r04|r05|r06|r07|r08|r09]
Open={!VFS}
View=rar v -c- %f
Extract=rar x -c- %f '*'
# Extract (with flags)=I=%{Enter any RAR flags:}; if test -n "$I";then rar x $I %f; fi
#compress
[Z]
Open={!VFS}
View=compress -dc '%f'
Extract=compress -dc '%f'
# cpio
[cpio]
Open={!VFS}
View=cat '%f' | cpio -ictv
Extract=cat '%f' | cpio -ic
# ls-lR
#regex/(^|\.)ls-?lR$
# Open=%cd %p#lslR
#regex/(^|\.)ls-?lR\.(g?z|Z)$
# Open=%cd %p#lslR
# View=%view{ascii} gunzip -c %f
# ftplist
#regex/\.ftplist$
# Open=%cd %p#ftplist
# gzip
[gz]
Open={!VFS}
View=gzip -dc %f 2>/dev/null
Uncompress=gunzip %f
# Edit=I=`date +%%s`; export I; gzip -cd %f >/tmp/gzed.$I && %var{EDITOR:vi} /tmp/gzed.$I && gzip -c /tmp/gzed.$I > %f; rm -f /tmp/gzed.$I
# bzip2
[bz2|bzip2]
Open={!VFS}
View=bzip2 -dc %f 2>/dev/null
# Edit=I=`date +%%s`; export I; bzip2 -cd %f >/tmp/bzed.$I && %var{EDITOR:vi} /tmp/bzed.$I && bzip2 -c /tmp/bzed.$I > %f; rm -f /tmp/bzed.$I
Uncompress=bunzip2 %f
# bzip
[bz|bzip]
Open={!VFS}
View=bzip -dc %f 2>/dev/null
#Edit=I=`date +%%s`; export I; bzip -cd %f >/tmp/bzed.$I && %var{EDITOR:vi} /tmp/bzed.$I && bzip -c /tmp/bzed.$I > %f; rm -f /tmp/bzed.$I
Uncompress=bunzip %f
# ace
[ace]
Open={!VFS}
Uncompress=unace e %f
# ar library
#regex/\.s?a$
# Open=%cd %p#uar
# #Open=%view{ascii} ar tv %f
# View=%view{ascii} nm %f
# trpm
#regex/\.trpm$
# Open=%cd %p#trpm
# View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
# Source RPMs (SuSE uses *.spm, others use *.src.rpm)
[spm|srcm]
Open={!VFS}
View=rpm -qivlp --scripts %f
Install this RPM=rpm -i %f
Rebuild this RPM=rpm --rebuild %f
Check signature=rpm --checksig %f
# Compiled RPMs
[rpm]
Open={!VFS}
View=rpm -qivlp --scripts %f
Install this RPM=rpm -i %f
Upgrade this RPM=rpm -U %f
Check signature=rpm --checksig %f
# deb
[deb]
Open={!VFS}
View=dpkg-deb -c %f

54
doublecmd.ini Normal file
View file

@ -0,0 +1,54 @@
Language=english.lng
LynxLike=1
CaseSensitiveSort=1
ShowSystemFiles=1
DirSelect=1
Term=cmd.exe
HotDir=/home/,/mnt/,/usr/bin/,/mnt/X//
ShortFileSizeFormat=1
UseExtEdit=0
UseExtView=0
UseExtDiff=0
ExtEdit=kwrite "%s"
ExtView=Viewer.exe "%s"
RunTerm=cmd.exe
FontSize=9
FontWeight=700
FontEditorSize=12
FontViewerSize=12
FontName=MS Sans Serif
FontViewerName=Courier
FontEditorName=Times New Roman
SeparateExt=1
EditorSize=12
ViewerSize=12
Main.Left=-87
Main.Top=48
Main.Width=800
Main.Height=541
Col0=169
Col1=33
Col2=48
Col3=76
Col4=216
Viewer.left=3634
Viewer.top=13363
Viewer.height=100
Viewer.width=350
Editor.left=82
Editor.top=340
Editor.height=518
Editor.width=792
leftpath=c:\
rightpath=c:\
[Colors]
BackColor=16777215
[PackerPlugins]
;rpm=20,X:\Doublecmd\plugins\rpm\bin\rpm.wcx
;zip=87,E:\Doublecmd\Internet\Doublecmd\plugins\zip\bin\zip.wcx
;tar=87,X:\Doublecmd\plugins\zip\bin\zip.wcx
;gz=87,X:\Doublecmd\plugins\zip\bin\zip.wcx
;cpio=87,X:\Doublecmd\plugins\cpio\bin\cpio.wcx

531
doublecmd.lpi Normal file
View file

@ -0,0 +1,531 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<Flags>
<SaveClosedFiles Value="False"/>
</Flags>
<MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="Double Commander"/>
<ActiveEditorIndexAtStart Value="39"/>
</General>
<LazDoc Paths=""/>
<PublishOptions>
<Version Value="2"/>
<DestinationDirectory Value="\mnt\X\linux\sccmd\scfpc\"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<UseExcludeFileFilter Value="True"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="5">
<Item1>
<PackageName Value="viewerpackage"/>
</Item1>
<Item2>
<PackageName Value="SynEdit"/>
<MinVersion Major="1" Valid="True"/>
</Item2>
<Item3>
<PackageName Value="LCL"/>
<MinVersion Major="1" Valid="True"/>
</Item3>
<Item4>
<PackageName Value="KASComp"/>
<MinVersion Major="1" Release="1" Build="1" Valid="True"/>
</Item4>
<Item5>
<PackageName Value="JPEGForLazarus"/>
</Item5>
</RequiredPackages>
<Units Count="43">
<Unit0>
<Filename Value="doublecmd.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="doublecmd"/>
<CursorPos X="78" Y="72"/>
<TopLine Value="59"/>
<EditorIndex Value="33"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="fbtnchangedlg.pas"/>
<ComponentName Value="OneButtonChangeDlg"/>
<HasResources Value="True"/>
<IsPartOfProject Value="True"/>
<ResourceFilename Value="fbtnchangedlg.lrs"/>
<UnitName Value="fbtnchangedlg"/>
<CursorPos X="1" Y="11"/>
<TopLine Value="23"/>
<EditorIndex Value="2"/>
<UsageCount Value="166"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="fconfigtoolbar.pas"/>
<ComponentName Value="ButtonChangeDlg"/>
<HasResources Value="True"/>
<IsPartOfProject Value="True"/>
<ResourceFilename Value="fconfigtoolbar.lrs"/>
<UnitName Value="fconfigtoolbar"/>
<CursorPos X="1" Y="7"/>
<TopLine Value="34"/>
<EditorIndex Value="1"/>
<UsageCount Value="166"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="fmain.pas"/>
<ComponentName Value="frmMain"/>
<HasResources Value="True"/>
<ResourceFilename Value="fMain.lrs"/>
<UnitName Value="fMain"/>
<CursorPos X="34" Y="13"/>
<TopLine Value="1"/>
<EditorIndex Value="39"/>
<UsageCount Value="77"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="uwcxmodule.pas"/>
<UnitName Value="uWCXmodule"/>
<CursorPos X="1" Y="211"/>
<TopLine Value="205"/>
<EditorIndex Value="26"/>
<UsageCount Value="77"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
<Filename Value="findex.pas"/>
<UnitName Value="FindEx"/>
<CursorPos X="1" Y="19"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="77"/>
<Loaded Value="True"/>
</Unit5>
<Unit6>
<Filename Value="ufileop.pas"/>
<UnitName Value="uFileOp"/>
<CursorPos X="1" Y="7"/>
<TopLine Value="1"/>
<EditorIndex Value="12"/>
<UsageCount Value="77"/>
<Loaded Value="True"/>
</Unit6>
<Unit7>
<Filename Value="framepanel.pas"/>
<ComponentName Value="FrameFilePanel"/>
<HasResources Value="True"/>
<ResourceFilename Value="framepanel.lrs"/>
<UnitName Value="framePanel"/>
<CursorPos X="1" Y="725"/>
<TopLine Value="771"/>
<EditorIndex Value="35"/>
<UsageCount Value="77"/>
<Loaded Value="True"/>
</Unit7>
<Unit8>
<Filename Value="upixmapmanager.pas"/>
<UnitName Value="uPixMapManager"/>
<CursorPos X="16" Y="72"/>
<TopLine Value="255"/>
<EditorIndex Value="40"/>
<UsageCount Value="77"/>
<Loaded Value="True"/>
</Unit8>
<Unit9>
<Filename Value="uexeccmd.pas"/>
<UnitName Value="uExecCmd"/>
<CursorPos X="28" Y="15"/>
<TopLine Value="1"/>
<EditorIndex Value="8"/>
<UsageCount Value="77"/>
<Loaded Value="True"/>
</Unit9>
<Unit10>
<Filename Value="foptions.pas"/>
<ComponentName Value="frmOptions"/>
<HasResources Value="True"/>
<ResourceFilename Value="fOptions.lrs"/>
<UnitName Value="fOptions"/>
<CursorPos X="71" Y="266"/>
<TopLine Value="1"/>
<EditorIndex Value="19"/>
<UsageCount Value="76"/>
<Loaded Value="True"/>
</Unit10>
<Unit11>
<Filename Value="ufileopthread.pas"/>
<UnitName Value="uFileOpThread"/>
<CursorPos X="1" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="22"/>
<UsageCount Value="76"/>
<Loaded Value="True"/>
</Unit11>
<Unit12>
<Filename Value="umovethread.pas"/>
<UnitName Value="uMoveThread"/>
<CursorPos X="37" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="6"/>
<UsageCount Value="76"/>
<Loaded Value="True"/>
</Unit12>
<Unit13>
<Filename Value="ufileprocs.pas"/>
<UnitName Value="uFileProcs"/>
<CursorPos X="1" Y="9"/>
<TopLine Value="45"/>
<EditorIndex Value="7"/>
<UsageCount Value="76"/>
<Loaded Value="True"/>
</Unit13>
<Unit14>
<Filename Value="ufilelist.pas"/>
<UnitName Value="uFileList"/>
<CursorPos X="32" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="9"/>
<UsageCount Value="75"/>
<Loaded Value="True"/>
</Unit14>
<Unit15>
<Filename Value="uvfsutil.pas"/>
<UnitName Value="uVFSutil"/>
<CursorPos X="57" Y="12"/>
<TopLine Value="59"/>
<EditorIndex Value="13"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit15>
<Unit16>
<Filename Value="ufindmmap.pas"/>
<UnitName Value="uFindMmap"/>
<CursorPos X="32" Y="8"/>
<TopLine Value="61"/>
<EditorIndex Value="31"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit16>
<Unit17>
<Filename Value="ufindthread.pas"/>
<UnitName Value="uFindThread"/>
<CursorPos X="37" Y="11"/>
<TopLine Value="193"/>
<EditorIndex Value="32"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit17>
<Unit18>
<Filename Value="ufilepanel.pas"/>
<UnitName Value="uFilePanel"/>
<CursorPos X="19" Y="544"/>
<TopLine Value="591"/>
<EditorIndex Value="29"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit18>
<Unit19>
<Filename Value="ufakethread.pas"/>
<UnitName Value="uFakeThread"/>
<CursorPos X="60" Y="54"/>
<TopLine Value="1"/>
<EditorIndex Value="38"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit19>
<Unit20>
<Filename Value="ucopythread.pas"/>
<UnitName Value="uCopyThread"/>
<CursorPos X="37" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="20"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit20>
<Unit21>
<Filename Value="udeletethread.pas"/>
<UnitName Value="uDeleteThread"/>
<CursorPos X="41" Y="9"/>
<TopLine Value="1"/>
<EditorIndex Value="21"/>
<UsageCount Value="74"/>
<Loaded Value="True"/>
</Unit21>
<Unit22>
<Filename Value="fhardlink.pas"/>
<ComponentName Value="frmHardLink"/>
<HasResources Value="True"/>
<ResourceFilename Value="fHardLink.lrs"/>
<UnitName Value="fHardLink"/>
<CursorPos X="27" Y="22"/>
<TopLine Value="1"/>
<EditorIndex Value="4"/>
<UsageCount Value="73"/>
<Loaded Value="True"/>
</Unit22>
<Unit23>
<Filename Value="fsymlink.pas"/>
<ComponentName Value="frmSymLink"/>
<HasResources Value="True"/>
<ResourceFilename Value="fSymLink.lrs"/>
<UnitName Value="fSymLink"/>
<CursorPos X="19" Y="32"/>
<TopLine Value="1"/>
<EditorIndex Value="5"/>
<UsageCount Value="73"/>
<Loaded Value="True"/>
</Unit23>
<Unit24>
<Filename Value="uGlobsPaths.pas"/>
<UnitName Value="uGlobsPaths"/>
<CursorPos X="38" Y="33"/>
<TopLine Value="1"/>
<EditorIndex Value="17"/>
<UsageCount Value="73"/>
<Loaded Value="True"/>
</Unit24>
<Unit25>
<Filename Value="fCopyDlg.pas"/>
<ComponentName Value="frmCopyDlg"/>
<HasResources Value="True"/>
<ResourceFilename Value="fCopyDlg.lrs"/>
<UnitName Value="fCopyDlg"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="10"/>
<UsageCount Value="73"/>
<Loaded Value="True"/>
</Unit25>
<Unit26>
<Filename Value="fLngForm.pas"/>
<ComponentName Value="frmLng"/>
<HasResources Value="True"/>
<ResourceFilename Value="fLngForm.lrs"/>
<UnitName Value="fLngForm"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="11"/>
<UsageCount Value="73"/>
<Loaded Value="True"/>
</Unit26>
<Unit27>
<Filename Value="fFindDlg.pas"/>
<ComponentName Value="frmFindDlg"/>
<HasResources Value="True"/>
<ResourceFilename Value="fFindDlg.lrs"/>
<UnitName Value="fFindDlg"/>
<CursorPos X="5" Y="147"/>
<TopLine Value="1"/>
<EditorIndex Value="0"/>
<UsageCount Value="72"/>
<Loaded Value="True"/>
</Unit27>
<Unit28>
<Filename Value="uglobs.pas"/>
<UnitName Value="uGlobs"/>
<CursorPos X="37" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="15"/>
<UsageCount Value="71"/>
<Loaded Value="True"/>
</Unit28>
<Unit29>
<Filename Value="utypes.pas"/>
<UnitName Value="uTypes"/>
<CursorPos X="1" Y="9"/>
<TopLine Value="1"/>
<EditorIndex Value="41"/>
<UsageCount Value="66"/>
<Loaded Value="True"/>
</Unit29>
<Unit30>
<Filename Value="fFileOpDlg.pas"/>
<ComponentName Value="frmFileOp"/>
<HasResources Value="True"/>
<ResourceFilename Value="fFileOpDlg.lrs"/>
<UnitName Value="fFileOpDlg"/>
<CursorPos X="1" Y="81"/>
<TopLine Value="1"/>
<EditorIndex Value="23"/>
<UsageCount Value="64"/>
<Loaded Value="True"/>
</Unit30>
<Unit31>
<Filename Value="uwcxprototypes.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="uWCXprototypes"/>
<CursorPos X="28" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="27"/>
<UsageCount Value="116"/>
<Loaded Value="True"/>
</Unit31>
<Unit32>
<Filename Value="uWCXhead.pas"/>
<UnitName Value="uWCXhead"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="28"/>
<UsageCount Value="60"/>
<Loaded Value="True"/>
</Unit32>
<Unit33>
<Filename Value="uVFS_.pas"/>
<UnitName Value="uVFS_"/>
<CursorPos X="42" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="14"/>
<UsageCount Value="60"/>
<Loaded Value="True"/>
</Unit33>
<Unit34>
<Filename Value="uini.pas"/>
<UnitName Value="uIni"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="16"/>
<UsageCount Value="57"/>
<Loaded Value="True"/>
</Unit34>
<Unit35>
<Filename Value="uColorExt.pas"/>
<UnitName Value="uColorExt"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="37"/>
<UsageCount Value="40"/>
<Loaded Value="True"/>
</Unit35>
<Unit36>
<Filename Value="uConv.pas"/>
<UnitName Value="uConv"/>
<CursorPos X="31" Y="33"/>
<TopLine Value="1"/>
<EditorIndex Value="36"/>
<UsageCount Value="37"/>
<Loaded Value="True"/>
</Unit36>
<Unit37>
<Filename Value="feditor.pas"/>
<ComponentName Value="frmEditor"/>
<HasResources Value="True"/>
<ResourceFilename Value="fEditor.lrs"/>
<UnitName Value="fEditor"/>
<CursorPos X="5" Y="102"/>
<TopLine Value="1"/>
<EditorIndex Value="34"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit37>
<Unit38>
<Filename Value="uShowMsg.pas"/>
<UnitName Value="uShowMsg"/>
<CursorPos X="1" Y="10"/>
<TopLine Value="173"/>
<EditorIndex Value="24"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit38>
<Unit39>
<Filename Value="fMsg.pas"/>
<ComponentName Value="frmMsg"/>
<HasResources Value="True"/>
<ResourceFilename Value="fMsg.lrs"/>
<UnitName Value="fMsg"/>
<CursorPos X="39" Y="68"/>
<TopLine Value="51"/>
<EditorIndex Value="25"/>
<UsageCount Value="18"/>
<Loaded Value="True"/>
</Unit39>
<Unit40>
<Filename Value="ffindview.pas"/>
<ComponentName Value="frmFindView"/>
<HasResources Value="True"/>
<UnitName Value="fFindView"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="30"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit40>
<Unit41>
<Filename Value="fAbout.pas"/>
<ComponentName Value="frmAbout"/>
<HasResources Value="True"/>
<ResourceFilename Value="fAbout.lrs"/>
<UnitName Value="fAbout"/>
<CursorPos X="5" Y="48"/>
<TopLine Value="41"/>
<EditorIndex Value="42"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit41>
<Unit42>
<Filename Value="ulng.pas"/>
<UnitName Value="uLng"/>
<CursorPos X="15" Y="419"/>
<TopLine Value="1"/>
<EditorIndex Value="18"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit42>
</Units>
<JumpHistory Count="0" HistoryIndex="-1"/>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths>
<SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<DelphiCompat Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Generate Value="Faster"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<BreakPoints Count="4">
<Item1>
<Source Value="mnt\X\linux\lazarus\lcl\include\imglist.inc"/>
<Line Value="435"/>
</Item1>
<Item2>
<Source Value="ufilepanel.pas"/>
<Line Value="197"/>
</Item2>
<Item3>
<Source Value="ucopythread.pas"/>
<Line Value="69"/>
</Item3>
<Item4>
<Source Value="ucopythread.pas"/>
<Line Value="42"/>
</Item4>
</BreakPoints>
</Debugging>
</CONFIG>

87
doublecmd.lpr Normal file
View file

@ -0,0 +1,87 @@
{ $threading on}
program doublecmd;
// uGlobs must be first in uses, uLng must be before any form;
{%File 'doc/changelog.txt'}
{.$APPTYPE GUI}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
Interfaces,
uGlobsPaths,
uGlobs,
uLng,
uIni,
SysUtils,
Forms,
fMain,
fAbout,
uFileList,
uFilePanel,
uFileOp,
uConstants,
uTypes,
framePanel,
uExecCmd,
uFileOpThread,
uFileProcs,
fFileOpDlg,
uCopyThread,
uDeleteThread,
fMkDir,
uCompareFiles,
uHighlighterProcs,
fEditor,
uMoveThread,
uFilter,
fMsg,
uSpaceThread,
fHotDir,
uConv,
fHardLink,
fFindView,
uPathHistory,
uExts,
uLog,
uShowForm,
fEditSearch,
uColorExt,
fEditorConf,
{$IFNDEF WIN32}
uFindMmap,
fFileProperties,
uUsersGroups,
{$ENDIF}
fLinker,
fCompareFiles,
dmHigh,
uPixMapManager, uVFS_,
KASComp, fbtnchangedlg, fconfigtoolbar, uWCXprototypes;
{$IFDEF WIN32}
{$R XP.res}
{$ENDIF}
begin
Application.Title:='Double Commander';
// try
Application.Initialize;
ThousandSeparator:=' ';
writeln('Double commander 0.1 alpha - Free Pascal');
writeln('This program is free software released under terms of GNU GPL 2');
writeln('(C)opyright 2006-7 Koblov Alexander (Alexx2000@mail.ru)');
writeln(' and contributors (see about dialog)');
LoadPaths;
LoadGlobs;
LoadPixMapManager;
Application.CreateForm(TfrmMain, frmMain); // main form
Application.CreateForm(TdmHighl, dmHighl); // highlighters
Application.Run;
{ except
on E:Exception do
Writeln('Critical unhandled exception:', E.Message);
end}
end.

0
edithistory.txt Normal file
View file

361
editor.col Normal file
View file

@ -0,0 +1,361 @@
# color is $00bbggrr (in hex)
[Untitled]
bg=$00000000
fg=$00FFFFFF
style=$0
[Asm]
bg=$00000000
fg=$0000FF00
style=$0
[Asm comment]
bg=$00000000
fg=$00FFFFFF
style=$0
[Asm key]
bg=$00000000
fg=$00000000
style=$0
[Assembler]
bg=$00000000
fg=$0000FF00
style=$0
[Attribute Name]
bg=$00000000
fg=$00FFFF00
style=$0
[Attribute Value]
bg=$00000000
fg=$0000FFFF
style=$0
[Block]
bg=$000000FF
fg=$00FFFFFF
style=$0
[Untitled]
bg=$00000000
fg=$00000000
style=$0
[Brackets]
bg=$00000000
fg=$00FFFF00
style=$0
[CDATA Section]
bg=$00000000
fg=$00FFFFFF
style=$0
[Character]
bg=$00000000
fg=$0000FFFF
style=$0
[Class]
bg=$00000000
fg=$00FFFFFF
style=$0
[Comment]
bg=$00000000
fg=$00C0C0C0
style=$2
[Condition]
bg=$00000000
fg=$00FFFFFF
style=$0
[Data type]
bg=$00000000
fg=$00FFFFFF
style=$0
[Default packages]
bg=$00000000
fg=$00FFFFFF
style=$0
[Direction]
bg=$00000000
fg=$00FFFFFF
style=$0
[Directive]
bg=$00000000
fg=$00FFFFFF
style=$0
[DOCTYPE Section]
bg=$00000000
fg=$00FFFFFF
style=$0
[Documentation]
bg=$00000000
fg=$0000FFFF
style=$0
[Element Name]
bg=$00000000
fg=$00FFFFFF
style=$0
[Embedded SQL]
bg=$00000000
fg=$0000FFFF
style=$0
[Embedded text]
bg=$00000000
fg=$00FFFFFF
style=$0
[Entity Reference]
bg=$00000000
fg=$00FFFFFF
style=$0
[Escape ampersand]
bg=$00000000
fg=$00FFFFFF
style=$0
[Event]
bg=$00000000
fg=$00FFFFFF
style=$0
[Exception]
bg=$00000000
fg=$00FFFFFF
style=$0
[Float]
bg=$00000000
fg=$00FF00FF
style=$0
[Form]
bg=$00000000
fg=$00FFFFFF
style=$0
[Function]
bg=$00000000
fg=$00FFFFFF
style=$0
[Hexadecimal]
bg=$00000000
fg=$00FF00FF
style=$0
[Icon reference]
bg=$00000000
fg=$00FFFFFF
style=$0
[Identifier]
bg=$00000000
fg=$00FFFF00
style=$1
[Illegal char]
bg=$00000000
fg=$000000FF
style=$0
[Include]
bg=$00000000
fg=$000000FF
style=$0
[Indirect]
bg=$00000000
fg=$00FFFFFF
style=$0
[Invalid symbol]
bg=$00000000
fg=$00FFFFFF
style=$0
[Internal function]
bg=$00000000
fg=$00FFFFFF
style=$0
[Key]
bg=$00000000
fg=$00FFFF00
style=$0
[Label]
bg=$00000000
fg=$0000FFFF
style=$0
[Macro]
bg=$00000000
fg=$00FFFFFF
style=$0
[Marker]
bg=$00000000
fg=$000000FF
style=$0
[Message]
bg=$00000000
fg=$0000FFFF
style=$0
[Miscellaneous]
bg=$00000000
fg=$00FFFFFF
style=$0
[Namespace Attribute Name]
bg=$00000000
fg=$00FFFFFF
style=$0
[Namespace Attribute Value]
bg=$00000000
fg=$00FFFFFF
style=$0
[Non-reserved keyword]
bg=$00000000
fg=$00FFFFFF
style=$0
[Null]
bg=$00000000
fg=$00FFFFFF
style=$0
[Number]
bg=$00000000
fg=$00FF00FF
style=$0
[Octal]
bg=$00000000
fg=$0000FF00
style=$0
[Operator]
bg=$00000000
fg=$00FFFF00
style=$0
[Reserved word (PL/SQL)]
bg=$00000000
fg=$00FFFFFF
style=$1
[Pragma]
bg=$00000000
fg=$00FFFFFF
style=$0
[Preprocessor]
bg=$00000000
fg=$00FFFFFF
style=$0
[Processing Instruction]
bg=$00000000
fg=$00FFFFFF
style=$0
[Qualifier]
bg=$00000000
fg=$00FFFFFF
style=$0
[Register]
bg=$00000000
fg=$00FFFFFF
style=$1
[Reserved word]
bg=$00000000
fg=$00FFFF00
style=$0
[Rpl]
bg=$00000000
fg=$00FFFFFF
style=$0
[Rpl key]
bg=$00000000
fg=$00FFFFFF
style=$0
[Rpl comment]
bg=$00000000
fg=$00FFFFFF
style=$0
[SASM]
bg=$00000000
fg=$00FFFFFF
style=$0
[SASM Comment]
bg=$00000000
fg=$00C0C0C0
style=$2
[SASM Key]
bg=$00000000
fg=$00FFFF00
style=$1
[Second reserved word]
bg=$00000000
fg=$00FFFF00
style=$0
[Section]
bg=$00000000
fg=$00FFFFFF
style=$0
[Space]
bg=$00000000
fg=$00FFFFFF
style=$0
[Special variable]
bg=$00000000
fg=$00FFFFFF
style=$0
[SQL keyword]
bg=$00000000
fg=$00FFFF00
style=$0
[SQL*Plus command]
bg=$00000000
fg=$00FFFFFF
style=$0
[String]
bg=$00000000
fg=$0000FFFF
style=$0
[Symbol]
bg=$00000000
fg=$00FFFFFF
style=$0
[SyntaxError]
bg=$00000000
fg=$000000FF
style=$0
[System functions and variables]
bg=$00000000
fg=$00FFFF00
style=$0
[System value]
bg=$00000000
fg=$0000FF00
style=$0
[Table Name]
bg=$00000000
fg=$00FFFFFF
style=$1
[Terminator]
bg=$00000000
fg=$00FFFFFF
style=$0
[Text]
bg=$00000000
fg=$00FFFFFF
style=$0
[Unknown word]
bg=$00000000
fg=$00FFFFFF
style=$0
[User functions and variables]
bg=$00000000
fg=$00FFFFFF
style=$0
[User functions]
bg=$00000000
fg=$00FFFFFF
style=$0
[Value]
bg=$00000000
fg=$00FF00FF
style=$0
[Variable]
bg=$00000000
fg=$00FFFFFF
style=$0
[Whitespace]
bg=$00000000
fg=$00FFFFFF
style=$0
[Math Mode]
bg=$00000000
fg=$0000FF00
style=$0
[Text in Math Mode]
bg=$00000000
fg=$0000FFFF
style=$0
[Square Bracket]
bg=$00000000
fg=$00FFFF00
style=$0
[Round Bracket]
bg=$00000000
fg=$00FFFF00
style=$0
[TeX Command]
bg=$00000000
fg=$00FFFF00
style=$1

80
fAbout.lfm Normal file
View file

@ -0,0 +1,80 @@
object frmAbout: TfrmAbout
ActiveControl = OKButton
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'About'
ClientHeight = 324
ClientWidth = 532
KeyPreview = True
OnKeyDown = FormKeyDown
OnShow = frmAboutShow
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 16
HorzScrollBar.Page = 531
HorzScrollBar.Range = 521
VertScrollBar.Page = 323
VertScrollBar.Range = 281
Left = 298
Height = 324
Top = 372
Width = 532
object imgLogo: TImage
AutoSize = True
Center = True
Transparent = True
Left = 8
Height = 148
Top = 8
Width = 135
end
object lblVersion: TLabel
Caption = 'version 0.1 alpha'
Color = clNone
ParentColor = False
Left = 24
Height = 14
Top = 200
Width = 84
end
object OKButton: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Hmm...'
OnClick = OKButtonClick
TabOrder = 0
Left = 32
Height = 23
Top = 288
Width = 100
end
object Panel1: TPanel
BevelInner = bvRaised
BevelOuter = bvLowered
ClientHeight = 305
ClientWidth = 369
FullRepaint = False
TabOrder = 1
Left = 152
Height = 305
Top = 8
Width = 369
object memInfo: TMemo
ReadOnly = True
TabOrder = 0
Left = 8
Height = 289
Top = 8
Width = 353
end
end
object lblTitle: TStaticText
AutoSize = True
Caption = 'Double Commander'
Color = clBtnFace
Font.Color = 3485410
Left = 24
Height = 16
Top = 176
Width = 100
end
end

25
fAbout.lrs Normal file
View file

@ -0,0 +1,25 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmAbout','FORMDATA',[
'TPF0'#9'TfrmAbout'#8'frmAbout'#13'ActiveControl'#7#8'OKButton'#11'BorderIcon'
+'s'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Cap'
+'tion'#6#5'About'#12'ClientHeight'#3'D'#1#11'ClientWidth'#3#20#2#10'KeyPrevi'
+'ew'#9#9'OnKeyDown'#7#11'FormKeyDown'#6'OnShow'#7#12'frmAboutShow'#13'Pixels'
+'PerInch'#2'`'#8'Position'#7#14'poScreenCenter'#10'TextHeight'#2#16#18'HorzS'
+'crollBar.Page'#3#19#2#19'HorzScrollBar.Range'#3#9#2#18'VertScrollBar.Page'#3
+'C'#1#19'VertScrollBar.Range'#3#25#1#4'Left'#3'*'#1#6'Height'#3'D'#1#3'Top'#3
+'t'#1#5'Width'#3#20#2#0#6'TImage'#7'imgLogo'#8'AutoSize'#9#6'Center'#9#11'Tr'
+'ansparent'#9#4'Left'#2#8#6'Height'#3#148#0#3'Top'#2#8#5'Width'#3#135#0#0#0#6
+'TLabel'#10'lblVersion'#7'Caption'#6#17'version 0.1 alpha'#5'Color'#7#6'clNo'
+'ne'#11'ParentColor'#8#4'Left'#2#24#6'Height'#2#14#3'Top'#3#200#0#5'Width'#2
+'T'#0#0#7'TButton'#8'OKButton'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6
+#6'Hmm...'#7'OnClick'#7#13'OKButtonClick'#8'TabOrder'#2#0#4'Left'#2' '#6'Hei'
+'ght'#2#23#3'Top'#3' '#1#5'Width'#2'd'#0#0#6'TPanel'#6'Panel1'#10'BevelInner'
+#7#8'bvRaised'#10'BevelOuter'#7#9'bvLowered'#12'ClientHeight'#3'1'#1#11'Clie'
+'ntWidth'#3'q'#1#11'FullRepaint'#8#8'TabOrder'#2#1#4'Left'#3#152#0#6'Height'
+#3'1'#1#3'Top'#2#8#5'Width'#3'q'#1#0#5'TMemo'#7'memInfo'#8'ReadOnly'#9#8'Tab'
+'Order'#2#0#4'Left'#2#8#6'Height'#3'!'#1#3'Top'#2#8#5'Width'#3'a'#1#0#0#0#11
+'TStaticText'#8'lblTitle'#8'AutoSize'#9#7'Caption'#6#16'Double Commander'#5
+'Color'#7#9'clBtnFace'#10'Font.Color'#4#226'.5'#0#4'Left'#2#24#6'Height'#2#16
+#3'Top'#3#176#0#5'Width'#2'd'#0#0#0
]);

94
fAbout.pas Normal file
View file

@ -0,0 +1,94 @@
{
Seksi Commander
----------------------------
Implementing of About dialog
Licence : GNU GPL v 2.0
Author : radek.cervinka@centrum.cz
}
unit fAbout;
{$mode objfpc}{$H+}
interface
uses
LResources,
Graphics, Forms, Controls, StdCtrls, ExtCtrls, ActnList,Buttons,
SysUtils, Classes, lcltype;
type
TfrmAbout = class(TForm)
lblVersion: TLabel;
OKButton: TButton;
Panel1: TPanel;
imgLogo: TImage;
memInfo: TMemo;
lblTitle: TStaticText;
procedure OKButtonClick(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure frmAboutShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure ShowAboutBox;
implementation
{uses
uConstants;}
const
cAboutMsg =
'This program is free software under GNU GPL 2 license, see COPYING file'+#13+
'Authors: '+ #13 +
'Alexander Koblov (Alexx2000@mail.ru)' + #13 +
'Radek Cervinka (radek.cervinka@centrum.cz) - author of Seksi Commander'+#13+
'Contributors:'+#13+
'Peter Cernoch (pcernoch@volny.cz) - author PFM'+#13+
'Pavel Letko (letcuv@centrum.cz) - multirename, split, linker'+#13+
'Jiri Karasek (jkarasek@centrum.cz)'+#13+
'Vladimir Pilny (vladimir@pilny.com)'+#13+
'Vaclav Juza (vaclavjuza@seznam.cz)'+#13+
'Martin Matusu (xmat@volny.cz) - chown, chgrp'+#13+
'Radek Polak - some viewer fixes'+#13+
'translators (see detail in lng files) '+#13+#13+
'Big thanks to Lazarus and FreePascal Team';
procedure ShowAboutBox;
begin
with TfrmAbout.Create(Application) do
try
ShowModal;
finally
Free;
end;
end;
procedure TfrmAbout.OKButtonClick(Sender: TObject);
begin
Close;
end;
procedure TfrmAbout.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key = VK_Escape) then
Close;
end;
procedure TfrmAbout.frmAboutShow(Sender: TObject);
begin
//imgLogo.Picture.Bitmap.LoadFromLazarusResource('logo');
memInfo.Lines.Text:=cAboutMsg;
end;
initialization
{$I fAbout.lrs}
{.$I logo.lrs}
end.

148
fCompareFiles.lrs Normal file
View file

@ -0,0 +1,148 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmCompareFiles','FORMDATA',[
'TPF0'#16'TfrmCompareFiles'#15'frmCompareFiles'#13'ActiveControl'#7#15'edtFil'
+'eNameLeft'#7'Caption'#6#13'Compare files'#12'ClientHeight'#3#28#2#11'Client'
+'Width'#3#15#3#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenCenter'#10'Te'
+'xtHeight'#2#15#18'HorzScrollBar.Page'#3#14#3#19'HorzScrollBar.Range'#3'm'#1
+#18'VertScrollBar.Page'#3#27#2#19'VertScrollBar.Range'#2'4'#4'Left'#2'='#6'H'
+'eight'#3#28#2#3'Top'#3'&'#2#5'Width'#3#15#3#0#9'TSplitter'#9'Splitter1'#6'H'
+'eight'#3#220#1#5'Width'#2#5#6'Cursor'#7#8'crHSplit'#4'Left'#3'i'#1#6'Height'
+#3#220#1#3'Top'#2')'#5'Width'#2#5#0#0#6'TPanel'#6'Panel1'#5'Align'#7#6'alLef'
+'t'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3#220#1#11'ClientWidth'#3'i'
+#1#11'FullRepaint'#8#8'TabOrder'#2#0#6'Height'#3#220#1#3'Top'#2')'#5'Width'#3
+'i'#1#0#6'TPanel'#10'pnlLeftBox'#5'Align'#7#5'alTop'#10'BevelOuter'#7#6'bvNo'
+'ne'#12'ClientHeight'#2#25#11'ClientWidth'#3'i'#1#11'FullRepaint'#8#8'TabOrd'
+'er'#2#0#8'OnResize'#7#16'pnlLeftBoxResize'#6'Height'#2#25#5'Width'#3'i'#1#0
+#5'TEdit'#15'edtFileNameLeft'#8'TabOrder'#2#0#4'Text'#6#2'pp'#6'Height'#2#20
+#5'Width'#3'3'#1#0#0#7'TButton'#15'btnFileNameLeft'#25'BorderSpacing.InnerBo'
+'rder'#2#2#7'Caption'#6#3'...'#8'TabOrder'#2#1#4'Left'#3'C'#1#6'Height'#2#20
+#5'Width'#2#20#0#0#0#8'TSynEdit'#7'lstLeft'#5'Align'#7#8'alClient'#10'Font.C'
+'olor'#7#7'clBlack'#11'Font.Height'#2#13#9'Font.Name'#6#13'adobe-courier'#10
+'Font.Pitch'#7#10'fpVariable'#6'Height'#3#195#1#4'Name'#6#7'lstLeft'#11'Pare'
+'ntColor'#8#11'ParentCtl3D'#8#8'TabOrder'#2#1#5'Width'#3'i'#1#23'BookMarkOpt'
+'ions.Xoffset'#2#238#17'Gutter.DigitCount'#2#2#17'Gutter.LeftOffset'#2#0#14
+'Gutter.Visible'#8#12'Gutter.Width'#2#15#23'Gutter.CodeFoldingWidth'#2#14#10
+'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&'#0#1#7'Command'#2'g'#8'Shor'
+'tCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3'&@'#0#1#7'Command'#2#4#8'S'
+'hortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'( '#0#1#7'Command'#3#212#0#8
+'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2'%'#0#1#7'Command'#2'e'#8'S'
+'hortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%@'#0#1#7'Command'#2'i'#8'S'
+'hortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2''''#0#1#7'Command'#2'f'#8'S'
+'hortCut'#3''' '#0#1#7'Command'#2#6#8'ShortCut'#3'''@'#0#1#7'Command'#2'j'#8
+'ShortCut'#3'''`'#0#1#7'Command'#2#10#8'ShortCut'#2'"'#0#1#7'Command'#2'n'#8
+'ShortCut'#3'" '#0#1#7'Command'#2#14#8'ShortCut'#3'"@'#0#1#7'Command'#2'r'#8
+'ShortCut'#3'"`'#0#1#7'Command'#2#9#8'ShortCut'#2'!'#0#1#7'Command'#2'm'#8'S'
+'hortCut'#3'! '#0#1#7'Command'#2#13#8'ShortCut'#3'!@'#0#1#7'Command'#2'q'#8
+'ShortCut'#3'!`'#0#1#7'Command'#2#7#8'ShortCut'#2'$'#0#1#7'Command'#2'k'#8'S'
+'hortCut'#3'$ '#0#1#7'Command'#2#15#8'ShortCut'#3'$@'#0#1#7'Command'#2's'#8
+'ShortCut'#3'$`'#0#1#7'Command'#2#8#8'ShortCut'#2'#'#0#1#7'Command'#2'l'#8'S'
+'hortCut'#3'# '#0#1#7'Command'#2#16#8'ShortCut'#3'#@'#0#1#7'Command'#2't'#8
+'ShortCut'#3'#`'#0#1#7'Command'#3#223#0#8'ShortCut'#2'-'#0#1#7'Command'#3#201
+#0#8'ShortCut'#3'-@'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'- '#0#1#7'Command'#3
+#246#1#8'ShortCut'#2'.'#0#1#7'Command'#3'['#2#8'ShortCut'#3'. '#0#1#7'Comman'
+'d'#3#245#1#8'ShortCut'#2#8#0#1#7'Command'#3#245#1#8'ShortCut'#3#8' '#0#1#7
+'Command'#3#248#1#8'ShortCut'#3#8'@'#0#1#7'Command'#3'Y'#2#8'ShortCut'#4#8
+#128#0#0#0#1#7'Command'#3'Z'#2#8'ShortCut'#4#8#160#0#0#0#1#7'Command'#3#253#1
+#8'ShortCut'#2#13#0#1#7'Command'#3#199#0#8'ShortCut'#3'A@'#0#1#7'Command'#3
+#201#0#8'ShortCut'#3'C@'#0#1#7'Command'#3'b'#2#8'ShortCut'#3'I`'#0#1#7'Comma'
+'nd'#3#253#1#8'ShortCut'#3'M@'#0#1#7'Command'#3#254#1#8'ShortCut'#3'N@'#0#1#7
+'Command'#3#247#1#8'ShortCut'#3'T@'#0#1#7'Command'#3'c'#2#8'ShortCut'#3'U`'#0
+#1#7'Command'#3'\'#2#8'ShortCut'#3'V@'#0#1#7'Command'#3'['#2#8'ShortCut'#3'X'
+'@'#0#1#7'Command'#3#251#1#8'ShortCut'#3'Y@'#0#1#7'Command'#3#250#1#8'ShortC'
+'ut'#3'Y`'#0#1#7'Command'#3'Y'#2#8'ShortCut'#3'Z@'#0#1#7'Command'#3'Z'#2#8'S'
+'hortCut'#3'Z`'#0#1#7'Command'#3'-'#1#8'ShortCut'#3'0@'#0#1#7'Command'#3'.'#1
+#8'ShortCut'#3'1@'#0#1#7'Command'#3'/'#1#8'ShortCut'#3'2@'#0#1#7'Command'#3
+'0'#1#8'ShortCut'#3'3@'#0#1#7'Command'#3'1'#1#8'ShortCut'#3'4@'#0#1#7'Comman'
+'d'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'Command'#3'3'#1#8'ShortCut'#3'6@'#0#1#7'C'
+'ommand'#3'4'#1#8'ShortCut'#3'7@'#0#1#7'Command'#3'5'#1#8'ShortCut'#3'8@'#0#1
+#7'Command'#3'6'#1#8'ShortCut'#3'9@'#0#1#7'Command'#3'_'#1#8'ShortCut'#3'0`'
+#0#1#7'Command'#3'`'#1#8'ShortCut'#3'1`'#0#1#7'Command'#3'a'#1#8'ShortCut'#3
+'2`'#0#1#7'Command'#3'b'#1#8'ShortCut'#3'3`'#0#1#7'Command'#3'c'#1#8'ShortCu'
+'t'#3'4`'#0#1#7'Command'#3'd'#1#8'ShortCut'#3'5`'#0#1#7'Command'#3'e'#1#8'Sh'
+'ortCut'#3'6`'#0#1#7'Command'#3'f'#1#8'ShortCut'#3'7`'#0#1#7'Command'#3'g'#1
+#8'ShortCut'#3'8`'#0#1#7'Command'#3'h'#1#8'ShortCut'#3'9`'#0#1#7'Command'#3
+#231#0#8'ShortCut'#3'N`'#0#1#7'Command'#3#232#0#8'ShortCut'#3'C`'#0#1#7'Comm'
+'and'#3#233#0#8'ShortCut'#3'L`'#0#1#7'Command'#3'd'#2#8'ShortCut'#2#9#0#1#7
+'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1#7'Command'#3#250#0#8'ShortCut'#3'B`'
,#0#0#8'ReadOnly'#9#19'OnSpecialLineColors'#7#24'lstLeftSpecialLineColors'#14
+'OnStatusChange'#7#19'lstLeftStatusChange'#6'Cursor'#7#7'crIBeam'#6'Height'#3
+#195#1#3'Top'#2#25#5'Width'#3'i'#1#0#0#0#6'TPanel'#6'Panel2'#5'Align'#7#8'al'
+'Client'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3#220#1#11'ClientWidth'
+#3#161#1#11'FullRepaint'#8#8'TabOrder'#2#1#4'Left'#3'n'#1#6'Height'#3#220#1#3
+'Top'#2')'#5'Width'#3#161#1#0#6'TPanel'#11'pnlRightBox'#5'Align'#7#5'alTop'
+#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2#25#11'ClientWidth'#3#161#1#11
+'FullRepaint'#8#8'TabOrder'#2#0#8'OnResize'#7#17'pnlRightBoxResize'#6'Height'
+#2#25#5'Width'#3#161#1#0#5'TEdit'#16'edtFileNameRight'#8'TabOrder'#2#0#4'Tex'
+'t'#6#3'ppp'#4'Left'#2#10#6'Height'#2#20#5'Width'#3'X'#1#0#0#7'TButton'#16'b'
+'tnFileNameRight'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'...'#8'Ta'
+'bOrder'#2#1#4'Left'#3'r'#1#6'Height'#2#20#5'Width'#2#20#0#0#0#8'TSynEdit'#8
+'lstRight'#5'Align'#7#8'alClient'#10'Font.Color'#7#7'clBlack'#11'Font.Height'
+#2#13#9'Font.Name'#6#13'adobe-courier'#10'Font.Pitch'#7#10'fpVariable'#6'Hei'
+'ght'#3#195#1#4'Name'#6#8'lstRight'#11'ParentColor'#8#11'ParentCtl3D'#8#8'Ta'
+'bOrder'#2#1#5'Width'#3#161#1#23'BookMarkOptions.Xoffset'#2#238#14'Gutter.Vi'
+'sible'#8#23'Gutter.CodeFoldingWidth'#2#14#10'Keystrokes'#14#1#7'Command'#2#3
+#8'ShortCut'#2'&'#0#1#7'Command'#2'g'#8'ShortCut'#3'& '#0#1#7'Command'#3#211
+#0#8'ShortCut'#3'&@'#0#1#7'Command'#2#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'
+#8'ShortCut'#3'( '#0#1#7'Command'#3#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2
+#1#8'ShortCut'#2'%'#0#1#7'Command'#2'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5
+#8'ShortCut'#3'%@'#0#1#7'Command'#2'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8
+'ShortCut'#2''''#0#1#7'Command'#2'f'#8'ShortCut'#3''' '#0#1#7'Command'#2#6#8
+'ShortCut'#3'''@'#0#1#7'Command'#2'j'#8'ShortCut'#3'''`'#0#1#7'Command'#2#10
+#8'ShortCut'#2'"'#0#1#7'Command'#2'n'#8'ShortCut'#3'" '#0#1#7'Command'#2#14#8
+'ShortCut'#3'"@'#0#1#7'Command'#2'r'#8'ShortCut'#3'"`'#0#1#7'Command'#2#9#8
+'ShortCut'#2'!'#0#1#7'Command'#2'm'#8'ShortCut'#3'! '#0#1#7'Command'#2#13#8
+'ShortCut'#3'!@'#0#1#7'Command'#2'q'#8'ShortCut'#3'!`'#0#1#7'Command'#2#7#8
+'ShortCut'#2'$'#0#1#7'Command'#2'k'#8'ShortCut'#3'$ '#0#1#7'Command'#2#15#8
+'ShortCut'#3'$@'#0#1#7'Command'#2's'#8'ShortCut'#3'$`'#0#1#7'Command'#2#8#8
+'ShortCut'#2'#'#0#1#7'Command'#2'l'#8'ShortCut'#3'# '#0#1#7'Command'#2#16#8
+'ShortCut'#3'#@'#0#1#7'Command'#2't'#8'ShortCut'#3'#`'#0#1#7'Command'#3#223#0
+#8'ShortCut'#2'-'#0#1#7'Command'#3#201#0#8'ShortCut'#3'-@'#0#1#7'Command'#3
+'\'#2#8'ShortCut'#3'- '#0#1#7'Command'#3#246#1#8'ShortCut'#2'.'#0#1#7'Comman'
+'d'#3'['#2#8'ShortCut'#3'. '#0#1#7'Command'#3#245#1#8'ShortCut'#2#8#0#1#7'Co'
+'mmand'#3#245#1#8'ShortCut'#3#8' '#0#1#7'Command'#3#248#1#8'ShortCut'#3#8'@'
+#0#1#7'Command'#3'Y'#2#8'ShortCut'#4#8#128#0#0#0#1#7'Command'#3'Z'#2#8'Short'
+'Cut'#4#8#160#0#0#0#1#7'Command'#3#253#1#8'ShortCut'#2#13#0#1#7'Command'#3
+#199#0#8'ShortCut'#3'A@'#0#1#7'Command'#3#201#0#8'ShortCut'#3'C@'#0#1#7'Comm'
+'and'#3'b'#2#8'ShortCut'#3'I`'#0#1#7'Command'#3#253#1#8'ShortCut'#3'M@'#0#1#7
+'Command'#3#254#1#8'ShortCut'#3'N@'#0#1#7'Command'#3#247#1#8'ShortCut'#3'T@'
+#0#1#7'Command'#3'c'#2#8'ShortCut'#3'U`'#0#1#7'Command'#3'\'#2#8'ShortCut'#3
+'V@'#0#1#7'Command'#3'['#2#8'ShortCut'#3'X@'#0#1#7'Command'#3#251#1#8'ShortC'
+'ut'#3'Y@'#0#1#7'Command'#3#250#1#8'ShortCut'#3'Y`'#0#1#7'Command'#3'Y'#2#8
+'ShortCut'#3'Z@'#0#1#7'Command'#3'Z'#2#8'ShortCut'#3'Z`'#0#1#7'Command'#3'-'
+#1#8'ShortCut'#3'0@'#0#1#7'Command'#3'.'#1#8'ShortCut'#3'1@'#0#1#7'Command'#3
+'/'#1#8'ShortCut'#3'2@'#0#1#7'Command'#3'0'#1#8'ShortCut'#3'3@'#0#1#7'Comman'
+'d'#3'1'#1#8'ShortCut'#3'4@'#0#1#7'Command'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'C'
+'ommand'#3'3'#1#8'ShortCut'#3'6@'#0#1#7'Command'#3'4'#1#8'ShortCut'#3'7@'#0#1
+#7'Command'#3'5'#1#8'ShortCut'#3'8@'#0#1#7'Command'#3'6'#1#8'ShortCut'#3'9@'
+#0#1#7'Command'#3'_'#1#8'ShortCut'#3'0`'#0#1#7'Command'#3'`'#1#8'ShortCut'#3
+'1`'#0#1#7'Command'#3'a'#1#8'ShortCut'#3'2`'#0#1#7'Command'#3'b'#1#8'ShortCu'
+'t'#3'3`'#0#1#7'Command'#3'c'#1#8'ShortCut'#3'4`'#0#1#7'Command'#3'd'#1#8'Sh'
+'ortCut'#3'5`'#0#1#7'Command'#3'e'#1#8'ShortCut'#3'6`'#0#1#7'Command'#3'f'#1
+#8'ShortCut'#3'7`'#0#1#7'Command'#3'g'#1#8'ShortCut'#3'8`'#0#1#7'Command'#3
+'h'#1#8'ShortCut'#3'9`'#0#1#7'Command'#3#231#0#8'ShortCut'#3'N`'#0#1#7'Comma'
+'nd'#3#232#0#8'ShortCut'#3'C`'#0#1#7'Command'#3#233#0#8'ShortCut'#3'L`'#0#1#7
+'Command'#3'd'#2#8'ShortCut'#2#9#0#1#7'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1
+#7'Command'#3#250#0#8'ShortCut'#3'B`'#0#0#8'ReadOnly'#9#19'OnSpecialLineColo'
+'rs'#7#25'lstRightSpecialLineColors'#14'OnStatusChange'#7#20'lstRightStatusC'
+'hange'#6'Cursor'#7#7'crIBeam'#6'Height'#3#195#1#3'Top'#2#25#5'Width'#3#161#1
+#0#0#0#10'TStatusBar'#12'pnlStatusBar'#6'Panels'#14#1#4'Text'#6#19'Number of'
+' changes: '#5'Width'#2'2'#0#0#6'Height'#2#23#3'Top'#3#5#2#5'Width'#3#15#3#0
+#0#6'TPanel'#10'pnlButtons'#5'Align'#7#5'alTop'#10'BevelOuter'#7#6'bvNone'#12
,'ClientHeight'#2')'#11'ClientWidth'#3#15#3#11'FullRepaint'#8#8'TabOrder'#2#2
+#6'Height'#2')'#5'Width'#3#15#3#0#7'TButton'#10'btnCompare'#25'BorderSpacing'
+'.InnerBorder'#2#2#7'Caption'#6#13'Compare files'#7'OnClick'#7#15'btnCompare'
+'Click'#8'TabOrder'#2#0#4'Left'#2#5#6'Height'#2#23#3'Top'#2#8#5'Width'#2'`'#0
+#0#7'TButton'#11'btnNextDiff'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6
+#15'Next difference'#8'TabOrder'#2#1#4'Left'#2'x'#6'Height'#2#23#3'Top'#2#8#5
+'Width'#2'z'#0#0#7'TButton'#11'btnPrevDiff'#25'BorderSpacing.InnerBorder'#2#2
+#7'Caption'#6#19'Previous difference'#8'TabOrder'#2#2#4'Left'#3#0#1#6'Height'
+#2#23#3'Top'#2#8#5'Width'#3#147#0#0#0#9'TCheckBox'#10'chbBinMode'#11'AllowGr'
+'ayed'#9#7'Caption'#6#11'Binary mode'#8'TabOrder'#2#3#4'Left'#3#168#1#6'Heig'
+'ht'#2#13#3'Top'#2#8#5'Width'#2'N'#0#0#7'TButton'#8'btnClose'#25'BorderSpaci'
+'ng.InnerBorder'#2#2#7'Caption'#6#5'Close'#7'OnClick'#7#13'btnCloseClick'#8
+'TabOrder'#2#4#4'Left'#3#136#2#6'Height'#2#23#3'Top'#2#8#5'Width'#2'2'#0#0#9
+'TCheckBox'#16'chbKeepScrolling'#11'AllowGrayed'#9#7'Caption'#6#14'Keep scro'
+'lling'#8'TabOrder'#2#5#4'Left'#3#16#2#6'Height'#2#13#3'Top'#2#8#5'Width'#2
+'V'#0#0#0#0
]);

85
fCopyDlg.lfm Normal file
View file

@ -0,0 +1,85 @@
object frmCopyDlg: TfrmCopyDlg
ActiveControl = btnOK
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'frmCopyDlg'
OnKeyPress = frmCopyDlgKeyPress
OnShow = frmCopyDlgShow
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 16
HorzScrollBar.Page = 344
HorzScrollBar.Range = 337
VertScrollBar.Page = 161
VertScrollBar.Range = 143
Left = 160
Height = 162
Top = 539
Width = 345
object lblCopySrc: TLabel
Caption = 'lblCopySrc'
Color = clNone
ParentColor = False
Left = 8
Height = 14
Top = 8
Width = 51
end
object lblFileType: TLabel
Caption = 'lblFileType'
Color = clNone
ParentColor = False
Left = 8
Height = 14
Top = 64
Width = 51
end
object btnOK: TBitBtn
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 2
Caption = '&OK'
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
TabOrder = 0
Left = 176
Height = 23
Top = 120
Width = 75
end
object btnCancel: TBitBtn
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 1
Left = 262
Height = 23
Top = 120
Width = 75
end
object edtDst: TEdit
TabOrder = 2
Text = 'edtDst'
Left = 8
Height = 24
Top = 32
Width = 329
end
object cmbFileType: TComboBox
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
Enabled = False
ItemHeight = 18
MaxLength = 0
ParentCtl3D = False
TabOrder = 3
Left = 8
Height = 21
Top = 88
Width = 329
end
end

27
fCopyDlg.lrs Normal file
View file

@ -0,0 +1,27 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmCopyDlg','FORMDATA',[
'TPF0'#11'TfrmCopyDlg'#10'frmCopyDlg'#13'ActiveControl'#7#5'btnOK'#11'BorderI'
+'cons'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7
+'Caption'#6#10'frmCopyDlg'#10'OnKeyPress'#7#18'frmCopyDlgKeyPress'#6'OnShow'
+#7#14'frmCopyDlgShow'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenCenter'
+#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3'X'#1#19'HorzScrollBar.Range'#3
+'Q'#1#18'VertScrollBar.Page'#3#161#0#19'VertScrollBar.Range'#3#143#0#4'Left'
+#3#160#0#6'Height'#3#162#0#3'Top'#3#27#2#5'Width'#3'Y'#1#0#6'TLabel'#10'lblC'
+'opySrc'#7'Caption'#6#10'lblCopySrc'#5'Color'#7#6'clNone'#11'ParentColor'#8#4
+'Left'#2#8#6'Height'#2#14#3'Top'#2#8#5'Width'#2'3'#0#0#6'TLabel'#11'lblFileT'
+'ype'#7'Caption'#6#11'lblFileType'#5'Color'#7#6'clNone'#11'ParentColor'#8#4
+'Left'#2#8#6'Height'#2#14#3'Top'#2'@'#5'Width'#2'3'#0#0#7'TBitBtn'#5'btnOK'#7
+'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#2#7'Capti'
+'on'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'
+#2#0#8'TabOrder'#2#0#4'Left'#3#176#0#6'Height'#2#23#3'Top'#2'x'#5'Width'#2'K'
+#0#0#7'TBitBtn'#9'btnCancel'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSp'
+'acing.InnerBorder'#2#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCan'
+'cel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#1#4'Left'#3#6#1#6'H'
+'eight'#2#23#3'Top'#2'x'#5'Width'#2'K'#0#0#5'TEdit'#6'edtDst'#8'TabOrder'#2#2
+#4'Text'#6#6'edtDst'#4'Left'#2#8#6'Height'#2#24#3'Top'#2' '#5'Width'#3'I'#1#0
+#0#9'TComboBox'#11'cmbFileType'#16'AutoCompleteText'#11#22'cbactEndOfLineCom'
+'plete'#20'cbactSearchAscending'#0#7'Enabled'#8#10'ItemHeight'#2#18#9'MaxLen'
+'gth'#2#0#11'ParentCtl3D'#8#8'TabOrder'#2#3#4'Left'#2#8#6'Height'#2#21#3'Top'
+#2'X'#5'Width'#3'I'#1#0#0#0
]);

60
fCopyDlg.pas Normal file
View file

@ -0,0 +1,60 @@
unit fCopyDlg;
interface
uses
LResources,
SysUtils, Types, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, Buttons;
type
TfrmCopyDlg = class(TfrmLng)
btnOK: TBitBtn;
btnCancel: TBitBtn;
edtDst: TEdit;
lblCopySrc: TLabel;
cmbFileType: TComboBox;
lblFileType: TLabel;
procedure frmCopyDlgKeyPress(Sender: TObject; var Key: Char);
procedure frmCopyDlgShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure LoadLng; override;
end;
var
frmCopyDlg: TfrmCopyDlg;
implementation
uses
uLng;
procedure TfrmCopyDlg.frmCopyDlgShow(Sender: TObject);
begin
edtDst.SelectAll;
edtDst.SetFocus;
end;
procedure TfrmCopyDlg.frmCopyDlgKeyPress(Sender: TObject; var Key: Char);
begin
if Key=#27 then
ModalResult:=mrCancel;
if Key=#13 then
begin
ModalResult:=mrOK;
Key:=#0;
end;
end;
procedure TfrmCopyDlg.LoadLng;
begin
Caption:= lngGetString(clngDlgCp);
// lblCopySrc.Caption:= lngGetString(clngDlgCpSrc); handle by MainForm
lblFileType.Caption:= lngGetString(clngDlgCpType);
end;
initialization
{$I fCopyDlg.lrs}
end.

122
fEditor.lrs Normal file
View file

@ -0,0 +1,122 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmEditor','FORMDATA',[
'TPF0'#10'TfrmEditor'#9'frmEditor'#13'ActiveControl'#7#6'Editor'#7'Caption'#6
+#9'frmEditor'#12'ClientHeight'#3#212#1#11'ClientWidth'#3#221#2#10'KeyPreview'
+#9#4'Menu'#7#9'MainMenu1'#7'OnClose'#7#14'frmEditorClose'#12'OnCloseQuery'#7
+#14'FormCloseQuery'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestr'
+'oy'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenCenter'#10'TextHeight'#2
+#16#18'HorzScrollBar.Page'#3#220#2#18'VertScrollBar.Page'#3#211#1#19'VertScr'
+'ollBar.Range'#2#19#4'Left'#3#180#1#6'Height'#3#232#1#3'Top'#3'$'#1#5'Width'
+#3#221#2#0#10'TStatusBar'#9'StatusBar'#6'Panels'#14#1#5'Width'#2'2'#0#1#5'Wi'
+'dth'#3#150#0#0#1#5'Width'#2'2'#0#1#5'Width'#2'2'#0#0#11'SimplePanel'#8#6'He'
+'ight'#2#23#3'Top'#3#189#1#5'Width'#3#221#2#0#0#8'TSynEdit'#6'Editor'#5'Alig'
+'n'#7#8'alClient'#7'Anchors'#11#5'akTop'#0#10'Font.Color'#7#7'clBlack'#11'Fo'
+'nt.Height'#2#13#9'Font.Name'#6#13'adobe-courier'#10'Font.Pitch'#7#7'fpFixed'
+#6'Height'#3#189#1#4'Name'#6#6'Editor'#11'ParentColor'#8#11'ParentCtl3D'#8#8
+'TabOrder'#2#0#5'Width'#3#221#2#9'OnKeyDown'#7#13'EditorKeyDown'#10'OnKeyPre'
+'ss'#7#14'EditorKeyPress'#7'OnKeyUp'#7#11'EditorKeyUp'#23'BookMarkOptions.Xo'
+'ffset'#2'"'#22'Gutter.ShowLineNumbers'#9#23'Gutter.CodeFoldingWidth'#2#14#10
+'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&'#0#1#7'Command'#2'g'#8'Shor'
+'tCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3'&@'#0#1#7'Command'#2#4#8'S'
+'hortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'( '#0#1#7'Command'#3#212#0#8
+'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2'%'#0#1#7'Command'#2'e'#8'S'
+'hortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%@'#0#1#7'Command'#2'i'#8'S'
+'hortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2''''#0#1#7'Command'#2'f'#8'S'
+'hortCut'#3''' '#0#1#7'Command'#2#6#8'ShortCut'#3'''@'#0#1#7'Command'#2'j'#8
+'ShortCut'#3'''`'#0#1#7'Command'#2#10#8'ShortCut'#2'"'#0#1#7'Command'#2'n'#8
+'ShortCut'#3'" '#0#1#7'Command'#2#14#8'ShortCut'#3'"@'#0#1#7'Command'#2'r'#8
+'ShortCut'#3'"`'#0#1#7'Command'#2#9#8'ShortCut'#2'!'#0#1#7'Command'#2'm'#8'S'
+'hortCut'#3'! '#0#1#7'Command'#2#13#8'ShortCut'#3'!@'#0#1#7'Command'#2'q'#8
+'ShortCut'#3'!`'#0#1#7'Command'#2#7#8'ShortCut'#2'$'#0#1#7'Command'#2'k'#8'S'
+'hortCut'#3'$ '#0#1#7'Command'#2#15#8'ShortCut'#3'$@'#0#1#7'Command'#2's'#8
+'ShortCut'#3'$`'#0#1#7'Command'#2#8#8'ShortCut'#2'#'#0#1#7'Command'#2'l'#8'S'
+'hortCut'#3'# '#0#1#7'Command'#2#16#8'ShortCut'#3'#@'#0#1#7'Command'#2't'#8
+'ShortCut'#3'#`'#0#1#7'Command'#3#223#0#8'ShortCut'#2'-'#0#1#7'Command'#3#201
+#0#8'ShortCut'#3'-@'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'- '#0#1#7'Command'#3
+#246#1#8'ShortCut'#2'.'#0#1#7'Command'#3'['#2#8'ShortCut'#3'. '#0#1#7'Comman'
+'d'#3#245#1#8'ShortCut'#2#8#0#1#7'Command'#3#245#1#8'ShortCut'#3#8' '#0#1#7
+'Command'#3#248#1#8'ShortCut'#3#8'@'#0#1#7'Command'#3'Y'#2#8'ShortCut'#4#8
+#128#0#0#0#1#7'Command'#3'Z'#2#8'ShortCut'#4#8#160#0#0#0#1#7'Command'#3#253#1
+#8'ShortCut'#2#13#0#1#7'Command'#3#199#0#8'ShortCut'#3'A@'#0#1#7'Command'#3
+#201#0#8'ShortCut'#3'C@'#0#1#7'Command'#3'b'#2#8'ShortCut'#3'I`'#0#1#7'Comma'
+'nd'#3#253#1#8'ShortCut'#3'M@'#0#1#7'Command'#3#254#1#8'ShortCut'#3'N@'#0#1#7
+'Command'#3#247#1#8'ShortCut'#3'T@'#0#1#7'Command'#3'c'#2#8'ShortCut'#3'U`'#0
+#1#7'Command'#3'\'#2#8'ShortCut'#3'V@'#0#1#7'Command'#3'['#2#8'ShortCut'#3'X'
+'@'#0#1#7'Command'#3#251#1#8'ShortCut'#3'Y@'#0#1#7'Command'#3#250#1#8'ShortC'
+'ut'#3'Y`'#0#1#7'Command'#3'Y'#2#8'ShortCut'#3'Z@'#0#1#7'Command'#3'Z'#2#8'S'
+'hortCut'#3'Z`'#0#1#7'Command'#3'-'#1#8'ShortCut'#3'0@'#0#1#7'Command'#3'.'#1
+#8'ShortCut'#3'1@'#0#1#7'Command'#3'/'#1#8'ShortCut'#3'2@'#0#1#7'Command'#3
+'0'#1#8'ShortCut'#3'3@'#0#1#7'Command'#3'1'#1#8'ShortCut'#3'4@'#0#1#7'Comman'
+'d'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'Command'#3'3'#1#8'ShortCut'#3'6@'#0#1#7'C'
+'ommand'#3'4'#1#8'ShortCut'#3'7@'#0#1#7'Command'#3'5'#1#8'ShortCut'#3'8@'#0#1
+#7'Command'#3'6'#1#8'ShortCut'#3'9@'#0#1#7'Command'#3'_'#1#8'ShortCut'#3'0`'
+#0#1#7'Command'#3'`'#1#8'ShortCut'#3'1`'#0#1#7'Command'#3'a'#1#8'ShortCut'#3
+'2`'#0#1#7'Command'#3'b'#1#8'ShortCut'#3'3`'#0#1#7'Command'#3'c'#1#8'ShortCu'
+'t'#3'4`'#0#1#7'Command'#3'd'#1#8'ShortCut'#3'5`'#0#1#7'Command'#3'e'#1#8'Sh'
+'ortCut'#3'6`'#0#1#7'Command'#3'f'#1#8'ShortCut'#3'7`'#0#1#7'Command'#3'g'#1
+#8'ShortCut'#3'8`'#0#1#7'Command'#3'h'#1#8'ShortCut'#3'9`'#0#1#7'Command'#3
+#231#0#8'ShortCut'#3'N`'#0#1#7'Command'#3#232#0#8'ShortCut'#3'C`'#0#1#7'Comm'
+'and'#3#233#0#8'ShortCut'#3'L`'#0#1#7'Command'#3'd'#2#8'ShortCut'#2#9#0#1#7
+'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1#7'Command'#3#250#0#8'ShortCut'#3'B`'
+#0#0#8'OnChange'#7#12'EditorChange'#13'OnReplaceText'#7#17'EditorReplaceText'
+#14'OnStatusChange'#7#18'EditorStatusChange'#6'Cursor'#7#7'crIBeam'#6'Height'
+#3#189#1#5'Width'#3#221#2#0#0#9'TMainMenu'#9'MainMenu1'#4'left'#2'0'#3'top'#2
+#8#0#9'TMenuItem'#6'miFile'#7'Caption'#6#5'&File'#0#9'TMenuItem'#4'New1'#6'A'
+'ction'#7#10'actFileNew'#7'OnClick'#7#17'actFileNewExecute'#0#0#9'TMenuItem'
+#5'Open1'#6'Action'#7#11'actFileOpen'#7'OnClick'#7#18'actFileOpenExecute'#0#0
,#9'TMenuItem'#5'Save1'#6'Action'#7#11'actFileSave'#7'OnClick'#7#18'actFileSa'
+'veExecute'#0#0#9'TMenuItem'#7'SaveAs1'#6'Action'#7#13'actFileSaveAs'#7'OnCl'
+'ick'#7#20'actFileSaveAsExecute'#0#0#9'TMenuItem'#5'miDiv'#7'Caption'#6#1'-'
+#0#0#9'TMenuItem'#10'miConfHigh'#6'Action'#7#11'actConfHigh'#7'OnClick'#7#18
+'actConfHighExecute'#0#0#9'TMenuItem'#2'N1'#7'Caption'#6#1'-'#0#0#9'TMenuIte'
+'m'#5'Exit1'#6'Action'#7#11'actFileExit'#7'OnClick'#7#18'actFileExitExecute'
+#0#0#0#9'TMenuItem'#6'miEdit'#7'Caption'#6#5'&Edit'#0#9'TMenuItem'#6'miUndo'
+#6'Action'#7#11'actEditUndo'#7'OnClick'#7#18'actEditUndoExecute'#0#0#9'TMenu'
+'Item'#2'N3'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#5'miCut'#6'Action'#7#10'actE'
+'ditCut'#7'OnClick'#7#17'actEditCutExecute'#0#0#9'TMenuItem'#6'miCopy'#6'Act'
+'ion'#7#11'actEditCopy'#7'OnClick'#7#18'actEditCopyExecute'#0#0#9'TMenuItem'
+#7'miPaste'#6'Action'#7#12'actEditPaste'#7'OnClick'#7#19'actEditPasteExecute'
+#0#0#9'TMenuItem'#2'N4'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#6'miFind'#6'Actio'
+'n'#7#11'actEditFind'#7'OnClick'#7#18'actEditFindExecute'#0#0#9'TMenuItem'#9
+'miReplace'#6'Action'#7#11'actEditRplc'#7'OnClick'#7#18'actEditRplcExecute'#0
+#0#0#9'TMenuItem'#11'miHighlight'#7'Caption'#6#16'Syntax highlight'#0#0#9'TM'
+'enuItem'#5'Help1'#7'Caption'#6#5'&Help'#0#9'TMenuItem'#7'miAbout'#6'Action'
+#7#8'actAbout'#7'OnClick'#7#15'actAboutExecute'#0#0#0#0#11'TActionList'#11'A'
+'ctListEdit'#4'left'#3#128#0#3'top'#3#232#0#0#7'TAction'#8'actAbout'#7'Capti'
+'on'#6#5'About'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#15'actAboutExecute'
+#8'Category'#6#4'Help'#0#0#7'TAction'#11'actFileOpen'#7'Caption'#6#5'&Open'#8
+'HelpType'#7#9'htKeyword'#9'OnExecute'#7#18'actFileOpenExecute'#8'ShortCut'#3
+'O@'#8'Category'#6#4'File'#0#0#7'TAction'#12'actFileClose'#7'Caption'#6#6'&C'
+'lose'#8'HelpType'#7#9'htKeyword'#8'Category'#6#4'File'#0#0#7'TAction'#11'ac'
+'tFileSave'#7'Caption'#6#5'&Save'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7
+#18'actFileSaveExecute'#8'ShortCut'#2'q'#8'Category'#6#4'File'#0#0#7'TAction'
+#13'actFileSaveAs'#7'Caption'#6#10'Save &As..'#8'HelpType'#7#9'htKeyword'#9
+'OnExecute'#7#20'actFileSaveAsExecute'#8'Category'#6#4'File'#0#0#7'TAction'
+#10'actFileNew'#7'Caption'#6#4'&New'#8'HelpType'#7#9'htKeyword'#9'OnExecute'
+#7#17'actFileNewExecute'#8'ShortCut'#3'N@'#8'Category'#6#4'File'#0#0#7'TActi'
+'on'#11'actFileExit'#7'Caption'#6#5'E&xit'#8'HelpType'#7#9'htKeyword'#9'OnEx'
+'ecute'#7#18'actFileExitExecute'#8'ShortCut'#3'X@'#8'Category'#6#4'File'#0#0
+#7'TAction'#10'actSaveAll'#7'Caption'#6#9'Sa&ve All'#8'HelpType'#7#9'htKeywo'
+'rd'#8'ShortCut'#3'S`'#8'Category'#6#4'File'#0#0#7'TAction'#11'actEditFind'#7
+'Caption'#6#5'&Find'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#18'actEditFin'
+'dExecute'#8'ShortCut'#3'F@'#8'Category'#6#4'Edit'#0#0#7'TAction'#11'actEdit'
+'Rplc'#7'Caption'#6#8'&Replace'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#18
+'actEditRplcExecute'#8'ShortCut'#3'R@'#8'Category'#6#4'Edit'#0#0#7'TAction'#8
+'actSave2'#7'Caption'#6#8'actSave2'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7
+#15'actSave2Execute'#8'ShortCut'#3'S@'#8'Category'#6#4'File'#0#0#7'TAction'
+#11'actConfHigh'#7'Caption'#6#11'actConfHigh'#8'HelpType'#7#9'htKeyword'#9'O'
+'nExecute'#7#18'actConfHighExecute'#8'Category'#6#4'File'#0#0#7'TAction'#10
+'actEditCut'#7'Caption'#6#3'Cut'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#17
+'actEditCutExecute'#8'ShortCut'#3'X@'#8'Category'#6#4'Edit'#0#0#7'TAction'#11
+'actEditCopy'#7'Caption'#6#4'Copy'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7
+#18'actEditCopyExecute'#8'ShortCut'#3'C@'#8'Category'#6#4'Edit'#0#0#7'TActio'
+'n'#12'actEditPaste'#7'Caption'#6#5'Paste'#8'HelpType'#7#9'htKeyword'#9'OnEx'
+'ecute'#7#19'actEditPasteExecute'#8'ShortCut'#3'V@'#8'Category'#6#4'Edit'#0#0
+#7'TAction'#11'actEditUndo'#7'Caption'#6#4'Undo'#8'HelpType'#7#9'htKeyword'#9
+'OnExecute'#7#18'actEditUndoExecute'#8'ShortCut'#3'Z@'#8'Category'#6#4'Edit'
+#0#0#7'TAction'#11'actEditRedo'#7'Caption'#6#11'actEditRedo'#8'HelpType'#7#9
+'htKeyword'#8'Category'#6#4'Edit'#0#0#7'TAction'#16'actEditSelectAll'#7'Capt'
+'ion'#6#10'Select&All'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#23'actEditS'
+'electAllExecute'#8'ShortCut'#3'A@'#8'Category'#6#4'Edit'#0#0#0#0
]);

91
fEditorConf.lrs Normal file
View file

@ -0,0 +1,91 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmEditorConf','FORMDATA',[
'TPF0'#14'TfrmEditorConf'#13'frmEditorConf'#13'ActiveControl'#7#7'grColor'#7
+'Caption'#6#20'Editor configuration'#12'ClientHeight'#3''''#1#11'ClientWidth'
+#3#227#1#8'OnCreate'#7#10'FormCreate'#13'PixelsPerInch'#2'`'#8'Position'#7#14
+'poScreenCenter'#10'TextHeight'#2#16#10'AutoScroll'#9#4'Left'#3#154#2#6'Heig'
+'ht'#3''''#1#3'Top'#3#211#1#5'Width'#3#227#1#0#6'TLabel'#8'lbSample'#7'Capti'
+'on'#6#6'Sample'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#8#6'Height'
+#2#14#3'Top'#3#184#0#5'Width'#2'#'#0#0#6'TLabel'#12'lbPredefined'#7'Caption'
+#6#10'Predefined'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#8#6'Heigh'
+'t'#2#14#3'Top'#3#136#0#5'Width'#2'5'#0#0#9'TDrawGrid'#7'grColor'#11'AutoAdv'
+'ance'#7#6'aaDown'#5'Color'#7#7'clWhite'#8'ColCount'#2#4#15'DefaultColWidth'
+#2#30#14'DefaultDrawing'#8#16'DefaultRowHeight'#2#30#10'FixedColor'#7#9'clBt'
+'nFace'#9'FixedCols'#2#0#9'FixedRows'#2#0#13'GridLineWidth'#2#0#7'Options'#11
+#15'goFixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#13'go'
+'RangeSelect'#14'goSmoothScroll'#0#8'RowCount'#2#4#10'ScrollBars'#7#10'ssAut'
+'oBoth'#8'TabOrder'#2#0#7'TabStop'#9#15'VisibleColCount'#2#4#15'VisibleRowCo'
+'unt'#2#4#10'OnDrawCell'#7#15'grColorDrawCell'#11'OnMouseDown'#7#16'grColorM'
+'ouseDown'#4'Left'#2#8#6'Height'#3#128#0#3'Top'#2#8#5'Width'#3#128#0#0#0#8'T'
+'ListBox'#7'lbNames'#7'OnClick'#7#12'lbNamesClick'#8'TabOrder'#2#1#4'Left'#3
+#240#0#6'Height'#3#192#0#5'Width'#3#201#0#0#0#9'TCheckBox'#6'cbBold'#11'Allo'
+'wGrayed'#9#7'Caption'#6#6'cbBold'#7'OnClick'#7#11'cbBoldClick'#8'TabOrder'#2
+#2#4'Left'#3#137#0#6'Height'#2#13#3'Top'#2'8'#5'Width'#2'5'#0#0#9'TCheckBox'
+#11'cbUnderline'#11'AllowGrayed'#9#7'Caption'#6#11'cbUnderline'#7'OnClick'#7
+#11'cbBoldClick'#8'TabOrder'#2#3#4'Left'#3#136#0#6'Height'#2#13#3'Top'#2#8#5
+'Width'#2'M'#0#0#9'TCheckBox'#11'cbStrikeOut'#11'AllowGrayed'#9#7'Caption'#6
+#11'cbStrikeOut'#7'OnClick'#7#11'cbBoldClick'#8'TabOrder'#2#4#4'Left'#3#136#0
+#6'Height'#2#13#3'Top'#2#24#5'Width'#2'L'#0#0#9'TCheckBox'#8'cbItalic'#11'Al'
+'lowGrayed'#9#7'Caption'#6#8'cbItalic'#7'OnClick'#7#11'cbBoldClick'#8'TabOrd'
+'er'#2#5#4'Left'#3#136#0#6'Height'#2#13#3'Top'#2'('#5'Width'#2'6'#0#0#9'TCom'
+'boBox'#13'cmbPredefined'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'
+#20'cbactSearchAscending'#0#10'ItemHeight'#2#18#9'MaxLength'#2#0#8'OnChange'
+#7#19'cmbPredefinedChange'#11'ParentCtl3D'#8#5'Style'#7#14'csDropDownList'#8
+'TabOrder'#2#6#4'Left'#2#8#6'Height'#2#21#3'Top'#3#152#0#5'Width'#3#208#0#0#0
+#7'TBitBtn'#9'btnCancel'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#6'Ca'
+'ncel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#7'OnClick'
+#7#14'btnCancelClick'#8'TabOrder'#2#9#4'Left'#3'n'#1#6'Height'#2#25#3'Top'#3
+#240#0#5'Width'#2'K'#0#0#7'TBitBtn'#5'btnOK'#25'BorderSpacing.InnerBorder'#2
+#2#7'Caption'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9
+'NumGlyphs'#2#0#7'OnClick'#7#10'btnOKClick'#8'TabOrder'#2#7#4'Left'#3#16#1#6
+'Height'#2#25#3'Top'#3#240#0#5'Width'#2'K'#0#0#8'TSynEdit'#9'edtSample'#11'F'
+'ont.Height'#2#244#9'Font.Name'#6#7'courier'#6'Height'#2'8'#4'Name'#6#9'edtS'
+'ample'#11'ParentColor'#8#11'ParentCtl3D'#8#8'TabOrder'#2#8#5'Width'#3#232#0
+#24'BookMarkOptions.OnChange'#13#15'Gutter.OnChange'#13#23'Gutter.CodeFoldin'
+'gWidth'#2#14#10'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&'#0#1#7'Comm'
+'and'#2'g'#8'ShortCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3'&@'#0#1#7
+'Command'#2#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'( '#0#1#7'C'
+'ommand'#3#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2'%'#0#1#7
+'Command'#2'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%@'#0#1#7
+'Command'#2'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2''''#0#1#7
+'Command'#2'f'#8'ShortCut'#3''' '#0#1#7'Command'#2#6#8'ShortCut'#3'''@'#0#1#7
+'Command'#2'j'#8'ShortCut'#3'''`'#0#1#7'Command'#2#10#8'ShortCut'#2'"'#0#1#7
+'Command'#2'n'#8'ShortCut'#3'" '#0#1#7'Command'#2#14#8'ShortCut'#3'"@'#0#1#7
+'Command'#2'r'#8'ShortCut'#3'"`'#0#1#7'Command'#2#9#8'ShortCut'#2'!'#0#1#7'C'
+'ommand'#2'm'#8'ShortCut'#3'! '#0#1#7'Command'#2#13#8'ShortCut'#3'!@'#0#1#7
+'Command'#2'q'#8'ShortCut'#3'!`'#0#1#7'Command'#2#7#8'ShortCut'#2'$'#0#1#7'C'
+'ommand'#2'k'#8'ShortCut'#3'$ '#0#1#7'Command'#2#15#8'ShortCut'#3'$@'#0#1#7
+'Command'#2's'#8'ShortCut'#3'$`'#0#1#7'Command'#2#8#8'ShortCut'#2'#'#0#1#7'C'
+'ommand'#2'l'#8'ShortCut'#3'# '#0#1#7'Command'#2#16#8'ShortCut'#3'#@'#0#1#7
+'Command'#2't'#8'ShortCut'#3'#`'#0#1#7'Command'#3#223#0#8'ShortCut'#2'-'#0#1
+#7'Command'#3#201#0#8'ShortCut'#3'-@'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'- '
+#0#1#7'Command'#3#246#1#8'ShortCut'#2'.'#0#1#7'Command'#3'['#2#8'ShortCut'#3
+'. '#0#1#7'Command'#3#245#1#8'ShortCut'#2#8#0#1#7'Command'#3#245#1#8'ShortCu'
+'t'#3#8' '#0#1#7'Command'#3#248#1#8'ShortCut'#3#8'@'#0#1#7'Command'#3'Y'#2#8
+'ShortCut'#4#8#128#0#0#0#1#7'Command'#3'Z'#2#8'ShortCut'#4#8#160#0#0#0#1#7'C'
+'ommand'#3#253#1#8'ShortCut'#2#13#0#1#7'Command'#3#199#0#8'ShortCut'#3'A@'#0
,#1#7'Command'#3#201#0#8'ShortCut'#3'C@'#0#1#7'Command'#3'b'#2#8'ShortCut'#3
+'I`'#0#1#7'Command'#3#253#1#8'ShortCut'#3'M@'#0#1#7'Command'#3#254#1#8'Short'
+'Cut'#3'N@'#0#1#7'Command'#3#247#1#8'ShortCut'#3'T@'#0#1#7'Command'#3'c'#2#8
+'ShortCut'#3'U`'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'V@'#0#1#7'Command'#3'['
+#2#8'ShortCut'#3'X@'#0#1#7'Command'#3#251#1#8'ShortCut'#3'Y@'#0#1#7'Command'
+#3#250#1#8'ShortCut'#3'Y`'#0#1#7'Command'#3'Y'#2#8'ShortCut'#3'Z@'#0#1#7'Com'
+'mand'#3'Z'#2#8'ShortCut'#3'Z`'#0#1#7'Command'#3'-'#1#8'ShortCut'#3'0@'#0#1#7
+'Command'#3'.'#1#8'ShortCut'#3'1@'#0#1#7'Command'#3'/'#1#8'ShortCut'#3'2@'#0
+#1#7'Command'#3'0'#1#8'ShortCut'#3'3@'#0#1#7'Command'#3'1'#1#8'ShortCut'#3'4'
+'@'#0#1#7'Command'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'Command'#3'3'#1#8'ShortCut'
+#3'6@'#0#1#7'Command'#3'4'#1#8'ShortCut'#3'7@'#0#1#7'Command'#3'5'#1#8'Short'
+'Cut'#3'8@'#0#1#7'Command'#3'6'#1#8'ShortCut'#3'9@'#0#1#7'Command'#3'_'#1#8
+'ShortCut'#3'0`'#0#1#7'Command'#3'`'#1#8'ShortCut'#3'1`'#0#1#7'Command'#3'a'
+#1#8'ShortCut'#3'2`'#0#1#7'Command'#3'b'#1#8'ShortCut'#3'3`'#0#1#7'Command'#3
+'c'#1#8'ShortCut'#3'4`'#0#1#7'Command'#3'd'#1#8'ShortCut'#3'5`'#0#1#7'Comman'
+'d'#3'e'#1#8'ShortCut'#3'6`'#0#1#7'Command'#3'f'#1#8'ShortCut'#3'7`'#0#1#7'C'
+'ommand'#3'g'#1#8'ShortCut'#3'8`'#0#1#7'Command'#3'h'#1#8'ShortCut'#3'9`'#0#1
+#7'Command'#3#231#0#8'ShortCut'#3'N`'#0#1#7'Command'#3#232#0#8'ShortCut'#3'C'
+'`'#0#1#7'Command'#3#233#0#8'ShortCut'#3'L`'#0#1#7'Command'#3'd'#2#8'ShortCu'
+'t'#2#9#0#1#7'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1#7'Command'#3#250#0#8'Sh'
+'ortCut'#3'B`'#0#0#13'Lines.Strings'#1#6#23'bla bla ble ble blu blu'#6#23'bl'
+'u blu ble ble bla bla'#0#22'SelectedColor.OnChange'#13#6'Cursor'#7#7'crIBea'
+'m'#4'Left'#2#8#6'Height'#2'8'#3'Top'#3#209#0#5'Width'#3#232#0#0#0#0
]);

74
fFileOpDlg.lfm Normal file
View file

@ -0,0 +1,74 @@
object frmFileOp: TfrmFileOp
ActiveControl = btnCancel
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'frmFileOp'
ClientHeight = 144
ClientWidth = 402
OnClose = FormClose
OnShow = FormShow
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 16
HorzScrollBar.Page = 401
HorzScrollBar.Range = 337
VertScrollBar.Page = 143
VertScrollBar.Range = 137
Left = 278
Height = 144
Top = 234
Width = 402
object lblFileName: TLabel
Caption = 'lblFileName'
Color = clNone
Font.Color = clBlack
Font.Height = 13
Font.Name = 'adobe-helvetica'
Font.Pitch = fpVariable
Font.Style = [fsBold]
ParentColor = False
Height = 13
Width = 59
end
object lblEstimated: TLabel
Caption = 'lblEstimated'
Color = clNone
ParentColor = False
Height = 14
Top = 96
Width = 58
end
object pbSecond: TProgressBar
Max = 100
Smooth = True
TabOrder = 0
BarShowText = True
Height = 22
Top = 64
Width = 384
end
object pbFirst: TProgressBar
Max = 100
Position = 20
Smooth = True
TabOrder = 1
BarShowText = True
Height = 22
Top = 32
Width = 385
end
object btnCancel: TBitBtn
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
OnClick = btnCancelClick
TabOrder = 2
Left = 160
Height = 25
Top = 96
Width = 89
end
end

24
fFileOpDlg.lrs Normal file
View file

@ -0,0 +1,24 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmFileOp','FORMDATA',[
'TPF0'#10'TfrmFileOp'#9'frmFileOp'#13'ActiveControl'#7#9'btnCancel'#11'Border'
+'Icons'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7
+'Caption'#6#9'frmFileOp'#12'ClientHeight'#3#144#0#11'ClientWidth'#3#146#1#7
+'OnClose'#7#9'FormClose'#6'OnShow'#7#8'FormShow'#13'PixelsPerInch'#2'`'#8'Po'
+'sition'#7#14'poScreenCenter'#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3
+#145#1#19'HorzScrollBar.Range'#3'Q'#1#18'VertScrollBar.Page'#3#143#0#19'Vert'
+'ScrollBar.Range'#3#137#0#4'Left'#3#22#1#6'Height'#3#144#0#3'Top'#3#234#0#5
+'Width'#3#146#1#0#6'TLabel'#11'lblFileName'#7'Caption'#6#11'lblFileName'#5'C'
+'olor'#7#6'clNone'#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#13#9'Font.N'
+'ame'#6#15'adobe-helvetica'#10'Font.Pitch'#7#10'fpVariable'#10'Font.Style'#11
+#6'fsBold'#0#11'ParentColor'#8#6'Height'#2#13#5'Width'#2';'#0#0#6'TLabel'#12
+'lblEstimated'#7'Caption'#6#12'lblEstimated'#5'Color'#7#6'clNone'#11'ParentC'
+'olor'#8#6'Height'#2#14#3'Top'#2'`'#5'Width'#2':'#0#0#12'TProgressBar'#8'pbS'
+'econd'#3'Max'#2'd'#6'Smooth'#9#8'TabOrder'#2#0#11'BarShowText'#9#6'Height'#2
+#22#3'Top'#2'@'#5'Width'#3#128#1#0#0#12'TProgressBar'#7'pbFirst'#3'Max'#2'd'
+#8'Position'#2#20#6'Smooth'#9#8'TabOrder'#2#1#11'BarShowText'#9#6'Height'#2
+#22#3'Top'#2' '#5'Width'#3#129#1#0#0#7'TBitBtn'#9'btnCancel'#25'BorderSpacin'
+'g.InnerBorder'#2#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'
+#11'ModalResult'#2#2#9'NumGlyphs'#2#0#7'OnClick'#7#14'btnCancelClick'#8'TabO'
+'rder'#2#2#4'Left'#3#160#0#6'Height'#2#25#3'Top'#2'`'#5'Width'#2'Y'#0#0#0
]);

147
fFileOpDlg.pas Normal file
View file

@ -0,0 +1,147 @@
{
Seksi Commander
----------------------------
Implementing of progress dialog for file operation
Licence : GNU GPL v 2.0
Author : radek.cervinka@centrum.cz
contributors:
}
unit fFileOpDlg;
{$mode objfpc}{$H+}
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, ComCtrls, Buttons;
type
{ TfrmFileOp }
TfrmFileOp = class(TfrmLng)
pbSecond: TProgressBar;
pbFirst: TProgressBar;
lblFileName: TLabel;
lblEstimated: TLabel;
btnCancel: TBitBtn;
procedure btnCancelClick(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
iProgress1Max:Integer;
iProgress1Pos:Integer;
iProgress2Max:Integer;
iProgress2Pos:Integer;
sEstimated:ShortString; // bugbug, must be short string
// sEstimated:String;
sFileName:String;
Thread : TThread;
procedure UpdateDlg;
procedure LoadLng; override;
end;
var
frmFileOp : TfrmFileOp;
implementation
uses fMain;
//uses uFileOpThread;
procedure TfrmFileOp.LoadLng;
begin
Thread := nil;
end;
procedure TfrmFileOp.btnCancelClick(Sender: TObject);
begin
if Assigned(Thread) then
Thread.Terminate;
end;
procedure TfrmFileOp.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
frmMain.frameLeft.RefreshPanel;
frmMain.frameRight.RefreshPanel;
frmMain.ActiveFrame.SetFocus;
end;
procedure TfrmFileOp.FormShow(Sender: TObject);
begin
sEstimated:='';
sFileName:='';
pbFirst.Position:=0;
pbSecond.Position:=0;
pbFirst.Max:=1;
pbSecond.Max:=1;
iProgress1Max:=0;
iProgress2Max:=0;
iProgress1Pos:=0;
iProgress2Pos:=0;
end;
procedure TfrmFileOp.UpdateDlg;
var
bP1, bP2:Boolean; // repaint if needed
s:String;
begin
// in processor intensive task we force repaint immedially
bP1:=False;
bP2:=False;
if pbFirst.Max<> iProgress1Max then
begin
if iProgress1Max>0 then
pbFirst.Max:= iProgress1Max;
{ pbFirst.Max:=20000;}
bP1:=True;
end;
if pbFirst.Position<> iProgress1Pos then
begin
if iProgress1Pos>0 then
pbFirst.Position:= iProgress1Pos;
bP1:=True;
end;
if pbSecond.Max<> iProgress2Max then
begin
if iProgress2Max>0 then
pbSecond.Max:= iProgress2Max;
bP2:=True;
end;
if pbSecond.Position<> iProgress2Pos then
begin
if iProgress2Pos>0 then
pbSecond.Position:= iProgress2Pos;
bP2:=True;
end;
if bp1 then
pbFirst.Invalidate;
if bp2 then
pbSecond.Invalidate;
if sEstimated<>lblEstimated.Caption then
begin
lblEstimated.Caption:=sEstimated;
lblEstimated.Invalidate;
end;
if sFileName<>lblFileName.Caption then
begin
lblFileName.Caption:=sFileName;
lblFileName.Invalidate;
end;
end;
initialization
{$I fFileOpDlg.lrs}
end.

255
fFindDlg.lfm Normal file
View file

@ -0,0 +1,255 @@
object frmFindDlg: TfrmFindDlg
ActiveControl = pgcSearch
Caption = 'frmFindDlg'
ClientHeight = 513
ClientWidth = 495
KeyPreview = True
OnClose = frmFindDlgClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnKeyPress = FormKeyPress
OnShow = frmFindDlgShow
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 16
HorzScrollBar.Page = 494
VertScrollBar.Page = 512
VertScrollBar.Range = 316
Left = 305
Height = 513
Top = 428
Width = 495
object Splitter1: TSplitter
Align = alTop
Cursor = crVSplit
Height = 1
Width = 495
ResizeAnchor = akTop
Cursor = crVSplit
Height = 1
Width = 495
end
object Panel2: TPanel
Align = alTop
BevelOuter = bvNone
ClientHeight = 313
ClientWidth = 495
FullRepaint = False
TabOrder = 0
Height = 313
Top = 1
Width = 495
object pgcSearch: TPageControl
ActivePage = tsStandard
Align = alClient
Anchors = [akTop, akLeft, akRight]
TabIndex = 0
TabOrder = 0
Height = 313
Width = 495
object tsStandard: TTabSheet
Caption = 'Standard'
ClientHeight = 287
ClientWidth = 487
Height = 287
Width = 487
object lblFindPathStart: TLabel
Caption = 'FileDir'
Color = clNone
ParentColor = False
Height = 14
Top = 8
Width = 30
end
object lblFindFileMask: TLabel
Caption = 'FileMask'
Color = clNone
ParentColor = False
Height = 14
Top = 64
Width = 41
end
object edtFindPathStart: TEdit
Anchors = [akTop, akLeft, akRight]
TabOrder = 0
Height = 24
Top = 32
Width = 282
end
object btnSelDir: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 2
Caption = '...'
OnClick = btnSelDirClick
TabOrder = 1
Left = 284
Height = 25
Top = 32
Width = 25
end
object cmbFindFileMask: TComboBox
Anchors = [akTop, akLeft, akRight]
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 18
MaxLength = 0
ParentCtl3D = False
TabOrder = 4
Text = '*'
Height = 21
Top = 88
Width = 306
end
object cbFindInFile: TCheckBox
AllowGrayed = True
Caption = 'Find in file'
OnClick = cbFindInFileClick
TabOrder = 2
Height = 13
Top = 120
Width = 67
end
object gbFindData: TGroupBox
Anchors = [akTop, akLeft, akRight]
Caption = 'Find Data'
ClientHeight = 87
ClientWidth = 313
Enabled = False
ParentCtl3D = False
TabOrder = 3
Height = 105
Top = 152
Width = 317
object cbCaseSens: TCheckBox
AllowGrayed = True
Caption = 'Case sensitive'
TabOrder = 0
Left = 16
Height = 13
Top = 56
Width = 88
end
object edtFindText: TEdit
Anchors = [akTop, akLeft, akRight]
TabOrder = 1
Left = 16
Height = 24
Top = 24
Width = 273
end
end
end
object tsAdvanced: TTabSheet
Caption = 'Advanced'
ClientHeight = 287
ClientWidth = 487
ImageIndex = 1
Height = 287
Width = 487
end
end
object btnStart: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 2
Caption = '&Start'
Default = True
OnClick = btnStartClick
TabOrder = 1
Left = 376
Height = 25
Top = 87
Width = 75
end
object btnStop: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Cancel'
Enabled = False
OnClick = btnStopClick
TabOrder = 2
Left = 376
Height = 25
Top = 151
Width = 75
end
object btnClose: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 2
Caption = '&Close'
OnClick = btnCloseClick
TabOrder = 3
Left = 376
Height = 25
Top = 119
Width = 75
end
end
object Panel1: TPanel
Align = alClient
BevelOuter = bvNone
ClientHeight = 199
ClientWidth = 495
FullRepaint = False
TabOrder = 1
Height = 199
Top = 314
Width = 495
object Panel3: TPanel
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
ClientHeight = 65
ClientWidth = 495
FullRepaint = False
TabOrder = 0
Height = 65
Width = 495
object lblStatus: TLabel
Caption = 'lblStatus'
Color = clNone
Font.Color = clBlack
Font.Height = 13
Font.Name = 'adobe-helvetica'
Font.Pitch = fpVariable
Font.Style = [fsBold]
ParentColor = False
Left = 392
Height = 13
Top = 12
Width = 44
end
object lblCurrent: TLabel
Caption = 'lblCurrent'
Color = clNone
Font.Color = clBlack
Font.Height = 13
Font.Name = 'adobe-helvetica'
Font.Pitch = fpVariable
Font.Style = [fsBold]
ParentColor = False
Left = 8
Height = 13
Top = 12
Width = 49
end
end
object lsFoundedFiles: TListBox
Align = alClient
MultiSelect = True
OnDblClick = lsFoundedFilesDblClick
PopupMenu = PopupMenuFind
TabOrder = 1
Height = 134
Top = 65
Width = 495
end
end
object PopupMenuFind: TPopupMenu
left = 272
top = 400
object miShowInViewer: TMenuItem
Caption = 'Show In Viewer'
OnClick = miShowInViewerClick
end
end
end

73
fFindDlg.lrs Normal file
View file

@ -0,0 +1,73 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmFindDlg','FORMDATA',[
'TPF0'#11'TfrmFindDlg'#10'frmFindDlg'#13'ActiveControl'#7#9'pgcSearch'#7'Capt'
+'ion'#6#10'frmFindDlg'#12'ClientHeight'#3#1#2#11'ClientWidth'#3#239#1#10'Key'
+'Preview'#9#7'OnClose'#7#15'frmFindDlgClose'#12'OnCloseQuery'#7#14'FormClose'
+'Query'#8'OnCreate'#7#10'FormCreate'#10'OnKeyPress'#7#12'FormKeyPress'#6'OnS'
+'how'#7#14'frmFindDlgShow'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenC'
+'enter'#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3#238#1#18'VertScrollBar.'
+'Page'#3#0#2#19'VertScrollBar.Range'#3'<'#1#4'Left'#3'1'#1#6'Height'#3#1#2#3
+'Top'#3#172#1#5'Width'#3#239#1#0#9'TSplitter'#9'Splitter1'#5'Align'#7#5'alTo'
+'p'#6'Cursor'#7#8'crVSplit'#6'Height'#2#1#5'Width'#3#239#1#12'ResizeAnchor'#7
+#5'akTop'#6'Cursor'#7#8'crVSplit'#6'Height'#2#1#5'Width'#3#239#1#0#0#6'TPane'
+'l'#6'Panel2'#5'Align'#7#5'alTop'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'
+#3'9'#1#11'ClientWidth'#3#239#1#11'FullRepaint'#8#8'TabOrder'#2#0#6'Height'#3
+'9'#1#3'Top'#2#1#5'Width'#3#239#1#0#12'TPageControl'#9'pgcSearch'#10'ActiveP'
+'age'#7#10'tsStandard'#5'Align'#7#8'alClient'#7'Anchors'#11#5'akTop'#6'akLef'
+'t'#7'akRight'#0#8'TabIndex'#2#0#8'TabOrder'#2#0#6'Height'#3'9'#1#5'Width'#3
+#239#1#0#9'TTabSheet'#10'tsStandard'#7'Caption'#6#8'Standard'#12'ClientHeigh'
+'t'#3#31#1#11'ClientWidth'#3#231#1#6'Height'#3#31#1#5'Width'#3#231#1#0#6'TLa'
+'bel'#16'lblFindPathStart'#7'Caption'#6#7'FileDir'#5'Color'#7#6'clNone'#11'P'
+'arentColor'#8#6'Height'#2#14#3'Top'#2#8#5'Width'#2#30#0#0#6'TLabel'#15'lblF'
+'indFileMask'#7'Caption'#6#8'FileMask'#5'Color'#7#6'clNone'#11'ParentColor'#8
+#6'Height'#2#14#3'Top'#2'@'#5'Width'#2')'#0#0#5'TEdit'#16'edtFindPathStart'#7
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#6'Height'#2#24#3
+'Top'#2' '#5'Width'#3#26#1#0#0#7'TButton'#9'btnSelDir'#7'Anchors'#11#5'akTop'
+#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'...'#7'OnClic'
+'k'#7#14'btnSelDirClick'#8'TabOrder'#2#1#4'Left'#3#28#1#6'Height'#2#25#3'Top'
+#2' '#5'Width'#2#25#0#0#9'TComboBox'#15'cmbFindFileMask'#7'Anchors'#11#5'akT'
+'op'#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplet'
+'e'#20'cbactSearchAscending'#0#10'ItemHeight'#2#18#9'MaxLength'#2#0#11'Paren'
+'tCtl3D'#8#8'TabOrder'#2#4#4'Text'#6#1'*'#6'Height'#2#21#3'Top'#2'X'#5'Width'
+#3'2'#1#0#0#9'TCheckBox'#12'cbFindInFile'#11'AllowGrayed'#9#7'Caption'#6#12
+'Find in file'#7'OnClick'#7#17'cbFindInFileClick'#8'TabOrder'#2#2#6'Height'#2
+#13#3'Top'#2'x'#5'Width'#2'C'#0#0#9'TGroupBox'#10'gbFindData'#7'Anchors'#11#5
+'akTop'#6'akLeft'#7'akRight'#0#7'Caption'#6#9'Find Data'#12'ClientHeight'#2
+'W'#11'ClientWidth'#3'9'#1#7'Enabled'#8#11'ParentCtl3D'#8#8'TabOrder'#2#3#6
+'Height'#2'i'#3'Top'#3#152#0#5'Width'#3'='#1#0#9'TCheckBox'#10'cbCaseSens'#11
+'AllowGrayed'#9#7'Caption'#6#14'Case sensitive'#8'TabOrder'#2#0#4'Left'#2#16
+#6'Height'#2#13#3'Top'#2'8'#5'Width'#2'X'#0#0#5'TEdit'#11'edtFindText'#7'Anc'
+'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#1#4'Left'#2#16#6'Hei'
+'ght'#2#24#3'Top'#2#24#5'Width'#3#17#1#0#0#0#0#9'TTabSheet'#10'tsAdvanced'#7
+'Caption'#6#8'Advanced'#12'ClientHeight'#3#31#1#11'ClientWidth'#3#231#1#10'I'
+'mageIndex'#2#1#6'Height'#3#31#1#5'Width'#3#231#1#0#0#0#7'TButton'#8'btnStar'
+'t'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#2#7
+'Caption'#6#6'&Start'#7'Default'#9#7'OnClick'#7#13'btnStartClick'#8'TabOrder'
+#2#1#4'Left'#3'x'#1#6'Height'#2#25#3'Top'#2'W'#5'Width'#2'K'#0#0#7'TButton'#7
+'btnStop'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2
+#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#7'Enabled'#8#7'OnClick'#7#12'btnStopCl'
+'ick'#8'TabOrder'#2#2#4'Left'#3'x'#1#6'Height'#2#25#3'Top'#3#151#0#5'Width'#2
+'K'#0#0#7'TButton'#8'btnClose'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'Border'
+'Spacing.InnerBorder'#2#2#7'Caption'#6#6'&Close'#7'OnClick'#7#13'btnCloseCli'
+'ck'#8'TabOrder'#2#3#4'Left'#3'x'#1#6'Height'#2#25#3'Top'#2'w'#5'Width'#2'K'
+#0#0#0#6'TPanel'#6'Panel1'#5'Align'#7#8'alClient'#10'BevelOuter'#7#6'bvNone'
+#12'ClientHeight'#3#199#0#11'ClientWidth'#3#239#1#11'FullRepaint'#8#8'TabOrd'
+'er'#2#1#6'Height'#3#199#0#3'Top'#3':'#1#5'Width'#3#239#1#0#6'TPanel'#6'Pane'
+'l3'#5'Align'#7#5'alTop'#10'BevelInner'#7#8'bvRaised'#10'BevelOuter'#7#9'bvL'
+'owered'#12'ClientHeight'#2'A'#11'ClientWidth'#3#239#1#11'FullRepaint'#8#8'T'
+'abOrder'#2#0#6'Height'#2'A'#5'Width'#3#239#1#0#6'TLabel'#9'lblStatus'#7'Cap'
+'tion'#6#9'lblStatus'#5'Color'#7#6'clNone'#10'Font.Color'#7#7'clBlack'#11'Fo'
+'nt.Height'#2#13#9'Font.Name'#6#15'adobe-helvetica'#10'Font.Pitch'#7#10'fpVa'
+'riable'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#4'Left'#3#136#1#6'H'
+'eight'#2#13#3'Top'#2#12#5'Width'#2','#0#0#6'TLabel'#10'lblCurrent'#7'Captio'
+'n'#6#10'lblCurrent'#5'Color'#7#6'clNone'#10'Font.Color'#7#7'clBlack'#11'Fon'
+'t.Height'#2#13#9'Font.Name'#6#15'adobe-helvetica'#10'Font.Pitch'#7#10'fpVar'
+'iable'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#4'Left'#2#8#6'Height'
+#2#13#3'Top'#2#12#5'Width'#2'1'#0#0#0#8'TListBox'#14'lsFoundedFiles'#5'Align'
,#7#8'alClient'#11'MultiSelect'#9#10'OnDblClick'#7#22'lsFoundedFilesDblClick'
+#9'PopupMenu'#7#13'PopupMenuFind'#8'TabOrder'#2#1#6'Height'#3#134#0#3'Top'#2
+'A'#5'Width'#3#239#1#0#0#0#10'TPopupMenu'#13'PopupMenuFind'#4'left'#3#16#1#3
+'top'#3#144#1#0#9'TMenuItem'#14'miShowInViewer'#7'Caption'#6#14'Show In View'
+'er'#7'OnClick'#7#19'miShowInViewerClick'#0#0#0#0
]);

258
fFindDlg.pas Normal file
View file

@ -0,0 +1,258 @@
{
Seksi Commander
----------------------------
Licence : GNU GPL v 2.0
Author : radek.cervinka@centrum.cz
Find dialog, with searching in thread
contributors:
}
{ $threading on}
unit fFindDlg;
{$mode objfpc}{$H+}
{ $DEFINE NOFAKETHREAD}
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, ExtCtrls, Buttons, uFindThread, Menus,
fLngForm;
type
TfrmFindDlg = class(TfrmLng)
Splitter1: TSplitter;
Panel2: TPanel;
pgcSearch: TPageControl;
tsStandard: TTabSheet;
lblFindPathStart: TLabel;
edtFindPathStart: TEdit;
btnSelDir: TButton;
lblFindFileMask: TLabel;
cmbFindFileMask: TComboBox;
cbFindInFile: TCheckBox;
gbFindData: TGroupBox;
cbCaseSens: TCheckBox;
edtFindText: TEdit;
tsAdvanced: TTabSheet;
Panel1: TPanel;
Panel3: TPanel;
lsFoundedFiles: TListBox;
btnStart: TButton;
btnStop: TButton;
lblStatus: TLabel;
btnClose: TButton;
lblCurrent: TLabel;
PopupMenuFind: TPopupMenu;
miShowInViewer: TMenuItem;
procedure btnSelDirClick(Sender: TObject);
procedure btnStartClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btnStopClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure btnCloseClick(Sender: TObject);
procedure cbFindInFileClick(Sender: TObject);
procedure frmFindDlgClose(Sender: TObject; var CloseAction: TCloseAction);
procedure frmFindDlgShow(Sender: TObject);
procedure lsFoundedFilesDblClick(Sender: TObject);
procedure miShowInViewerClick(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
FFindThread:TFindThread;
public
{ Public declarations }
procedure ThreadTerminate(Sender:TObject);
procedure LoadLng; override;
end;
var
frmFindDlg: TfrmFindDlg =nil;
procedure ShowFindDlg(const sActPath:String);
implementation
uses
fViewer, uLng;
procedure ShowFindDlg(const sActPath:String);
begin
if not assigned (frmFindDlg) then
frmFindDlg:=TfrmFindDlg.Create(Application);
frmFindDlg.Show;
frmFindDlg.BringToFront;
end;
procedure TfrmFindDlg.LoadLng;
begin
// load language
Caption:=lngGetString(clngFindFile);
tsStandard.Caption:= lngGetString(clngFindStandard);
tsAdvanced.Caption:= lngGetString(clngFindAdvanced);
lblFindPathStart.Caption:= lngGetString(clngFindFileDir);
lblFindFileMask.Caption:= lngGetString (clngFindFileMask);
cbFindInFile.Caption:= lngGetString(clngFindFndInFl);
gbFindData.Caption:= lngGetString(clngFindData);
cbCaseSens.Caption:= lngGetString(clngFindCase);
miShowInViewer.Caption:=lngGetString(clngFindShowView);
end;
procedure TfrmFindDlg.btnSelDirClick(Sender: TObject);
var
s:String;
begin
s:=edtFindPathStart.Text;
if not DirectoryExists(s) then s:='';
SelectDirectory(lngGetString(clngFindWhereBeg),'',s, False);
edtFindPathStart.Text:=s;
end;
procedure TfrmFindDlg.btnStartClick(Sender: TObject);
begin
if not DirectoryExists(edtFindPathStart.Text) then
begin
ShowMessage(Format(lngGetString(clngFindDirNoEx),[edtFindPathStart.Text]));
Exit;
end;
lsFoundedFiles.Items.Clear;
btnStop.Enabled:=True;
btnStart.Enabled:=False;
btnClose.Enabled:=False;
FFindThread:=TFindThread.Create;
with FFindThread do
begin
FilterMask:=cmbFindFileMask.Text;
PathStart:=edtFindPathStart.Text;
Items:=lsFoundedFiles.Items;
FindInFiles:=cbFindInFile.Checked;
FindData:=edtFindText.Text;
CaseSensitive:=cbCaseSens.Checked;
Status:=lblStatus;
Current:=lblCurrent;
writeln('thread a');
{$IFDEF NOFAKETHREAD}
FreeOnTerminate:=False;
OnTerminate:=@ThreadTerminate; // napojime udalost na obsluhu tlacitka
writeln('thread a1');
Resume;
end;
{$ELSE}
Resume;
//WaitFor; //remove
end;
//ThreadTerminate(self); //remove if thread is Ok
{$ENDIF}
writeln('thread a2');
end;
procedure TfrmFindDlg.ThreadTerminate(Sender:TObject);
begin
writeln('thread terminate end');
{ FFindThread.Terminate;
FFindThread.WaitFor;}
btnStop.Enabled:=False;
btnStart.Enabled:=True;
btnClose.Enabled:=True;
FFindThread:=nil;
end;
procedure TfrmFindDlg.FormCreate(Sender: TObject);
{ar
s:String;}
begin
inherited;
FFindThread:=nil;
edtFindPathStart.Text:=GetCurrentDir;
lblCurrent.Caption:='';
lblStatus.Caption:='';
end;
procedure TfrmFindDlg.btnStopClick(Sender: TObject);
begin
if not assigned(FFindThread) then Exit;
FFindThread.Terminate;
// FFindThread.WaitFor;
// FFindThread:=nil;
end;
procedure TfrmFindDlg.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose:= not Assigned(FFindThread);
end;
procedure TfrmFindDlg.btnCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmFindDlg.cbFindInFileClick(Sender: TObject);
begin
gbFindData.Enabled:=cbFindInFile.Checked;
end;
procedure TfrmFindDlg.frmFindDlgClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
// CloseAction:=caFree;
end;
procedure TfrmFindDlg.frmFindDlgShow(Sender: TObject);
begin
cmbFindFileMask.SelectAll;
//cmbFindFileMask.SetFocus;
end;
procedure TfrmFindDlg.lsFoundedFilesDblClick(Sender: TObject);
begin
miShowInViewer.Click;
end;
procedure TfrmFindDlg.miShowInViewerClick(Sender: TObject);
var
sl:TStringList;
i:Integer;
begin
if lsFoundedFiles.ItemIndex=-1 then Exit;
sl:=TStringList.Create;
try
for i:=0 to lsFoundedFiles.Items.Count-1 do
if lsFoundedFiles.Selected[i] then
sl.Add(lsFoundedFiles.Items[i]);
ShowViewer(sl);
finally
sl.Free;
end;
end;
procedure TfrmFindDlg.FormKeyPress(Sender: TObject; var Key: Char);
begin
if key=#13 then
begin
if btnStart.Enabled then
btnStart.Click
else
btnStop.Click;
end;
if key=#27 then
begin
Key:=#0;
Close;
end;
end;
initialization
{$I fFindDlg.lrs}
finalization
if assigned(frmFindDlg) then
FreeAndNil(frmFindDlg);
end.

23
fHardLink.lrs Normal file
View file

@ -0,0 +1,23 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmHardLink','FORMDATA',[
'TPF0'#12'TfrmHardLink'#11'frmHardLink'#13'ActiveControl'#7#6'edtNew'#7'Capti'
+'on'#6#11'frmHardLink'#12'ClientHeight'#3#148#0#11'ClientWidth'#3#161#1#10'K'
+'eyPreview'#9#10'OnKeyPress'#7#19'frmHardLinkKeyPress'#13'PixelsPerInch'#2'`'
+#8'Position'#7#16'poMainFormCenter'#10'TextHeight'#2#16#18'HorzScrollBar.Pag'
+'e'#3#160#1#19'HorzScrollBar.Range'#3#155#1#18'VertScrollBar.Page'#3#147#0#19
+'VertScrollBar.Range'#3#145#0#4'Left'#3'$'#1#6'Height'#3#148#0#3'Top'#3#224#0
+#5'Width'#3#161#1#0#6'TLabel'#6'lblNew'#7'Caption'#6#6'lblNew'#5'Color'#7#6
+'clNone'#11'ParentColor'#8#4'Left'#2#8#6'Height'#2#14#3'Top'#2'@'#5'Width'#2
+' '#0#0#6'TLabel'#6'lblDst'#7'Caption'#6#6'lblDst'#5'Color'#7#6'clNone'#11'P'
+'arentColor'#8#4'Left'#2#8#6'Height'#2#14#3'Top'#2#8#5'Width'#2#27#0#0#5'TEd'
+'it'#6'edtNew'#8'TabOrder'#2#1#4'Left'#2#8#6'Height'#2#24#3'Top'#2'X'#5'Widt'
+'h'#3#145#1#0#0#5'TEdit'#6'edtDst'#8'TabOrder'#2#3#4'Left'#2#8#6'Height'#2#24
+#3'Top'#2' '#5'Width'#3#145#1#0#0#7'TBitBtn'#5'btnOK'#25'BorderSpacing.Inner'
+'Border'#2#2#7'Caption'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResu'
+'lt'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#10'btnOKClick'#8'TabOrder'#2#0#4'Left'
+#3#248#0#6'Height'#2#23#3'Top'#2'x'#5'Width'#2'K'#0#0#7'TBitBtn'#9'btnCancel'
+#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCanc'
+'el'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#2#4'Left'#3'P'#1#6'H'
+'eight'#2#23#3'Top'#2'x'#5'Width'#2'K'#0#0#0
]);

41
fLinker.lrs Normal file
View file

@ -0,0 +1,41 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmLinker','FORMDATA',[
'TPF0'#10'TfrmLinker'#9'frmLinker'#13'ActiveControl'#7#6'edSave'#11'BorderIco'
+'ns'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSingle'#7'Ca'
+'ption'#6#6'Linker'#12'ClientHeight'#3'['#1#11'ClientWidth'#3';'#1#13'Pixels'
+'PerInch'#2'`'#18'HorzScrollBar.Page'#3':'#1#19'HorzScrollBar.Range'#3'!'#1
+#18'VertScrollBar.Page'#3'Z'#1#19'VertScrollBar.Range'#3'K'#1#4'Left'#3#1#2#6
+'Height'#3'['#1#3'Top'#3#252#0#5'Width'#3';'#1#0#12'TProgressBar'#8'prbrWork'
+#5'Align'#7#8'alBottom'#3'Max'#2'd'#8'TabOrder'#2#0#6'Height'#2#19#3'Top'#3
+'H'#1#5'Width'#3';'#1#0#0#9'TGroupBox'#8'gbSaveTo'#7'Caption'#6#10'Save to..'
+'.'#12'ClientHeight'#2'/'#11'ClientWidth'#3#213#0#11'ParentCtl3D'#8#8'TabOrd'
+'er'#2#1#6'Height'#2'A'#3'Top'#3#0#1#5'Width'#3#217#0#0#6'TLabel'#11'lblFile'
+'Name'#7'Caption'#6#11'lblFileName'#5'Color'#7#6'clNone'#11'ParentColor'#8#4
+'Left'#2#6#6'Height'#2#14#3'Top'#2#1#5'Width'#2'6'#0#0#5'TEdit'#6'edSave'#8
+'TabOrder'#2#0#4'Left'#2#6#6'Height'#2#24#3'Top'#2#17#5'Width'#3#168#0#0#0#7
+'TButton'#7'btnSave'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'...'#7
+'OnClick'#7#12'btnSaveClick'#8'TabOrder'#2#1#4'Left'#3#182#0#6'Height'#2#25#3
+'Top'#2#17#5'Width'#2#25#0#0#0#9'TGroupBox'#11'grbxControl'#7'Caption'#6#4'I'
+'tem'#12'ClientHeight'#3#231#0#11'ClientWidth'#2'T'#11'ParentCtl3D'#8#8'TabO'
+'rder'#2#2#4'Left'#3#224#0#6'Height'#3#249#0#5'Width'#2'X'#0#7'TButton'#7'sp'
+'btnUp'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2'Up'#7'OnClick'#7#12
+'spbtnUpClick'#14'ParentShowHint'#8#8'TabOrder'#2#0#4'Left'#2#6#6'Height'#2
+#23#4'Hint'#6#2'Up'#3'Top'#2#1#5'Width'#2'K'#0#0#7'TButton'#9'spbtnDown'#25
+'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#4'Down'#7'OnClick'#7#14'spbtnDo'
+'wnClick'#14'ParentShowHint'#8#8'TabOrder'#2#1#4'Left'#2#6#6'Height'#2#23#4
+'Hint'#6#4'Down'#3'Top'#2'!'#5'Width'#2'K'#0#0#7'TButton'#8'spbtnDel'#25'Bor'
+'derSpacing.InnerBorder'#2#2#7'Caption'#6#6'Delete'#7'OnClick'#7#13'spbtnDel'
+'Click'#14'ParentShowHint'#8#8'TabOrder'#2#2#4'Left'#2#6#6'Height'#2#23#4'Hi'
+'nt'#6#6'Delete'#3'Top'#2'A'#5'Width'#2'K'#0#0#0#7'TButton'#5'btnOK'#25'Bord'
+'erSpacing.InnerBorder'#2#2#7'Caption'#6#2'OK'#7'OnClick'#7#10'btnOKClick'#8
+'TabOrder'#2#3#4'Left'#3#227#0#6'Height'#2#25#3'Top'#3#6#1#5'Width'#2'X'#0#0
+#7'TButton'#7'btnExit'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#4'Exit'
+#11'ModalResult'#2#2#8'TabOrder'#2#4#4'Left'#3#224#0#6'Height'#2#25#3'Top'#3
+'('#1#5'Width'#2'X'#0#0#8'TListBox'#7'lstFile'#8'TabOrder'#2#5#6'Height'#3
+#248#0#3'Top'#2#8#5'Width'#3#212#0#0#0#11'TSaveDialog'#10'dlgSaveAll'#5'Titl'
+'e'#6#18#209#238#245#240#224#237#232#242#252' '#244#224#233#235' '#234#224
+#234#6'Filter'#6#13'All files|*.*'#11'FilterIndex'#2#0#5'Title'#6#18#209#238
+#245#240#224#237#232#242#252' '#244#224#233#235' '#234#224#234#4'left'#3#160
+#0#3'top'#3#240#0#0#0#0
]);

11
fLngForm.lfm Normal file
View file

@ -0,0 +1,11 @@
object frmLng: TfrmLng
Caption = 'frmLng'
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 16
HorzScrollBar.Page = 550
VertScrollBar.Page = 343
Height = 344
Top = 539
Width = 551
end

8
fLngForm.lrs Normal file
View file

@ -0,0 +1,8 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmLng','FORMDATA',[
'TPF0'#7'TfrmLng'#6'frmLng'#7'Caption'#6#6'frmLng'#8'OnCreate'#7#10'FormCreat'
+'e'#13'PixelsPerInch'#2'`'#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3'&'#2
+#18'VertScrollBar.Page'#3'W'#1#6'Height'#3'X'#1#3'Top'#3#27#2#5'Width'#3''''
+#2#0#0
]);

58
fLngForm.pas Normal file
View file

@ -0,0 +1,58 @@
{
Seksi Commander
----------------------------
Licence : GNU GPL v 2.0
Author : radek.cervinka@centrum.cz
contributors:
This is a generic language form.
It's public a virtual abstract method LoadLng, which
must be overloaded in descendant.
In this method we lokalize our GUI (via uLng).
In future maybe will have contained mechanism
for storing windows position in ini file
}
unit fLngForm;
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfrmLng = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure LoadLng; virtual; abstract;
end;
implementation
uses
uGlobs;
procedure TfrmLng.FormCreate(Sender: TObject);
begin
LoadLng;
// Color := clBtnFace;
// Font.Assign(gMainFont);
// writeln('Debug: Localised '+ClassName);
// SetFocus;
// PixelsPerInch:=0;
// Scaled:=False;
end;
initialization
{$I fLngForm.lrs}
end.

227
fMain.lrs Normal file
View file

@ -0,0 +1,227 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmMain','FORMDATA',[
'TPF0'#8'TfrmMain'#7'frmMain'#7'Caption'#6#16'Double Commander'#12'ClientHeig'
+'ht'#3'='#1#11'ClientWidth'#3#13#2#10'Font.Color'#7#7'clBlack'#11'Font.Heigh'
+'t'#2#13#9'Font.Name'#6#9'Helvetica'#10'Font.Pitch'#7#10'fpVariable'#10'KeyP'
+'review'#9#4'Menu'#7#7'mnuMain'#10'OnActivate'#7#12'FormActivate'#7'OnClose'
+#7#12'frmMainClose'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestr'
+'oy'#9'OnKeyDown'#7#11'FormKeyDown'#10'OnKeyPress'#7#12'FormKeyPress'#7'OnKe'
+'yUp'#7#12'frmMainKeyUp'#8'OnResize'#7#10'FormResize'#6'OnShow'#7#11'frmMain'
+'Show'#13'PixelsPerInch'#2'`'#8'Position'#7#15'poDesktopCenter'#8'ShowHint'#9
+#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3#12#2#18'VertScrollBar.Page'#3
+'<'#1#19'VertScrollBar.Range'#2'O'#4'Left'#3#191#1#6'Height'#3'P'#1#3'Top'#3
+'%'#2#5'Width'#3#13#2#0#6'TPanel'#9'pnlButton'#5'Align'#7#5'alTop'#12'Client'
+'Height'#2#22#11'ClientWidth'#3#13#2#11'FullRepaint'#8#8'TabOrder'#2#0#7'Vis'
+'ible'#8#6'Height'#2#22#3'Top'#2#23#5'Width'#3#13#2#0#0#6'TPanel'#7'pnlDisk'
+#5'Align'#7#5'alTop'#7'Caption'#6#7'pnlDisk'#12'ClientHeight'#2#24#11'Client'
+'Width'#3#13#2#11'FullRepaint'#8#11'ParentColor'#8#8'TabOrder'#2#1#6'Height'
+#2#24#3'Top'#2'-'#5'Width'#3#13#2#0#11'TKAStoolBar'#7'dskLeft'#17'OnToolButt'
+'onClick'#7#22'dskLeftToolButtonClick'#15'CheckToolButton'#9#11'FlatButtons'
+#9#11'IsDiskPanel'#9#5'Align'#7#6'alLeft'#12'ClientHeight'#2#22#11'ClientWid'
+'th'#3'b'#1#11'ParentColor'#8#8'TabOrder'#2#0#4'Left'#2#1#6'Height'#2#22#3'T'
+'op'#2#1#5'Width'#3'b'#1#0#0#11'TKAStoolBar'#8'dskRight'#17'OnToolButtonClic'
+'k'#7#23'dskRightToolButtonClick'#15'CheckToolButton'#9#11'FlatButtons'#9#11
+'IsDiskPanel'#9#5'Align'#7#8'alClient'#7'Anchors'#11#5'akTop'#6'akLeft'#8'ak'
+'Bottom'#0#12'ClientHeight'#2#22#11'ClientWidth'#3#169#0#8'TabOrder'#2#1#4'L'
+'eft'#3'c'#1#6'Height'#2#22#3'Top'#2#1#5'Width'#3#169#0#0#0#0#6'TPanel'#10'p'
+'nlCommand'#5'Align'#7#8'alBottom'#7'Anchors'#11#6'akLeft'#7'akRight'#0#10'B'
+'evelOuter'#7#9'bvLowered'#12'ClientHeight'#2'B'#11'ClientWidth'#3#13#2#11'F'
+'ullRepaint'#8#11'ParentColor'#8#8'TabOrder'#2#2#6'Height'#2'B'#3'Top'#3#251
+#0#5'Width'#3#13#2#0#6'TLabel'#14'lblCommandPath'#9'Alignment'#7#14'taRightJ'
+'ustify'#7'Caption'#6#4'Path'#5'Color'#7#6'clNone'#11'ParentColor'#8#13'Show'
+'AccelChar'#8#4'Left'#2#1#6'Height'#2#14#3'Top'#2#8#5'Width'#2#23#0#0#6'TPan'
+'el'#7'pnlKeys'#5'Align'#7#8'alBottom'#7'Anchors'#11#6'akLeft'#7'akRight'#0
+#10'BevelOuter'#7#9'bvLowered'#12'ClientHeight'#2#27#11'ClientWidth'#3#11#2
+#11'FullRepaint'#8#8'TabOrder'#2#0#8'OnResize'#7#13'pnlKeysResize'#4'Left'#2
+#1#6'Height'#2#27#3'Top'#2'&'#5'Width'#3#11#2#0#12'TSpeedButton'#5'btnF3'#6
+'Action'#7#7'actView'#4'Flat'#9#9'NumGlyphs'#2#0#4'Left'#2#1#6'Height'#2#23#3
+'Top'#2#4#5'Width'#2'K'#0#0#12'TSpeedButton'#5'btnF4'#6'Action'#7#7'actEdit'
+#4'Flat'#9#9'NumGlyphs'#2#0#4'Left'#2'L'#6'Height'#2#23#3'Top'#2#4#5'Width'#2
+'K'#0#0#12'TSpeedButton'#5'btnF5'#6'Action'#7#7'actCopy'#4'Flat'#9#9'NumGlyp'
+'hs'#2#0#4'Left'#3#151#0#6'Height'#2#23#3'Top'#2#4#5'Width'#2'K'#0#0#12'TSpe'
+'edButton'#5'btnF6'#6'Action'#7#9'actRename'#4'Flat'#9#9'NumGlyphs'#2#0#4'Le'
+'ft'#3#226#0#6'Height'#2#23#3'Top'#2#4#5'Width'#2'K'#0#0#12'TSpeedButton'#5
+'btnF7'#6'Action'#7#10'actMakeDir'#4'Flat'#9#9'NumGlyphs'#2#0#4'Left'#3'-'#1
+#6'Height'#2#23#3'Top'#2#4#5'Width'#2'K'#0#0#12'TSpeedButton'#5'btnF8'#6'Act'
+'ion'#7#9'actDelete'#4'Flat'#9#9'NumGlyphs'#2#0#4'Left'#3'x'#1#6'Height'#2#23
+#3'Top'#2#4#5'Width'#2'K'#0#0#12'TSpeedButton'#6'btnF10'#6'Action'#7#7'actEx'
+'it'#4'Flat'#9#9'NumGlyphs'#2#0#4'Left'#3#27#2#6'Height'#2#23#3'Top'#2#4#5'W'
+'idth'#2'K'#0#0#12'TSpeedButton'#5'btnF9'#6'Action'#7#11'actShowMenu'#4'Flat'
+#9#9'NumGlyphs'#2#0#4'Left'#3#192#1#6'Height'#2#22#3'Top'#2#4#5'Width'#2'Y'#0
+#0#0#9'TComboBox'#10'edtCommand'#16'AutoCompleteText'#11#22'cbactEndOfLineCo'
+'mplete'#20'cbactSearchAscending'#0#10'ItemHeight'#2#18#9'MaxLength'#2#0#9'O'
+'nKeyDown'#7#17'edtCommandKeyDown'#7'OnKeyUp'#7#15'edtCommandKeyUp'#11'Paren'
+'tCtl3D'#8#8'TabOrder'#2#1#7'TabStop'#8#7'TabStop'#8#4'Left'#2'8'#6'Height'#2
+#21#3'Top'#2#8#5'Width'#3#176#2#0#0#0#6'TPanel'#12'pnlNotebooks'#5'Align'#7#8
+'alClient'#12'ClientHeight'#3#182#0#11'ClientWidth'#3#13#2#11'FullRepaint'#8
+#8'TabOrder'#2#3#7'TabStop'#9#6'Height'#3#182#0#3'Top'#2'E'#5'Width'#3#13#2#0
+#9'TNotebook'#6'nbLeft'#5'Align'#7#6'alLeft'#17'OnCloseTabClicked'#7#23'Note'
+'BookCloseTabClicked'#7'Options'#11#19'nboShowCloseButtons'#0#4'Left'#2#1#6
+'Height'#3#180#0#3'Top'#2#1#5'Width'#3#135#1#0#0#9'TSplitter'#9'Splitter1'#6
+'Height'#3#180#0#11'ResizeStyle'#7#6'rsLine'#5'Width'#2#4#6'Cursor'#7#8'crHS'
+'plit'#4'Left'#3#136#1#6'Height'#3#180#0#3'Top'#2#1#5'Width'#2#4#0#0#9'TNote'
+'book'#7'nbRight'#5'Align'#7#8'alClient'#17'OnCloseTabClicked'#7#23'NoteBook'
+'CloseTabClicked'#7'Options'#11#19'nboShowCloseButtons'#0#4'Left'#3#140#1#6
+'Height'#3#180#0#3'Top'#2#1#5'Width'#3#128#0#0#0#0#11'TKAStoolBar'#11'MainTo'
+'olBar'#17'OnToolButtonClick'#7#26'MainToolBarToolButtonClick'#11'FlatButton'
,'s'#9#5'Align'#7#5'alTop'#12'ClientHeight'#2#23#11'ClientWidth'#3#13#2#8'Tab'
+'Order'#2#4#11'OnMouseDown'#7#20'MainToolBarMouseDown'#6'Height'#2#23#5'Widt'
+'h'#3#13#2#0#0#9'TMainMenu'#7'mnuMain'#4'left'#3#27#1#3'top'#2#8#0#9'TMenuIt'
+'em'#8'mnuFiles'#7'Caption'#6#5'Files'#0#9'TMenuItem'#12'mnuFilesLink'#6'Act'
+'ion'#7#11'actHardLink'#7'OnClick'#7#18'actHardLinkExecute'#0#0#9'TMenuItem'
+#15'mnuFilesSymLink'#6'Action'#7#10'actSymLink'#7'OnClick'#7#17'actSymLinkEx'
+'ecute'#0#0#9'TMenuItem'#7'miLine1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#14'mn'
+'uFilesAttrib'#6'Action'#7#8'actChMod'#7'OnClick'#7#15'actChModExecute'#0#0#9
+'TMenuItem'#13'mnuFilesChown'#6'Action'#7#8'actChown'#7'OnClick'#7#15'actCho'
+'wnExecute'#0#0#9'TMenuItem'#18'mnuFilesProperties'#6'Action'#7#17'actFilePr'
+'operties'#7'OnClick'#7#24'actFilePropertiesExecute'#0#0#9'TMenuItem'#13'mnu'
+'FilesSpace'#6'Action'#7#17'actCalculateSpace'#7'OnClick'#7#24'actCalculateS'
+'paceExecute'#0#0#9'TMenuItem'#14'mnuFilesCmpCnt'#6'Action'#7#18'actCompareC'
+'ontents'#7'OnClick'#7#25'actCompareContentsExecute'#0#0#9'TMenuItem'#13'miM'
+'ultiRename'#6'Action'#7#14'actMultiRename'#7'OnClick'#7#21'actMultiRenameEx'
+'ecute'#0#0#9'TMenuItem'#7'miLine2'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#13'mn'
+'uFilesSplit'#6'Action'#7#14'actFileSpliter'#7'OnClick'#7#21'actFileSpliterE'
+'xecute'#0#0#9'TMenuItem'#15'mnuFilesCombine'#6'Action'#7#13'actFileLinker'#7
+'Caption'#6#13'Combine Files'#7'OnClick'#7#20'actFileLinkerExecute'#0#0#9'TM'
+'enuItem'#7'miLine3'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#19'mnuFilesShwSysFil'
+'es'#6'Action'#7#15'actShowSysFiles'#7'OnClick'#7#22'actShowSysFilesExecute'
+#0#0#9'TMenuItem'#7'miLine4'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#6'miExit'#6
+'Action'#7#7'actExit'#7'OnClick'#7#14'actExitExecute'#0#0#0#9'TMenuItem'#7'm'
+'nuMark'#7'Caption'#6#5'&Mark'#0#9'TMenuItem'#13'mnuMarkSGroup'#6'Action'#7
+#11'actMarkPlus'#7'OnClick'#7#18'actMarkPlusExecute'#0#0#9'TMenuItem'#13'mnu'
+'MarkUGroup'#6'Action'#7#12'actMarkMinus'#7'OnClick'#7#19'actMarkMinusExecut'
+'e'#0#0#9'TMenuItem'#11'mnuMarkSAll'#6'Action'#7#14'actMarkMarkAll'#7'OnClic'
+'k'#7#21'actMarkMarkAllExecute'#0#0#9'TMenuItem'#11'mnuMarkUAll'#6'Action'#7
+#16'actMarkUnmarkAll'#7'OnClick'#7#23'actMarkUnmarkAllExecute'#0#0#9'TMenuIt'
+'em'#13'mnuMarkInvert'#6'Action'#7#13'actMarkInvert'#7'OnClick'#7#20'actMark'
+'InvertExecute'#0#0#9'TMenuItem'#7'miLine5'#7'Caption'#6#1'-'#0#0#9'TMenuIte'
+'m'#13'mnuMarkCmpDir'#7'Caption'#6#20'&Compare Directories'#7'Enabled'#8#8'S'
+'hortCut'#3'10'#0#0#0#9'TMenuItem'#6'mnuCmd'#7'Caption'#6#9'&Commands'#0#9'T'
+'MenuItem'#12'mnuCmdSearch'#6'Action'#7#9'actSearch'#7'OnClick'#7#16'actSear'
+'chExecute'#0#0#9'TMenuItem'#16'mnuCmdDirHotlist'#6'Action'#7#13'actDirHotLi'
+'st'#7'OnClick'#7#20'actDirHotListExecute'#0#0#9'TMenuItem'#7'miLine6'#7'Cap'
+'tion'#6#1'-'#0#0#9'TMenuItem'#9'miRunTerm'#6'Action'#7#10'actRunTerm'#7'OnC'
+'lick'#7#17'actRunTermExecute'#0#0#9'TMenuItem'#7'miLine9'#7'Caption'#6#1'-'
+#0#0#9'TMenuItem'#22'mnuCmdSwapSourceTarget'#7'Caption'#6#18'Source &<-> Tar'
+'get'#7'Enabled'#8#8'ShortCut'#3'U@'#0#0#9'TMenuItem'#20'mnuCmdTargetIsSourc'
+'e'#7'Caption'#6#16'Target &= Source'#7'Enabled'#8#0#0#0#9'TMenuItem'#7'mnuS'
+'how'#7'Caption'#6#5'&Show'#0#9'TMenuItem'#11'mnuShowName'#6'Action'#7#13'ac'
+'tSortByName'#7'OnClick'#7#20'actSortByNameExecute'#0#0#9'TMenuItem'#16'mnuS'
+'howExtension'#6'Action'#7#12'actSortByExt'#7'OnClick'#7#19'actSortByExtExec'
+'ute'#0#0#9'TMenuItem'#11'mnuShowSize'#6'Action'#7#13'actSortBySize'#7'OnCli'
+'ck'#7#20'actSortBySizeExecute'#0#0#9'TMenuItem'#11'mnuShowTime'#6'Action'#7
+#13'actSortByDate'#7'OnClick'#7#20'actSortByDateExecute'#0#0#9'TMenuItem'#13
+'mnuShowAttrib'#6'Action'#7#13'actSortByAttr'#7'OnClick'#7#20'actSortByAttrE'
+'xecute'#0#0#9'TMenuItem'#7'miLine7'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#14'm'
+'nuShowReverse'#6'Action'#7#15'actReverseOrder'#7'OnClick'#7#22'actReverseOr'
+'derExecute'#0#0#9'TMenuItem'#13'mnuShowReread'#6'Action'#7#10'actRefresh'#7
+'OnClick'#7#17'actRefreshExecute'#0#0#0#9'TMenuItem'#9'mnuConfig'#7'Caption'
+#6#14'C&onfiguration'#0#9'TMenuItem'#16'mnuConfigOptions'#6'Action'#7#10'act'
+'Options'#7'OnClick'#7#17'actOptionsExecute'#0#0#0#9'TMenuItem'#7'mnuHelp'#7
+'Caption'#6#5'&Help'#0#9'TMenuItem'#12'mnuHelpAbout'#6'Action'#7#8'actAbout'
+#8'ShortCut'#2'p'#7'OnClick'#7#15'actAboutExecute'#0#0#0#0#11'TActionList'#9
+'actionLst'#4'left'#3'h'#1#3'top'#2'@'#0#7'TAction'#7'actExit'#7'Caption'#6#4
+'Exit'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#14'actExitExecute'#8'Catego'
+'ry'#6#4'File'#0#0#7'TAction'#7'actView'#7'Caption'#6#7'View F3'#8'HelpType'
+#7#9'htKeyword'#9'OnExecute'#7#14'actViewExecute'#8'ShortCut'#3'2'#16#8'Cate'
+'gory'#6#7'Classic'#0#0#7'TAction'#7'actEdit'#7'Caption'#6#7'Edit F4'#8'Help'
+'Type'#7#9'htKeyword'#9'OnExecute'#7#14'actEditExecute'#8'ShortCut'#3'3'#16#8
+'Category'#6#7'Classic'#0#0#7'TAction'#7'actCopy'#7'Caption'#6#7'Copy F5'#8
+'HelpType'#7#9'htKeyword'#9'OnExecute'#7#14'actCopyExecute'#8'ShortCut'#3'4'
,#16#8'Category'#6#7'Classic'#0#0#7'TAction'#9'actRename'#7'Caption'#6#9'Rena'
+'me F6'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#16'actRenameExecute'#8'Sho'
+'rtCut'#3'5'#16#8'Category'#6#7'Classic'#0#0#7'TAction'#10'actMakeDir'#7'Cap'
+'tion'#6#10'MakeDir F7'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#17'actMake'
+'DirExecute'#8'ShortCut'#3'6'#16#8'Category'#6#7'Classic'#0#0#7'TAction'#9'a'
+'ctDelete'#7'Caption'#6#9'Delete F8'#8'HelpType'#7#9'htKeyword'#9'OnExecute'
+#7#16'actDeleteExecute'#8'ShortCut'#3'7'#16#8'Category'#6#7'Classic'#0#0#7'T'
+'Action'#8'actAbout'#7'Caption'#6#5'About'#8'HelpType'#7#9'htKeyword'#9'OnEx'
+'ecute'#7#15'actAboutExecute'#8'ShortCut'#3'0'#16#8'Category'#6#4'Help'#0#0#7
+'TAction'#15'actShowSysFiles'#7'Caption'#6#17'Show System Files'#7'Checked'#9
+#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#22'actShowSysFilesExecute'#8'Cate'
+'gory'#6#4'File'#0#0#7'TAction'#10'actOptions'#7'Caption'#6#10'Options...'#8
+'HelpType'#7#9'htKeyword'#9'OnExecute'#7#17'actOptionsExecute'#8'Category'#6
+#6'Config'#0#0#7'TAction'#18'actCompareContents'#7'Caption'#6#20'Compare by '
+'&Contents'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#25'actCompareContentsE'
+'xecute'#8'Category'#6#4'File'#0#0#7'TAction'#11'actShowMenu'#7'Caption'#6#7
+'Menu F9'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#18'actShowMenuExecute'#8
+'ShortCut'#3'8'#16#8'Category'#6#7'Classic'#0#0#7'TAction'#10'actRefresh'#7
+'Caption'#6#8'&Refresh'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#17'actRefr'
+'eshExecute'#8'ShortCut'#3'R@'#8'Category'#6#4'Show'#0#0#7'TAction'#9'actSea'
+'rch'#7'Caption'#6#7'&Search'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#16'a'
+'ctSearchExecute'#8'ShortCut'#3'6P'#8'Category'#6#8'Commands'#0#0#7'TAction'
+#13'actDirHotList'#7'Caption'#6#18'Directory &hotlist'#8'HelpType'#7#9'htKey'
+'word'#9'OnExecute'#7#20'actDirHotListExecute'#8'ShortCut'#3'D@'#8'Category'
+#6#8'Commands'#0#0#7'TAction'#14'actMarkMarkAll'#7'Caption'#6#11'&Select All'
+#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#21'actMarkMarkAllExecute'#8'Categ'
+'ory'#6#4'Mark'#0#0#7'TAction'#13'actMarkInvert'#7'Caption'#6#17'Invert Sele'
+'ctions'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#20'actMarkInvertExecute'#8
+'ShortCut'#2'*'#8'Category'#6#4'Mark'#0#0#7'TAction'#16'actMarkUnmarkAll'#7
+'Caption'#6#12'Unselect All'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#23'ac'
+'tMarkUnmarkAllExecute'#8'Category'#6#4'Mark'#0#0#7'TAction'#10'actDelete2'#7
+'Caption'#6#10'actDelete2'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#17'actD'
+'elete2Execute'#8'ShortCut'#3#7#16#8'Category'#6#7'Classic'#0#0#7'TAction'#16
+'actPathToCmdLine'#7'Caption'#6#16'actPathToCmdLine'#8'HelpType'#7#9'htKeywo'
+'rd'#9'OnExecute'#7#23'actPathToCmdLineExecute'#8'ShortCut'#3'P@'#0#0#7'TAct'
+'ion'#11'actMarkPlus'#7'Caption'#6#14'Select a group'#8'HelpType'#7#9'htKeyw'
+'ord'#9'OnExecute'#7#18'actMarkPlusExecute'#8'Category'#6#4'Mark'#0#0#7'TAct'
+'ion'#12'actMarkMinus'#7'Caption'#6#16'Unselect a group'#8'HelpType'#7#9'htK'
+'eyword'#9'OnExecute'#7#19'actMarkMinusExecute'#8'Category'#6#4'Mark'#0#0#7
+'TAction'#8'actChMod'#7'Caption'#6#17'Change Attributes'#8'HelpType'#7#9'htK'
+'eyword'#9'OnExecute'#7#15'actChModExecute'#8'Category'#6#4'File'#0#0#7'TAct'
+'ion'#10'actSymLink'#7'Caption'#6#17'Create symlink...'#8'HelpType'#7#9'htKe'
+'yword'#9'OnExecute'#7#17'actSymLinkExecute'#8'Category'#6#4'File'#0#0#7'TAc'
+'tion'#11'actHardLink'#7'Caption'#6#14'Create link...'#8'HelpType'#7#9'htKey'
+'word'#9'OnExecute'#7#18'actHardLinkExecute'#8'Category'#6#4'File'#0#0#7'TAc'
+'tion'#15'actReverseOrder'#7'Caption'#6#13'Reverse order'#8'HelpType'#7#9'ht'
+'Keyword'#9'OnExecute'#7#22'actReverseOrderExecute'#8'Category'#6#4'Show'#0#0
+#7'TAction'#13'actSortByName'#7'Caption'#6#4'Name'#8'HelpType'#7#9'htKeyword'
+#9'OnExecute'#7#20'actSortByNameExecute'#8'Category'#6#4'Show'#0#0#7'TAction'
+#12'actSortByExt'#7'Caption'#6#9'Extension'#8'HelpType'#7#9'htKeyword'#9'OnE'
+'xecute'#7#19'actSortByExtExecute'#8'Category'#6#4'Show'#0#0#7'TAction'#13'a'
+'ctSortBySize'#7'Caption'#6#4'Size'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7
+#20'actSortBySizeExecute'#8'Category'#6#4'Show'#0#0#7'TAction'#13'actSortByD'
+'ate'#7'Caption'#6#4'Date'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#20'actS'
+'ortByDateExecute'#8'Category'#6#4'Show'#0#0#7'TAction'#13'actSortByAttr'#7
+'Caption'#6#6'Attrib'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#20'actSortBy'
+'AttrExecute'#8'Category'#6#4'Show'#0#0#7'TAction'#14'actMultiRename'#7'Capt'
+'ion'#6#17'Multi Rename Tool'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#21'a'
+'ctMultiRenameExecute'#8'Category'#6#4'File'#0#0#7'TAction'#10'actShiftF5'#7
+'Caption'#6#10'actShiftF5'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#17'actS'
+'hiftF5Execute'#8'ShortCut'#3'40'#8'Category'#6#8'Commands'#0#0#7'TAction'#10
+'actShiftF6'#7'Caption'#6#10'actShiftF6'#8'HelpType'#7#9'htKeyword'#9'OnExec'
+'ute'#7#17'actShiftF6Execute'#8'ShortCut'#3'50'#8'Category'#6#8'Commands'#0#0
+#7'TAction'#10'actShiftF4'#7'Caption'#6#10'actShiftF4'#8'HelpType'#7#9'htKey'
,'word'#9'OnExecute'#7#17'actShiftF4Execute'#8'Category'#6#8'Commands'#0#0#7
+'TAction'#13'actDirHistory'#7'Caption'#6#13'actDirHistory'#8'HelpType'#7#9'h'
+'tKeyword'#9'OnExecute'#7#20'actDirHistoryExecute'#8'ShortCut'#3'H@'#8'Categ'
+'ory'#6#8'Commands'#0#0#7'TAction'#9'actCtrlF8'#7'Caption'#6#9'actCtrlF8'#8
+'HelpType'#7#9'htKeyword'#9'OnExecute'#7#16'actCtrlF8Execute'#8'ShortCut'#3
+'7P'#8'Category'#6#8'Commands'#0#0#7'TAction'#10'actRunTerm'#7'Caption'#6#8
+'Run Term'#8'HelpType'#7#9'htKeyword'#9'OnExecute'#7#17'actRunTermExecute'#8
+'ShortCut'#3'T@'#8'Category'#6#8'Commands'#0#0#7'TAction'#17'actCalculateSpa'
+'ce'#7'Caption'#6#28'Calculate &Occupied Space...'#8'HelpType'#7#9'htKeyword'
+#9'OnExecute'#7#24'actCalculateSpaceExecute'#8'Category'#6#4'File'#0#0#7'TAc'
+'tion'#17'actFileProperties'#7'Caption'#6#20'Show File Properties'#8'HelpTyp'
+'e'#7#9'htKeyword'#9'OnExecute'#7#24'actFilePropertiesExecute'#8'Category'#6
+#4'File'#0#0#7'TAction'#8'actChown'#7'Caption'#6#5'Chown'#8'HelpType'#7#9'ht'
+'Keyword'#9'OnExecute'#7#15'actChownExecute'#8'Category'#6#4'File'#0#0#7'TAc'
+'tion'#13'actFileLinker'#7'Caption'#6#10'Link Files'#8'HelpType'#7#9'htKeywo'
+'rd'#9'OnExecute'#7#20'actFileLinkerExecute'#8'Category'#6#4'File'#0#0#7'TAc'
+'tion'#14'actFileSpliter'#7'Caption'#6#10'Split File'#8'HelpType'#7#9'htKeyw'
+'ord'#9'OnExecute'#7#21'actFileSpliterExecute'#8'Category'#6#4'File'#0#0#7'T'
+'Action'#9'actNewTab'#7'Caption'#6#9'actNewTab'#8'HelpType'#7#9'htKeyword'#9
+'OnExecute'#7#16'actNewTabExecute'#8'Category'#6#4'Tabs'#0#0#7'TAction'#12'a'
+'ctRemoveTab'#7'Caption'#6#12'actRemoveTab'#8'HelpType'#7#9'htKeyword'#9'OnE'
+'xecute'#7#19'actRemoveTabExecute'#8'Category'#6#4'Tabs'#0#0#0#10'TPopupMenu'
+#9'pmHotList'#4'left'#3#152#0#3'top'#3#136#0#0#9'TMenuItem'#9'MenuItem3'#7'C'
+'aption'#6#9'New Item1'#0#0#0#10'TPopupMenu'#10'pmFileList'#7'OnPopup'#7#15
+'pmFileListPopup'#4'left'#3#216#0#3'top'#3#136#0#0#9'TMenuItem'#5'file1'#7'C'
+'aption'#6#4'file'#0#0#0#10'TPopupMenu'#12'pmDirHistory'#9'AutoPopup'#8#4'le'
+'ft'#3#184#0#3'top'#3#136#0#0#9'TMenuItem'#9'MenuItem4'#7'Caption'#6#9'New I'
+'tem1'#0#0#0#10'TPopupMenu'#9'pmToolBar'#3'Tag'#2#255#4'left'#2'x'#3'top'#3
+#136#0#0#9'TMenuItem'#6'tbEdit'#7'Caption'#6#4'Edit'#7'OnClick'#7#11'tbEditC'
+'lick'#0#0#9'TMenuItem'#8'tbDelete'#7'Caption'#6#6'Delete'#7'OnClick'#7#11'D'
+'eleteClick'#0#0#0#0
]);

21
fMkDir.lrs Normal file
View file

@ -0,0 +1,21 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmMkDir','FORMDATA',[
'TPF0'#9'TfrmMkDir'#8'frmMkDir'#13'ActiveControl'#7#8'edtMkDir'#7'Caption'#6#8
+'frmMkDir'#12'ClientHeight'#2'['#11'ClientWidth'#3'P'#1#5'Color'#7#12'clBack'
+'ground'#10'KeyPreview'#9#10'OnKeyPress'#7#12'FormKeyPress'#13'PixelsPerInch'
+#2'N'#8'Position'#7#14'poScreenCenter'#10'TextHeight'#2#16#18'HorzScrollBar.'
+'Page'#3'O'#1#19'HorzScrollBar.Range'#3'I'#1#18'VertScrollBar.Page'#2'Z'#19
+'VertScrollBar.Range'#2'Y'#4'Left'#3#252#1#6'Height'#2'['#3'Top'#3#130#1#5'W'
+'idth'#3'P'#1#0#6'TLabel'#10'lblMakeDir'#7'Caption'#6#10'lblMakeDir'#5'Color'
+#7#6'clNone'#11'ParentColor'#8#4'Left'#2#8#6'Height'#2#13#3'Top'#2#8#5'Width'
+#2'='#0#0#5'TEdit'#8'edtMkDir'#8'TabOrder'#2#0#4'Left'#2#8#6'Height'#2#24#3
+'Top'#2' '#5'Width'#3'A'#1#0#0#7'TBitBtn'#5'btnOK'#7'Anchors'#11#5'akTop'#7
+'akRight'#0#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&OK'#7'Default'
+#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#1#4
+'Left'#3#167#0#6'Height'#2#23#3'Top'#2'@'#5'Width'#2'K'#0#0#7'TBitBtn'#9'btn'
+'Cancel'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2
+#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2
+#2#9'NumGlyphs'#2#0#8'TabOrder'#2#2#4'Left'#3#255#0#6'Height'#2#23#3'Top'#2
+'@'#5'Width'#2'K'#0#0#0
]);

27
fMoveDlg.lrs Normal file
View file

@ -0,0 +1,27 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmMoveDlg','FORMDATA',[
'TPF0'#11'TfrmMoveDlg'#10'frmMoveDlg'#13'ActiveControl'#7#5'btnOK'#7'Caption'
+#6#10'frmMoveDlg'#12'ClientHeight'#3#147#0#11'ClientWidth'#3'Y'#1#10'KeyPrev'
+'iew'#9#10'OnKeyPress'#7#18'frmMoveDlgKeyPress'#6'OnShow'#7#14'frmMoveDlgSho'
+'w'#13'PixelsPerInch'#2'N'#8'Position'#7#14'poScreenCenter'#10'TextHeight'#2
+#16#18'HorzScrollBar.Page'#3'X'#1#19'HorzScrollBar.Range'#3'Q'#1#18'VertScro'
+'llBar.Page'#3#146#0#19'VertScrollBar.Range'#3#145#0#4'Left'#3#191#1#6'Heigh'
+'t'#3#147#0#3'Top'#3'X'#1#5'Width'#3'Y'#1#0#6'TLabel'#10'lblMoveSrc'#7'Capti'
+'on'#6#10'lblMoveSrc'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#8#6'H'
+'eight'#2#13#3'Top'#2#8#5'Width'#2'A'#0#0#6'TLabel'#11'lblFileType'#7'Captio'
+'n'#6#11'lblFileType'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#8#6'H'
+'eight'#2#13#3'Top'#2'@'#5'Width'#2'?'#0#0#7'TBitBtn'#5'btnOK'#7'Anchors'#11
+#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&OK'
+#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOr'
+'der'#2#0#4'Left'#3#170#0#6'Height'#2#23#3'Top'#2'x'#5'Width'#2'K'#0#0#7'TBi'
+'tBtn'#9'btnCancel'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.Inn'
+'erBorder'#2#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'M'
+'odalResult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#1#4'Left'#3#4#1#6'Height'#2
+#23#3'Top'#2'x'#5'Width'#2'K'#0#0#5'TEdit'#6'edtDst'#8'TabOrder'#2#2#4'Text'
+#6#6'edtDst'#4'Left'#2#8#6'Height'#2#24#3'Top'#2' '#5'Width'#3'I'#1#0#0#9'TC'
+'omboBox'#11'cmbFileType'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'
+#20'cbactSearchAscending'#0#7'Enabled'#8#10'ItemHeight'#2#18#9'MaxLength'#2#0
+#11'ParentCtl3D'#8#8'TabOrder'#2#3#4'Left'#2#8#6'Height'#2#24#3'Top'#2'X'#5
+'Width'#3'I'#1#0#0#0
]);

26
fMsg.lfm Normal file
View file

@ -0,0 +1,26 @@
object frmMsg: TfrmMsg
Caption = 'frmMsg'
ClientHeight = 254
ClientWidth = 426
KeyPreview = True
OnCreate = FormCreate
OnKeyPress = FormKeyPress
OnShow = frmMsgShow
PixelsPerInch = 96
TextHeight = 16
HorzScrollBar.Page = 425
VertScrollBar.Page = 253
Left = 324
Height = 254
Top = 342
Width = 426
object lblMsg: TLabel
Caption = 'lblMsg'
Color = clNone
ParentColor = False
Left = 32
Height = 14
Top = 16
Width = 30
end
end

11
fMsg.lrs Normal file
View file

@ -0,0 +1,11 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmMsg','FORMDATA',[
'TPF0'#7'TfrmMsg'#6'frmMsg'#7'Caption'#6#6'frmMsg'#12'ClientHeight'#3#254#0#11
+'ClientWidth'#3#170#1#10'KeyPreview'#9#8'OnCreate'#7#10'FormCreate'#10'OnKey'
+'Press'#7#12'FormKeyPress'#6'OnShow'#7#10'frmMsgShow'#13'PixelsPerInch'#2'`'
+#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3#169#1#18'VertScrollBar.Page'#3
+#253#0#4'Left'#3'D'#1#6'Height'#3#254#0#3'Top'#3'V'#1#5'Width'#3#170#1#0#6'T'
+'Label'#6'lblMsg'#7'Caption'#6#6'lblMsg'#5'Color'#7#6'clNone'#11'ParentColor'
+#8#4'Left'#2' '#6'Height'#2#14#3'Top'#2#16#5'Width'#2#30#0#0#0
]);

79
fMsg.pas Normal file
View file

@ -0,0 +1,79 @@
unit fMsg;
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
const
cButtonWith=90;
cButtonSpace=15;
type
TMyMsgResult=(mmrOK, mmrNo, mmrYes, mmrCancel, mmrNone,
mmrAppend, mmrRewrite, mmrRewriteAll, mmrSkip, mmrSkipAll, mmrAll );
TMyMsgButton=(msmbOK, msmbNO, msmbYes, msmbCancel, msmbNone,
msmbAppend, msmbRewrite, msmbRewriteAll, msmbSkip, msmbSkipAll, msmbAll);
TfrmMsg = class(TForm)
lblMsg: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure frmMsgShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
Escape :Integer;
iSelected:Integer;
procedure ButtonClick(Sender:TObject);
end;
implementation
procedure TfrmMsg.FormCreate(Sender: TObject);
begin
iSelected:=-1;
end;
procedure TfrmMsg.ButtonClick(Sender:TObject);
begin
iSelected:=(Sender as TButton).Tag;
Close;
end;
procedure TfrmMsg.FormKeyPress(Sender: TObject; var Key: Char);
begin
if (Key=#27) and (Escape>=0) then
begin
iSelected:=Escape;
Close;
end;
end;
procedure TfrmMsg.frmMsgShow(Sender: TObject);
var
x:Integer;
iWidth:Integer;
begin
for x:=0 to ComponentCount-1 do
begin
if Components[x] is TButton then
begin
with Components[x] as TButton do
begin
if Tag=0 then SetFocus;
Continue;
end;
end;
end;
end;
initialization
{$I fMsg.lrs}
end.

98
fMultiRename.lrs Normal file
View file

@ -0,0 +1,98 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmMultiRename','FORMDATA',[
'TPF0'#15'TfrmMultiRename'#14'frmMultiRename'#13'ActiveControl'#7#6'edName'#7
+'Caption'#6#11'MultiRename'#12'ClientHeight'#3'b'#1#11'ClientWidth'#3'`'#2#13
+'PixelsPerInch'#2'`'#8'Position'#7#16'poMainFormCenter'#10'TextHeight'#2#16
+#18'HorzScrollBar.Page'#3'_'#2#19'HorzScrollBar.Range'#3'['#2#18'VertScrollB'
+'ar.Page'#3'a'#1#19'VertScrollBar.Range'#3'Y'#1#4'Left'#3''''#1#6'Height'#3
+'b'#1#3'Top'#3#24#2#5'Width'#3'`'#2#0#9'TGroupBox'#7'gbMaska'#7'Caption'#6#4
+'Mask'#12'ClientHeight'#2'W'#11'ClientWidth'#3#172#0#11'ParentCtl3D'#8#8'Tab'
+'Order'#2#0#6'Height'#2'i'#3'Top'#3#208#0#5'Width'#3#176#0#0#6'TLabel'#6'lbN'
+'ame'#7'Caption'#6#9'File Name'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Lef'
+'t'#2#6#6'Height'#2#14#5'Width'#2'/'#0#0#6'TLabel'#5'lbExt'#7'Caption'#6#9'E'
+'xtension'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6'Height'#2#14
+#3'Top'#2')'#5'Width'#2'0'#0#0#5'TEdit'#6'edName'#8'OnChange'#7#14'cmbxFontC'
+'hange'#8'TabOrder'#2#0#4'Left'#2#6#6'Height'#2#20#3'Top'#2#17#5'Width'#3#136
+#0#0#0#5'TEdit'#5'edExt'#8'OnChange'#7#14'cmbxFontChange'#8'TabOrder'#2#2#4
+'Left'#2#6#6'Height'#2#20#3'Top'#2'9'#5'Width'#3#136#0#3'Tag'#2#25#0#0#7'TBu'
+'tton'#11'btnNameMenu'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'...'
+#7'OnClick'#7#16'btnNameMenuClick'#8'TabOrder'#2#1#4'Left'#3#150#0#6'Height'
+#2#19#3'Top'#2#17#5'Width'#2#16#0#0#7'TButton'#10'btnExtMenu'#25'BorderSpaci'
+'ng.InnerBorder'#2#2#7'Caption'#6#3'...'#7'OnClick'#7#15'btnExtMenuClick'#8
+'TabOrder'#2#3#4'Left'#3#150#0#6'Height'#2#20#3'Top'#2'9'#5'Width'#2#16#0#0#0
+#9'TGroupBox'#13'gbFindReplace'#7'Caption'#6#15'Find && Replace'#12'ClientHe'
+'ight'#2'W'#11'ClientWidth'#3#133#0#11'ParentCtl3D'#8#8'TabOrder'#2#1#4'Left'
+#3#176#0#6'Height'#2'i'#3'Top'#3#208#0#5'Width'#3#137#0#0#6'TLabel'#6'lbFind'
+#7'Caption'#6#7'Find...'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6
+'Height'#2#14#5'Width'#2'!'#0#0#6'TLabel'#9'lbReplace'#7'Caption'#6#10'Repla'
+'ce...'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6'Height'#2#14#3
+'Top'#2')'#5'Width'#2'3'#0#0#5'TEdit'#6'edFind'#8'OnChange'#7#14'cmbxFontCha'
+'nge'#8'TabOrder'#2#0#4'Left'#2#6#6'Height'#2#20#3'Top'#2#17#5'Width'#2'x'#0
+#0#5'TEdit'#9'edReplace'#8'OnChange'#7#14'cmbxFontChange'#8'TabOrder'#2#1#4
+'Left'#2#6#6'Height'#2#20#3'Top'#2'9'#5'Width'#2'x'#0#0#0#9'TGroupBox'#11'gb'
+'FontStyle'#7'Caption'#6#15'File Name Style'#12'ClientHeight'#2#31#11'Client'
+'Width'#3#133#0#11'ParentCtl3D'#8#8'TabOrder'#2#2#4'Left'#3#208#1#6'Height'#2
+'1'#3'Top'#3#208#0#5'Width'#3#137#0#0#9'TComboBox'#8'cmbxFont'#16'AutoComple'
+'teText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10'ItemHei'
+'ght'#2#18#9'ItemIndex'#2#0#13'Items.Strings'#1#6#9'no change'#6#9'uppercase'
+#6#9'lowercase'#6#14'first char big'#0#9'MaxLength'#2#0#8'OnChange'#7#14'cmb'
+'xFontChange'#11'ParentCtl3D'#8#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#0
+#4'Text'#6#9'no change'#4'Left'#2#6#6'Height'#2#21#3'Top'#2#1#5'Width'#2'x'#0
+#0#0#9'TGroupBox'#9'gbCounter'#7'Caption'#6#7'Counter'#12'ClientHeight'#2'W'
+#11'ClientWidth'#3#133#0#11'ParentCtl3D'#8#8'TabOrder'#2#3#4'Left'#3'@'#1#6
+'Height'#2'i'#3'Top'#3#208#0#5'Width'#3#137#0#0#6'TLabel'#6'lbStNb'#7'Captio'
+'n'#6#12'Start Number'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6
+'Height'#2#14#3'Top'#2#1#5'Width'#2'A'#0#0#6'TLabel'#10'lbInterval'#7'Captio'
+'n'#6#8'Interval'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6'Heigh'
+'t'#2#14#3'Top'#2'9'#5'Width'#2''''#0#0#6'TLabel'#7'lbWidth'#7'Caption'#6#5
+'Width'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6'Height'#2#14#3
+'Top'#2#28#5'Width'#2#29#0#0#5'TEdit'#5'edPoc'#9'MaxLength'#2#5#8'OnChange'#7
+#11'edPocChange'#8'TabOrder'#2#0#4'Text'#6#1'1'#4'Left'#2'P'#6'Height'#2#20#3
+'Top'#2#1#5'Width'#2'0'#0#0#5'TEdit'#10'edInterval'#9'MaxLength'#2#5#8'OnCha'
+'nge'#7#16'edIntervalChange'#8'TabOrder'#2#1#4'Text'#6#1'1'#4'Left'#2'P'#6'H'
+'eight'#2#20#3'Top'#2'6'#5'Width'#2'0'#0#0#9'TComboBox'#9'cmbxWidth'#16'Auto'
+'CompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10'I'
+'temHeight'#2#18#9'ItemIndex'#2#0#13'Items.Strings'#1#6#2'01'#6#2'02'#6#2'03'
+#6#2'04'#6#2'05'#6#2'06'#6#2'07'#6#2'08'#6#2'09'#6#2'10'#0#9'MaxLength'#2#0#8
+'OnChange'#7#14'cmbxFontChange'#11'ParentCtl3D'#8#5'Style'#7#14'csDropDownLi'
+'st'#8'TabOrder'#2#2#4'Text'#6#2'01'#4'Left'#2'P'#6'Height'#2#21#3'Top'#2#25
+#5'Width'#2'2'#0#0#0#7'TButton'#5'btnOK'#25'BorderSpacing.InnerBorder'#2#2#7
+'Caption'#6#2'OK'#7'OnClick'#7#10'btnOKClick'#8'TabOrder'#2#4#4'Left'#3'@'#1
+#6'Height'#2#25#3'Top'#3'@'#1#5'Width'#2'A'#0#0#7'TButton'#9'btnCancel'#25'B'
+'orderSpacing.InnerBorder'#2#2#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8
+'TabOrder'#2#5#4'Left'#3#136#1#6'Height'#2#25#3'Top'#3'@'#1#5'Width'#2'A'#0#0
+#9'TGroupBox'#5'gbLog'#7'Caption'#6#10'Log Result'#12'ClientHeight'#2'@'#11
+'ClientWidth'#3#133#0#11'ParentCtl3D'#8#8'TabOrder'#2#6#4'Left'#3#208#1#6'He'
+'ight'#2'R'#3'Top'#3#7#1#5'Width'#3#137#0#0#5'TEdit'#6'edFile'#8'TabOrder'#2
,#0#4'Left'#2#6#6'Height'#2#20#3'Top'#2#16#5'Width'#2'x'#0#0#9'TCheckBox'#5'c'
+'bLog'#11'AllowGrayed'#9#7'Caption'#6#3'Log'#7'OnClick'#7#10'cbLogClick'#8'T'
+'abOrder'#2#1#4'Left'#2#8#6'Height'#2#13#3'Top'#2'('#5'Width'#2'&'#0#0#0#7'T'
+'Button'#10'btnRestore'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#11'Re'
+'store All'#7'OnClick'#7#15'btnRestoreClick'#8'TabOrder'#2#7#4'Left'#2#8#6'H'
+'eight'#2#25#3'Top'#3'>'#1#5'Width'#3#136#0#0#0#9'TListView'#8'lsvwFile'#7'C'
+'olumns'#14#1#8'AutoSize'#9#7'Caption'#6#13'Old File Name'#5'Width'#3#190#0#0
+#1#8'AutoSize'#9#7'Caption'#6#13'New File Name'#5'Width'#3#190#0#0#1#8'AutoS'
+'ize'#9#7'Caption'#6#9'File Path'#5'Width'#3#190#0#0#0#8'TabOrder'#2#8#9'Vie'
+'wStyle'#7#8'vsReport'#4'Left'#2#2#6'Height'#3#201#0#3'Top'#2#2#5'Width'#3'['
+#2#0#0#10'TPopupMenu'#10'ppNameMenu'#9'AutoPopup'#8#7'OnPopup'#7#15'ppNameMe'
+'nuPopup'#4'left'#3'@'#1#3'top'#3#192#0#0#9'TMenuItem'#10'miNextName'#7'Capt'
+'ion'#6#7'Name...'#0#9'TMenuItem'#6'miName'#7'Caption'#6#6'[N]ame'#7'OnClick'
+#7#9'NameClick'#0#0#9'TMenuItem'#7'miNameX'#7'Caption'#6#7'[Nx]ame'#7'OnClic'
+'k'#7#10'NameXClick'#0#0#9'TMenuItem'#8'miNameXX'#7'Caption'#6#9'[Nx:x]ame'#7
+'OnClick'#7#11'NameXXClick'#0#0#0#9'TMenuItem'#2'N1'#7'Caption'#6#1'-'#0#0#9
+'TMenuItem'#15'miNextExtension'#7'Caption'#6#12'Extension...'#0#9'TMenuItem'
+#9'Extension'#7'Caption'#6#11'[E]xtension'#7'OnClick'#7#14'ExtensionClick'#0
+#0#9'TMenuItem'#12'miExtensionX'#7'Caption'#6#12'[Ex]xtension'#7'OnClick'#7
+#15'ExtensionXClick'#0#0#9'TMenuItem'#13'miExtensionXX'#7'Caption'#6#14'[Ex:'
+'x]xtension'#7'OnClick'#7#16'ExtensionXXClick'#0#0#0#9'TMenuItem'#2'N2'#7'Ca'
+'ption'#6#1'-'#0#0#9'TMenuItem'#9'miCounter'#7'Caption'#6#9'[C]ounter'#7'OnC'
+'lick'#7#12'CounterClick'#0#0#9'TMenuItem'#2'N3'#7'Caption'#6#1'-'#0#0#9'TMe'
+'nuItem'#6'miNext'#7'Caption'#6#7'Time...'#0#9'TMenuItem'#6'miYear'#7'Captio'
+'n'#6#6'[Y]ear'#7'Enabled'#8#0#0#9'TMenuItem'#7'miMonth'#7'Caption'#6#7'[Mo]'
+'nth'#7'Enabled'#8#0#0#9'TMenuItem'#5'miDay'#7'Caption'#6#5'[D]ay'#7'Enabled'
+#8#0#0#9'TMenuItem'#2'N4'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#6'miHour'#7'Cap'
+'tion'#6#6'[H]our'#7'Enabled'#8#0#0#9'TMenuItem'#8'miMinute'#7'Caption'#6#8
+'[Mi]nute'#7'Enabled'#8#0#0#9'TMenuItem'#8'miSecond'#7'Caption'#6#8'[S]econd'
+#7'Enabled'#8#0#0#0#0#0
]);

102
fOptions.lrs Normal file
View file

@ -0,0 +1,102 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmOptions','FORMDATA',[
'TPF0'#11'TfrmOptions'#10'frmOptions'#13'ActiveControl'#7#12'PageControl1'#11
+'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bsSin'
+'gle'#7'Caption'#6#7'Options'#12'ClientHeight'#3'8'#1#11'ClientWidth'#3#198#1
+#8'OnCreate'#7#10'FormCreate'#13'PixelsPerInch'#2'`'#8'Position'#7#16'poMain'
+'FormCenter'#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3#197#1#18'VertScrol'
+'lBar.Page'#3'7'#1#19'VertScrollBar.Range'#2')'#4'Left'#3'9'#1#6'Height'#3'8'
+#1#3'Top'#3#160#1#5'Width'#3#198#1#0#12'TPageControl'#12'PageControl1'#10'Ac'
+'tivePage'#7#7'tsFonts'#5'Align'#7#8'alClient'#8'TabIndex'#2#3#8'TabOrder'#2
+#0#6'Height'#3#16#1#5'Width'#3#198#1#0#9'TTabSheet'#5'tsLng'#7'Caption'#6#8
+'Language'#12'ClientHeight'#3#246#0#11'ClientWidth'#3#190#1#6'Height'#3#246#0
+#5'Width'#3#190#1#0#8'TListBox'#7'lngList'#5'Align'#7#8'alClient'#8'TabOrder'
+#2#0#8'TopIndex'#2#255#6'Height'#3#242#0#5'Width'#3#194#1#0#0#0#9'TTabSheet'
+#7'tsBehav'#7'Caption'#6#9'Behaviour'#12'ClientHeight'#3#246#0#11'ClientWidt'
+'h'#3#190#1#10'ImageIndex'#2#1#6'Height'#3#246#0#5'Width'#3#190#1#0#6'TLabel'
+#7'lblTerm'#7'Caption'#6#9'Terminal:'#5'Color'#7#6'clNone'#11'ParentColor'#8
+#4'Left'#2#8#6'Height'#2#13#3'Top'#2#16#5'Width'#2'3'#0#0#6'TLabel'#10'lblRu'
+'nTerm'#7'Caption'#6#13'Run terminal:'#5'Color'#7#6'clNone'#11'ParentColor'#8
+#4'Left'#2#8#6'Height'#2#13#3'Top'#2'0'#5'Width'#2'I'#0#0#5'TEdit'#7'edtTerm'
+#8'TabOrder'#2#0#4'Text'#6'%/usr/X11R6/bin/xterm -e bash -i -c %s'#4'Left'#2
+'`'#6'Height'#2#24#3'Top'#2#8#5'Width'#3'9'#1#0#0#9'TGroupBox'#2'gb'#12'Clie'
+'ntHeight'#3#148#0#11'ClientWidth'#3#225#0#11'ParentCtl3D'#8#8'TabOrder'#2#2
+#4'Left'#2#8#6'Height'#3#148#0#3'Top'#2'P'#5'Width'#3#225#0#0#9'TCheckBox'#11
+'cbDirSelect'#11'AllowGrayed'#9#7'Caption'#6#11'cbDirSelect'#8'TabOrder'#2#0
+#4'Left'#2#8#6'Height'#2#24#3'Top'#2#253#5'Width'#2'\'#0#0#9'TCheckBox'#19'c'
+'bCaseSensitiveSort'#11'AllowGrayed'#9#7'Caption'#6#19'cbCaseSensitiveSort'#8
+'TabOrder'#2#1#4'Left'#2#8#6'Height'#2#24#3'Top'#2'-'#5'Width'#3#143#0#0#0#9
+'TCheckBox'#10'cbLynxLike'#11'AllowGrayed'#9#7'Caption'#6#10'cbLynxLike'#8'T'
+'abOrder'#2#2#4'Left'#2#8#6'Height'#2#24#3'Top'#2#21#5'Width'#2'['#0#0#9'TCh'
+'eckBox'#21'cbShortFileSizeFormat'#11'AllowGrayed'#9#7'Caption'#6#21'cbShort'
+'FileSizeFormat'#8'TabOrder'#2#3#4'Left'#2#8#6'Height'#2#24#3'Top'#2'E'#5'Wi'
+'dth'#3#153#0#0#0#9'TCheckBox'#13'cbSeparateExt'#11'AllowGrayed'#9#7'Caption'
+#6#13'cbSeparateExt'#8'TabOrder'#2#4#4'Left'#2#8#6'Height'#2#24#3'Top'#2'e'#5
+'Width'#2'l'#0#0#0#5'TEdit'#10'edtRunTerm'#8'TabOrder'#2#1#4'Text'#6#20'/usr'
+'/X11R6/bin/xterm'#4'Left'#2'`'#6'Height'#2#24#3'Top'#2'('#5'Width'#3'9'#1#0
+#0#0#9'TTabSheet'#7'tsTools'#7'Caption'#6#5'Tools'#12'ClientHeight'#3#246#0
+#11'ClientWidth'#3#190#1#10'ImageIndex'#2#2#6'Height'#3#246#0#5'Width'#3#190
+#1#0#9'TCheckBox'#11'cbExtEditor'#11'AllowGrayed'#9#7'Caption'#6#11'cbExtEdi'
+'tor'#7'OnClick'#7#16'cbExtEditorClick'#8'TabOrder'#2#0#4'Left'#2#8#6'Height'
+#2#24#5'Width'#2'Z'#0#0#5'TEdit'#12'edtExtEditor'#8'TabOrder'#2#1#4'Text'#6
+#10'gEdit "%s"'#4'Left'#2#24#6'Height'#2#24#3'Top'#2' '#5'Width'#3'9'#1#0#0#9
+'TCheckBox'#11'cbExtDiffer'#11'AllowGrayed'#9#7'Caption'#6#11'cbExtDiffer'#7
+'OnClick'#7#16'cbExtDifferClick'#8'TabOrder'#2#2#4'Left'#2#8#6'Height'#2#24#3
+'Top'#2'8'#5'Width'#2'W'#0#0#5'TEdit'#12'edtExtDiffer'#8'TabOrder'#2#3#4'Tex'
+'t'#6#18'gtk-diff "%s" "%s"'#4'Left'#2#24#6'Height'#2#24#3'Top'#2'X'#5'Width'
+#3'9'#1#0#0#9'TCheckBox'#11'cbExtViewer'#11'AllowGrayed'#9#7'Caption'#6#11'c'
+'bExtViewer'#7'OnClick'#7#16'cbExtViewerClick'#8'TabOrder'#2#4#4'Left'#2#8#6
+'Height'#2#24#3'Top'#2'x'#5'Width'#2'a'#0#0#5'TEdit'#12'edtExtViewer'#8'TabO'
+'rder'#2#5#4'Text'#6#10'emacs "%s"'#4'Left'#2#24#6'Height'#2#24#3'Top'#3#152
+#0#5'Width'#3'9'#1#0#0#0#9'TTabSheet'#7'tsFonts'#7'Caption'#6#5'Fonts'#12'Cl'
+'ientHeight'#3#246#0#11'ClientWidth'#3#190#1#10'ImageIndex'#2#3#6'Height'#3
+#246#0#5'Width'#3#190#1#0#6'TLabel'#11'lblMainFont'#7'Caption'#6#9'Main font'
+#5'Color'#7#6'clNone'#11'ParentColor'#8#6'Height'#2#14#3'Top'#2#24#5'Width'#2
+'.'#0#0#6'TLabel'#13'lblEditorFont'#7'Caption'#6#11'Editor font'#5'Color'#7#6
+'clNone'#11'ParentColor'#8#6'Height'#2#14#3'Top'#2'`'#5'Width'#2'4'#0#0#6'TL'
+'abel'#13'lblViewerFont'#7'Caption'#6#11'Viewer font'#5'Color'#7#6'clNone'#11
+'ParentColor'#8#6'Height'#2#14#3'Top'#3#168#0#5'Width'#2'8'#0#0#9'TComboBox'
+#10'cbMainFont'#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactS'
+'earchAscending'#0#10'ItemHeight'#2#18#9'MaxLength'#2#0#8'OnChange'#7#16'cbM'
+'ainFontChange'#11'ParentCtl3D'#8#8'TabOrder'#2#0#4'Left'#2'N'#6'Height'#2#21
+#3'Top'#2#16#5'Width'#3#16#1#0#0#9'TComboBox'#12'cbEditorFont'#16'AutoComple'
+'teText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#10'ItemHei'
+'ght'#2#18#9'MaxLength'#2#0#8'OnChange'#7#18'cbEditorFontChange'#11'ParentCt'
+'l3D'#8#8'TabOrder'#2#1#4'Left'#2'N'#6'Height'#2#21#3'Top'#2'W'#5'Width'#3#16
+#1#0#0#5'TEdit'#8'edtTest1'#8'TabOrder'#2#2#4'Text'#6#16'Example '#207#240
,#238#226#229#240#234#224#4'Left'#2'N'#6'Height'#2#24#3'Top'#2'0'#5'Width'#3#0
+#1#0#0#5'TEdit'#8'edtTest2'#8'TabOrder'#2#3#4'Text'#6#16'Example '#207#240
+#238#226#229#240#234#224#4'Left'#2'N'#6'Height'#2#24#3'Top'#2'x'#5'Width'#3#1
+#1#0#0#5'TEdit'#8'edtTest3'#8'TabOrder'#2#4#4'Text'#6#16'Example '#207#240
+#238#226#229#240#234#224#4'Left'#2'N'#6'Height'#2#24#3'Top'#3#192#0#5'Width'
+#3#1#1#0#0#9'TComboBox'#12'cbViewerFont'#16'AutoCompleteText'#11#22'cbactEnd'
+'OfLineComplete'#20'cbactSearchAscending'#0#10'ItemHeight'#2#18#9'MaxLength'
+#2#0#8'OnChange'#7#18'cbViewerFontChange'#11'ParentCtl3D'#8#8'TabOrder'#2#5#4
+'Left'#2'N'#6'Height'#2#21#3'Top'#3#159#0#5'Width'#3#16#1#0#0#7'TButton'#13
+'btnSelMainFnt'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'...'#7'OnCl'
+'ick'#7#18'btnSelMainFntClick'#8'TabOrder'#2#7#4'Left'#3'h'#1#6'Height'#2#23
+#3'Top'#2#16#5'Width'#2#23#0#0#7'TButton'#13'btnSelEditFnt'#25'BorderSpacing'
+'.InnerBorder'#2#2#7'Caption'#6#3'...'#7'OnClick'#7#18'btnSelEditFntClick'#8
+'TabOrder'#2#9#4'Left'#3'h'#1#6'Height'#2#23#3'Top'#2'W'#5'Width'#2#23#0#0#7
+'TButton'#13'btnSelViewFnt'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3
+'...'#7'OnClick'#7#18'btnSelViewFntClick'#8'TabOrder'#2#11#4'Left'#3'h'#1#6
+'Height'#2#23#3'Top'#3#159#0#5'Width'#2#23#0#0#9'TSpinEdit'#11'edtMainSize'#8
+'MaxValue'#2#25#8'MinValue'#2#8#8'TabOrder'#2#6#5'Value'#2#14#4'Left'#3'T'#1
+#6'Height'#2#23#3'Top'#2'1'#5'Width'#2'D'#0#0#9'TSpinEdit'#13'edtEditorSize'
+#8'MaxValue'#2#25#8'MinValue'#2#8#8'TabOrder'#2#8#5'Value'#2#14#4'Left'#3'T'
+#1#6'Height'#2#23#3'Top'#2'y'#5'Width'#2'D'#0#0#9'TSpinEdit'#13'edtViewerSiz'
+'e'#8'MaxValue'#2#25#8'MinValue'#2#8#8'TabOrder'#2#10#5'Value'#2#14#4'Left'#3
+'T'#1#6'Height'#2#23#3'Top'#3#192#0#5'Width'#2'D'#0#0#0#0#6'TPanel'#6'Panel1'
+#5'Align'#7#8'alBottom'#12'ClientHeight'#2'('#11'ClientWidth'#3#198#1#11'Ful'
+'lRepaint'#8#8'TabOrder'#2#1#6'Height'#2'('#3'Top'#3#16#1#5'Width'#3#198#1#0
+#7'TBitBtn'#5'btnOK'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&OK'#4
+'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#10'btnOKC'
+'lick'#8'TabOrder'#2#0#4'Left'#3#24#1#6'Height'#2#25#3'Top'#2#8#5'Width'#2'K'
+#0#0#7'TBitBtn'#9'btnCancel'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#6
+'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#8'TabOrd'
+'er'#2#1#4'Left'#3'p'#1#6'Height'#2#25#3'Top'#2#8#5'Width'#2'K'#0#0#0#11'TFo'
+'ntDialog'#6'dlgFnt'#5'Title'#6#13#194#251#225#240#224#242#252' '#248#240#232
+#244#242#5'Title'#6#13#194#251#225#240#224#242#252' '#248#240#232#244#242#4
+'left'#2'V'#3'top'#2#23#0#0#0
]);

43
fSplitter.lrs Normal file
View file

@ -0,0 +1,43 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmSplitter','FORMDATA',[
'TPF0'#12'TfrmSplitter'#11'frmSplitter'#13'ActiveControl'#7#12'edFileSource'
+#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#0#11'BorderStyle'#7#8'bs'
+'Single'#7'Caption'#6#8'Splitter'#12'ClientHeight'#3#244#0#11'ClientWidth'#3
+'s'#1#13'PixelsPerInch'#2'`'#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3'r'
+#1#19'HorzScrollBar.Range'#3'q'#1#18'VertScrollBar.Page'#3#243#0#19'VertScro'
+'llBar.Range'#3#227#0#4'Left'#3'+'#1#6'Height'#3#244#0#3'Top'#3#230#0#5'Widt'
+'h'#3's'#1#0#12'TProgressBar'#9'prgbrDoIt'#3'Max'#2'd'#8'TabOrder'#2#5#6'Hei'
+'ght'#2#27#3'Top'#3#213#0#5'Width'#3'q'#1#0#0#9'TGroupBox'#8'grbxFile'#7'Cap'
+'tion'#6#9'File name'#12'ClientHeight'#2'w'#11'ClientWidth'#3#181#0#11'Paren'
+'tCtl3D'#8#8'TabOrder'#2#0#6'Height'#3#137#0#5'Width'#3#185#0#0#6'TLabel'#12
+'lbFileSource'#7'Caption'#6#11'File source'#5'Color'#7#6'clNone'#11'ParentCo'
+'lor'#8#4'Left'#2#6#6'Height'#2#14#3'Top'#2#9#5'Width'#2'4'#0#0#6'TLabel'#11
+'lbDirTarget'#7'Caption'#6#16'Directory target'#5'Color'#7#6'clNone'#11'Pare'
+'ntColor'#8#4'Left'#2#6#6'Height'#2#14#3'Top'#2'A'#5'Width'#2'N'#0#0#5'TEdit'
+#12'edFileSource'#8'ReadOnly'#9#8'TabOrder'#2#0#4'Left'#2#6#6'Height'#2#23#3
+'Top'#2'!'#5'Width'#3#144#0#0#0#5'TEdit'#11'edDirTarget'#8'TabOrder'#2#1#4'L'
+'eft'#2#6#6'Height'#2#23#3'Top'#2'Y'#5'Width'#3#144#0#0#0#7'TButton'#11'btnF'
+'TChoice'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'...'#7'OnClick'#7
+#16'btnFTChoiceClick'#8'TabOrder'#2#2#4'Left'#3#158#0#6'Height'#2#23#3'Top'#2
+'Y'#5'Width'#2#19#0#0#0#9'TGroupBox'#8'grbxSize'#7'Caption'#6#9'File size'#12
+'ClientHeight'#2'/'#11'ClientWidth'#3#181#0#11'ParentCtl3D'#8#8'TabOrder'#2#1
+#6'Height'#2'A'#3'Top'#3#144#0#5'Width'#3#185#0#0#9'TComboBox'#8'cmbxSize'#16
+'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0
+#10'ItemHeight'#2#18#9'ItemIndex'#2#0#13'Items.Strings'#1#6#15'1457664B - 3.'
+'5"'#6#19'98078KB - ZIP 100MB'#6#16'650MB - CD 650MB'#6#16'700MB - CD 700MB'
+#0#9'MaxLength'#2#0#11'ParentCtl3D'#8#8'TabOrder'#2#0#4'Text'#6#15'1457664B '
+'- 3.5"'#4'Left'#2#6#6'Height'#2#21#3'Top'#2#9#5'Width'#3#168#0#0#0#0#9'TGro'
+'upBox'#9'grbxWatch'#7'Caption'#6#10'Watchtower'#12'ClientHeight'#3#159#0#11
+'ClientWidth'#3#173#0#11'ParentCtl3D'#8#8'TabOrder'#2#2#4'Left'#3#192#0#6'He'
+'ight'#3#177#0#5'Width'#3#177#0#0#5'TMemo'#8'memWatch'#5'Color'#7#7'clBlack'
+#10'Font.Color'#7#8'clYellow'#11'Font.Height'#2#11#9'Font.Name'#6#12'MS Shel'
+'l Dlg'#10'Font.Pitch'#7#10'fpVariable'#8'ReadOnly'#9#10'ScrollBars'#7#10'ss'
+'AutoBoth'#8'TabOrder'#2#0#7'TabStop'#8#8'WordWrap'#8#4'Left'#2#6#6'Height'#3
+#138#0#3'Top'#2#9#5'Width'#3#161#0#0#0#0#7'TButton'#5'btnOK'#25'BorderSpacin'
+'g.InnerBorder'#2#2#7'Caption'#6#2'OK'#7'OnClick'#7#10'btnOKClick'#8'TabOrde'
+'r'#2#3#4'Left'#3#192#0#6'Height'#2#25#3'Top'#3#184#0#5'Width'#2'K'#0#0#7'TB'
+'utton'#9'btnCancel'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#4'Exit'
+#11'ModalResult'#2#2#8'TabOrder'#2#4#4'Left'#3' '#1#6'Height'#2#25#3'Top'#3
+#184#0#5'Width'#2'K'#0#0#0
]);

23
fSymLink.lrs Normal file
View file

@ -0,0 +1,23 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmSymLink','FORMDATA',[
'TPF0'#11'TfrmSymLink'#10'frmSymLink'#13'ActiveControl'#7#5'btnOK'#7'Caption'
+#6#10'frmSymLink'#12'ClientHeight'#3#138#0#11'ClientWidth'#3'c'#1#10'KeyPrev'
+'iew'#9#10'OnKeyPress'#7#18'frmSymLinkKeyPress'#13'PixelsPerInch'#2'`'#8'Pos'
+'ition'#7#14'poScreenCenter'#10'TextHeight'#2#16#18'HorzScrollBar.Page'#3'b'
+#1#19'HorzScrollBar.Range'#3'X'#1#21'HorzScrollBar.Visible'#9#18'VertScrollB'
+'ar.Page'#3#137#0#19'VertScrollBar.Range'#2'w'#21'VertScrollBar.Visible'#9#4
+'Left'#3'#'#1#6'Height'#3#138#0#3'Top'#3#233#0#5'Width'#3'c'#1#0#6'TLabel'#6
+'lblNew'#7'Caption'#6#6'lblNew'#5'Color'#7#6'clNone'#11'ParentColor'#8#6'Hei'
+'ght'#2#14#5'Width'#2' '#0#0#6'TLabel'#6'lblDst'#7'Caption'#6#6'lblDst'#5'Co'
+'lor'#7#6'clNone'#11'ParentColor'#8#6'Height'#2#14#3'Top'#2'('#5'Width'#2#27
+#0#0#5'TEdit'#6'edtNew'#8'TabOrder'#2#1#6'Height'#2#23#3'Top'#2#16#5'Width'#3
+'X'#1#0#0#5'TEdit'#6'edtDst'#8'TabOrder'#2#3#6'Height'#2#23#3'Top'#2'@'#5'Wi'
+'dth'#3'X'#1#0#0#7'TBitBtn'#5'btnOK'#25'BorderSpacing.InnerBorder'#2#2#7'Cap'
+'tion'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyp'
+'hs'#2#0#7'OnClick'#7#10'btnOKClick'#8'TabOrder'#2#0#4'Left'#3#176#0#6'Heigh'
+'t'#2#23#3'Top'#2'`'#5'Width'#2'X'#0#0#7'TBitBtn'#9'btnCancel'#25'BorderSpac'
+'ing.InnerBorder'#2#2#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalR'
+'esult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#2#4'Left'#3#13#1#6'Height'#2#23#3
+'Top'#2'`'#5'Width'#2'K'#0#0#0
]);

70
fViewer.lrs Normal file
View file

@ -0,0 +1,70 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmViewer','FORMDATA',[
'TPF0'#10'TfrmViewer'#9'frmViewer'#13'ActiveControl'#7#13'ScrollBarVert'#7'Ca'
+'ption'#6#9'frmViewer'#10'KeyPreview'#9#4'Menu'#7#8'MainMenu'#7'OnClose'#7#14
+'frmViewerClose'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'
+#9'OnKeyDown'#7#16'frmViewerKeyDown'#10'OnKeyPress'#7#12'FormKeyPress'#7'OnK'
+'eyUp'#7#14'frmViewerKeyUp'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreen'
+'Center'#10'TextHeight'#2#16#18'HorzScrollBar.Page'#4#255#255#0#0#18'VertScr'
+'ollBar.Page'#4#255#255#0#0#19'VertScrollBar.Range'#2#19#6'Height'#3#6#2#3'T'
+'op'#3#27#2#5'Width'#3#24#3#0#10'TStatusBar'#6'Status'#6'Panels'#14#1#5'Widt'
+'h'#3#200#0#0#1#5'Width'#2'F'#0#1#5'Width'#3#150#0#0#1#5'Width'#2'2'#0#0#11
+'SimplePanel'#8#6'Height'#2#23#3'Top'#2#233#0#0#9'TNotebook'#7'nbPages'#5'Al'
+'ign'#7#8'alClient'#9'PageIndex'#2#0#8'ShowTabs'#8#3'Top'#2#245#0#5'TPage'#6
+'pgText'#7'Caption'#6#6'pgText'#0#10'TScrollBar'#13'ScrollBarVert'#5'Align'#7
+#7'alRight'#7'Anchors'#11#5'akTop'#7'akRight'#0#4'Kind'#7#10'sbVertical'#3'M'
+'ax'#3#232#3#8'PageSize'#2#1#11'ParentCtl3D'#8#8'Position'#2'2'#8'TabOrder'#2
+#0#8'OnScroll'#7#19'ScrollBarVertScroll'#4'Left'#2#241#5'Width'#2#15#0#0#14
+'TViewerControl'#13'ViewerControl'#11'Font.Height'#2#242#9'Font.Name'#6#5'fi'
+'xed'#10'Font.Pitch'#7#7'fpFixed'#5'Align'#7#8'alClient'#16'OnMouseWheelDown'
+#7#27'ViewerControlMouseWheelDown'#14'OnMouseWheelUp'#7#25'ViewerControlMous'
+'eWheelUp'#6'Cursor'#7#7'crIBeam'#4'Left'#2#249#0#0#0#5'TPage'#7'pgImage'#7
+'Caption'#6#7'pgImage'#0#10'TScrollBox'#9'ScrollBox'#5'Align'#7#8'alClient'
+#11'ParentCtl3D'#8#8'TabOrder'#2#0#7'TabStop'#9#18'HorzScrollBar.Page'#3#19#3
+#18'VertScrollBar.Page'#3#211#1#6'Height'#3#212#1#5'Width'#3#20#3#0#6'TImage'
+#5'Image'#5'Align'#7#8'alClient'#11'Transparent'#9#6'Height'#3#212#1#5'Width'
+#3#20#3#0#0#0#0#0#9'TMainMenu'#8'MainMenu'#4'left'#2'X'#3'top'#2#8#0#9'TMenu'
+'Item'#6'miFile'#7'Caption'#6#5'&File'#0#9'TMenuItem'#6'miPrev'#7'Caption'#6
+#9'&Previous'#8'ShortCut'#2'P'#7'OnClick'#7#11'miPrevClick'#0#0#9'TMenuItem'
+#6'miNext'#7'Caption'#6#5'&Next'#8'ShortCut'#2'N'#7'OnClick'#7#11'miNextClic'
+'k'#0#0#9'TMenuItem'#11'miSeparator'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#9'mi'
+'SavePos'#7'Caption'#6#14'&Save Position'#7'OnClick'#7#14'miSavePosClick'#0#0
+#9'TMenuItem'#2'N1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#6'miExit'#7'Caption'#6
+#5'E&xit'#7'OnClick'#7#11'miExitClick'#0#0#0#9'TMenuItem'#6'miEdit'#7'Captio'
+'n'#6#5'&Edit'#0#9'TMenuItem'#17'miCopyToClipboard'#7'Caption'#6#17'Copy To '
+'Clipboard'#7'OnClick'#7#22'miCopyToClipboardClick'#0#0#9'TMenuItem'#11'miSe'
+'lectAll'#7'Caption'#6#10'Select All'#7'OnClick'#7#16'miSelectAllClick'#0#0#0
+#9'TMenuItem'#6'miView'#7'Caption'#6#5'&View'#0#9'TMenuItem'#6'miText'#7'Cap'
+'tion'#6#4'Text'#7'OnClick'#7#11'miTextClick'#0#0#9'TMenuItem'#5'miBin'#7'Ca'
+'ption'#6#3'Bin'#7'OnClick'#7#10'miBinClick'#0#0#9'TMenuItem'#5'miHex'#7'Cap'
+'tion'#6#3'Hex'#7'OnClick'#7#10'miHexClick'#0#0#9'TMenuItem'#10'miWrapText'#7
+'Caption'#6#9'Wrap Text'#7'OnClick'#7#15'miWrapTextClick'#0#0#9'TMenuItem'#6
+'miDiv2'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#10'miGraphics'#7'Caption'#6#8'Gr'
+'aphics'#8'ShortCut'#2'6'#7'OnClick'#7#15'miGraphicsClick'#0#0#9'TMenuItem'#6
+'miDiv1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#8'miSearch'#7'Caption'#6#6'Searc'
+'h'#8'ShortCut'#2'r'#7'OnClick'#7#13'miSearchClick'#0#0#0#9'TMenuItem'#7'miI'
+'mage'#7'Caption'#6#6'&Image'#0#9'TMenuItem'#9'miStretch'#7'Caption'#6#7'Str'
+'etch'#7'OnClick'#7#14'miStretchClick'#0#0#0#9'TMenuItem'#7'miAbout'#7'Capti'
+'on'#6#5'About'#0#9'TMenuItem'#8'miAbout2'#7'Caption'#6#6'About '#7'OnClick'
+#7#13'miAbout2Click'#0#0#0#0#0
]);
LazarusResources.Add('TfrmFindView','FORMDATA',[
'TPF0'#12'TfrmFindView'#11'frmFindView'#13'ActiveControl'#7#12'cbDataToFind'#7
+'Caption'#6#11'frmFindView'#12'ClientHeight'#2'^'#11'ClientWidth'#3'S'#1#6'O'
+'nShow'#7#8'FormShow'#8'Position'#7#17'poOwnerFormCenter'#10'TextHeight'#2#16
+#18'HorzScrollBar.Page'#3'T'#1#19'HorzScrollBar.Range'#3'K'#1#18'VertScrollB'
+'ar.Page'#2'_'#19'VertScrollBar.Range'#2'V'#4'Left'#3#192#1#6'Height'#2'^'#3
+'Top'#3'_'#1#5'Width'#3'S'#1#0#9'TComboBox'#12'cbDataToFind'#10'ItemHeight'#2
+#18#9'MaxLength'#2#0#7'OnKeyUp'#7#17'cbDataToFindKeyUp'#11'ParentCtl3D'#8#8
+'TabOrder'#2#0#4'Left'#2#16#6'Height'#2#23#3'Top'#2#16#5'Width'#3'8'#1#0#0#7
+'TBitBtn'#7'btnFind'#7'Default'#9#7'OnClick'#7#12'btnFindClick'#7'Default'#9
+#7'Caption'#6#4'Find'#8'TabOrder'#2#1#7'OnClick'#7#12'btnFindClick'#4'Left'#3
+#176#0#6'Height'#2#25#3'Top'#2'8'#5'Width'#2'K'#0#0#7'TBitBtn'#8'btnClose'#4
+'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#11'ModalResult'#2#2#7'Caption'#6#6
+'Cancel'#8'TabOrder'#2#2#4'Left'#3#0#1#6'Height'#2#25#3'Top'#2'8'#5'Width'#2
+'K'#0#0#9'TCheckBox'#10'cbCaseSens'#11'AllowGrayed'#9#8'AutoSize'#9#7'Captio'
+'n'#6#10'cbCaseSens'#10'DragCursor'#4#244#255#0#0#8'TabOrder'#2#3#4'Left'#2
+#16#6'Height'#2#30#3'Top'#2'8'#5'Width'#3#153#0#0#0#0
]);

264
fattrib.lfm Normal file
View file

@ -0,0 +1,264 @@
object frmAttrib: TfrmAttrib
ActiveControl = cbReadOwner
Caption = 'frmAttrib'
ClientHeight = 272
ClientWidth = 335
HorzScrollBar.Page = 336
HorzScrollBar.Range = 323
VertScrollBar.Page = 273
VertScrollBar.Range = 257
Left = 391
Height = 272
Top = 258
Width = 335
object lblFileName: TLabel
Caption = 'lblFileName'
Font.Color = clBlack
Font.Height = 13
Font.Name = 'Helvetica'
Font.Pitch = fpVariable
Font.Style = [fsBold]
Left = 104
Height = 15
Top = 8
Width = 219
end
object cbReadOwner: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 0
Left = 112
Height = 30
Top = 48
Width = 25
end
object cbWriteOwner: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 1
Left = 184
Height = 30
Top = 48
Width = 25
end
object cbExecOwner: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 2
Left = 256
Height = 30
Top = 48
Width = 25
end
object lblOwner: TLabel
Caption = 'Owner'
Left = 8
Height = 15
Top = 54
Width = 88
end
object lblGroup: TLabel
Caption = 'Group'
Left = 8
Height = 15
Top = 94
Width = 88
end
object cbReadGroup: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 3
Left = 112
Height = 30
Top = 88
Width = 25
end
object cbWriteGroup: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 4
Left = 184
Height = 30
Top = 88
Width = 25
end
object cbExecGroup: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 5
Left = 256
Height = 30
Top = 88
Width = 25
end
object lblOther: TLabel
Caption = 'Other'
Left = 8
Height = 15
Top = 134
Width = 82
end
object cbReadOther: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 6
Left = 112
Height = 30
Top = 128
Width = 25
end
object cbWriteOther: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 7
Left = 184
Height = 30
Top = 128
Width = 25
end
object cbExecOther: TCheckBox
AllowGrayed = True
AutoSize = True
DragCursor = 65524
TabOrder = 8
Left = 256
Height = 30
Top = 128
Width = 25
end
object lblRead: TLabel
Caption = 'Read'
Left = 104
Height = 15
Top = 32
Width = 72
end
object lblWrite: TLabel
Caption = 'Write'
Left = 176
Height = 15
Top = 32
Width = 63
end
object lblExec: TLabel
Caption = 'Execute'
Left = 240
Height = 15
Top = 32
Width = 83
end
object btnOK: TBitBtn
Default = True
Kind = bkOK
ModalResult = 1
OnClick = btnOKClick
Default = True
ModalResult = 1
Caption = '&OK'
TabOrder = 9
OnClick = btnOKClick
Left = 8
Height = 25
Top = 232
Width = 75
end
object btnAll: TBitBtn
OnClick = btnAllClick
Caption = '&All'
TabOrder = 10
OnClick = btnAllClick
Left = 88
Height = 25
Top = 232
Width = 75
end
object btnSkip: TBitBtn
OnClick = btnSkipClick
Caption = 'Skip'
TabOrder = 11
OnClick = btnSkipClick
Left = 168
Height = 25
Top = 232
Width = 75
end
object btnCancel: TBitBtn
Kind = bkCancel
ModalResult = 2
ModalResult = 2
Caption = 'Cancel'
TabOrder = 12
Left = 248
Height = 25
Top = 232
Width = 75
end
object lblTextAttr: TLabel
AutoSize = True
Caption = 'Representation in text:'
Left = 8
Height = 15
Top = 200
Width = 144
end
object lblAttr: TLabel
Caption = 'lblAttr'
Font.Color = clBlack
Font.Height = 13
Font.Name = 'adobe-helvetica'
Font.Pitch = fpVariable
Font.Style = [fsBold]
Left = 162
Height = 16
Top = 200
Width = 151
end
object cbSuid: TCheckBox
AllowGrayed = True
AutoSize = True
Caption = 'SUID'
DragCursor = 65524
TabOrder = 13
Left = 112
Height = 30
Top = 168
Width = 69
end
object cbSgid: TCheckBox
AllowGrayed = True
AutoSize = True
Caption = 'SGID'
DragCursor = 65524
TabOrder = 14
Left = 184
Height = 30
Top = 168
Width = 59
end
object cbSticky: TCheckBox
AllowGrayed = True
AutoSize = True
Caption = 'Sticky'
DragCursor = 65524
TabOrder = 15
Left = 248
Height = 30
Top = 168
Width = 65
end
object lblFile: TLabel
Caption = 'Filename'
Left = 8
Height = 17
Top = 6
Width = 81
end
end

65
fattrib.lrs Normal file
View file

@ -0,0 +1,65 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmAttrib','FORMDATA',[
'TPF0'#10'TfrmAttrib'#9'frmAttrib'#13'ActiveControl'#7#11'cbReadOwner'#7'Capt'
+'ion'#6#9'frmAttrib'#12'ClientHeight'#3#16#1#11'ClientWidth'#3'O'#1#18'HorzS'
+'crollBar.Page'#3'P'#1#19'HorzScrollBar.Range'#3'C'#1#18'VertScrollBar.Page'
+#3#17#1#19'VertScrollBar.Range'#3#1#1#4'Left'#3#135#1#6'Height'#3#16#1#3'Top'
+#3#2#1#5'Width'#3'O'#1#0#6'TLabel'#11'lblFileName'#7'Caption'#6#11'lblFileNa'
+'me'#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#13#9'Font.Name'#6#9'Helve'
+'tica'#10'Font.Pitch'#7#10'fpVariable'#10'Font.Style'#11#6'fsBold'#0#4'Left'
+#2'h'#6'Height'#2#15#3'Top'#2#8#5'Width'#3#219#0#0#0#9'TCheckBox'#11'cbReadO'
+'wner'#11'AllowGrayed'#9#8'AutoSize'#9#10'DragCursor'#4#244#255#0#0#8'TabOrd'
+'er'#2#0#4'Left'#2'p'#6'Height'#2#30#3'Top'#2'0'#5'Width'#2#25#0#0#9'TCheckB'
+'ox'#12'cbWriteOwner'#11'AllowGrayed'#9#8'AutoSize'#9#10'DragCursor'#4#244
+#255#0#0#8'TabOrder'#2#1#4'Left'#3#184#0#6'Height'#2#30#3'Top'#2'0'#5'Width'
+#2#25#0#0#9'TCheckBox'#11'cbExecOwner'#11'AllowGrayed'#9#8'AutoSize'#9#10'Dr'
+'agCursor'#4#244#255#0#0#8'TabOrder'#2#2#4'Left'#3#0#1#6'Height'#2#30#3'Top'
+#2'0'#5'Width'#2#25#0#0#6'TLabel'#8'lblOwner'#7'Caption'#6#5'Owner'#4'Left'#2
+#8#6'Height'#2#15#3'Top'#2'6'#5'Width'#2'X'#0#0#6'TLabel'#8'lblGroup'#7'Capt'
+'ion'#6#5'Group'#4'Left'#2#8#6'Height'#2#15#3'Top'#2'^'#5'Width'#2'X'#0#0#9
+'TCheckBox'#11'cbReadGroup'#11'AllowGrayed'#9#8'AutoSize'#9#10'DragCursor'#4
+#244#255#0#0#8'TabOrder'#2#3#4'Left'#2'p'#6'Height'#2#30#3'Top'#2'X'#5'Width'
+#2#25#0#0#9'TCheckBox'#12'cbWriteGroup'#11'AllowGrayed'#9#8'AutoSize'#9#10'D'
+'ragCursor'#4#244#255#0#0#8'TabOrder'#2#4#4'Left'#3#184#0#6'Height'#2#30#3'T'
+'op'#2'X'#5'Width'#2#25#0#0#9'TCheckBox'#11'cbExecGroup'#11'AllowGrayed'#9#8
+'AutoSize'#9#10'DragCursor'#4#244#255#0#0#8'TabOrder'#2#5#4'Left'#3#0#1#6'He'
+'ight'#2#30#3'Top'#2'X'#5'Width'#2#25#0#0#6'TLabel'#8'lblOther'#7'Caption'#6
+#5'Other'#4'Left'#2#8#6'Height'#2#15#3'Top'#3#134#0#5'Width'#2'R'#0#0#9'TChe'
+'ckBox'#11'cbReadOther'#11'AllowGrayed'#9#8'AutoSize'#9#10'DragCursor'#4#244
+#255#0#0#8'TabOrder'#2#6#4'Left'#2'p'#6'Height'#2#30#3'Top'#3#128#0#5'Width'
+#2#25#0#0#9'TCheckBox'#12'cbWriteOther'#11'AllowGrayed'#9#8'AutoSize'#9#10'D'
+'ragCursor'#4#244#255#0#0#8'TabOrder'#2#7#4'Left'#3#184#0#6'Height'#2#30#3'T'
+'op'#3#128#0#5'Width'#2#25#0#0#9'TCheckBox'#11'cbExecOther'#11'AllowGrayed'#9
+#8'AutoSize'#9#10'DragCursor'#4#244#255#0#0#8'TabOrder'#2#8#4'Left'#3#0#1#6
+'Height'#2#30#3'Top'#3#128#0#5'Width'#2#25#0#0#6'TLabel'#7'lblRead'#7'Captio'
+'n'#6#4'Read'#4'Left'#2'h'#6'Height'#2#15#3'Top'#2' '#5'Width'#2'H'#0#0#6'TL'
+'abel'#8'lblWrite'#7'Caption'#6#5'Write'#4'Left'#3#176#0#6'Height'#2#15#3'To'
+'p'#2' '#5'Width'#2'?'#0#0#6'TLabel'#7'lblExec'#7'Caption'#6#7'Execute'#4'Le'
+'ft'#3#240#0#6'Height'#2#15#3'Top'#2' '#5'Width'#2'S'#0#0#7'TBitBtn'#5'btnOK'
+#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#7'OnClick'#7#10'btnOKCli'
+'ck'#7'Default'#9#11'ModalResult'#2#1#7'Caption'#6#3'&OK'#8'TabOrder'#2#9#7
+'OnClick'#7#10'btnOKClick'#4'Left'#2#8#6'Height'#2#25#3'Top'#3#232#0#5'Width'
+#2'K'#0#0#7'TBitBtn'#6'btnAll'#7'OnClick'#7#11'btnAllClick'#7'Caption'#6#4'&'
+'All'#8'TabOrder'#2#10#7'OnClick'#7#11'btnAllClick'#4'Left'#2'X'#6'Height'#2
+#25#3'Top'#3#232#0#5'Width'#2'K'#0#0#7'TBitBtn'#7'btnSkip'#7'OnClick'#7#12'b'
+'tnSkipClick'#7'Caption'#6#4'Skip'#8'TabOrder'#2#11#7'OnClick'#7#12'btnSkipC'
+'lick'#4'Left'#3#168#0#6'Height'#2#25#3'Top'#3#232#0#5'Width'#2'K'#0#0#7'TBi'
+'tBtn'#9'btnCancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#11'ModalResult'
+#2#2#7'Caption'#6#6'Cancel'#8'TabOrder'#2#12#4'Left'#3#248#0#6'Height'#2#25#3
+'Top'#3#232#0#5'Width'#2'K'#0#0#6'TLabel'#11'lblTextAttr'#8'AutoSize'#9#7'Ca'
+'ption'#6#23'Representation in text:'#4'Left'#2#8#6'Height'#2#15#3'Top'#3#200
+#0#5'Width'#3#144#0#0#0#6'TLabel'#7'lblAttr'#7'Caption'#6#7'lblAttr'#10'Font'
+'.Color'#7#7'clBlack'#11'Font.Height'#2#13#9'Font.Name'#6#15'adobe-helvetica'
+#10'Font.Pitch'#7#10'fpVariable'#10'Font.Style'#11#6'fsBold'#0#4'Left'#3#162
+#0#6'Height'#2#16#3'Top'#3#200#0#5'Width'#3#151#0#0#0#9'TCheckBox'#6'cbSuid'
+#11'AllowGrayed'#9#8'AutoSize'#9#7'Caption'#6#4'SUID'#10'DragCursor'#4#244
+#255#0#0#8'TabOrder'#2#13#4'Left'#2'p'#6'Height'#2#30#3'Top'#3#168#0#5'Width'
+#2'E'#0#0#9'TCheckBox'#6'cbSgid'#11'AllowGrayed'#9#8'AutoSize'#9#7'Caption'#6
+#4'SGID'#10'DragCursor'#4#244#255#0#0#8'TabOrder'#2#14#4'Left'#3#184#0#6'Hei'
+'ght'#2#30#3'Top'#3#168#0#5'Width'#2';'#0#0#9'TCheckBox'#8'cbSticky'#11'Allo'
+'wGrayed'#9#8'AutoSize'#9#7'Caption'#6#6'Sticky'#10'DragCursor'#4#244#255#0#0
+#8'TabOrder'#2#15#4'Left'#3#248#0#6'Height'#2#30#3'Top'#3#168#0#5'Width'#2'A'
+#0#0#6'TLabel'#7'lblFile'#7'Caption'#6#8'Filename'#4'Left'#2#8#6'Height'#2#17
+#3'Top'#2#6#5'Width'#2'Q'#0#0#0
]);

209
fattrib.pas Normal file
View file

@ -0,0 +1,209 @@
unit fAttrib;
{$mode objfpc}{$H+}
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, uFileList, Buttons;
type
TfrmAttrib = class(TfrmLng)
lblFile: TLabel;
lblFileName: TLabel;
cbReadOwner: TCheckBox;
cbWriteOwner: TCheckBox;
cbExecOwner: TCheckBox;
lblOwner: TLabel;
lblGroup: TLabel;
cbReadGroup: TCheckBox;
cbWriteGroup: TCheckBox;
cbExecGroup: TCheckBox;
lblOther: TLabel;
cbReadOther: TCheckBox;
cbWriteOther: TCheckBox;
cbExecOther: TCheckBox;
lblRead: TLabel;
lblWrite: TLabel;
lblExec: TLabel;
btnOK: TBitBtn;
btnAll: TBitBtn;
btnSkip: TBitBtn;
btnCancel: TBitBtn;
lblTextAttr: TLabel;
lblAttr: TLabel;
cbSuid: TCheckBox;
cbSgid: TCheckBox;
cbSticky: TCheckBox;
procedure btnOKClick(Sender: TObject);
procedure btnAllClick(Sender: TObject);
procedure btnSkipClick(Sender: TObject);
private
{ Private declarations }
iCurrent:Integer;
ffileList:TFileList;
public
{ Public declarations }
Path:String;
procedure LoadLng; override;
procedure ShowFile(iIndex:Integer);
procedure StoreData(FileList:TFileList);
function FindNextSelected:Boolean;
procedure ShowAttr(iMode:Integer);
function GetModeFromForm:Integer;
procedure ChangeMod;
end;
procedure ShowAttrForm(FileList:TFileList; const aPath:String);
implementation
uses
uLng, uFileOp, BaseUnix;
procedure ShowAttrForm(FileList:TFileList; const aPath:String);
begin
with TfrmAttrib.Create(Application) do
begin
try
Path:=aPath;
StoreData(FileList);
if FindNextSelected then
begin
ShowFile(iCurrent);
ShowModal;
end;
finally
Free;
end;
end;
end;
procedure TfrmAttrib.ShowFile(iIndex:Integer);
begin
with ffileList.GetItem(iIndex)^ do
begin
lblFileName.Caption:=sName;
ShowAttr(iMode);
end;
end;
procedure TfrmAttrib.StoreData(FileList:TFileList);
begin
fFileList:=FileList;
iCurrent:=0;
end;
function TfrmAttrib.FindNextSelected:Boolean;
var
i:Integer;
begin
for i:=iCurrent to FFileList.Count-1 do
begin
if FFileList.GetItem(i)^.bSelected then
begin
iCurrent:=i;
Result:=True;
Exit;
end;
end;
Result:=False;
end;
procedure TfrmAttrib.ShowAttr(iMode:Integer);
begin
cbReadOwner.Checked:= ((iMode AND S_IRUSR) = S_IRUSR);
cbWriteOwner.Checked:= ((iMode AND S_IWUSR) = S_IWUSR);
cbExecOwner.Checked:= ((iMode AND S_IXUSR) = S_IXUSR);
cbReadGroup.Checked:= ((iMode AND S_IRGRP) = S_IRGRP);
cbWriteGroup.Checked:= ((iMode AND S_IWGRP) = S_IWGRP);
cbExecGroup.Checked:= ((iMode AND S_IXGRP) = S_IXGRP);
cbReadOther.Checked:= ((iMode AND S_IROTH) = S_IROTH);
cbWriteOther.Checked:= ((iMode AND S_IWOTH) = S_IWOTH);
cbExecOther.Checked:= ((iMode AND S_IXOTH) = S_IXOTH);
cbSuid.Checked:= ((iMode AND S_ISUID) = S_ISUID);
cbSgid.Checked:= ((iMode AND S_ISGID) = S_ISGID);
cbSticky.Checked:= ((iMode AND S_ISVTX) = S_ISVTX);
lblAttr.Caption:=AttrToStr(iMode);
end;
procedure TfrmAttrib.LoadLng;
begin
// load strings
Caption:=lngGetString(clngAttrChmod);
lblFile.Caption:=lngGetString(clngLinkColumnNameFile);
lblOwner.Caption:=lngGetString(clngAttrOwner);
lblGroup.Caption:=lngGetString(clngAttrGroup);
lblOther.Caption:=lngGetString(clngAttrOther);
lblRead.Caption:=lngGetString(clngAttrRead);
lblWrite.Caption:=lngGetString(clngAttrWrite);
lblExec.Caption:=lngGetString(clngAttrExec);
lblTextAttr.Caption:=lngGetString(clngAttrTextRep);
btnCancel.Caption:=lngGetString(clngbutCancel);
btnSkip.Caption:=lngGetString(clngbutSkip);
btnAll.Caption:=lngGetString(clngbutAll);
end;
procedure TfrmAttrib.ChangeMod;
begin
fpchmod(PChar(Path+ffileList.GetItem(iCurrent)^.sName),GetModeFromForm);
end;
procedure TfrmAttrib.btnOKClick(Sender: TObject);
begin
ChangeMod;
inc (iCurrent);
if not FindNextSelected Then
Close
else
ShowFile(iCurrent);
end;
function TfrmAttrib.GetModeFromForm:Integer;
begin
Result:=0;
if cbReadOwner.Checked then Result:=(Result OR S_IRUSR);
if cbWriteOwner.Checked then Result:=(Result OR S_IWUSR);
if cbExecOwner.Checked then Result:=(Result OR S_IXUSR);
if cbReadGroup.Checked then Result:=(Result OR S_IRGRP);
if cbWriteGroup.Checked then Result:=(Result OR S_IWGRP);
if cbExecGroup.Checked then Result:=(Result OR S_IXGRP);
if cbReadOther.Checked then Result:=(Result OR S_IROTH);
if cbWriteOther.Checked then Result:=(Result OR S_IWOTH);
if cbExecOther.Checked then Result:=(Result OR S_IXOTH);
if cbSuid.Checked then Result:=(Result OR S_ISUID);
if cbSgid.Checked then Result:=(Result OR S_ISGID);
if cbSticky.Checked then Result:=(Result OR S_ISVTX);
end;
procedure TfrmAttrib.btnAllClick(Sender: TObject);
begin
inherited;
repeat
ChangeMod;
inc (iCurrent);
until not FindNextSelected;
Close;
end;
procedure TfrmAttrib.btnSkipClick(Sender: TObject);
begin
inherited;
inc (iCurrent);
if not FindNextSelected Then
Close
else
ShowFile(iCurrent);
end;
initialization
{$I fAttrib.lrs}
end.

260
fbtnchangedlg.lfm Normal file
View file

@ -0,0 +1,260 @@
object OneButtonChangeDlg: TOneButtonChangeDlg
ActiveControl = id_btn_command
BorderIcons = []
BorderStyle = bsDialog
Caption = 'Change single button'
ClientHeight = 240
ClientWidth = 533
Font.Color = clBtnText
Font.Height = -11
Font.Name = 'MS Sans Serif'
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 13
HorzScrollBar.Page = 532
VertScrollBar.Page = 239
Left = 349
Height = 240
Top = 436
Width = 533
HelpContext = 270
Tag = 1
object Command: TLabel
AutoSize = False
Caption = '&Command:'
Color = clNone
FocusControl = id_btn_command
ParentColor = False
Left = 4
Height = 14
Top = 7
Width = 80
Tag = 9
end
object Parameters: TLabel
AutoSize = False
Caption = '&Parameters:'
Color = clNone
FocusControl = id_btn_param
ParentColor = False
Left = 4
Height = 14
Top = 35
Width = 80
Tag = 10
end
object Startpath: TLabel
AutoSize = False
Caption = '&Start path:'
Color = clNone
FocusControl = id_btn_startpath
ParentColor = False
Left = 4
Height = 14
Top = 60
Width = 80
Tag = 11
end
object Iconfile: TLabel
AutoSize = False
Caption = 'Icon &file:'
Color = clNone
FocusControl = id_btn_iconfilename
ParentColor = False
Left = 4
Height = 13
Top = 85
Width = 80
Tag = 12
end
object Icon: TLabel
AutoSize = False
Caption = '&Icon:'
Color = clNone
FocusControl = id_btn_icon
ParentColor = False
WordWrap = True
Left = 4
Height = 14
Top = 110
Width = 45
Tag = 13
end
object id_btn_iconindex: TLabel
AutoSize = False
Caption = '0'
Color = clNone
ParentColor = False
WordWrap = True
Left = 54
Height = 14
Top = 110
Width = 25
end
object Tooltip: TLabel
AutoSize = False
Caption = '&Tooltip:'
Color = clNone
FocusControl = id_btn_ToolTip
ParentColor = False
Left = 4
Height = 14
Top = 167
Width = 80
Tag = 14
end
object id_btn_command: TComboBox
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
DropDownCount = 20
Font.Height = -11
Font.Name = 'MS Sans Serif'
ItemHeight = 13
MaxLength = 0
TabOrder = 0
Left = 85
Height = 21
Top = 6
Width = 298
end
object id_btn_find1: TButton
BorderSpacing.InnerBorder = 2
Caption = '>>'
OnClick = id_btn_find1Click
TabOrder = 1
Left = 384
Height = 22
Top = 5
Width = 25
end
object id_btn_findbar: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Add Subbar >>'
TabOrder = 2
Left = 412
Height = 23
Top = 4
Width = 110
Tag = 15
end
object id_btn_param: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 3
Left = 85
Height = 21
Top = 31
Width = 298
end
object id_btn_assymbol: TCheckBox
Caption = 'Run mi&nimized'
TabOrder = 4
Left = 387
Height = 13
Top = 34
Width = 94
Tag = 16
end
object id_btn_startpath: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 6
Left = 85
Height = 21
Top = 56
Width = 298
end
object id_btn_iconfilename: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 7
Left = 85
Height = 21
Top = 81
Width = 298
end
object id_btn_iconfile: TButton
BorderSpacing.InnerBorder = 2
Caption = '>>'
OnClick = id_btn_iconfileClick
TabOrder = 8
Left = 384
Height = 21
Top = 81
Width = 25
end
object id_btn_icon: TListBox
Font.Height = -11
Font.Name = 'MS Sans Serif'
ItemHeight = 36
Style = lbOwnerDrawFixed
TabOrder = 9
Left = 85
Height = 54
Top = 106
Width = 298
end
object id_btn_ToolTip: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 10
Left = 85
Height = 21
Top = 164
Width = 298
end
object Ok: TButton
BorderSpacing.InnerBorder = 2
Caption = 'OK'
Default = True
OnClick = OkClick
TabOrder = 11
Left = 420
Height = 23
Top = 110
Width = 100
Tag = 4001
end
object Cancel: TButton
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Cancel'
ModalResult = 2
OnClick = CancelClick
TabOrder = 12
Left = 420
Height = 23
Top = 136
Width = 100
Tag = 4002
end
object id_Globalhelp: TButton
BorderSpacing.InnerBorder = 2
Caption = '&Help'
TabOrder = 13
Left = 420
Height = 23
Top = 162
Width = 100
Tag = 4003
end
object id_btn_maximized: TCheckBox
Caption = 'Run ma&ximized'
TabOrder = 5
Left = 387
Height = 13
Top = 50
Width = 97
Tag = 17
end
object OpenDialog: TOpenDialog
Title = 'Îòêðûòü ñóùåñòâóþùèé ôàéë'
FilterIndex = 0
Title = 'Îòêðûòü ñóùåñòâóþùèé ôàéë'
left = 32
top = 496
end
end

69
fbtnchangedlg.lrs Normal file
View file

@ -0,0 +1,69 @@
LazarusResources.Add('TOneButtonChangeDlg','FORMDATA',[
'TPF0'#19'TOneButtonChangeDlg'#18'OneButtonChangeDlg'#13'ActiveControl'#7#14
+'id_btn_command'#11'BorderIcons'#11#0#11'BorderStyle'#7#8'bsDialog'#7'Captio'
+'n'#6#20'Change single button'#12'ClientHeight'#3#240#0#11'ClientWidth'#3#21
+#2#10'Font.Color'#7#9'clBtnText'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS '
+'Sans Serif'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenCenter'#10'Text'
+'Height'#2#13#18'HorzScrollBar.Page'#3#20#2#18'VertScrollBar.Page'#3#239#0#4
+'Left'#3']'#1#6'Height'#3#240#0#3'Top'#3#180#1#5'Width'#3#21#2#11'HelpContex'
+'t'#3#14#1#3'Tag'#2#1#0#6'TLabel'#7'Command'#8'AutoSize'#8#7'Caption'#6#9'&C'
+'ommand:'#5'Color'#7#6'clNone'#12'FocusControl'#7#14'id_btn_command'#11'Pare'
+'ntColor'#8#4'Left'#2#4#6'Height'#2#14#3'Top'#2#7#5'Width'#2'P'#3'Tag'#2#9#0
+#0#6'TLabel'#10'Parameters'#8'AutoSize'#8#7'Caption'#6#12'&Parameters:'#5'Co'
+'lor'#7#6'clNone'#12'FocusControl'#7#12'id_btn_param'#11'ParentColor'#8#4'Le'
+'ft'#2#4#6'Height'#2#14#3'Top'#2'#'#5'Width'#2'P'#3'Tag'#2#10#0#0#6'TLabel'#9
+'Startpath'#8'AutoSize'#8#7'Caption'#6#12'&Start path:'#5'Color'#7#6'clNone'
+#12'FocusControl'#7#16'id_btn_startpath'#11'ParentColor'#8#4'Left'#2#4#6'Hei'
+'ght'#2#14#3'Top'#2'<'#5'Width'#2'P'#3'Tag'#2#11#0#0#6'TLabel'#8'Iconfile'#8
+'AutoSize'#8#7'Caption'#6#11'Icon &file:'#5'Color'#7#6'clNone'#12'FocusContr'
+'ol'#7#19'id_btn_iconfilename'#11'ParentColor'#8#4'Left'#2#4#6'Height'#2#13#3
+'Top'#2'U'#5'Width'#2'P'#3'Tag'#2#12#0#0#6'TLabel'#4'Icon'#8'AutoSize'#8#7'C'
+'aption'#6#6'&Icon:'#5'Color'#7#6'clNone'#12'FocusControl'#7#11'id_btn_icon'
+#11'ParentColor'#8#8'WordWrap'#9#4'Left'#2#4#6'Height'#2#14#3'Top'#2'n'#5'Wi'
+'dth'#2'-'#3'Tag'#2#13#0#0#6'TLabel'#16'id_btn_iconindex'#8'AutoSize'#8#7'Ca'
+'ption'#6#1'0'#5'Color'#7#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#2
+'6'#6'Height'#2#14#3'Top'#2'n'#5'Width'#2#25#0#0#6'TLabel'#7'Tooltip'#8'Auto'
+'Size'#8#7'Caption'#6#9'&Tooltip:'#5'Color'#7#6'clNone'#12'FocusControl'#7#14
+'id_btn_ToolTip'#11'ParentColor'#8#4'Left'#2#4#6'Height'#2#14#3'Top'#3#167#0
+#5'Width'#2'P'#3'Tag'#2#14#0#0#9'TComboBox'#14'id_btn_command'#16'AutoComple'
+'teText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#13'DropDow'
+'nCount'#2#20#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'#10'Item'
+'Height'#2#13#9'MaxLength'#2#0#8'TabOrder'#2#0#4'Left'#2'U'#6'Height'#2#21#3
+'Top'#2#6#5'Width'#3'*'#1#0#0#7'TButton'#12'id_btn_find1'#25'BorderSpacing.I'
+'nnerBorder'#2#2#7'Caption'#6#2'>>'#7'OnClick'#7#17'id_btn_find1Click'#8'Tab'
+'Order'#2#1#4'Left'#3#128#1#6'Height'#2#22#3'Top'#2#5#5'Width'#2#25#0#0#7'TB'
+'utton'#14'id_btn_findbar'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#13
+'Add Subbar >>'#8'TabOrder'#2#2#4'Left'#3#156#1#6'Height'#2#23#3'Top'#2#4#5
+'Width'#2'n'#3'Tag'#2#15#0#0#8'TKASEdit'#12'id_btn_param'#11'Font.Height'#2
+#245#9'Font.Name'#6#13'MS Sans Serif'#9'MaxLength'#3#3#1#8'TabOrder'#2#3#4'L'
+'eft'#2'U'#6'Height'#2#21#3'Top'#2#31#5'Width'#3'*'#1#0#0#9'TCheckBox'#15'id'
+'_btn_assymbol'#7'Caption'#6#14'Run mi&nimized'#8'TabOrder'#2#4#4'Left'#3#131
+#1#6'Height'#2#13#3'Top'#2'"'#5'Width'#2'^'#3'Tag'#2#16#0#0#8'TKASEdit'#16'i'
+'d_btn_startpath'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'#9'M'
+'axLength'#3#3#1#8'TabOrder'#2#6#4'Left'#2'U'#6'Height'#2#21#3'Top'#2'8'#5'W'
+'idth'#3'*'#1#0#0#8'TKASEdit'#19'id_btn_iconfilename'#11'Font.Height'#2#245#9
+'Font.Name'#6#13'MS Sans Serif'#9'MaxLength'#3#3#1#8'TabOrder'#2#7#4'Left'#2
+'U'#6'Height'#2#21#3'Top'#2'Q'#5'Width'#3'*'#1#0#0#7'TButton'#15'id_btn_icon'
+'file'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2'>>'#7'OnClick'#7#20
+'id_btn_iconfileClick'#8'TabOrder'#2#8#4'Left'#3#128#1#6'Height'#2#21#3'Top'
+#2'Q'#5'Width'#2#25#0#0#8'TListBox'#11'id_btn_icon'#11'Font.Height'#2#245#9
+'Font.Name'#6#13'MS Sans Serif'#10'ItemHeight'#2'$'#5'Style'#7#16'lbOwnerDra'
+'wFixed'#8'TabOrder'#2#9#4'Left'#2'U'#6'Height'#2'6'#3'Top'#2'j'#5'Width'#3
+'*'#1#0#0#8'TKASEdit'#14'id_btn_ToolTip'#11'Font.Height'#2#245#9'Font.Name'#6
+#13'MS Sans Serif'#9'MaxLength'#3#3#1#8'TabOrder'#2#10#4'Left'#2'U'#6'Height'
+#2#21#3'Top'#3#164#0#5'Width'#3'*'#1#0#0#7'TButton'#2'Ok'#25'BorderSpacing.I'
+'nnerBorder'#2#2#7'Caption'#6#2'OK'#7'Default'#9#7'OnClick'#7#7'OkClick'#8'T'
+'abOrder'#2#11#4'Left'#3#164#1#6'Height'#2#23#3'Top'#2'n'#5'Width'#2'd'#3'Ta'
+'g'#3#161#15#0#0#7'TButton'#6'Cancel'#25'BorderSpacing.InnerBorder'#2#2#6'Ca'
+'ncel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#7'OnClick'#7#11'CancelCl'
+'ick'#8'TabOrder'#2#12#4'Left'#3#164#1#6'Height'#2#23#3'Top'#3#136#0#5'Width'
+#2'd'#3'Tag'#3#162#15#0#0#7'TButton'#13'id_Globalhelp'#25'BorderSpacing.Inne'
+'rBorder'#2#2#7'Caption'#6#5'&Help'#8'TabOrder'#2#13#4'Left'#3#164#1#6'Heigh'
+'t'#2#23#3'Top'#3#162#0#5'Width'#2'd'#3'Tag'#3#163#15#0#0#9'TCheckBox'#16'id'
+'_btn_maximized'#7'Caption'#6#14'Run ma&ximized'#8'TabOrder'#2#5#4'Left'#3
+#131#1#6'Height'#2#13#3'Top'#2'2'#5'Width'#2'a'#3'Tag'#2#17#0#0#11'TOpenDial'
+'og'#10'OpenDialog'#5'Title'#6#25#206#242#234#240#251#242#252' '#241#243#249
,#229#241#242#226#243#254#249#232#233' '#244#224#233#235#11'FilterIndex'#2#0#5
+'Title'#6#25#206#242#234#240#251#242#252' '#241#243#249#229#241#242#226#243
+#254#249#232#233' '#244#224#233#235#4'left'#2' '#3'top'#3#240#1#0#0#0
]);

114
fbtnchangedlg.pas Normal file
View file

@ -0,0 +1,114 @@
{
Double Commander
----------------------------
Configuration Toolbar
Licence : GNU GPL v 2.0
Author : Alexander Koblov (Alexx2000@mail.ru)
contributors:
}
unit fbtnchangedlg;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons, StdCtrls, KASEdit;
type
{ TOneButtonChangeDlg }
TOneButtonChangeDlg = class(TForm)
Cancel: TButton;
Command: TLabel;
IconX: TLabel;
Iconfile: TLabel;
id_btn_assymbol: TCheckBox;
id_btn_command: TComboBox;
id_btn_find1: TButton;
id_btn_findbar: TButton;
id_btn_icon: TListBox;
id_btn_iconfile: TButton;
id_btn_iconfilename: TKASEdit;
id_btn_iconindex: TLabel;
id_btn_maximized: TCheckBox;
id_btn_param: TKASEdit;
id_btn_startpath: TKASEdit;
id_btn_ToolTip: TKASEdit;
id_Globalhelp: TButton;
Ok: TButton;
OpenDialog: TOpenDialog;
Parameters: TLabel;
Startpath: TLabel;
Tooltip: TLabel;
procedure CancelClick(Sender: TObject);
procedure OkClick(Sender: TObject);
procedure id_btn_find1Click(Sender: TObject);
procedure id_btn_iconfileClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
procedure ShowOneBtnChangeDlg(NumberOfButton : Integer);
var
OneButtonChangeDlg: TOneButtonChangeDlg;
LastToolButton : Integer;
implementation
uses fMain, uGlobsPaths;
{ TOneButtonChangeDlg }
procedure ShowOneBtnChangeDlg(NumberOfButton : Integer);
begin
with TOneButtonChangeDlg.Create(Application) do
try
id_btn_command.Text := frmMain.MainToolBar.Commands[NumberOfButton];
id_btn_iconfilename.Text := frmMain.MainToolBar.Icons[NumberOfButton];
id_btn_ToolTip.Text := frmMain.MainToolBar.Buttons[NumberOfButton].Hint;
LastToolButton := NumberOfButton;
ShowModal;
finally
Free;
end;
end;
procedure TOneButtonChangeDlg.CancelClick(Sender: TObject);
begin
Close;
end;
procedure TOneButtonChangeDlg.OkClick(Sender: TObject);
begin
frmMain.MainToolBar.Commands[LastToolButton] := id_btn_command.Text;
frmMain.MainToolBar.Icons[LastToolButton] := id_btn_iconfilename.Text;
frmMain.MainToolBar.Buttons[LastToolButton].Hint := id_btn_ToolTip.Text;
frmMain.MainToolBar.SaveToFile(gpIniDir + 'default.bar');
Close;
end;
procedure TOneButtonChangeDlg.id_btn_find1Click(Sender: TObject);
begin
if OpenDialog.Execute then
id_btn_command.Text := OpenDialog.FileName;
end;
procedure TOneButtonChangeDlg.id_btn_iconfileClick(Sender: TObject);
begin
if OpenDialog.Execute then
id_btn_iconfilename.Text := OpenDialog.FileName;
end;
initialization
{$I fbtnchangedlg.lrs}
end.

112
fchown.lfm Normal file
View file

@ -0,0 +1,112 @@
object frmChown: TfrmChown
ActiveControl = btnCancel
Caption = 'Change Owner/Group'
ClientHeight = 160
ClientWidth = 336
Color = clBackground
Position = poMainFormCenter
HorzScrollBar.Page = 337
HorzScrollBar.Range = 323
VertScrollBar.Page = 161
VertScrollBar.Range = 145
Left = 329
Height = 160
Top = 222
Width = 336
object btnCancel: TBitBtn
Kind = bkCancel
ModalResult = 2
ModalResult = 2
Caption = 'Cancel'
TabOrder = 5
Left = 248
Height = 25
Top = 120
Width = 75
end
object btnSkip: TBitBtn
OnClick = btnSkipClick
Caption = 'Skip'
TabOrder = 4
OnClick = btnSkipClick
Left = 168
Height = 25
Top = 120
Width = 75
end
object btnOK: TBitBtn
Default = True
Kind = bkOK
ModalResult = 1
OnClick = btnOKClick
Default = True
ModalResult = 1
Caption = '&OK'
TabOrder = 2
OnClick = btnOKClick
Left = 8
Height = 25
Top = 120
Width = 75
end
object btnAll: TBitBtn
OnClick = btnAllClick
Caption = '&All'
TabOrder = 3
OnClick = btnAllClick
Left = 88
Height = 25
Top = 120
Width = 75
end
object cbxUsers: TComboBox
ItemHeight = 20
MaxLength = 0
ParentCtl3D = False
Sorted = True
TabOrder = 0
Text = 'cbxUsers'
Left = 96
Height = 26
Top = 40
Width = 227
end
object cbxGroups: TComboBox
ItemHeight = 20
MaxLength = 0
ParentCtl3D = False
Sorted = True
TabOrder = 1
Text = 'cbxGroups'
Left = 96
Height = 26
Top = 72
Width = 227
end
object lblFileName: TLabel
Caption = 'lblFileName'
Font.Color = clBlack
Font.Height = 13
Font.Name = 'Helvetica'
Font.Pitch = fpVariable
Font.Style = [fsBold]
Left = 8
Height = 15
Top = 8
Width = 315
end
object lblOwner: TLabel
Caption = 'Owner'
Left = 8
Height = 15
Top = 46
Width = 80
end
object lblGroup: TLabel
Caption = 'Group'
Left = 8
Height = 15
Top = 78
Width = 80
end
end

31
fchown.lrs Normal file
View file

@ -0,0 +1,31 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmChown','FORMDATA',[
'TPF0'#9'TfrmChown'#8'frmChown'#13'ActiveControl'#7#9'btnCancel'#7'Caption'#6
+#18'Change Owner/Group'#12'ClientHeight'#3#160#0#11'ClientWidth'#3'P'#1#5'Co'
+'lor'#7#12'clBackground'#8'Position'#7#16'poMainFormCenter'#18'HorzScrollBar'
+'.Page'#3'Q'#1#19'HorzScrollBar.Range'#3'C'#1#18'VertScrollBar.Page'#3#161#0
+#19'VertScrollBar.Range'#3#145#0#4'Left'#3'I'#1#6'Height'#3#160#0#3'Top'#3
+#222#0#5'Width'#3'P'#1#0#7'TBitBtn'#9'btnCancel'#4'Kind'#7#8'bkCancel'#11'Mo'
+'dalResult'#2#2#11'ModalResult'#2#2#7'Caption'#6#6'Cancel'#8'TabOrder'#2#5#4
+'Left'#3#248#0#6'Height'#2#25#3'Top'#2'x'#5'Width'#2'K'#0#0#7'TBitBtn'#7'btn'
+'Skip'#7'OnClick'#7#12'btnSkipClick'#7'Caption'#6#4'Skip'#8'TabOrder'#2#4#7
+'OnClick'#7#12'btnSkipClick'#4'Left'#3#168#0#6'Height'#2#25#3'Top'#2'x'#5'Wi'
+'dth'#2'K'#0#0#7'TBitBtn'#5'btnOK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalRe'
+'sult'#2#1#7'OnClick'#7#10'btnOKClick'#7'Default'#9#11'ModalResult'#2#1#7'Ca'
+'ption'#6#3'&OK'#8'TabOrder'#2#2#7'OnClick'#7#10'btnOKClick'#4'Left'#2#8#6'H'
+'eight'#2#25#3'Top'#2'x'#5'Width'#2'K'#0#0#7'TBitBtn'#6'btnAll'#7'OnClick'#7
+#11'btnAllClick'#7'Caption'#6#4'&All'#8'TabOrder'#2#3#7'OnClick'#7#11'btnAll'
+'Click'#4'Left'#2'X'#6'Height'#2#25#3'Top'#2'x'#5'Width'#2'K'#0#0#9'TComboBo'
+'x'#8'cbxUsers'#10'ItemHeight'#2#20#9'MaxLength'#2#0#11'ParentCtl3D'#8#6'Sor'
+'ted'#9#8'TabOrder'#2#0#4'Text'#6#8'cbxUsers'#4'Left'#2'`'#6'Height'#2#26#3
+'Top'#2'('#5'Width'#3#227#0#0#0#9'TComboBox'#9'cbxGroups'#10'ItemHeight'#2#20
+#9'MaxLength'#2#0#11'ParentCtl3D'#8#6'Sorted'#9#8'TabOrder'#2#1#4'Text'#6#9
+'cbxGroups'#4'Left'#2'`'#6'Height'#2#26#3'Top'#2'H'#5'Width'#3#227#0#0#0#6'T'
+'Label'#11'lblFileName'#7'Caption'#6#11'lblFileName'#10'Font.Color'#7#7'clBl'
+'ack'#11'Font.Height'#2#13#9'Font.Name'#6#9'Helvetica'#10'Font.Pitch'#7#10'f'
+'pVariable'#10'Font.Style'#11#6'fsBold'#0#4'Left'#2#8#6'Height'#2#15#3'Top'#2
+#8#5'Width'#3';'#1#0#0#6'TLabel'#8'lblOwner'#7'Caption'#6#5'Owner'#4'Left'#2
+#8#6'Height'#2#15#3'Top'#2'.'#5'Width'#2'P'#0#0#6'TLabel'#8'lblGroup'#7'Capt'
+'ion'#6#5'Group'#4'Left'#2#8#6'Height'#2#15#3'Top'#2'N'#5'Width'#2'P'#0#0#0
]);

184
fchown.pas Normal file
View file

@ -0,0 +1,184 @@
{
File name: fChown.pas
Date: 2003/07/03
Author: Martin Matusu <xmat@volny.cz>
Copyright (C) 2003
This program is free software; you can redistribute it and/or
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, 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.
You should have received a copy of the GNU General Public License
in a file called COPYING along with this program; if not, write to
the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
02139, USA.
}
{mate}
unit fChown;
{$mode objfpc}{$H+}
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, fLngForm, uFileList;
type
TfrmChown = class(TfrmLng)
btnCancel: TBitBtn;
btnSkip: TBitBtn;
btnOK: TBitBtn;
btnAll: TBitBtn;
cbxUsers: TComboBox;
cbxGroups: TComboBox;
lblFileName: TLabel;
lblOwner: TLabel;
lblGroup: TLabel;
procedure btnSkipClick(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure btnAllClick(Sender: TObject);
private
{ Private declarations }
bPerm: Boolean;
iCurrent:Integer;
ffileList:TFileList;
public
{ Public declarations }
procedure LoadLng; override;
procedure StoreData(FileList:TFileList);
function FindNextSelected:Boolean;
procedure ShowFile(iIndex:Integer);
procedure ChangeOwner;
end;
procedure ShowChownForm(FileList:TFileList; const aPath:String);
implementation
uses
uLng, Unix, BaseUnix, uUsersGroups;
procedure ShowChownForm(FileList:TFileList; const aPath:String);
begin
with TfrmChown.Create(Application) do
begin
try
// Path:=aPath;
StoreData(FileList);
if FindNextSelected then
begin
ShowFile(iCurrent);
ShowModal;
end;
finally
Free;
end;
end;
end;
procedure TfrmChown.StoreData(FileList:TFileList);
begin
fFileList:=FileList;
iCurrent:=0;
end;
function TfrmChown.FindNextSelected:Boolean;
var
i:Integer;
begin
Application.ProcessMessages;
for i:=iCurrent to FFileList.Count-1 do
begin
if FFileList.GetItem(i)^.bSelected then
begin
iCurrent:=i;
Result:=True;
Exit;
end;
end;
Result:=False;
end;
procedure TfrmChown.ShowFile(iIndex:Integer);
var
iMyUID: Cardinal;
begin
iMyUID:=fpGetUID; //get user's UID
with ffileList.GetItem(iIndex)^ do
begin
bPerm:=(iMyUID=iOwner);
lblFileName.Caption:=sName;
cbxUsers.Text:=sOwner;
if(imyUID=0) then GetUsers(cbxUsers.Items); //huh, a ROOT :))
cbxUsers.Enabled:=(imyUID=0);
cbxGroups.Text:=sGroup;
if(bPerm or (iMyUID=0)) then
GetUsrGroups(iMyUID,cbxGroups.Items);
cbxGroups.Enabled:=(bPerm or (iMyUID=0));
end;
end;
procedure TfrmChown.btnSkipClick(Sender: TObject);
begin
inherited;
inc (iCurrent);
if not FindNextSelected Then
Close
else
ShowFile(iCurrent);
end;
procedure TfrmChown.LoadLng;
begin
// load strings
Caption:=lngGetString(clngChownDlg);
lblOwner.Caption:=lngGetString(clngChownOwner);
lblGroup.Caption:=lngGetString(clngChownGroup);
btnCancel.Caption:=lngGetString(clngbutCancel);
btnSkip.Caption:=lngGetString(clngbutSkip);
btnAll.Caption:=lngGetString(clngbutAll);
end;
procedure TfrmChown.ChangeOwner;
begin
fpchown(PChar(ffileList.GetItem(iCurrent)^.sName),StrToUID(cbxUsers.Text),
StrToGID(cbxGroups.Text));
end;
procedure TfrmChown.btnOKClick(Sender: TObject);
begin
inherited;
if (bPerm) then
ChangeOwner;
btnSkipClick(Self);
end;
procedure TfrmChown.btnAllClick(Sender: TObject);
begin
inherited;
repeat
if(bPerm) then
ChangeOwner;
inc (iCurrent);
until not FindNextSelected;
Close;
end;
initialization
{$I fChown.lrs}
end.
{/mate}

867
fcomparefiles.lfm Normal file
View file

@ -0,0 +1,867 @@
object frmCompareFiles: TfrmCompareFiles
ActiveControl = edtFileNameLeft
Caption = 'Compare files'
ClientHeight = 540
ClientWidth = 783
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 15
HorzScrollBar.Page = 782
HorzScrollBar.Range = 365
VertScrollBar.Page = 539
VertScrollBar.Range = 52
Left = 61
Height = 540
Top = 550
Width = 783
object Splitter1: TSplitter
Height = 476
Width = 5
Cursor = crHSplit
Left = 361
Height = 476
Top = 41
Width = 5
end
object Panel1: TPanel
Align = alLeft
BevelOuter = bvNone
ClientHeight = 476
ClientWidth = 361
FullRepaint = False
TabOrder = 0
Height = 476
Top = 41
Width = 361
object pnlLeftBox: TPanel
Align = alTop
BevelOuter = bvNone
ClientHeight = 25
ClientWidth = 361
FullRepaint = False
TabOrder = 0
OnResize = pnlLeftBoxResize
Height = 25
Width = 361
object edtFileNameLeft: TEdit
TabOrder = 0
Text = 'pp'
Height = 20
Width = 307
end
object btnFileNameLeft: TButton
BorderSpacing.InnerBorder = 2
Caption = '...'
TabOrder = 1
Left = 323
Height = 20
Width = 20
end
end
object lstLeft: TSynEdit
Align = alClient
Font.Color = clBlack
Font.Height = 13
Font.Name = 'adobe-courier'
Font.Pitch = fpVariable
Height = 451
Name = 'lstLeft'
ParentColor = False
ParentCtl3D = False
TabOrder = 1
Width = 361
BookMarkOptions.Xoffset = -18
Gutter.DigitCount = 2
Gutter.LeftOffset = 0
Gutter.Visible = False
Gutter.Width = 15
Gutter.CodeFoldingWidth = 14
Keystrokes = <
item
Command = 3
ShortCut = 38
end
item
Command = 103
ShortCut = 8230
end
item
Command = 211
ShortCut = 16422
end
item
Command = 4
ShortCut = 40
end
item
Command = 104
ShortCut = 8232
end
item
Command = 212
ShortCut = 16424
end
item
Command = 1
ShortCut = 37
end
item
Command = 101
ShortCut = 8229
end
item
Command = 5
ShortCut = 16421
end
item
Command = 105
ShortCut = 24613
end
item
Command = 2
ShortCut = 39
end
item
Command = 102
ShortCut = 8231
end
item
Command = 6
ShortCut = 16423
end
item
Command = 106
ShortCut = 24615
end
item
Command = 10
ShortCut = 34
end
item
Command = 110
ShortCut = 8226
end
item
Command = 14
ShortCut = 16418
end
item
Command = 114
ShortCut = 24610
end
item
Command = 9
ShortCut = 33
end
item
Command = 109
ShortCut = 8225
end
item
Command = 13
ShortCut = 16417
end
item
Command = 113
ShortCut = 24609
end
item
Command = 7
ShortCut = 36
end
item
Command = 107
ShortCut = 8228
end
item
Command = 15
ShortCut = 16420
end
item
Command = 115
ShortCut = 24612
end
item
Command = 8
ShortCut = 35
end
item
Command = 108
ShortCut = 8227
end
item
Command = 16
ShortCut = 16419
end
item
Command = 116
ShortCut = 24611
end
item
Command = 223
ShortCut = 45
end
item
Command = 201
ShortCut = 16429
end
item
Command = 604
ShortCut = 8237
end
item
Command = 502
ShortCut = 46
end
item
Command = 603
ShortCut = 8238
end
item
Command = 501
ShortCut = 8
end
item
Command = 501
ShortCut = 8200
end
item
Command = 504
ShortCut = 16392
end
item
Command = 601
ShortCut = 32776
end
item
Command = 602
ShortCut = 40968
end
item
Command = 509
ShortCut = 13
end
item
Command = 199
ShortCut = 16449
end
item
Command = 201
ShortCut = 16451
end
item
Command = 610
ShortCut = 24649
end
item
Command = 509
ShortCut = 16461
end
item
Command = 510
ShortCut = 16462
end
item
Command = 503
ShortCut = 16468
end
item
Command = 611
ShortCut = 24661
end
item
Command = 604
ShortCut = 16470
end
item
Command = 603
ShortCut = 16472
end
item
Command = 507
ShortCut = 16473
end
item
Command = 506
ShortCut = 24665
end
item
Command = 601
ShortCut = 16474
end
item
Command = 602
ShortCut = 24666
end
item
Command = 301
ShortCut = 16432
end
item
Command = 302
ShortCut = 16433
end
item
Command = 303
ShortCut = 16434
end
item
Command = 304
ShortCut = 16435
end
item
Command = 305
ShortCut = 16436
end
item
Command = 306
ShortCut = 16437
end
item
Command = 307
ShortCut = 16438
end
item
Command = 308
ShortCut = 16439
end
item
Command = 309
ShortCut = 16440
end
item
Command = 310
ShortCut = 16441
end
item
Command = 351
ShortCut = 24624
end
item
Command = 352
ShortCut = 24625
end
item
Command = 353
ShortCut = 24626
end
item
Command = 354
ShortCut = 24627
end
item
Command = 355
ShortCut = 24628
end
item
Command = 356
ShortCut = 24629
end
item
Command = 357
ShortCut = 24630
end
item
Command = 358
ShortCut = 24631
end
item
Command = 359
ShortCut = 24632
end
item
Command = 360
ShortCut = 24633
end
item
Command = 231
ShortCut = 24654
end
item
Command = 232
ShortCut = 24643
end
item
Command = 233
ShortCut = 24652
end
item
Command = 612
ShortCut = 9
end
item
Command = 613
ShortCut = 8201
end
item
Command = 250
ShortCut = 24642
end>
ReadOnly = True
OnSpecialLineColors = lstLeftSpecialLineColors
OnStatusChange = lstLeftStatusChange
Cursor = crIBeam
Height = 451
Top = 25
Width = 361
end
end
object Panel2: TPanel
Align = alClient
BevelOuter = bvNone
ClientHeight = 476
ClientWidth = 417
FullRepaint = False
TabOrder = 1
Left = 366
Height = 476
Top = 41
Width = 417
object pnlRightBox: TPanel
Align = alTop
BevelOuter = bvNone
ClientHeight = 25
ClientWidth = 417
FullRepaint = False
TabOrder = 0
OnResize = pnlRightBoxResize
Height = 25
Width = 417
object edtFileNameRight: TEdit
TabOrder = 0
Text = 'ppp'
Left = 10
Height = 20
Width = 344
end
object btnFileNameRight: TButton
BorderSpacing.InnerBorder = 2
Caption = '...'
TabOrder = 1
Left = 370
Height = 20
Width = 20
end
end
object lstRight: TSynEdit
Align = alClient
Font.Color = clBlack
Font.Height = 13
Font.Name = 'adobe-courier'
Font.Pitch = fpVariable
Height = 451
Name = 'lstRight'
ParentColor = False
ParentCtl3D = False
TabOrder = 1
Width = 417
BookMarkOptions.Xoffset = -18
Gutter.Visible = False
Gutter.CodeFoldingWidth = 14
Keystrokes = <
item
Command = 3
ShortCut = 38
end
item
Command = 103
ShortCut = 8230
end
item
Command = 211
ShortCut = 16422
end
item
Command = 4
ShortCut = 40
end
item
Command = 104
ShortCut = 8232
end
item
Command = 212
ShortCut = 16424
end
item
Command = 1
ShortCut = 37
end
item
Command = 101
ShortCut = 8229
end
item
Command = 5
ShortCut = 16421
end
item
Command = 105
ShortCut = 24613
end
item
Command = 2
ShortCut = 39
end
item
Command = 102
ShortCut = 8231
end
item
Command = 6
ShortCut = 16423
end
item
Command = 106
ShortCut = 24615
end
item
Command = 10
ShortCut = 34
end
item
Command = 110
ShortCut = 8226
end
item
Command = 14
ShortCut = 16418
end
item
Command = 114
ShortCut = 24610
end
item
Command = 9
ShortCut = 33
end
item
Command = 109
ShortCut = 8225
end
item
Command = 13
ShortCut = 16417
end
item
Command = 113
ShortCut = 24609
end
item
Command = 7
ShortCut = 36
end
item
Command = 107
ShortCut = 8228
end
item
Command = 15
ShortCut = 16420
end
item
Command = 115
ShortCut = 24612
end
item
Command = 8
ShortCut = 35
end
item
Command = 108
ShortCut = 8227
end
item
Command = 16
ShortCut = 16419
end
item
Command = 116
ShortCut = 24611
end
item
Command = 223
ShortCut = 45
end
item
Command = 201
ShortCut = 16429
end
item
Command = 604
ShortCut = 8237
end
item
Command = 502
ShortCut = 46
end
item
Command = 603
ShortCut = 8238
end
item
Command = 501
ShortCut = 8
end
item
Command = 501
ShortCut = 8200
end
item
Command = 504
ShortCut = 16392
end
item
Command = 601
ShortCut = 32776
end
item
Command = 602
ShortCut = 40968
end
item
Command = 509
ShortCut = 13
end
item
Command = 199
ShortCut = 16449
end
item
Command = 201
ShortCut = 16451
end
item
Command = 610
ShortCut = 24649
end
item
Command = 509
ShortCut = 16461
end
item
Command = 510
ShortCut = 16462
end
item
Command = 503
ShortCut = 16468
end
item
Command = 611
ShortCut = 24661
end
item
Command = 604
ShortCut = 16470
end
item
Command = 603
ShortCut = 16472
end
item
Command = 507
ShortCut = 16473
end
item
Command = 506
ShortCut = 24665
end
item
Command = 601
ShortCut = 16474
end
item
Command = 602
ShortCut = 24666
end
item
Command = 301
ShortCut = 16432
end
item
Command = 302
ShortCut = 16433
end
item
Command = 303
ShortCut = 16434
end
item
Command = 304
ShortCut = 16435
end
item
Command = 305
ShortCut = 16436
end
item
Command = 306
ShortCut = 16437
end
item
Command = 307
ShortCut = 16438
end
item
Command = 308
ShortCut = 16439
end
item
Command = 309
ShortCut = 16440
end
item
Command = 310
ShortCut = 16441
end
item
Command = 351
ShortCut = 24624
end
item
Command = 352
ShortCut = 24625
end
item
Command = 353
ShortCut = 24626
end
item
Command = 354
ShortCut = 24627
end
item
Command = 355
ShortCut = 24628
end
item
Command = 356
ShortCut = 24629
end
item
Command = 357
ShortCut = 24630
end
item
Command = 358
ShortCut = 24631
end
item
Command = 359
ShortCut = 24632
end
item
Command = 360
ShortCut = 24633
end
item
Command = 231
ShortCut = 24654
end
item
Command = 232
ShortCut = 24643
end
item
Command = 233
ShortCut = 24652
end
item
Command = 612
ShortCut = 9
end
item
Command = 613
ShortCut = 8201
end
item
Command = 250
ShortCut = 24642
end>
ReadOnly = True
OnSpecialLineColors = lstRightSpecialLineColors
OnStatusChange = lstRightStatusChange
Cursor = crIBeam
Height = 451
Top = 25
Width = 417
end
end
object pnlStatusBar: TStatusBar
Panels = <
item
Text = 'Number of changes: '
Width = 50
end>
Height = 23
Top = 517
Width = 783
end
object pnlButtons: TPanel
Align = alTop
BevelOuter = bvNone
ClientHeight = 41
ClientWidth = 783
FullRepaint = False
TabOrder = 2
Height = 41
Width = 783
object btnCompare: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Compare files'
OnClick = btnCompareClick
TabOrder = 0
Left = 5
Height = 23
Top = 8
Width = 96
end
object btnNextDiff: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Next difference'
TabOrder = 1
Left = 120
Height = 23
Top = 8
Width = 122
end
object btnPrevDiff: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Previous difference'
TabOrder = 2
Left = 256
Height = 23
Top = 8
Width = 147
end
object chbBinMode: TCheckBox
AllowGrayed = True
Caption = 'Binary mode'
TabOrder = 3
Left = 424
Height = 13
Top = 8
Width = 78
end
object btnClose: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Close'
OnClick = btnCloseClick
TabOrder = 4
Left = 648
Height = 23
Top = 8
Width = 50
end
object chbKeepScrolling: TCheckBox
AllowGrayed = True
Caption = 'Keep scrolling'
TabOrder = 5
Left = 528
Height = 13
Top = 8
Width = 86
end
end
end

176
fcomparefiles.pas Normal file
View file

@ -0,0 +1,176 @@
unit fCompareFiles;
{$mode objfpc}{$H+}
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, fLngForm,
ComCtrls, Buttons, SynEdit;
type
TfrmCompareFiles = class(TFrmLng)
Panel1: TPanel;
Splitter1: TSplitter;
Panel2: TPanel;
pnlLeftBox: TPanel;
pnlRightBox: TPanel;
edtFileNameLeft: TEdit;
btnFileNameLeft: TButton;
edtFileNameRight: TEdit;
btnFileNameRight: TButton;
lstRight: TSynEdit;
lstLeft: TSynEdit;
pnlStatusBar: TStatusBar;
pnlButtons: TPanel;
btnCompare: TButton;
btnNextDiff: TButton;
btnPrevDiff: TButton;
chbBinMode: TCheckBox;
btnClose: TButton;
chbKeepScrolling: TCheckBox;
procedure btnCompareClick(Sender: TObject);
procedure lstLeftSpecialLineColors(Sender: TObject; Line: Integer;
var Special: Boolean; var FG, BG: TColor);
procedure lstLeftStatusChange(Sender: TObject; Changes: TSynStatusChanges);
procedure lstRightSpecialLineColors(Sender: TObject; Line: Integer;
var Special: Boolean; var FG, BG: TColor);
procedure lstRightStatusChange(Sender: TObject; Changes: TSynStatusChanges);
procedure pnlLeftBoxResize(Sender: TObject);
procedure pnlRightBoxResize(Sender: TObject);
procedure btnCloseClick(Sender: TObject);
private
{ Private declarations }
public
procedure LoadLng; override;
end;
procedure ShowCmpFiles(const sFile1, sFile2:String);
implementation
uses
uCompareFiles, uLng, uGlobs;
procedure ShowCmpFiles(const sFile1, sFile2:String);
begin
with TfrmCompareFiles.Create(Application)do
begin
try
edtFileNameLeft.Text:=sFile1;
edtFileNameRight.Text:=sFile2;
ShowModal;
finally
Free;
end;
end;
end;
procedure TfrmCompareFiles.LoadLng;
begin
lstLeft.Font.Name:=gEditorFontName;
lstLeft.Font.Style:=[];
lstRight.Font.Name:=gEditorFontName;
lstLeft.Font.Size:=gEditorSize;
lstRight.Font.Size:=gEditorSize;
lstRight.Font.Style:=[];
end;
procedure TfrmCompareFiles.btnCompareClick(Sender: TObject);
var
iChanges : integer;
begin
if chbBinMode.Checked then
iChanges := CompareFiles(edtFileNameLeft.Text, edtFileNameRight.Text,
lstLeft.Lines, lstRight.Lines, cmInternalBin)
else
iChanges := CompareFiles(edtFileNameLeft.Text, edtFileNameRight.Text,
lstLeft.Lines, lstRight.Lines, cmInternalText);
{ CompareFiles(edtFileNameLeft.Text, edtFileNameRight.Text,
lstLeft.Items, lstRight.Items, cmInternalText);}
pnlStatusBar.Panels[0].Text := lngGetString(clngCompareDiffs) + ' ' + IntToStr(iChanges);
end;
procedure TfrmCompareFiles.lstLeftSpecialLineColors(Sender: TObject;
Line: Integer; var Special: Boolean; var FG, BG: TColor);
var
i:Integer;
begin
i:=Integer(lstLeft.Lines.Objects[Line-1]);
if i = 0 then Exit;
Special:=True;
if chbBinMode.Checked then
begin
FG:=clRed;
Exit;
end;
if i=1 then
FG:=clRed
else
FG:=clGreen;
end;
procedure TfrmCompareFiles.lstLeftStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
begin
if (chbKeepScrolling.Checked) then
begin
lstRight.TopLine := lstLeft.TopLine;
lstLeft.Invalidate;
end;
end;
procedure TfrmCompareFiles.lstRightSpecialLineColors(Sender: TObject;
Line: Integer; var Special: Boolean; var FG, BG: TColor);
var
i:Integer;
begin
i:=Integer(lstRight.Lines.Objects[Line-1]);
if i = 0 then Exit;
Special:=True;
if chbBinMode.Checked then
begin
FG:=clRed;
Exit;
end;
if i=1 then
FG:=clRed
else
FG:=clGreen;
end;
procedure TfrmCompareFiles.lstRightStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
begin
if (chbKeepScrolling.Checked) then
begin
lstLeft.TopLine := lstRight.TopLine;
lstRight.Invalidate;
end;
end;
procedure TfrmCompareFiles.pnlLeftBoxResize(Sender: TObject);
begin
inherited;
edtFileNameLeft.Width := pnlLeftBox.Width - btnFileNameLeft.Width;
btnFileNameLeft.Left := pnlLeftBox.Width - btnFileNameLeft.Width;
end;
procedure TfrmCompareFiles.pnlRightBoxResize(Sender: TObject);
begin
inherited;
edtFileNameRight.Width := pnlRightBox.Width - btnFileNameRight.Width;
btnFileNameRight.Left := pnlRightBox.Width - btnFileNameRight.Width;
end;
procedure TfrmCompareFiles.btnCloseClick(Sender: TObject);
begin
inherited;
Close();
end;
initialization
{$I fCompareFiles.lrs}
end.

381
fconfigtoolbar.lfm Normal file
View file

@ -0,0 +1,381 @@
object ButtonChangeDlg: TButtonChangeDlg
ActiveControl = id_btn_barfilesearch
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'Change button bar'
ClientHeight = 281
ClientWidth = 562
Font.Color = clBtnText
Font.Height = -11
Font.Name = 'MS Sans Serif'
OnShow = FormShow
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 13
HorzScrollBar.Page = 561
VertScrollBar.Page = 280
Left = 280
Height = 281
Top = 351
Width = 562
HelpContext = 270
Tag = 1
object Buttonbar: TLabel
AutoSize = False
Caption = '&Button bar:'
Color = clNone
ParentColor = False
Left = 6
Height = 13
Top = 5
Width = 75
Tag = 5
end
object Label1: TLabel
AutoSize = False
Color = clWindowFrame
ParentColor = False
Transparent = False
Left = -5
Height = 2
Top = 80
Width = 562
end
object Command: TLabel
AutoSize = False
Caption = '&Command:'
Color = clNone
FocusControl = id_btn_command
ParentColor = False
Left = 4
Height = 13
Top = 87
Width = 81
Tag = 9
end
object Parameters: TLabel
AutoSize = False
Caption = '&Parameters:'
Color = clNone
FocusControl = id_btn_param
ParentColor = False
Left = 4
Height = 13
Top = 115
Width = 81
Tag = 10
end
object Startpath: TLabel
AutoSize = False
Caption = '&Start path:'
Color = clNone
FocusControl = id_btn_startpath
ParentColor = False
Left = 4
Height = 13
Top = 140
Width = 81
Tag = 11
end
object Iconfile: TLabel
AutoSize = False
Caption = 'Icon &file:'
Color = clNone
FocusControl = id_btn_iconfilename
ParentColor = False
Left = 4
Height = 13
Top = 165
Width = 81
Tag = 12
end
object IconX: TLabel
AutoSize = False
Caption = 'Ic&on:'
Color = clNone
FocusControl = id_btn_icon
ParentColor = False
WordWrap = True
Left = 4
Height = 13
Top = 190
Width = 49
Tag = 13
end
object id_btn_iconindex: TLabel
AutoSize = False
Caption = '0'
Color = clNone
ParentColor = False
WordWrap = True
Left = 54
Height = 14
Top = 190
Width = 25
end
object Tooltip: TLabel
AutoSize = False
Caption = '&Tooltip:'
Color = clNone
FocusControl = id_btn_ToolTip
ParentColor = False
Left = 4
Height = 14
Top = 248
Width = 81
Tag = 14
end
object id_btn_barfilesearch: TButton
BorderSpacing.InnerBorder = 2
Caption = '>>'
TabOrder = 0
Left = 394
Height = 21
Top = 2
Width = 24
end
object id_btn_delete: TButton
BorderSpacing.InnerBorder = 2
Caption = '&Delete'
OnClick = id_btn_deleteClick
TabOrder = 2
Left = 4
Height = 23
Top = 52
Width = 77
Tag = 8
end
object id_btn_add: TButton
BorderSpacing.InnerBorder = 2
Caption = '&Append'
OnClick = id_btn_addClick
TabOrder = 1
Left = 4
Height = 23
Top = 25
Width = 77
Tag = 7
end
object id_btn_command: TComboBox
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
DropDownCount = 20
Font.Height = -11
Font.Name = 'MS Sans Serif'
ItemHeight = 13
MaxLength = 0
TabOrder = 4
Left = 85
Height = 21
Top = 86
Width = 298
end
object id_btn_find1: TButton
BorderSpacing.InnerBorder = 2
Caption = '>>'
OnClick = id_btn_find1Click
TabOrder = 5
Left = 384
Height = 22
Top = 85
Width = 24
end
object id_btn_findbar: TButton
BorderSpacing.InnerBorder = 2
Caption = 'Add S&ubbar >>'
TabOrder = 6
Left = 420
Height = 23
Top = 84
Width = 109
Tag = 15
end
object id_btn_param: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 7
Left = 85
Height = 21
Top = 111
Width = 298
end
object id_btn_assymbol: TCheckBox
Caption = 'Run mi&nimized'
TabOrder = 8
Left = 387
Height = 13
Top = 114
Width = 94
Tag = 16
end
object id_btn_startpath: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 10
Left = 85
Height = 21
Top = 136
Width = 298
end
object id_btn_iconfilename: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 11
Left = 85
Height = 21
Top = 161
Width = 298
end
object id_btn_iconfile: TButton
BorderSpacing.InnerBorder = 2
Caption = '>>'
OnClick = id_btn_iconfileClick
TabOrder = 12
Left = 384
Height = 21
Top = 160
Width = 24
end
object id_btn_icon: TListBox
Font.Height = -11
Font.Name = 'MS Sans Serif'
ItemHeight = 36
Style = lbOwnerDrawFixed
TabOrder = 13
Left = 85
Height = 54
Top = 186
Width = 298
end
object id_btn_ToolTip: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
TabOrder = 14
Left = 85
Height = 21
Top = 245
Width = 298
end
object Ok: TButton
BorderSpacing.InnerBorder = 2
Caption = 'OK'
Default = True
OnClick = OkClick
TabOrder = 15
Left = 420
Height = 23
Top = 187
Width = 109
Tag = 4001
end
object Cancel: TButton
BorderSpacing.InnerBorder = 2
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 17
Left = 420
Height = 23
Top = 213
Width = 109
Tag = 4002
end
object id_Globalhelp: TButton
BorderSpacing.InnerBorder = 2
Caption = '&Help'
TabOrder = 16
Left = 420
Height = 23
Top = 239
Width = 109
Tag = 4003
end
object id_btn_maximized: TCheckBox
Caption = 'Run ma&ximized'
TabOrder = 9
Left = 387
Height = 13
Top = 130
Width = 97
Tag = 17
end
object GroupBox1: TGroupBox
Caption = 'Appearance'
ClientHeight = 59
ClientWidth = 109
TabOrder = 3
Left = 420
Height = 77
Width = 113
Tag = 18
object Size: TLabel
AutoSize = False
Caption = 'S&ize:'
Color = clNone
FocusControl = id_btn_barsize
ParentColor = False
Left = 6
Height = 14
Top = 7
Width = 55
Tag = 6
end
object id_btn_barsize: TKASEdit
Font.Height = -11
Font.Name = 'MS Sans Serif'
TabOrder = 0
Text = '0'
Left = 62
Height = 21
Width = 43
end
object id_FlatIcons: TCheckBox
Caption = 'F&lat icons'
Checked = True
State = cbChecked
TabOrder = 1
Left = 6
Height = 13
Top = 18
Width = 71
Tag = 19
end
object id_SmallIcons: TCheckBox
Caption = 'S&mall icons'
TabOrder = 2
Left = 6
Height = 13
Top = 38
Width = 79
Tag = 20
end
end
object tbScrollBox: TScrollBox
TabOrder = 18
AutoScroll = True
Left = 86
Height = 50
Top = 25
Width = 330
object id_btn_bar: TKAStoolBar
OnToolButtonClick = id_btn_barToolButtonClick
CheckToolButton = True
BevelOuter = bvNone
ClientHeight = 23
ClientWidth = 296
TabOrder = 0
Height = 23
Width = 296
end
end
object OpenDialog: TOpenDialog
Title = 'Îòêðûòü ñóùåñòâóþùèé ôàéë'
FilterIndex = 0
Title = 'Îòêðûòü ñóùåñòâóþùèé ôàéë'
left = 8
top = 535
end
end

100
fconfigtoolbar.lrs Normal file
View file

@ -0,0 +1,100 @@
{ Ýòî - ôàéë ðåñóðñîâ, àâòîìàòè÷åñêè ñîçäàííûé lazarus }
LazarusResources.Add('TButtonChangeDlg','FORMDATA',[
'TPF0'#16'TButtonChangeDlg'#15'ButtonChangeDlg'#13'ActiveControl'#7#20'id_btn'
+'_barfilesearch'#11'BorderIcons'#11#12'biSystemMenu'#0#11'BorderStyle'#7#8'b'
+'sDialog'#7'Caption'#6#17'Change button bar'#12'ClientHeight'#3#25#1#11'Clie'
+'ntWidth'#3'2'#2#10'Font.Color'#7#9'clBtnText'#11'Font.Height'#2#245#9'Font.'
+'Name'#6#13'MS Sans Serif'#6'OnShow'#7#8'FormShow'#13'PixelsPerInch'#2'`'#8
+'Position'#7#14'poScreenCenter'#10'TextHeight'#2#13#18'HorzScrollBar.Page'#3
+'1'#2#18'VertScrollBar.Page'#3#24#1#4'Left'#3#24#1#6'Height'#3#25#1#3'Top'#3
+'_'#1#5'Width'#3'2'#2#11'HelpContext'#3#14#1#3'Tag'#2#1#0#6'TLabel'#9'Button'
+'bar'#8'AutoSize'#8#7'Caption'#6#12'&Button bar:'#5'Color'#7#6'clNone'#11'Pa'
+'rentColor'#8#4'Left'#2#6#6'Height'#2#13#3'Top'#2#5#5'Width'#2'K'#3'Tag'#2#5
+#0#0#6'TLabel'#6'Label1'#8'AutoSize'#8#5'Color'#7#13'clWindowFrame'#11'Paren'
+'tColor'#8#11'Transparent'#8#4'Left'#2#251#6'Height'#2#2#3'Top'#2'P'#5'Width'
+#3'2'#2#0#0#6'TLabel'#7'Command'#8'AutoSize'#8#7'Caption'#6#9'&Command:'#5'C'
+'olor'#7#6'clNone'#12'FocusControl'#7#14'id_btn_command'#11'ParentColor'#8#4
+'Left'#2#4#6'Height'#2#13#3'Top'#2'W'#5'Width'#2'Q'#3'Tag'#2#9#0#0#6'TLabel'
+#10'Parameters'#8'AutoSize'#8#7'Caption'#6#12'&Parameters:'#5'Color'#7#6'clN'
+'one'#12'FocusControl'#7#12'id_btn_param'#11'ParentColor'#8#4'Left'#2#4#6'He'
+'ight'#2#13#3'Top'#2's'#5'Width'#2'Q'#3'Tag'#2#10#0#0#6'TLabel'#9'Startpath'
+#8'AutoSize'#8#7'Caption'#6#12'&Start path:'#5'Color'#7#6'clNone'#12'FocusCo'
+'ntrol'#7#16'id_btn_startpath'#11'ParentColor'#8#4'Left'#2#4#6'Height'#2#13#3
+'Top'#3#140#0#5'Width'#2'Q'#3'Tag'#2#11#0#0#6'TLabel'#8'Iconfile'#8'AutoSize'
+#8#7'Caption'#6#11'Icon &file:'#5'Color'#7#6'clNone'#12'FocusControl'#7#19'i'
+'d_btn_iconfilename'#11'ParentColor'#8#4'Left'#2#4#6'Height'#2#13#3'Top'#3
+#165#0#5'Width'#2'Q'#3'Tag'#2#12#0#0#6'TLabel'#5'IconX'#8'AutoSize'#8#7'Capt'
+'ion'#6#6'Ic&on:'#5'Color'#7#6'clNone'#12'FocusControl'#7#11'id_btn_icon'#11
+'ParentColor'#8#8'WordWrap'#9#4'Left'#2#4#6'Height'#2#13#3'Top'#3#190#0#5'Wi'
+'dth'#2'1'#3'Tag'#2#13#0#0#6'TLabel'#16'id_btn_iconindex'#8'AutoSize'#8#7'Ca'
+'ption'#6#1'0'#5'Color'#7#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#2
+'6'#6'Height'#2#14#3'Top'#3#190#0#5'Width'#2#25#0#0#6'TLabel'#7'Tooltip'#8'A'
+'utoSize'#8#7'Caption'#6#9'&Tooltip:'#5'Color'#7#6'clNone'#12'FocusControl'#7
+#14'id_btn_ToolTip'#11'ParentColor'#8#4'Left'#2#4#6'Height'#2#14#3'Top'#3#248
+#0#5'Width'#2'Q'#3'Tag'#2#14#0#0#7'TButton'#20'id_btn_barfilesearch'#25'Bord'
+'erSpacing.InnerBorder'#2#2#7'Caption'#6#2'>>'#8'TabOrder'#2#0#4'Left'#3#138
+#1#6'Height'#2#21#3'Top'#2#2#5'Width'#2#24#0#0#7'TButton'#13'id_btn_delete'
+#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#7'&Delete'#7'OnClick'#7#18'i'
+'d_btn_deleteClick'#8'TabOrder'#2#2#4'Left'#2#4#6'Height'#2#23#3'Top'#2'4'#5
+'Width'#2'M'#3'Tag'#2#8#0#0#7'TButton'#10'id_btn_add'#25'BorderSpacing.Inner'
+'Border'#2#2#7'Caption'#6#7'&Append'#7'OnClick'#7#15'id_btn_addClick'#8'TabO'
+'rder'#2#1#4'Left'#2#4#6'Height'#2#23#3'Top'#2#25#5'Width'#2'M'#3'Tag'#2#7#0
+#0#9'TComboBox'#14'id_btn_command'#16'AutoCompleteText'#11#22'cbactEndOfLine'
+'Complete'#20'cbactSearchAscending'#0#13'DropDownCount'#2#20#11'Font.Height'
+#2#245#9'Font.Name'#6#13'MS Sans Serif'#10'ItemHeight'#2#13#9'MaxLength'#2#0
+#8'TabOrder'#2#4#4'Left'#2'U'#6'Height'#2#21#3'Top'#2'V'#5'Width'#3'*'#1#0#0
+#7'TButton'#12'id_btn_find1'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2
+'>>'#7'OnClick'#7#17'id_btn_find1Click'#8'TabOrder'#2#5#4'Left'#3#128#1#6'He'
+'ight'#2#22#3'Top'#2'U'#5'Width'#2#24#0#0#7'TButton'#14'id_btn_findbar'#25'B'
+'orderSpacing.InnerBorder'#2#2#7'Caption'#6#14'Add S&ubbar >>'#8'TabOrder'#2
+#6#4'Left'#3#164#1#6'Height'#2#23#3'Top'#2'T'#5'Width'#2'm'#3'Tag'#2#15#0#0#8
+'TKASEdit'#12'id_btn_param'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans '
+'Serif'#9'MaxLength'#3#3#1#8'TabOrder'#2#7#4'Left'#2'U'#6'Height'#2#21#3'Top'
+#2'o'#5'Width'#3'*'#1#0#0#9'TCheckBox'#15'id_btn_assymbol'#7'Caption'#6#14'R'
+'un mi&nimized'#8'TabOrder'#2#8#4'Left'#3#131#1#6'Height'#2#13#3'Top'#2'r'#5
+'Width'#2'^'#3'Tag'#2#16#0#0#8'TKASEdit'#16'id_btn_startpath'#11'Font.Height'
+#2#245#9'Font.Name'#6#13'MS Sans Serif'#9'MaxLength'#3#3#1#8'TabOrder'#2#10#4
+'Left'#2'U'#6'Height'#2#21#3'Top'#3#136#0#5'Width'#3'*'#1#0#0#8'TKASEdit'#19
+'id_btn_iconfilename'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'
+#9'MaxLength'#3#3#1#8'TabOrder'#2#11#4'Left'#2'U'#6'Height'#2#21#3'Top'#3#161
+#0#5'Width'#3'*'#1#0#0#7'TButton'#15'id_btn_iconfile'#25'BorderSpacing.Inner'
+'Border'#2#2#7'Caption'#6#2'>>'#7'OnClick'#7#20'id_btn_iconfileClick'#8'TabO'
+'rder'#2#12#4'Left'#3#128#1#6'Height'#2#21#3'Top'#3#160#0#5'Width'#2#24#0#0#8
+'TListBox'#11'id_btn_icon'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans S'
+'erif'#10'ItemHeight'#2'$'#5'Style'#7#16'lbOwnerDrawFixed'#8'TabOrder'#2#13#4
+'Left'#2'U'#6'Height'#2'6'#3'Top'#3#186#0#5'Width'#3'*'#1#0#0#8'TKASEdit'#14
+'id_btn_ToolTip'#11'Font.Height'#2#245#9'Font.Name'#6#13'MS Sans Serif'#9'Ma'
,'xLength'#3#3#1#8'TabOrder'#2#14#4'Left'#2'U'#6'Height'#2#21#3'Top'#3#245#0#5
+'Width'#3'*'#1#0#0#7'TButton'#2'Ok'#25'BorderSpacing.InnerBorder'#2#2#7'Capt'
+'ion'#6#2'OK'#7'Default'#9#7'OnClick'#7#7'OkClick'#8'TabOrder'#2#15#4'Left'#3
+#164#1#6'Height'#2#23#3'Top'#3#187#0#5'Width'#2'm'#3'Tag'#3#161#15#0#0#7'TBu'
+'tton'#6'Cancel'#25'BorderSpacing.InnerBorder'#2#2#6'Cancel'#9#7'Caption'#6#6
+'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#17#4'Left'#3#164#1#6'Height'#2#23
+#3'Top'#3#213#0#5'Width'#2'm'#3'Tag'#3#162#15#0#0#7'TButton'#13'id_Globalhel'
+'p'#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#5'&Help'#8'TabOrder'#2#16
+#4'Left'#3#164#1#6'Height'#2#23#3'Top'#3#239#0#5'Width'#2'm'#3'Tag'#3#163#15
+#0#0#9'TCheckBox'#16'id_btn_maximized'#7'Caption'#6#14'Run ma&ximized'#8'Tab'
+'Order'#2#9#4'Left'#3#131#1#6'Height'#2#13#3'Top'#3#130#0#5'Width'#2'a'#3'Ta'
+'g'#2#17#0#0#9'TGroupBox'#9'GroupBox1'#7'Caption'#6#10'Appearance'#12'Client'
+'Height'#2';'#11'ClientWidth'#2'm'#8'TabOrder'#2#3#4'Left'#3#164#1#6'Height'
+#2'M'#5'Width'#2'q'#3'Tag'#2#18#0#6'TLabel'#4'Size'#8'AutoSize'#8#7'Caption'
+#6#6'S&ize:'#5'Color'#7#6'clNone'#12'FocusControl'#7#14'id_btn_barsize'#11'P'
+'arentColor'#8#4'Left'#2#6#6'Height'#2#14#3'Top'#2#7#5'Width'#2'7'#3'Tag'#2#6
+#0#0#8'TKASEdit'#14'id_btn_barsize'#11'Font.Height'#2#245#9'Font.Name'#6#13
+'MS Sans Serif'#8'TabOrder'#2#0#4'Text'#6#1'0'#4'Left'#2'>'#6'Height'#2#21#5
+'Width'#2'+'#0#0#9'TCheckBox'#12'id_FlatIcons'#7'Caption'#6#11'F&lat icons'#7
+'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#1#4'Left'#2#6#6'Height'#2
+#13#3'Top'#2#18#5'Width'#2'G'#3'Tag'#2#19#0#0#9'TCheckBox'#13'id_SmallIcons'
+#7'Caption'#6#12'S&mall icons'#8'TabOrder'#2#2#4'Left'#2#6#6'Height'#2#13#3
+'Top'#2'&'#5'Width'#2'O'#3'Tag'#2#20#0#0#0#10'TScrollBox'#11'tbScrollBox'#8
+'TabOrder'#2#18#10'AutoScroll'#9#4'Left'#2'V'#6'Height'#2'2'#3'Top'#2#25#5'W'
+'idth'#3'J'#1#0#11'TKAStoolBar'#10'id_btn_bar'#17'OnToolButtonClick'#7#25'id'
+'_btn_barToolButtonClick'#15'CheckToolButton'#9#10'BevelOuter'#7#6'bvNone'#12
+'ClientHeight'#2#23#11'ClientWidth'#3'('#1#8'TabOrder'#2#0#6'Height'#2#23#5
+'Width'#3'('#1#0#0#0#11'TOpenDialog'#10'OpenDialog'#5'Title'#6#25#206#242#234
+#240#251#242#252' '#241#243#249#229#241#242#226#243#254#249#232#233' '#244
+#224#233#235#11'FilterIndex'#2#0#5'Title'#6#25#206#242#234#240#251#242#252' '
+#241#243#249#229#241#242#226#243#254#249#232#233' '#244#224#233#235#4'left'#2
+#8#3'top'#3#23#2#0#0#0
]);

182
fconfigtoolbar.pas Normal file
View file

@ -0,0 +1,182 @@
{
Double Commander
----------------------------
Configuration Toolbar
Licence : GNU GPL v 2.0
Author : Alexander Koblov (Alexx2000@mail.ru)
contributors:
}
unit fconfigtoolbar;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls, Buttons, KASToolBar, KASEdit;
type
{ TButtonChangeDlg }
TButtonChangeDlg = class(TForm)
Buttonbar: TLabel;
Cancel: TButton;
Command: TLabel;
GroupBox1: TGroupBox;
IconX: TLabel;
Iconfile: TLabel;
id_btn_add: TButton;
id_btn_assymbol: TCheckBox;
id_btn_bar: TKASToolBar;
id_btn_barfilesearch: TButton;
id_btn_barsize: TKASEdit;
id_btn_command: TComboBox;
id_btn_delete: TButton;
id_btn_find1: TButton;
id_btn_findbar: TButton;
id_btn_icon: TListBox;
id_btn_iconfile: TButton;
id_btn_iconfilename: TKASEdit;
id_btn_iconindex: TLabel;
id_btn_maximized: TCheckBox;
id_btn_param: TKASEdit;
id_btn_startpath: TKASEdit;
id_btn_ToolTip: TKASEdit;
id_FlatIcons: TCheckBox;
id_Globalhelp: TButton;
id_SmallIcons: TCheckBox;
Label1: TLabel;
Ok: TButton;
OpenDialog: TOpenDialog;
Parameters: TLabel;
tbScrollBox: TScrollBox;
Size: TLabel;
Startpath: TLabel;
Tooltip: TLabel;
procedure FormShow(Sender: TObject);
procedure OkClick(Sender: TObject);
procedure id_btn_addClick(Sender: TObject);
procedure id_btn_barToolButtonClick(NumberOfButton : Integer);
procedure Save;
procedure id_btn_deleteClick(Sender: TObject);
procedure id_btn_find1Click(Sender: TObject);
procedure id_btn_iconfileClick(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
procedure ShowConfigToolbar;
var
ButtonChangeDlg: TButtonChangeDlg;
LastToolButton, NewToolButton : Integer;
implementation
uses fMain, uGlobsPaths;
procedure ShowConfigToolbar;
begin
with TButtonChangeDlg.Create(Application) do
try
LastToolButton := -1;
NewToolButton := -1;
id_btn_bar.CreateWnd;
ShowModal;
finally
Free;
end;
end;
{ TButtonChangeDlg }
procedure TButtonChangeDlg.FormShow(Sender: TObject);
begin
id_btn_bar.LoadFromFile(gpIniDir + 'default.bar');
end;
procedure TButtonChangeDlg.OkClick(Sender: TObject);
begin
Save;
id_btn_bar.SaveToFile(gpIniDir + 'default.bar');
frmMain.MainToolBar.DeleteAllToolButtons;
//frmMain.MainToolBar.CreateWnd;
frmMain.MainToolBar.LoadFromFile(gpIniDir + 'default.bar');
Close;
end;
(*Add new button on tool bar*)
procedure TButtonChangeDlg.id_btn_addClick(Sender: TObject);
begin
Save;
NewToolButton := id_btn_bar.AddButton('', '', '');
//ShowMessage(IntToStr(NewToolButton));
end;
(*Select button on panel*)
procedure TButtonChangeDlg.id_btn_barToolButtonClick(NumberOfButton : Integer);
begin
Save;
id_btn_command.Text := id_btn_bar.Commands[NumberOfButton];
id_btn_iconfilename.Text := id_btn_bar.Icons[NumberOfButton];
id_btn_ToolTip.Text := id_btn_bar.Buttons[NumberOfButton].Hint;
LastToolButton := NumberOfButton;
end;
(*Save current button*)
procedure TButtonChangeDlg.Save;
begin
if (LastToolButton >= 0) and (id_btn_bar.ButtonCount > 0) then
begin
id_btn_bar.Commands[LastToolButton] := id_btn_command.Text;
id_btn_bar.Icons[LastToolButton] := id_btn_iconfilename.Text;
id_btn_bar.Buttons[LastToolButton].Hint := id_btn_ToolTip.Text;
end
else (*If only Append clicked*)
if NewToolButton >= 0 then
begin
//ShowMessage(IntToStr(NewToolButton));
id_btn_bar.Commands[NewToolButton] := id_btn_command.Text;
id_btn_bar.Icons[NewToolButton] := id_btn_iconfilename.Text;
id_btn_bar.Buttons[NewToolButton].Hint := id_btn_ToolTip.Text;
end;
end;
(*Remove current button*)
procedure TButtonChangeDlg.id_btn_deleteClick(Sender: TObject);
begin
if (LastToolButton >= 0) and (id_btn_bar.ButtonCount > 0) then
begin
id_btn_bar.RemoveButton(LastToolButton);
id_btn_command.Text := '';
id_btn_iconfilename.Text := '';
id_btn_ToolTip.Text := '';
LastToolButton := -1;
NewToolButton := -1;
end;
end;
procedure TButtonChangeDlg.id_btn_find1Click(Sender: TObject);
begin
if OpenDialog.Execute then
id_btn_command.Text := OpenDialog.FileName;
end;
procedure TButtonChangeDlg.id_btn_iconfileClick(Sender: TObject);
var
sDir: string;
begin
if OpenDialog.Execute then
id_btn_iconfilename.Text := OpenDialog.FileName;
end;
initialization
{$I fconfigtoolbar.lrs}
end.

590
feditor.lfm Normal file
View file

@ -0,0 +1,590 @@
object frmEditor: TfrmEditor
ActiveControl = Editor
Caption = 'frmEditor'
ClientHeight = 468
ClientWidth = 733
KeyPreview = True
Menu = MainMenu1
OnClose = frmEditorClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 16
HorzScrollBar.Page = 732
VertScrollBar.Page = 467
VertScrollBar.Range = 19
Left = 436
Height = 488
Top = 292
Width = 733
object StatusBar: TStatusBar
Panels = <
item
Width = 50
end
item
Width = 150
end
item
Width = 50
end
item
Width = 50
end>
SimplePanel = False
Height = 23
Top = 445
Width = 733
end
object Editor: TSynEdit
Align = alClient
Anchors = [akTop]
Font.Color = clBlack
Font.Height = 13
Font.Name = 'adobe-courier'
Font.Pitch = fpFixed
Height = 445
Name = 'Editor'
ParentColor = False
ParentCtl3D = False
TabOrder = 0
Width = 733
OnKeyDown = EditorKeyDown
OnKeyPress = EditorKeyPress
OnKeyUp = EditorKeyUp
BookMarkOptions.Xoffset = 34
Gutter.ShowLineNumbers = True
Gutter.CodeFoldingWidth = 14
Keystrokes = <
item
Command = 3
ShortCut = 38
end
item
Command = 103
ShortCut = 8230
end
item
Command = 211
ShortCut = 16422
end
item
Command = 4
ShortCut = 40
end
item
Command = 104
ShortCut = 8232
end
item
Command = 212
ShortCut = 16424
end
item
Command = 1
ShortCut = 37
end
item
Command = 101
ShortCut = 8229
end
item
Command = 5
ShortCut = 16421
end
item
Command = 105
ShortCut = 24613
end
item
Command = 2
ShortCut = 39
end
item
Command = 102
ShortCut = 8231
end
item
Command = 6
ShortCut = 16423
end
item
Command = 106
ShortCut = 24615
end
item
Command = 10
ShortCut = 34
end
item
Command = 110
ShortCut = 8226
end
item
Command = 14
ShortCut = 16418
end
item
Command = 114
ShortCut = 24610
end
item
Command = 9
ShortCut = 33
end
item
Command = 109
ShortCut = 8225
end
item
Command = 13
ShortCut = 16417
end
item
Command = 113
ShortCut = 24609
end
item
Command = 7
ShortCut = 36
end
item
Command = 107
ShortCut = 8228
end
item
Command = 15
ShortCut = 16420
end
item
Command = 115
ShortCut = 24612
end
item
Command = 8
ShortCut = 35
end
item
Command = 108
ShortCut = 8227
end
item
Command = 16
ShortCut = 16419
end
item
Command = 116
ShortCut = 24611
end
item
Command = 223
ShortCut = 45
end
item
Command = 201
ShortCut = 16429
end
item
Command = 604
ShortCut = 8237
end
item
Command = 502
ShortCut = 46
end
item
Command = 603
ShortCut = 8238
end
item
Command = 501
ShortCut = 8
end
item
Command = 501
ShortCut = 8200
end
item
Command = 504
ShortCut = 16392
end
item
Command = 601
ShortCut = 32776
end
item
Command = 602
ShortCut = 40968
end
item
Command = 509
ShortCut = 13
end
item
Command = 199
ShortCut = 16449
end
item
Command = 201
ShortCut = 16451
end
item
Command = 610
ShortCut = 24649
end
item
Command = 509
ShortCut = 16461
end
item
Command = 510
ShortCut = 16462
end
item
Command = 503
ShortCut = 16468
end
item
Command = 611
ShortCut = 24661
end
item
Command = 604
ShortCut = 16470
end
item
Command = 603
ShortCut = 16472
end
item
Command = 507
ShortCut = 16473
end
item
Command = 506
ShortCut = 24665
end
item
Command = 601
ShortCut = 16474
end
item
Command = 602
ShortCut = 24666
end
item
Command = 301
ShortCut = 16432
end
item
Command = 302
ShortCut = 16433
end
item
Command = 303
ShortCut = 16434
end
item
Command = 304
ShortCut = 16435
end
item
Command = 305
ShortCut = 16436
end
item
Command = 306
ShortCut = 16437
end
item
Command = 307
ShortCut = 16438
end
item
Command = 308
ShortCut = 16439
end
item
Command = 309
ShortCut = 16440
end
item
Command = 310
ShortCut = 16441
end
item
Command = 351
ShortCut = 24624
end
item
Command = 352
ShortCut = 24625
end
item
Command = 353
ShortCut = 24626
end
item
Command = 354
ShortCut = 24627
end
item
Command = 355
ShortCut = 24628
end
item
Command = 356
ShortCut = 24629
end
item
Command = 357
ShortCut = 24630
end
item
Command = 358
ShortCut = 24631
end
item
Command = 359
ShortCut = 24632
end
item
Command = 360
ShortCut = 24633
end
item
Command = 231
ShortCut = 24654
end
item
Command = 232
ShortCut = 24643
end
item
Command = 233
ShortCut = 24652
end
item
Command = 612
ShortCut = 9
end
item
Command = 613
ShortCut = 8201
end
item
Command = 250
ShortCut = 24642
end>
OnChange = EditorChange
OnReplaceText = EditorReplaceText
OnStatusChange = EditorStatusChange
Cursor = crIBeam
Height = 445
Width = 733
end
object MainMenu1: TMainMenu
left = 48
top = 8
object miFile: TMenuItem
Caption = '&File'
object New1: TMenuItem
Action = actFileNew
OnClick = actFileNewExecute
end
object Open1: TMenuItem
Action = actFileOpen
OnClick = actFileOpenExecute
end
object Save1: TMenuItem
Action = actFileSave
OnClick = actFileSaveExecute
end
object SaveAs1: TMenuItem
Action = actFileSaveAs
OnClick = actFileSaveAsExecute
end
object miDiv: TMenuItem
Caption = '-'
end
object miConfHigh: TMenuItem
Action = actConfHigh
OnClick = actConfHighExecute
end
object N1: TMenuItem
Caption = '-'
end
object Exit1: TMenuItem
Action = actFileExit
OnClick = actFileExitExecute
end
end
object miEdit: TMenuItem
Caption = '&Edit'
object miUndo: TMenuItem
Action = actEditUndo
OnClick = actEditUndoExecute
end
object N3: TMenuItem
Caption = '-'
end
object miCut: TMenuItem
Action = actEditCut
OnClick = actEditCutExecute
end
object miCopy: TMenuItem
Action = actEditCopy
OnClick = actEditCopyExecute
end
object miPaste: TMenuItem
Action = actEditPaste
OnClick = actEditPasteExecute
end
object N4: TMenuItem
Caption = '-'
end
object miFind: TMenuItem
Action = actEditFind
OnClick = actEditFindExecute
end
object miReplace: TMenuItem
Action = actEditRplc
OnClick = actEditRplcExecute
end
end
object miHighlight: TMenuItem
Caption = 'Syntax highlight'
end
object Help1: TMenuItem
Caption = '&Help'
object miAbout: TMenuItem
Action = actAbout
OnClick = actAboutExecute
end
end
end
object ActListEdit: TActionList
left = 128
top = 232
object actAbout: TAction
Caption = 'About'
HelpType = htKeyword
OnExecute = actAboutExecute
Category = 'Help'
end
object actFileOpen: TAction
Caption = '&Open'
HelpType = htKeyword
OnExecute = actFileOpenExecute
ShortCut = 16463
Category = 'File'
end
object actFileClose: TAction
Caption = '&Close'
HelpType = htKeyword
Category = 'File'
end
object actFileSave: TAction
Caption = '&Save'
HelpType = htKeyword
OnExecute = actFileSaveExecute
ShortCut = 113
Category = 'File'
end
object actFileSaveAs: TAction
Caption = 'Save &As..'
HelpType = htKeyword
OnExecute = actFileSaveAsExecute
Category = 'File'
end
object actFileNew: TAction
Caption = '&New'
HelpType = htKeyword
OnExecute = actFileNewExecute
ShortCut = 16462
Category = 'File'
end
object actFileExit: TAction
Caption = 'E&xit'
HelpType = htKeyword
OnExecute = actFileExitExecute
ShortCut = 16472
Category = 'File'
end
object actSaveAll: TAction
Caption = 'Sa&ve All'
HelpType = htKeyword
ShortCut = 24659
Category = 'File'
end
object actEditFind: TAction
Caption = '&Find'
HelpType = htKeyword
OnExecute = actEditFindExecute
ShortCut = 16454
Category = 'Edit'
end
object actEditRplc: TAction
Caption = '&Replace'
HelpType = htKeyword
OnExecute = actEditRplcExecute
ShortCut = 16466
Category = 'Edit'
end
object actSave2: TAction
Caption = 'actSave2'
HelpType = htKeyword
OnExecute = actSave2Execute
ShortCut = 16467
Category = 'File'
end
object actConfHigh: TAction
Caption = 'actConfHigh'
HelpType = htKeyword
OnExecute = actConfHighExecute
Category = 'File'
end
object actEditCut: TAction
Caption = 'Cut'
HelpType = htKeyword
OnExecute = actEditCutExecute
ShortCut = 16472
Category = 'Edit'
end
object actEditCopy: TAction
Caption = 'Copy'
HelpType = htKeyword
OnExecute = actEditCopyExecute
ShortCut = 16451
Category = 'Edit'
end
object actEditPaste: TAction
Caption = 'Paste'
HelpType = htKeyword
OnExecute = actEditPasteExecute
ShortCut = 16470
Category = 'Edit'
end
object actEditUndo: TAction
Caption = 'Undo'
HelpType = htKeyword
OnExecute = actEditUndoExecute
ShortCut = 16474
Category = 'Edit'
end
object actEditRedo: TAction
Caption = 'actEditRedo'
HelpType = htKeyword
Category = 'Edit'
end
object actEditSelectAll: TAction
Caption = 'Select&All'
HelpType = htKeyword
OnExecute = actEditSelectAllExecute
ShortCut = 16449
Category = 'Edit'
end
end
end

688
feditor.pas Normal file
View file

@ -0,0 +1,688 @@
{
Build-in Editor for Seksi Commander
----------------------------
Licence : GNU GPL v 2.0
Author : radek.cervinka@centrum.cz
This form used SynEdit and his Highlighters
contributors:
}
unit fEditor;
{$mode objfpc}{$H+}
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, ActnList, Menus, SynEdit,
ComCtrls, SynEditSearch;
type
TfrmEditor = class(TfrmLng)
actEditCut: TAction;
actEditCopy: TAction;
actEditSelectAll: TAction;
actEditUndo: TAction;
actEditRedo: TAction;
actEditPaste: TAction;
MainMenu1: TMainMenu;
ActListEdit: TActionList;
actAbout: TAction;
actFileOpen: TAction;
actFileClose: TAction;
actFileSave: TAction;
actFileSaveAs: TAction;
actFileNew: TAction;
actFileExit: TAction;
miFile: TMenuItem;
New1: TMenuItem;
Open1: TMenuItem;
Save1: TMenuItem;
SaveAs1: TMenuItem;
N1: TMenuItem;
Exit1: TMenuItem;
miEdit: TMenuItem;
miUndo: TMenuItem;
N3: TMenuItem;
miCut: TMenuItem;
miCopy: TMenuItem;
miPaste: TMenuItem;
N4: TMenuItem;
miFind: TMenuItem;
miReplace: TMenuItem;
Help1: TMenuItem;
miAbout: TMenuItem;
actSaveAll: TAction;
StatusBar: TStatusBar;
Editor: TSynEdit;
miHighlight: TMenuItem;
actEditFind: TAction;
actEditRplc: TAction;
actSave2: TAction;
actConfHigh: TAction;
miDiv: TMenuItem;
miConfHigh: TMenuItem;
procedure EditorKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure EditorKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure EditorReplaceText(Sender: TObject; const ASearch, AReplace: string;
Line, Column: integer; var ReplaceAction: TSynReplaceAction);
procedure actAboutExecute(Sender: TObject);
procedure actEditCopyExecute(Sender: TObject);
procedure actEditCutExecute(Sender: TObject);
procedure actEditPasteExecute(Sender: TObject);
procedure actEditSelectAllExecute(Sender: TObject);
procedure actFileNewExecute(Sender: TObject);
procedure actFileOpenExecute(Sender: TObject);
procedure actEditUndoExecute(Sender: TObject);
procedure EditorChange(Sender: TObject);
procedure actFileSaveExecute(Sender: TObject);
procedure actFileSaveAsExecute(Sender: TObject);
procedure EditorStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
procedure actFileExitExecute(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure EditorKeyPress(Sender: TObject; var Key: Char);
procedure actEditFindExecute(Sender: TObject);
procedure actEditRplcExecute(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure actSave2Execute(Sender: TObject);
procedure actConfHighExecute(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure frmEditorClose(Sender: TObject; var CloseAction: TCloseAction);
private
{ Private declarations }
bChanged:Boolean;
bNoName: Boolean;
bIsShortCut:Boolean;
bSearchBackwards:Boolean;
bSearchCaseSensitive:Boolean;
bSearchFromCaret:Boolean;
bSearchSelectionOnly:Boolean;
bSearchWholeWords:Boolean;
sSearchText, sReplaceText:String;
sReplaceTextHistory, sSearchTextHistory:String;
public
{ Public declarations }
SynEditSearch: TSynEditSearch;
procedure LoadLng; override;
procedure LoadFromIni;
procedure SaveToIni;
{ Function CreateNewTab:Integer; // return tab number
Function OpenFileNewTab(const sFileName:String):Integer;}
procedure OpenFile(const sFileName:String);
procedure UpdateStatus;
procedure SetHighLighter(Sender:TObject);
procedure UpdateHighlighterStatus;
procedure DoSearchReplaceText(AReplace: boolean; ABackwards: boolean);
procedure ShowSearchReplaceDialog(AReplace: boolean);
end;
procedure ShowEditor(const sFileName:String);
implementation
uses
dmDialogs, dmHigh, uLng,
SynEditHighlighter, uShowMsg, fMsg, fEditSearch,
SynEditTypes, uGlobsPaths, uGlobs, fEditorConf, LCLType;
procedure TfrmEditor.LoadLng;
var
i:Integer;
mi:TMenuItem;
begin
// load language
Editor.Font.Name:=gEditorFontName;
Editor.Font.Size:=gEditorSize;
miFile.Caption:= lngGetString(clngEditFile);
actFileExit.Caption:= lngGetString(clngEditExit);
miHighlight.Caption:= lngGetString(clngEditSynt);
actFileNew.Caption:= lngGetString(clngEditNew );
actFileOpen.Caption:= lngGetString(clngEditOpen);
actFileSave.Caption:= lngGetString(clngEditSave);
actFileSaveAs.Caption:= lngGetString(clngEditSvAs);
miEdit.Caption:= lngGetString(clngEditEdit);
actEditUndo.Caption:= lngGetString(clngEditUndo);
actEditCut.Caption:= lngGetString(clngEditCut );
actEditCopy.Caption:= lngGetString(clngEditCopy);
actEditPaste.Caption:= lngGetString(clngEditPast);
actEditFind.Caption:= lngGetString(clngEditFind);
actEditRplc.Caption:= lngGetString(clngEditRplc);
actConfHigh.Caption:= lngGetString(clngEditCfg);
// update menu highlighting
miHighlight.Clear;
for i:=0 to dmHighl.ComponentCount -1 do
if dmHighl.Components[i] is TSynCustomHighlighter then
begin
mi:=TMenuItem.Create(miHighlight);
mi.Caption:=TSynCustomHighlighter(dmHighl.Components[i]).GetLanguageName;
mi.Tag:=i;
// mi.Name:='miHigh'+IntToStr(i);
mi.Enabled:=True;
mi.OnClick:=@SetHighLighter;
miHighlight.Add(mi);
end;
end;
procedure ShowEditor(const sFileName:String);
{var
i:Integer;}
begin
with TfrmEditor.Create(Application) do
begin
Left:=gEditorPos.Left;
Top:=gEditorPos.Top;
Width:=gEditorPos.Right;
Height:=gEditorPos.Bottom;
try
LoadAttrFromFile(gpIniDir+csDefaultName);
if sFileName='' then
actFileNew.Execute
else
OpenFile(sFileName);
ShowOnTop;
finally
// Free;
end;
end;
end;
procedure TfrmEditor.OpenFile(const sFileName:String);
var
h:TSynCustomHighlighter;
begin
Editor.Lines.LoadFromFile(sFileName);
h:= dmHighl.GetHighlighterByExt(ExtractFileExt(sFileName));
SetupColorOfHighlighter(h);
Editor.Highlighter:=h;
UpdateHighlighterStatus;
Caption:=sFileName;
bChanged:=False;
bNoname:=False;
UpdateStatus;
end;
procedure TfrmEditor.actFileNewExecute(Sender: TObject);
begin
inherited;
Caption:=lngGetString(clngMsgNewFile);
Editor.Lines.Clear;
bChanged:=False;
bNoname:=True;
UpdateStatus;
end;
procedure TfrmEditor.EditorReplaceText(Sender: TObject; const ASearch,
AReplace: string; Line, Column: integer; var ReplaceAction: TSynReplaceAction );
begin
if ASearch = AReplace then
ReplaceAction := raSkip
else begin
case MsgBox('Replace this text?',[msmbYes, msmbNo, msmbCancel, msmbAll], msmbYes, msmbNo) of
mmrYes: ReplaceAction := raReplace;
mmrAll: ReplaceAction := raReplaceAll;
mmrNo: ReplaceAction := raSkip;
else
ReplaceAction := raCancel;
end;
end;
end;
procedure TfrmEditor.EditorKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
// this is hack, action hot key not work yet
case Key of
VK_F2:
begin
actFileSave.Execute;
Key:=0;
end;
VK_N:
begin
if Shift=[ssCtrl] then
begin
actFileNew.Execute;
Key:=0;
end;
end;
VK_S:
begin
if Shift=[ssCtrl] then
begin
actFileSave.Execute;
Key:=0;
end;
end;
VK_F:
begin
if Shift=[ssCtrl] then
begin
actEditFind.Execute;
Key:=0;
end;
end;
end;
end;
procedure TfrmEditor.EditorKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key=27 then
begin
Key:=0;
Close;
end;
end;
procedure TfrmEditor.actAboutExecute(Sender: TObject);
begin
ShowMessage('Internal editor, part of Seksi Commander');
end;
procedure TfrmEditor.actEditCopyExecute(Sender: TObject);
begin
editor.CopyToClipboard;
end;
procedure TfrmEditor.actEditCutExecute(Sender: TObject);
begin
Editor.CutToClipboard;
end;
procedure TfrmEditor.actEditPasteExecute(Sender: TObject);
begin
editor.PasteFromClipboard;
end;
procedure TfrmEditor.actEditSelectAllExecute(Sender: TObject);
begin
editor.SelectAll;
end;
procedure TfrmEditor.actFileOpenExecute(Sender: TObject);
begin
inherited;
dmDlg.OpenDialog.Filter:='*.*';
if not dmDlg.OpenDialog.Execute then Exit;
OpenFile(dmDlg.OpenDialog.FileName);
UpdateStatus;
end;
procedure TfrmEditor.SetHighLighter(Sender:TObject);
var
h:TSynCustomHighlighter;
begin
// TQSynHighlighter(dmHigh.Components[TMenuItem(Sender).HelpContext]);
h:=TSynCustomHighlighter(dmHighl.Components[TMenuItem(Sender).Tag]);
SetupColorOfHighlighter(h);
Editor.Highlighter:=h;
UpdateHighlighterStatus;
end;
(*
This is code for multi tabs editor, it's buggy because
Synedit bad handle scrollbars in page control, maybe in
future, workaround: new tab must be visible and maybe must have focus
procedure TfrmEditor.actFileNewExecute(Sender: TObject);
var
iPageIndex:Integer;
begin
inherited;
iPageIndex:=CreateNewTab;
with pgEditor.Pages[iPageIndex] do
begin
Caption:='New'+IntToStr(iPageIndex);
Hint:=''; // filename
end;
end;
Function TfrmEditor.CreateNewTab:Integer; // return tab number
var
iPageIndex:Integer;
begin
with TTabSheet.Create(pgEditor) do // create Tab
begin
PageControl:=pgEditor;
iPageIndex:=PageIndex;
// now create Editor
with TSynEdit.Create(pgEditor.Pages[PageIndex]) do
begin
Parent:=pgEditor.Pages[PageIndex];
Align:=alClient;
Lines.Clear;
end;
end;
end;
procedure TfrmEditor.actFileOpenExecute(Sender: TObject);
var
iPageIndex:Integer;
begin
inherited;
dmDlg.OpenDialog.Filter:='*.*';
if dmDlg.OpenDialog.Execute then
OpenFileNewTab(dmDlg.OpenDialog.FileName);
end;
Function TfrmEditor.OpenFileNewTab(const sFileName:String):Integer;
var
iPageIndex:Integer;
begin
inherited;
iPageIndex:=CreateNewTab;
pgEditor.ActivePageIndex:=iPageIndex;
with pgEditor.Pages[iPageIndex] do
begin
Caption:=sFileName;
Hint:=sFileName;
TSynEdit(pgEditor.Pages[iPageIndex].Components[0]).Lines.LoadFromFile(sFileName);
end;
end;
procedure ShowEditor(lsFiles:TStringList);
var
i:Integer;
begin
with TfrmEditor.Create(Application) do
begin
try
for i:=0 to lsFiles.Count-1 do
OpenFileNewTab(lsFiles.Strings[i]);
ShowModal;
finally
Free;
end;
end;
end;
*)
procedure TfrmEditor.actEditUndoExecute(Sender: TObject);
begin
inherited;
Editor.Undo;
UpdateStatus;
end;
procedure TfrmEditor.EditorChange(Sender: TObject);
begin
inherited;
bChanged:=True;
UpdateStatus;
end;
procedure TfrmEditor.actFileSaveExecute(Sender: TObject);
begin
inherited;
if bNoname then
actFileSaveAs.Execute
else
begin
Editor.Lines.SaveToFile(Caption);
bChanged:=False;
UpdateStatus;
end;
end;
procedure TfrmEditor.actFileSaveAsExecute(Sender: TObject);
begin
inherited;
dmDlg.SaveDialog.FileName:=Caption;
dmDlg.SaveDialog.Filter:='*.*'; // rewrite for highlighter
if not dmDlg.SaveDialog.Execute then Exit;
Editor.Lines.SaveToFile(dmDlg.SaveDialog.FileName);
bChanged:=False;
bNoname:=False;
Caption:=dmDlg.SaveDialog.FileName;
UpdateStatus;
Editor.Highlighter:= dmHighl.GetHighlighterByExt(ExtractFileExt(dmDlg.SaveDialog.FileName));
UpdateHighlighterStatus;
end;
procedure TfrmEditor.UpdateStatus;
begin
if bChanged then
StatusBar.Panels[0].Text:='*'
else
StatusBar.Panels[0].Text:='';
StatusBar.Panels[1].Text:=Format('%d:%d',[Editor.CaretX, Editor.CaretY]);
// StatusBar.Panels[2].Text:=IntToStr(Length(Editor.Lines.Text));
end;
procedure TfrmEditor.EditorStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
begin
inherited;
UpdateStatus;
end;
procedure TfrmEditor.UpdateHighlighterStatus;
begin
if assigned(Editor.Highlighter) then
StatusBar.Panels[3].Text:= Editor.Highlighter.GetLanguageName;
end;
procedure TfrmEditor.actFileExitExecute(Sender: TObject);
begin
Close;
end;
procedure TfrmEditor.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
inherited;
CanClose:=False;
if bChanged then
case msgYesNoCancel(Format(lngGetString(clngMsgFileChangedSave),[Caption])) of
mmrYes: actFileSave.Execute;
mmrNo: bChanged:=False;
else
Exit;
end;
CanClose:=True;
end;
procedure TfrmEditor.EditorKeyPress(Sender: TObject; var Key: Char);
begin
// inherited;
end;
procedure TfrmEditor.DoSearchReplaceText(AReplace: boolean;
ABackwards: boolean);
var
Options: TSynSearchOptions;
begin
Statusbar.SimpleText := '';
if AReplace then
Options := [ssoPrompt, ssoReplace, ssoReplaceAll]
else
Options := [];
if ABackwards then
Include(Options, ssoBackwards);
if bSearchCaseSensitive then
Include(Options, ssoMatchCase);
if not bSearchFromCaret then
Include(Options, ssoEntireScope);
if bSearchSelectionOnly then
Include(Options, ssoSelectedOnly);
if bSearchWholeWords then
Include(Options, ssoWholeWord);
if Editor.SearchReplace(sSearchText, sReplaceText, Options) = 0 then
begin
if ssoBackwards in Options then
Editor.BlockEnd := Editor.BlockBegin
else
Editor.BlockBegin := Editor.BlockEnd;
Editor.CaretXY := Editor.BlockBegin;
end;
end;
procedure TfrmEditor.ShowSearchReplaceDialog(AReplace: boolean);
var
dlg: TfrmEditSearch;
begin
// Statusbar.SimpleText := '';
if AReplace then
dlg := TfrmEditSearchReplace.Create(Self)
else
dlg := TfrmEditSearch.Create(Self);
with dlg do try
// assign search options
SearchBackwards := bSearchBackwards;
SearchCaseSensitive := bSearchCaseSensitive;
SearchFromCursor := bSearchFromCaret;
SearchInSelectionOnly := bSearchSelectionOnly;
// start with last search text
SearchText := sSearchText;
{ if fSearchTextAtCaret then begin}
// if something is selected search for that text
if Editor.SelAvail and (Editor.BlockBegin.Y = Editor.BlockEnd.Y)
then
SearchText := Editor.SelText
else
SearchText := Editor.GetWordAtRowCol(Editor.CaretXY);
// end;
SearchTextHistory := sSearchTextHistory;
if AReplace then with dlg as TfrmEditSearchReplace do begin
ReplaceText := sReplaceText;
ReplaceTextHistory := sReplaceTextHistory;
end;
SearchWholeWords := bSearchWholeWords;
if ShowModal = mrOK then begin
bSearchBackwards := SearchBackwards;
bSearchCaseSensitive := SearchCaseSensitive;
bSearchFromCaret := SearchFromCursor;
bSearchSelectionOnly := SearchInSelectionOnly;
bSearchWholeWords := SearchWholeWords;
sSearchText := SearchText;
sSearchTextHistory := SearchTextHistory;
if AReplace then with dlg as TfrmEditSearchReplace do begin
sReplaceText := ReplaceText;
sReplaceTextHistory := ReplaceTextHistory;
end;
// bSearchFromCaret := gbSearchFromCaret;
if sSearchText <> '' then begin
DoSearchReplaceText(AReplace, bSearchBackwards);
bSearchFromCaret := TRUE;
end;
end;
finally
FreeAndNil(dlg);
end;
end;
procedure TfrmEditor.actEditFindExecute(Sender: TObject);
begin
ShowSearchReplaceDialog(False);
end;
procedure TfrmEditor.actEditRplcExecute(Sender: TObject);
begin
ShowSearchReplaceDialog(True);
end;
procedure TfrmEditor.LoadFromIni;
var
f:TextFile;
begin
if FileExists(gpIniDir+'edithistory.txt') then
begin
assignFile(f,gpIniDir+'edithistory.txt');
reset(f);
try
readln(f,sSearchTextHistory);
readln(f,sReplaceTextHistory);
finally
closefile(f);
end;
end
else
begin
sSearchTextHistory:='';
sReplaceTextHistory:='';
end;
end;
procedure TfrmEditor.SaveToIni;
var
f:TextFile;
begin
assignFile(f,gpIniDir+'edithistory.txt');
rewrite(f);
try
writeln(f,sSearchTextHistory);
writeln(f,sReplaceTextHistory);
finally
closefile(f);
end;
gEditorPos.Left:= Left;
gEditorPos.Top:= Top;
gEditorPos.Right:= Width;
gEditorPos.Bottom:= Height;
end;
procedure TfrmEditor.FormDestroy(Sender: TObject);
begin
SaveToIni;
inherited;
end;
procedure TfrmEditor.actSave2Execute(Sender: TObject);
begin
inherited;
actFileSave.Execute;
end;
procedure TfrmEditor.actConfHighExecute(Sender: TObject);
begin
inherited;
with TfrmEditorConf.Create(Application) do
begin
try
ShowModal;
finally
Free;
end;
end;
end;
procedure TfrmEditor.FormCreate(Sender: TObject);
begin
inherited;
LoadFromIni;
end;
procedure TfrmEditor.frmEditorClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction:=caFree;
end;
initialization
{$I fEditor.lrs}
end.

489
feditorconf.lfm Normal file
View file

@ -0,0 +1,489 @@
object frmEditorConf: TfrmEditorConf
ActiveControl = grColor
Caption = 'Editor configuration'
ClientHeight = 295
ClientWidth = 483
OnCreate = FormCreate
PixelsPerInch = 96
Position = poScreenCenter
TextHeight = 16
AutoScroll = True
Left = 666
Height = 295
Top = 467
Width = 483
object lbSample: TLabel
Caption = 'Sample'
Color = clNone
ParentColor = False
Left = 8
Height = 14
Top = 184
Width = 35
end
object lbPredefined: TLabel
Caption = 'Predefined'
Color = clNone
ParentColor = False
Left = 8
Height = 14
Top = 136
Width = 53
end
object grColor: TDrawGrid
AutoAdvance = aaDown
Color = clWhite
ColCount = 4
DefaultColWidth = 30
DefaultDrawing = False
DefaultRowHeight = 30
FixedColor = clBtnFace
FixedCols = 0
FixedRows = 0
GridLineWidth = 0
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goSmoothScroll]
RowCount = 4
ScrollBars = ssAutoBoth
TabOrder = 0
TabStop = True
VisibleColCount = 4
VisibleRowCount = 4
OnDrawCell = grColorDrawCell
OnMouseDown = grColorMouseDown
Left = 8
Height = 128
Top = 8
Width = 128
end
object lbNames: TListBox
OnClick = lbNamesClick
TabOrder = 1
Left = 240
Height = 192
Width = 201
end
object cbBold: TCheckBox
AllowGrayed = True
Caption = 'cbBold'
OnClick = cbBoldClick
TabOrder = 2
Left = 137
Height = 13
Top = 56
Width = 53
end
object cbUnderline: TCheckBox
AllowGrayed = True
Caption = 'cbUnderline'
OnClick = cbBoldClick
TabOrder = 3
Left = 136
Height = 13
Top = 8
Width = 77
end
object cbStrikeOut: TCheckBox
AllowGrayed = True
Caption = 'cbStrikeOut'
OnClick = cbBoldClick
TabOrder = 4
Left = 136
Height = 13
Top = 24
Width = 76
end
object cbItalic: TCheckBox
AllowGrayed = True
Caption = 'cbItalic'
OnClick = cbBoldClick
TabOrder = 5
Left = 136
Height = 13
Top = 40
Width = 54
end
object cmbPredefined: TComboBox
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 18
MaxLength = 0
OnChange = cmbPredefinedChange
ParentCtl3D = False
Style = csDropDownList
TabOrder = 6
Left = 8
Height = 21
Top = 152
Width = 208
end
object btnCancel: TBitBtn
BorderSpacing.InnerBorder = 2
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
OnClick = btnCancelClick
TabOrder = 9
Left = 366
Height = 25
Top = 240
Width = 75
end
object btnOK: TBitBtn
BorderSpacing.InnerBorder = 2
Caption = '&OK'
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
OnClick = btnOKClick
TabOrder = 7
Left = 272
Height = 25
Top = 240
Width = 75
end
object edtSample: TSynEdit
Font.Height = -12
Font.Name = 'courier'
Height = 56
Name = 'edtSample'
ParentColor = False
ParentCtl3D = False
TabOrder = 8
Width = 232
BookMarkOptions.OnChange = nil
Gutter.OnChange = nil
Gutter.CodeFoldingWidth = 14
Keystrokes = <
item
Command = 3
ShortCut = 38
end
item
Command = 103
ShortCut = 8230
end
item
Command = 211
ShortCut = 16422
end
item
Command = 4
ShortCut = 40
end
item
Command = 104
ShortCut = 8232
end
item
Command = 212
ShortCut = 16424
end
item
Command = 1
ShortCut = 37
end
item
Command = 101
ShortCut = 8229
end
item
Command = 5
ShortCut = 16421
end
item
Command = 105
ShortCut = 24613
end
item
Command = 2
ShortCut = 39
end
item
Command = 102
ShortCut = 8231
end
item
Command = 6
ShortCut = 16423
end
item
Command = 106
ShortCut = 24615
end
item
Command = 10
ShortCut = 34
end
item
Command = 110
ShortCut = 8226
end
item
Command = 14
ShortCut = 16418
end
item
Command = 114
ShortCut = 24610
end
item
Command = 9
ShortCut = 33
end
item
Command = 109
ShortCut = 8225
end
item
Command = 13
ShortCut = 16417
end
item
Command = 113
ShortCut = 24609
end
item
Command = 7
ShortCut = 36
end
item
Command = 107
ShortCut = 8228
end
item
Command = 15
ShortCut = 16420
end
item
Command = 115
ShortCut = 24612
end
item
Command = 8
ShortCut = 35
end
item
Command = 108
ShortCut = 8227
end
item
Command = 16
ShortCut = 16419
end
item
Command = 116
ShortCut = 24611
end
item
Command = 223
ShortCut = 45
end
item
Command = 201
ShortCut = 16429
end
item
Command = 604
ShortCut = 8237
end
item
Command = 502
ShortCut = 46
end
item
Command = 603
ShortCut = 8238
end
item
Command = 501
ShortCut = 8
end
item
Command = 501
ShortCut = 8200
end
item
Command = 504
ShortCut = 16392
end
item
Command = 601
ShortCut = 32776
end
item
Command = 602
ShortCut = 40968
end
item
Command = 509
ShortCut = 13
end
item
Command = 199
ShortCut = 16449
end
item
Command = 201
ShortCut = 16451
end
item
Command = 610
ShortCut = 24649
end
item
Command = 509
ShortCut = 16461
end
item
Command = 510
ShortCut = 16462
end
item
Command = 503
ShortCut = 16468
end
item
Command = 611
ShortCut = 24661
end
item
Command = 604
ShortCut = 16470
end
item
Command = 603
ShortCut = 16472
end
item
Command = 507
ShortCut = 16473
end
item
Command = 506
ShortCut = 24665
end
item
Command = 601
ShortCut = 16474
end
item
Command = 602
ShortCut = 24666
end
item
Command = 301
ShortCut = 16432
end
item
Command = 302
ShortCut = 16433
end
item
Command = 303
ShortCut = 16434
end
item
Command = 304
ShortCut = 16435
end
item
Command = 305
ShortCut = 16436
end
item
Command = 306
ShortCut = 16437
end
item
Command = 307
ShortCut = 16438
end
item
Command = 308
ShortCut = 16439
end
item
Command = 309
ShortCut = 16440
end
item
Command = 310
ShortCut = 16441
end
item
Command = 351
ShortCut = 24624
end
item
Command = 352
ShortCut = 24625
end
item
Command = 353
ShortCut = 24626
end
item
Command = 354
ShortCut = 24627
end
item
Command = 355
ShortCut = 24628
end
item
Command = 356
ShortCut = 24629
end
item
Command = 357
ShortCut = 24630
end
item
Command = 358
ShortCut = 24631
end
item
Command = 359
ShortCut = 24632
end
item
Command = 360
ShortCut = 24633
end
item
Command = 231
ShortCut = 24654
end
item
Command = 232
ShortCut = 24643
end
item
Command = 233
ShortCut = 24652
end
item
Command = 612
ShortCut = 9
end
item
Command = 613
ShortCut = 8201
end
item
Command = 250
ShortCut = 24642
end>
Lines.Strings = (
'bla bla ble ble blu blu'
'blu blu ble ble bla bla'
)
SelectedColor.OnChange = nil
Cursor = crIBeam
Left = 8
Height = 56
Top = 209
Width = 232
end
end

385
feditorconf.pas Normal file
View file

@ -0,0 +1,385 @@
unit fEditorConf;
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, SynEditHighlighter, SynEditStrConst,
Grids, Buttons, ComCtrls, uGlobsPaths, SynEdit;
type
TLittleAttr= Packed Record
clFg:TColor;
clBg:TColor;
fntStyle:Integer;
end;
const
cCountSynAttrs=90;
// cCountSynAttrs=1;
csDefaultName='editor.col';
// not all synedit highighter are ported
cSynAttrNames: Array[0..cCountSynAttrs-1] of String =
(SYNS_Untitled,
SYNS_AttrAsm, SYNS_AttrAsmComment, SYNS_AttrAsmKey,
//4
SYNS_AttrAssembler, SYNS_AttrAttributeName, SYNS_AttrAttributeValue,
SYNS_AttrBlock, SYNS_Untitled, SYNS_AttrBrackets,
SYNS_AttrCDATASection, SYNS_AttrCharacter, SYNS_AttrClass,
//13
SYNS_AttrComment, SYNS_AttrCondition,
SYNS_AttrDataType, SYNS_AttrDefaultPackage,
//16
SYNS_AttrDir, SYNS_AttrDirective, SYNS_AttrDOCTYPESection,
SYNS_AttrDocumentation, SYNS_AttrElementName, SYNS_AttrEmbedSQL,
SYNS_AttrEmbedText, SYNS_AttrEntityReference, SYNS_AttrEscapeAmpersand,
//25
SYNS_AttrEvent, SYNS_AttrException, SYNS_AttrFloat, SYNS_AttrForm,
SYNS_AttrFunction, SYNS_AttrHexadecimal, SYNS_AttrIcon,
//32
SYNS_AttrIdentifier, SYNS_AttrIllegalChar, SYNS_AttrInclude,
{ SYNS_AttrIndicator,} SYNS_AttrIndirect, SYNS_AttrInvalidSymbol,
SYNS_AttrInternalFunction, SYNS_AttrKey, SYNS_AttrLabel,
//40
SYNS_AttrMacro, SYNS_AttrMarker,
SYNS_AttrMessage, SYNS_AttrMiscellaneous, SYNS_AttrNamespaceAttrName,
SYNS_AttrNamespaceAttrValue, SYNS_AttrNonReservedKeyword,
SYNS_AttrNull, SYNS_AttrNumber,
SYNS_AttrOctal, SYNS_AttrOperator, SYNS_AttrPLSQL,
//53
SYNS_AttrPragma, SYNS_AttrPreprocessor,
SYNS_AttrProcessingInstr, SYNS_AttrQualifier, SYNS_AttrRegister,
SYNS_AttrReservedWord, SYNS_AttrRpl, SYNS_AttrRplKey,
//60
SYNS_AttrRplComment, SYNS_AttrSASM, SYNS_AttrSASMComment,
SYNS_AttrSASMKey, SYNS_AttrSecondReservedWord,
SYNS_AttrSection,{ SYNS_AttrSequence,}
//66
SYNS_AttrSpace,
SYNS_AttrSpecialVariable, SYNS_AttrSQLKey, SYNS_AttrSQLPlus,
//70
SYNS_AttrString,{ SYNS_AttrSingleString,} SYNS_AttrSymbol,
SYNS_AttrSyntaxError, SYNS_AttrSystem, SYNS_AttrSystemValue,
{ SYNS_AttrTagArea,} SYNS_AttrTableName, SYNS_AttrTerminator,
//77
SYNS_AttrText, SYNS_AttrUnknownWord, SYNS_AttrUser,
SYNS_AttrUserFunction, SYNS_AttrValue, SYNS_AttrVariable,
SYNS_AttrWhitespace, SYNS_AttrMathMode, SYNS_AttrTextMathMode,
SYNS_AttrSquareBracket, SYNS_AttrRoundBracket, SYNS_AttrTeXCommand);
cColorGrid:Array[0..15] of TColor=
(clBlack, clMaroon, clGreen, clOlive, clNavy,
clPurple, clTeal, clGray, clSilver, clRed,
clLime, clYellow, clBlue, clFuchsia, clAqua, clWhite);
var
cAttrs:Array [0..cCountSynAttrs-1] of TLittleAttr;
type
TfrmEditorConf = class(TfrmLng)
grColor: TDrawGrid;
lbNames: TListBox;
lbSample: TLabel;
cbBold: TCheckBox;
cbUnderline: TCheckBox;
cbStrikeOut: TCheckBox;
cbItalic: TCheckBox;
cmbPredefined: TComboBox;
lbPredefined: TLabel;
btnCancel: TBitBtn;
btnOK: TBitBtn;
edtSample: TSynEdit;
procedure grColorDrawCell(Sender: TObject; ACol, ARow: Integer;
Rect: TRect; State: TGridDrawState);
procedure FormCreate(Sender: TObject);
procedure lbNamesClick(Sender: TObject);
procedure grColorMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure btnOKClick(Sender: TObject);
procedure cmbPredefinedChange(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure cbBoldClick(Sender: TObject);
private
{ Private declarations }
fbUpdatingBoxes:Boolean;
public
{ Public declarations }
procedure LoadLng; override;
procedure FillComboPred;
end;
procedure LoadAttrFromFile(const sFileName:String);
procedure SaveAttrToFile(const sFileName:String);
procedure SetupColorOfHighlighter(var h: TSynCustomHighlighter);
implementation
uses
uShowMsg, uLng, FindEx;
procedure SetupColorOfHighlighter(var h: TSynCustomHighlighter);
var
i, j:Integer;
begin
if not assigned(h) then Exit;
for i:=0 to h.AttrCount-1 do
begin
with h.Attribute[i] do
begin
for j:=0 to cCountSynAttrs-1 do
begin
if h.Attribute[i].Name=cSynAttrNames[j] then
begin
Background:= cAttrs[j].clBg;
Foreground:= cAttrs[j].clFg;
//load style
IntegerStyle:= cAttrs[j].fntStyle;
Break;
end;
end;
end;
end;
{ // default attr
if assigned(h.CommentAttribute) then
with h.CommentAttribute do
begin
Background:= cAttrs[15].clBg;
Foreground:= cAttrs[15].clFg;
IntegerStyle:= cAttrs[15].fntStyle;
end;
if assigned(h.IdentifierAttribute) then
with h.IdentifierAttribute do
begin
Background:= cAttrs[36].clBg;
Foreground:= cAttrs[36].clFg;
IntegerStyle:= cAttrs[36].fntStyle;
end;
if assigned(h.KeywordAttribute) then
with h.KeywordAttribute do
begin
Background:= cAttrs[43].clBg;
Foreground:= cAttrs[43].clFg;
IntegerStyle:= cAttrs[43].fntStyle;
end;
if assigned(h.StringAttribute) then
with h.StringAttribute do
begin
Background:= cAttrs[76].clBg;
Foreground:= cAttrs[76].clFg;
IntegerStyle:= cAttrs[76].fntStyle;
end;
if assigned(h.WhitespaceAttribute) then
with h.WhitespaceAttribute do
begin
Background:= cAttrs[72].clBg;
Foreground:= cAttrs[72].clFg;
IntegerStyle:= cAttrs[72].fntStyle;
end;}
end;
procedure LoadAttrFromFile(const sFileName:String);
var
i:Integer;
f:TextFile;
s, sValue:String;
begin
if Not FileExists(sFileName) Then Exit;
assign(f,sFileName);
reset(f);
try
while not eof(f) do
begin
readln(f,s);
s:=Trim(s);
if s='' then Continue;
if s[1]='#' then Continue;
if s[1]<>'[' then Continue;
s:=Copy(s,2,length(s)-2);
for i:=0 to cCountSynAttrs-1 do
begin
if s=cSynAttrNames[i] then
begin
// load bg
readln(f,s);
sValue:=Copy(s,Pos('=',s)+1,length(s));
cAttrs[i].clBg:=StrToIntDef(sValue,0);
// load fg
readln(f,s);
sValue:=Copy(s,Pos('=',s)+1,length(s));
cAttrs[i].clFg:=StrToIntDef(sValue,0);
//load style
readln(f,s);
sValue:=Copy(s,Pos('=',s)+1,length(s));
cAttrs[i].fntStyle:=StrToIntDef(sValue,0);
end;
end;
end;
finally
CloseFile(f);
end;
end;
procedure SaveAttrToFile(const sFileName:String);
var
i:Integer;
f:TextFile;
begin
assign(f,sFileName);
rewrite(f);
try
writeln(f,'# color is $00bbggrr (in hex)');
for i:=0 to cCountSynAttrs-1 do
begin
writeln(f,'[',cSynAttrNames[i],']');
writeln(f,'bg=$',IntToHex(cAttrs[i].clBg,8));
writeln(f,'fg=$',IntToHex(cAttrs[i].clFg,8));
writeln(f,'style=$',cAttrs[i].fntStyle);
end;
finally
CloseFile(f);
end;
end;
procedure TfrmEditorConf.LoadLng;
begin
Caption:=lngGetString(clngEditCfgForm);
cbBold.Caption:=lngGetString(clngEditCfgBold);
cbItalic.Caption:=lngGetString(clngEditCfgItalic);
cbUnderline.Caption:=lngGetString(clngEditCfgUline);
cbStrikeOut.Caption:=lngGetString(clngEditCfgStrike);
lbPredefined.Caption:=lngGetString(clngEditCfgDefined);
lbSample.Caption:=lngGetString(clngEditCfgSample);
grColor.ScrollBars:=ssNone;
end;
procedure TfrmEditorConf.grColorDrawCell(Sender: TObject; ACol,
ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
with grColor.Canvas do
begin
Brush.Style:=bsSolid;
Brush.Color:=cColorGrid[Acol*4+Arow];
FillRect(Rect);
end;
end;
procedure TfrmEditorConf.FormCreate(Sender: TObject);
var
i:Integer;
begin
inherited;
lbNames.Clear;
for i:=0 to cCountSynAttrs-1 do
lbNames.Items.Add(cSynAttrNames[i]);
lbNames.ItemIndex:=0;
FillComboPred;
LoadAttrFromFile(gpIniDir+csDefaultName);
lbNamesClick(Sender);
end;
procedure TfrmEditorConf.lbNamesClick(Sender: TObject);
begin
edtSample.Font.Color:=cAttrs[lbNames.ItemIndex].clFg;
edtSample.Color:=cAttrs[lbNames.ItemIndex].clBg;
With edtSample.Font,cAttrs[lbNames.ItemIndex] do
begin
if fntStyle and $1 = 0 then Style:= [] else Style:= [fsBold];
if fntStyle and $2 = 2 then Style:= Style + [fsItalic];
if fntStyle and $4 = 4 then Style:= Style + [fsUnderline];
if fntStyle and $8 = 8 then Style:= Style + [fsStrikeout];
fbUpdatingBoxes:=True;
try
cbBold.Checked:= (fntStyle and $1) <>0;
cbItalic.Checked:=(fntStyle and $2) <> 0;
cbUnderline.Checked:=(fntStyle and $4) <> 0;
cbStrikeOut.Checked:=(fntStyle and $8) <> 0;
finally
fbUpdatingBoxes:=False;
end;
end;
end;
procedure TfrmEditorConf.grColorMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
with grColor do
begin
if X>=DefaultColWidth*4 then Exit;
if Y>=DefaultRowHeight*4 then Exit;
if Button=mbRight then
cAttrs[lbNames.ItemIndex].clBg:=cColorGrid[X div DefaultColWidth *4 + Y div DefaultRowHeight];
if Button=mbLeft then
cAttrs[lbNames.ItemIndex].clFg:=cColorGrid[X div DefaultColWidth *4 + Y div DefaultRowHeight];
edtSample.Font.Color:=cAttrs[lbNames.ItemIndex].clFg;
edtSample.Color:=cAttrs[lbNames.ItemIndex].clBg;
end;
end;
procedure TfrmEditorConf.FillComboPred;
var
fr:TSearchRec;
iIndex:Integer;
begin
cmbPredefined.Clear;
if FindFirst(gpIniDir+'*.col', faAnyFile, fr)<>0 then
begin
FindClose(fr);
Exit;
end;
repeat
cmbPredefined.Items.Add(fr.Name);
until FindNext(fr)<>0;
FindClose(fr);
if cmbPredefined.Items.Count>0 then
begin
iIndex:=cmbPredefined.Items.IndexOf(csDefaultName);
if iIndex>=0 then
cmbPredefined.ItemIndex:=iIndex;
end;
end;
procedure TfrmEditorConf.btnOKClick(Sender: TObject);
begin
SaveAttrToFile(gpIniDir+csDefaultName);
Close;
end;
procedure TfrmEditorConf.cmbPredefinedChange(Sender: TObject);
begin
LoadAttrFromFile(gpCfgDir+cmbPredefined.Text);
lbNamesClick(Self);
// MsgOk(Format(lngGetString(clngEditCfgLoadOK),[gpCfgDir+cmbPredefined.Text]));
end;
procedure TfrmEditorConf.btnCancelClick(Sender: TObject);
begin
Close;
end;
procedure TfrmEditorConf.cbBoldClick(Sender: TObject);
begin
with edtSample.Font do
begin
if not cbBold.Checked then Style:= [] else Style:= [fsBold];
if cbItalic.Checked then Style:= Style + [fsItalic];
if cbUnderline.Checked then Style:= Style + [fsUnderline];
if cbStrikeOut.Checked then Style:= Style + [fsStrikeout];
end;
if not fbUpdatingBoxes then
cAttrs[lbNames.ItemIndex].fntStyle:= Ord(cbBold.Checked)+ 2*Ord(cbItalic.Checked)+4*ord(cbUnderline.Checked)+8*ord(cbStrikeOut.Checked);
end;
initialization
{$I fEditorConf.lrs}
end.

472
feditsearch.pas Normal file
View file

@ -0,0 +1,472 @@
{
Search & Replace dialogs
for lazarus converted from SynEdit by
Radek Cervinka, radek.cervinka@centrum.cz
This program is free software; you can redistribute it and/or 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, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA 02111-1307, USA.
based on SynEdit demo, original license:
-------------------------------------------------------------------------------
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: dlgSearchText.pas, released 2000-06-23.
The Original Code is part of the SearchReplaceDemo project, written by
Michael Hieke for the SynEdit component suite.
All Rights Reserved.
Contributors to the SynEdit project are listed in the Contributors.txt file.
Alternatively, the contents of this file may be used under the terms of the
GNU General Public License Version 2 or later (the "GPL"), in which case
the provisions of the GPL are applicable instead of those above.
If you wish to allow use of your version of this file only under the terms
of the GPL and not to allow others to use your version of this file
under the MPL, indicate your decision by deleting the provisions above and
replace them with the notice and other provisions required by the GPL.
If you do not delete the provisions above, a recipient may use your version
of this file under either the MPL or the GPL.
$Id: dlgSearchText.pas,v 1.3 2002/08/01 05:44:05 etrusco Exp $
You may retrieve the latest version of this file at the SynEdit home page,
located at http://SynEdit.SourceForge.net
Known Issues:
-------------------------------------------------------------------------------}
unit fEditSearch;
{$mode objfpc}{$H+}
interface
uses
LResources,
SysUtils, Classes, Controls, Forms, StdCtrls, ExtCtrls, Buttons;
type
TfrmEditSearch = class(TForm)
protected
lblSearchFor: TLabel;
cbSearchText: TComboBox;
gbSearchOptions: TGroupBox;
cbSearchCaseSensitive: TCheckBox;
cbSearchWholeWords: TCheckBox;
cbSearchFromCursor: TCheckBox;
cbSearchSelectedOnly: TCheckBox;
rgSearchDirection: TRadioGroup;
btnOK: TButton;
btnCancel: TButton;
procedure btnOKClick(Sender: TObject);
{ procedure cbSearchTextKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);}
protected
function GetSearchBackwards: boolean;
function GetSearchCaseSensitive: boolean;
function GetSearchFromCursor: boolean;
function GetSearchInSelection: boolean;
function GetSearchText: string;
function GetSearchTextHistory: string;
function GetSearchWholeWords: boolean;
procedure SetSearchBackwards(Value: boolean);
procedure SetSearchCaseSensitive(Value: boolean);
procedure SetSearchFromCursor(Value: boolean);
procedure SetSearchInSelection(Value: boolean);
procedure SetSearchText(Value: string);
procedure SetSearchTextHistory(Value: string);
procedure SetSearchWholeWords(Value: boolean);
procedure CreateDialog(AOwner: TForm); virtual;
public
constructor Create(AOwner:TComponent); override;
property SearchBackwards: boolean read GetSearchBackwards
write SetSearchBackwards;
property SearchCaseSensitive: boolean read GetSearchCaseSensitive
write SetSearchCaseSensitive;
property SearchFromCursor: boolean read GetSearchFromCursor
write SetSearchFromCursor;
property SearchInSelectionOnly: boolean read GetSearchInSelection
write SetSearchInSelection;
property SearchText: string read GetSearchText write SetSearchText;
property SearchTextHistory: string read GetSearchTextHistory
write SetSearchTextHistory;
property SearchWholeWords: boolean read GetSearchWholeWords
write SetSearchWholeWords;
// procedure LoadLng; override;
end;
TfrmEditSearchReplace = class(TfrmEditSearch)
protected
lblReplaceWith: TLabel;
cbReplaceText: TComboBox;
protected
procedure CreateDialog(AOwner: TForm); override;
function GetReplaceText: string;
function GetReplaceTextHistory: string;
procedure SetReplaceText(Value: string);
procedure SetReplaceTextHistory(Value: string);
public
property ReplaceText: string read GetReplaceText write SetReplaceText;
property ReplaceTextHistory: string read GetReplaceTextHistory
write SetReplaceTextHistory;
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
end;
{ TSearchDialog= Class(TCommonDialog)
protected
Ffrm: TfrmEditSearch;
public
constructor Create(AOwner:TComponent); override;
destructor Destroy; override;
function Execute:Boolean; override;
end;
TReplaceDialog = Class (TSearchDialog)
public
function Execute:Boolean; override;
end;}
implementation
uses
{ uLng,} lclType;
{procedure TfrmEditSearch.LoadLng;
begin
Caption:=lngGetString(clngEditSearch);
lblSearchFor.Caption:= lngGetString(clngEditSearchFor);
rgSearchDirection.Items.Clear;
rgSearchDirection.Items.Add(lngGetString(clngEditSearchFrw));
rgSearchDirection.Items.Add(lngGetString(clngEditSearchBack));
cbSearchCaseSensitive.Caption:= lngGetString(clngEditSearchCase);
cbSearchWholeWords.Caption:= lngGetString(clngEditSearchWholeWord);
cbSearchFromCursor.Caption := lngGetString(clngEditSearchCaret);
cbSearchSelectedOnly.Caption:= lngGetString(clngEditSearchSelect);
end;
}
const
cEditSearchCaption='Search';
cEditSearchForLbl='&Search for:';
cEditSearchFrw='&Forward';
cEditSearchBack='&Backward';
cEditSearchCase='C&ase sensitivity';
cEditSearchWholeWord ='&Whole words only';
cEditSearchCaret ='Search from &caret';
cEditSearchSelect ='Selected &text only';
cEditSearchOptions ='Option';
cEditSearchDirection = 'Direction';
cEditSearchReplace ='Replace';
cEditSearchReplaceWith ='&Replace with:';
function TfrmEditSearch.GetSearchBackwards: boolean;
begin
Result := rgSearchDirection.ItemIndex = 1;
end;
function TfrmEditSearch.GetSearchCaseSensitive: boolean;
begin
Result := cbSearchCaseSensitive.Checked;
end;
function TfrmEditSearch.GetSearchFromCursor: boolean;
begin
Result := cbSearchFromCursor.Checked;
end;
function TfrmEditSearch.GetSearchInSelection: boolean;
begin
Result := cbSearchSelectedOnly.Checked;
end;
function TfrmEditSearch.GetSearchText: string;
begin
Result := cbSearchText.Text;
end;
function TfrmEditSearch.GetSearchTextHistory: string;
var
i: integer;
begin
for i:= cbSearchText.Items.Count - 1 downto 25 do
cbSearchText.Items.Delete(i);
Result:=cbSearchText.Items.CommaText;
end;
function TfrmEditSearch.GetSearchWholeWords: boolean;
begin
Result := cbSearchWholeWords.Checked;
end;
procedure TfrmEditSearch.SetSearchBackwards(Value: boolean);
begin
rgSearchDirection.ItemIndex := Ord(Value);
end;
procedure TfrmEditSearch.SetSearchCaseSensitive(Value: boolean);
begin
cbSearchCaseSensitive.Checked := Value;
end;
procedure TfrmEditSearch.SetSearchFromCursor(Value: boolean);
begin
cbSearchFromCursor.Checked := Value;
end;
procedure TfrmEditSearch.SetSearchInSelection(Value: boolean);
begin
cbSearchSelectedOnly.Checked := Value;
end;
procedure TfrmEditSearch.SetSearchText(Value: string);
begin
cbSearchText.Text := Value;
end;
procedure TfrmEditSearch.SetSearchTextHistory(Value: string);
begin
cbSearchText.Items.CommaText := Value;
end;
procedure TfrmEditSearch.SetSearchWholeWords(Value: boolean);
begin
cbSearchWholeWords.Checked := Value;
end;
procedure TfrmEditSearch.CreateDialog(AOwner: TForm);
begin
SetInitialBounds(367, 203, 332, 167);
lblSearchFor:= TLabel.Create(AOwner);
lblSearchFor.Parent:=AOwner;
lblSearchFor.SetBounds(16, 8, 90, 17);
cbSearchText:= TComboBox.Create(AOwner);
cbSearchText.Parent:=AOwner;
cbSearchText.SetBounds(112, 8, 208, 24 );
gbSearchOptions :=TGroupBox.Create(AOwner);
gbSearchOptions.Parent:=AOwner;
gbSearchOptions.SetBounds(8, 32, 154, 127);
cbSearchCaseSensitive := TCheckBox.Create(gbSearchOptions);
cbSearchCaseSensitive.Parent:=gbSearchOptions;
cbSearchCaseSensitive.SetBounds(0,0 ,142, 20);
cbSearchWholeWords := TCheckBox.Create(gbSearchOptions);
cbSearchWholeWords.Parent:=gbSearchOptions;
cbSearchWholeWords.SetBounds(0,20 ,142, 20);
cbSearchFromCursor := TCheckBox.Create(gbSearchOptions);
cbSearchFromCursor.Parent:=gbSearchOptions;
cbSearchFromCursor.SetBounds(0,65 ,142, 20);
cbSearchSelectedOnly := TCheckBox.Create(gbSearchOptions);
cbSearchSelectedOnly.Parent:=gbSearchOptions;
cbSearchSelectedOnly.SetBounds(0, 41 ,142, 20);
rgSearchDirection := TRadioGroup.Create(AOwner);
rgSearchDirection.Parent:=AOwner;
rgSearchDirection.SetBounds(170, 32, 154, 72);
btnOK := TButton.Create(AOwner);
btnOK.Parent:=AOwner;
btnOK.Left:=170;
btnOK.Top:=136;
btnOK.Caption:='OK'; // TODO: change this
btnOK.OnClick:=@btnOKClick;
btnCancel:= TButton.Create(AOwner);
btnCancel.Parent:=AOwner;
btnCancel.Top:=136;
btnCancel.Left:=249;
btnCancel.Cancel:=True;
btnCancel.ModalResult:=mrCancel;
btnCancel.Caption:='Cancel'; // TODO: change this
Caption:= cEditSearchCaption;
lblSearchFor.Caption:= cEditSearchForLbl;
rgSearchDirection.Items.Add(cEditSearchFrw);
rgSearchDirection.Items.Add(cEditSearchBack);
cbSearchCaseSensitive.Caption:= cEditSearchCase;
cbSearchWholeWords.Caption:= cEditSearchWholeWord;
cbSearchFromCursor.Caption := cEditSearchCaret;
cbSearchSelectedOnly.Caption:= cEditSearchSelect;
gbSearchOptions.Caption:=cEditSearchOptions;
rgSearchDirection.Caption:=CEditSearchDirection;
end;
constructor TfrmEditSearch.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
CreateDialog(Self);
end;
procedure TfrmEditSearch.btnOKClick(Sender: TObject);
var
s: string;
i: integer;
begin
s := cbSearchText.Text;
if s <> '' then begin
i := cbSearchText.Items.IndexOf(s);
if i > -1 then begin
cbSearchText.Items.Delete(i);
cbSearchText.Items.Insert(0, s);
cbSearchText.Text := s;
end else
cbSearchText.Items.Insert(0, s);
end;
ModalResult := mrOK
end;
{
procedure TfrmEditSearch.cbSearchTextKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key=VK_Down) and (cbSearchText.Items.Count>0) then
begin
cbSearchText.DroppedDown:=True;
end;
end;
}
{ TSearchDialog }
{
constructor TSearchDialog.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Ffrm:=nil;
end;
destructor TSearchDialog.Destroy;
begin
if assigned(Ffrm) then
FreeAndNil(Ffrm);
inherited Destroy;
end;
function TSearchDialog.Execute:Boolean;
begin
if not assigned(Ffrm) then
Ffrm:=TfrmEditSearch.Create(Self);
if assigned(FDialogCreated) then
FDialogCreated(Ffrm);
Result:=Ffrm.ShowModal=mrOK;
end;
}
{ TfrmEditSearchReplace }
procedure TfrmEditSearchReplace.CreateDialog(AOwner: TForm);
begin
inherited CreateDialog(AOwner); // create search dialog
Height:=Height+30;
gbSearchOptions.Top:=gbSearchOptions.Top+30;
rgSearchDirection.Top:=rgSearchDirection.Top+30;
lblReplaceWith:= TLabel.Create(AOwner);
lblReplaceWith.Parent:=AOwner;
lblReplaceWith.SetBounds(16, 35, 90, 17);
cbReplaceText:= TComboBox.Create(AOwner);
cbReplaceText.Parent:=AOwner;
cbReplaceText.SetBounds(112, 35, 208, 24 );
btnOK.Top:=btnOK.Top+30;
btnCancel.Top:=btnCancel.Top+30;
Caption:=cEditSearchReplace;
lblReplaceWith.Caption:=cEditSearchReplaceWith;
end;
function TfrmEditSearchReplace.GetReplaceText: string;
begin
Result := cbReplaceText.Text;
end;
function TfrmEditSearchReplace.GetReplaceTextHistory: string;
var
i: integer;
begin
for i:= cbSearchText.Items.Count - 1 downto 25 do
cbReplaceText.Items.Delete(i);
Result:=cbReplaceText.Items.CommaText;
end;
procedure TfrmEditSearchReplace.SetReplaceText(Value: string);
begin
cbReplaceText.Items.CommaText := Value;
end;
procedure TfrmEditSearchReplace.SetReplaceTextHistory(Value: string);
begin
cbReplaceText.Items.Text := Value;
end;
procedure TfrmEditSearchReplace.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
var
s: string;
i: integer;
begin
inherited;
if ModalResult = mrOK then begin
s := cbReplaceText.Text;
if s <> '' then begin
i := cbReplaceText.Items.IndexOf(s);
if i > -1 then begin
cbReplaceText.Items.Delete(i);
cbReplaceText.Items.Insert(0, s);
cbReplaceText.Text := s;
end else
cbReplaceText.Items.Insert(0, s);
end;
end;
end;
{ TReplaceDialog }
{
function TReplaceDialog.Execute: Boolean;
begin
if not assigned(Ffrm) then
Ffrm:=TfrmEditSearchReplace.Create(Self);
if assigned(FDialogCreated) then
FDialogCreated(Ffrm);
Result:=Ffrm.ShowModal=mrOK;
end;
}
end.

278
ffileproperties.lfm Normal file
View file

@ -0,0 +1,278 @@
object frmFileProperties: TfrmFileProperties
ActiveControl = btnClose
Caption = 'frmFileProperties'
ClientHeight = 383
ClientWidth = 434
Color = clBackground
OnCreate = FormCreate
TextHeight = 16
HorzScrollBar.Page = 435
HorzScrollBar.Range = 425
VertScrollBar.Page = 384
VertScrollBar.Range = 401
Left = 599
Height = 383
Top = 219
Width = 434
object lblFileName: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 8
Width = 224
end
object btnClose: TButton
Default = True
Cancel = True
Caption = 'Close'
TabOrder = 1
OnClick = btnCloseClick
Left = 349
Height = 25
Top = 352
Width = 75
end
object btnNext: TButton
Caption = 'Next'
TabOrder = 2
OnClick = btnNextClick
Left = 264
Height = 25
Top = 352
Width = 75
end
object lblFileNameStr: TLabel
Caption = 'Name:'
Font.Color = clBlack
Font.Height = 11
Font.Name = 'Helvetica'
Font.Pitch = fpVariable
Left = 16
Height = 15
Top = 8
Width = 160
end
object lblSizeStr: TLabel
Caption = 'Size:'
Left = 16
Height = 15
Top = 80
Width = 160
end
object lblFolderStr: TLabel
Caption = 'Path:'
Left = 16
Height = 15
Top = 32
Width = 160
end
object lblAttributesStr: TGroupBox
Caption = 'Attributes'
ClientHeight = 112
ClientWidth = 405
ParentColor = True
ParentCtl3D = False
TabOrder = 6
Left = 16
Height = 129
Top = 216
Width = 409
object lblAttrOwnerStr: TLabel
Caption = 'Owner'
Left = 6
Height = 15
Top = 24
Width = 160
end
object lblAttrGroupStr: TLabel
Caption = 'Group'
Left = 6
Height = 15
Top = 40
Width = 160
end
object lblAttrOtherStr: TLabel
Caption = 'Other'
Left = 6
Height = 15
Top = 56
Width = 160
end
object lblAttrTextStr: TLabel
Caption = 'Alternative representation:'
Left = 6
Height = 15
Top = 96
Width = 160
end
object lblAttrBitsStr: TLabel
Caption = 'Bits:'
Left = 6
Height = 15
Top = 72
Width = 160
end
object lblAttrOwner: TLabel
Caption = '???'
ShowAccelChar = False
Left = 182
Height = 15
Top = 25
Width = 208
end
object lblAttrGroup: TLabel
Caption = '???'
ShowAccelChar = False
Left = 182
Height = 15
Top = 41
Width = 208
end
object lblAttrOther: TLabel
Caption = '???'
ShowAccelChar = False
Left = 182
Height = 15
Top = 57
Width = 208
end
object lblAttrBits: TLabel
Caption = '???'
ShowAccelChar = False
Left = 182
Height = 15
Top = 73
Width = 208
end
object lblAttrText: TLabel
Caption = '???'
ShowAccelChar = False
Left = 182
Height = 15
Top = 97
Width = 208
end
end
object lblLastAccessStr: TLabel
Caption = 'Last access:'
Left = 16
Height = 15
Top = 112
Width = 160
end
object lblSymlinkStr: TLabel
Caption = 'Symlink:'
Left = 16
Height = 15
Top = 64
Width = 160
end
object lblOwnerStr: TLabel
Caption = 'Owner:'
Left = 16
Height = 15
Top = 176
Width = 160
end
object lblGroupStr: TLabel
Caption = 'Group:'
Left = 16
Height = 15
Top = 192
Width = 160
end
object lblFolder: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 32
Width = 224
end
object lblSize: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 80
Width = 224
end
object lblLastAccess: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 112
Width = 224
end
object lblOwner: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 176
Width = 272
end
object lblGroup: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 192
Width = 224
end
object lblSymlink: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 64
Width = 224
end
object lblTypeStr: TLabel
Caption = 'Type:'
Left = 16
Height = 15
Top = 48
Width = 160
end
object lblType: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 48
Width = 224
end
object lblLastModifStr: TLabel
Caption = 'Last modification:'
Left = 16
Height = 15
Top = 128
Width = 160
end
object lblLastStChangeStr: TLabel
Caption = 'Last status change:'
Left = 16
Height = 15
Top = 144
Width = 160
end
object lblLastModif: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 128
Width = 224
end
object lblLastStChange: TLabel
Caption = '???'
ShowAccelChar = False
Left = 200
Height = 15
Top = 144
Width = 272
end
end

68
ffileproperties.lrs Normal file
View file

@ -0,0 +1,68 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmFileProperties','FORMDATA',[
'TPF0'#18'TfrmFileProperties'#17'frmFileProperties'#13'ActiveControl'#7#8'btn'
+'Close'#7'Caption'#6#17'frmFileProperties'#12'ClientHeight'#3''#1#11'Client'
+'Width'#3#178#1#5'Color'#7#12'clBackground'#8'OnCreate'#7#10'FormCreate'#10
+'TextHeight'#2#16#18'HorzScrollBar.Page'#3#179#1#19'HorzScrollBar.Range'#3
+#169#1#18'VertScrollBar.Page'#3#128#1#19'VertScrollBar.Range'#3#145#1#4'Left'
+#3'W'#2#6'Height'#3''#1#3'Top'#3#219#0#5'Width'#3#178#1#0#6'TLabel'#11'lblF'
+'ileName'#7'Caption'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#200#0#6'Height'#2
+#15#3'Top'#2#8#5'Width'#3#224#0#0#0#7'TButton'#8'btnClose'#7'Default'#9#6'Ca'
+'ncel'#9#7'Caption'#6#5'Close'#8'TabOrder'#2#1#7'OnClick'#7#13'btnCloseClick'
+#4'Left'#3']'#1#6'Height'#2#25#3'Top'#3'`'#1#5'Width'#2'K'#0#0#7'TButton'#7
+'btnNext'#7'Caption'#6#4'Next'#8'TabOrder'#2#2#7'OnClick'#7#12'btnNextClick'
+#4'Left'#3#8#1#6'Height'#2#25#3'Top'#3'`'#1#5'Width'#2'K'#0#0#6'TLabel'#14'l'
+'blFileNameStr'#7'Caption'#6#5'Name:'#10'Font.Color'#7#7'clBlack'#11'Font.He'
+'ight'#2#11#9'Font.Name'#6#9'Helvetica'#10'Font.Pitch'#7#10'fpVariable'#4'Le'
+'ft'#2#16#6'Height'#2#15#3'Top'#2#8#5'Width'#3#160#0#0#0#6'TLabel'#10'lblSiz'
+'eStr'#7'Caption'#6#5'Size:'#4'Left'#2#16#6'Height'#2#15#3'Top'#2'P'#5'Width'
+#3#160#0#0#0#6'TLabel'#12'lblFolderStr'#7'Caption'#6#5'Path:'#4'Left'#2#16#6
+'Height'#2#15#3'Top'#2' '#5'Width'#3#160#0#0#0#9'TGroupBox'#16'lblAttributes'
+'Str'#7'Caption'#6#10'Attributes'#12'ClientHeight'#2'p'#11'ClientWidth'#3#149
+#1#11'ParentColor'#9#11'ParentCtl3D'#8#8'TabOrder'#2#6#4'Left'#2#16#6'Height'
+#3#129#0#3'Top'#3#216#0#5'Width'#3#153#1#0#6'TLabel'#15'lblAttrOwnerStr'#7'C'
+'aption'#6#5'Owner'#4'Left'#2#6#6'Height'#2#15#3'Top'#2#24#5'Width'#3#160#0#0
+#0#6'TLabel'#15'lblAttrGroupStr'#7'Caption'#6#5'Group'#4'Left'#2#6#6'Height'
+#2#15#3'Top'#2'('#5'Width'#3#160#0#0#0#6'TLabel'#15'lblAttrOtherStr'#7'Capti'
+'on'#6#5'Other'#4'Left'#2#6#6'Height'#2#15#3'Top'#2'8'#5'Width'#3#160#0#0#0#6
+'TLabel'#14'lblAttrTextStr'#7'Caption'#6#27'Alternative representation:'#4'L'
+'eft'#2#6#6'Height'#2#15#3'Top'#2'`'#5'Width'#3#160#0#0#0#6'TLabel'#14'lblAt'
+'trBitsStr'#7'Caption'#6#5'Bits:'#4'Left'#2#6#6'Height'#2#15#3'Top'#2'H'#5'W'
+'idth'#3#160#0#0#0#6'TLabel'#12'lblAttrOwner'#7'Caption'#6#3'???'#13'ShowAcc'
+'elChar'#8#4'Left'#3#182#0#6'Height'#2#15#3'Top'#2#25#5'Width'#3#208#0#0#0#6
+'TLabel'#12'lblAttrGroup'#7'Caption'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3
+#182#0#6'Height'#2#15#3'Top'#2')'#5'Width'#3#208#0#0#0#6'TLabel'#12'lblAttrO'
+'ther'#7'Caption'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#182#0#6'Height'#2#15
+#3'Top'#2'9'#5'Width'#3#208#0#0#0#6'TLabel'#11'lblAttrBits'#7'Caption'#6#3'?'
+'??'#13'ShowAccelChar'#8#4'Left'#3#182#0#6'Height'#2#15#3'Top'#2'I'#5'Width'
+#3#208#0#0#0#6'TLabel'#11'lblAttrText'#7'Caption'#6#3'???'#13'ShowAccelChar'
+#8#4'Left'#3#182#0#6'Height'#2#15#3'Top'#2'a'#5'Width'#3#208#0#0#0#0#6'TLabe'
+'l'#16'lblLastAccessStr'#7'Caption'#6#12'Last access:'#4'Left'#2#16#6'Height'
+#2#15#3'Top'#2'p'#5'Width'#3#160#0#0#0#6'TLabel'#13'lblSymlinkStr'#7'Caption'
+#6#8'Symlink:'#4'Left'#2#16#6'Height'#2#15#3'Top'#2'@'#5'Width'#3#160#0#0#0#6
+'TLabel'#11'lblOwnerStr'#7'Caption'#6#6'Owner:'#4'Left'#2#16#6'Height'#2#15#3
+'Top'#3#176#0#5'Width'#3#160#0#0#0#6'TLabel'#11'lblGroupStr'#7'Caption'#6#6
+'Group:'#4'Left'#2#16#6'Height'#2#15#3'Top'#3#192#0#5'Width'#3#160#0#0#0#6'T'
+'Label'#9'lblFolder'#7'Caption'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#200#0
+#6'Height'#2#15#3'Top'#2' '#5'Width'#3#224#0#0#0#6'TLabel'#7'lblSize'#7'Capt'
+'ion'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#200#0#6'Height'#2#15#3'Top'#2'P'
+#5'Width'#3#224#0#0#0#6'TLabel'#13'lblLastAccess'#7'Caption'#6#3'???'#13'Sho'
+'wAccelChar'#8#4'Left'#3#200#0#6'Height'#2#15#3'Top'#2'p'#5'Width'#3#224#0#0
+#0#6'TLabel'#8'lblOwner'#7'Caption'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3
+#200#0#6'Height'#2#15#3'Top'#3#176#0#5'Width'#3#16#1#0#0#6'TLabel'#8'lblGrou'
+'p'#7'Caption'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#200#0#6'Height'#2#15#3
+'Top'#3#192#0#5'Width'#3#224#0#0#0#6'TLabel'#10'lblSymlink'#7'Caption'#6#3'?'
+'??'#13'ShowAccelChar'#8#4'Left'#3#200#0#6'Height'#2#15#3'Top'#2'@'#5'Width'
+#3#224#0#0#0#6'TLabel'#10'lblTypeStr'#7'Caption'#6#5'Type:'#4'Left'#2#16#6'H'
+'eight'#2#15#3'Top'#2'0'#5'Width'#3#160#0#0#0#6'TLabel'#7'lblType'#7'Caption'
+#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#200#0#6'Height'#2#15#3'Top'#2'0'#5'W'
+'idth'#3#224#0#0#0#6'TLabel'#15'lblLastModifStr'#7'Caption'#6#18'Last modifi'
+'cation:'#4'Left'#2#16#6'Height'#2#15#3'Top'#3#128#0#5'Width'#3#160#0#0#0#6
+'TLabel'#18'lblLastStChangeStr'#7'Caption'#6#19'Last status change:'#4'Left'
+#2#16#6'Height'#2#15#3'Top'#3#144#0#5'Width'#3#160#0#0#0#6'TLabel'#12'lblLas'
+'tModif'#7'Caption'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#200#0#6'Height'#2
+#15#3'Top'#3#128#0#5'Width'#3#224#0#0#0#6'TLabel'#15'lblLastStChange'#7'Capt'
+'ion'#6#3'???'#13'ShowAccelChar'#8#4'Left'#3#200#0#6'Height'#2#15#3'Top'#3
+#144#0#5'Width'#3#16#1#0#0#0
]);

277
ffileproperties.pas Normal file
View file

@ -0,0 +1,277 @@
unit fFileProperties;
{$mode objfpc}{$H+}
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, uFileList, Buttons;
type
TfrmFileProperties = class(TfrmLng)
btnClose: TButton;
btnNext: TButton;
lblFileNameStr: TLabel;
lblSizeStr: TLabel;
lblFolderStr: TLabel;
lblAttributesStr: TGroupBox;
lblAttrOwnerStr: TLabel;
lblAttrGroupStr: TLabel;
lblAttrOtherStr: TLabel;
lblLastAccessStr: TLabel;
lblSymlinkStr: TLabel;
lblOwnerStr: TLabel;
lblGroupStr: TLabel;
lblAttrTextStr: TLabel;
lblAttrBitsStr: TLabel;
lblLastModifStr: TLabel;
lblLastStChangeStr: TLabel;
lblTypeStr: TLabel;
lblFileName: TLabel;
lblFolder: TLabel;
lblSize: TLabel;
lblLastAccess: TLabel;
lblLastModif: TLabel;
lblLastStChange: TLabel;
lblOwner: TLabel;
lblGroup: TLabel;
lblSymlink: TLabel;
lblAttrOwner: TLabel;
lblAttrGroup: TLabel;
lblAttrOther: TLabel;
lblAttrBits: TLabel;
lblAttrText: TLabel;
lblType: TLabel;
procedure btnCloseClick(Sender: TObject);
procedure btnNextClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
iCurrent:Integer;
fFileList:TFileList;
procedure AddAttrString(lblItem:TLabel; nText:Integer);
public
szPath:String;
procedure LoadLng; override;
procedure ShowFile(iIndex:Integer);
procedure StoreData(FileList:TFileList);
function FindNextSelected:Boolean;
end;
procedure ShowFileProperties(FileList:TFileList; const aPath:String);
implementation
uses
uLng, uFileProcs, FindEx, BaseUnix, Libc;
procedure ShowFileProperties(FileList:TFileList; const aPath:String);
begin
with TfrmFileProperties.Create(Application) do
try
szPath:=aPath;
StoreData(FileList);
if FindNextSelected then
begin
ShowFile(iCurrent);
ShowModal;
end;
finally
Free;
end;
end;
procedure TfrmFileProperties.LoadLng;
begin
Caption := lngGetString(clngPropsTitle);
btnClose.Caption := lngGetString(clngPropsClose);
btnNext.Caption := lngGetString(clngPropsNext);
lblFileNameStr.Caption := lngGetString(clngPropsStrName);
lblSizeStr.Caption := lngGetString(clngPropsStrSize);
lblFolderStr.Caption := lngGetString(clngPropsStrPath);
lblAttributesStr.Caption := lngGetString(clngPropsStrAttrs);
lblAttrOwnerStr.Caption := lngGetString(clngPropsStrOwner);
lblAttrGroupStr.Caption := lngGetString(clngPropsStrGroup);
lblAttrOtherStr.Caption := lngGetString(clngPropsStrOther);
lblLastAccessStr.Caption := lngGetString(clngPropsStrLastAccess);
lblSymlinkStr.Caption := lngGetString(clngPropsStrSymlink);
lblOwnerStr.Caption := lngGetString(clngPropsStrOwner);
lblGroupStr.Caption := lngGetString(clngPropsStrGroup);
lblAttrTextStr.Caption := lngGetString(clngPropsStrAttrAlt);
lblAttrBitsStr.Caption := lngGetString(clngPropsStrBits);
lblLastModifStr.Caption := lngGetString(clngPropsStrLastChange);
lblLastStChangeStr.Caption := lngGetString(clngPropsStrLastStatus);
lblTypeStr.Caption := lngGetString(clngPropsStrType);
end;
procedure TfrmFileProperties.btnCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmFileProperties.ShowFile(iIndex:Integer);
var
sb: FindEx.Stat64;
dtFileDates:TDateTime;
psUidRec:PPasswordRecord;
psGidRec:PGroup;
begin
try
with fFileList.GetItem(iIndex)^ do
begin
fpstat64(PChar(szPath + sName), sb);
lblFileName.Caption:=sName;
lblFolder.Caption:=szPath;
lblSize.Caption:=IntToStr(iSize);
dtFileDates := FileStampToDateTime(sb.st_atime);
lblLastAccess.Caption:=DateTimeToStr(dtFileDates);
dtFileDates := FileStampToDateTime(sb.st_mtime);
lblLastModif.Caption:=DateTimeToStr(dtFileDates);
dtFileDates := FileStampToDateTime(sb.st_ctime);
lblLastStChange.Caption:=DateTimeToStr(dtFileDates);
if (bIsLink = True) then
lblSymlink.Caption:=Format(lngGetString(clngPropsYes), [sLinkTo])
else
lblSymlink.Caption:=lngGetString(clngPropsNo);
psUidRec := getpwuid(sb.st_uid);
if not assigned(psUidRec) then
lblOwner.Caption:=IntToStr(sb.st_uid)
else
lblOwner.Caption:=psUidRec^.pw_name;
psGidRec := getgrgid(sb.st_gid);
if not assigned(psGidRec) then
lblGroup.Caption:=IntToStr(sb.st_gid)
else
lblGroup.Caption:=psGidRec^.gr_name;
lblAttrOwner.Caption := '';
lblAttrGroup.Caption := '';
lblAttrOther.Caption := '';
lblAttrBits.Caption := '';
if ((sb.st_mode and S_IRUSR) = S_IRUSR) then
AddAttrString(lblAttrOwner, clngPropsAttrRead);
if ((sb.st_mode and S_IWUSR) = S_IWUSR) then
AddAttrString(lblAttrOwner, clngPropsAttrWrite);
if ((sb.st_mode and S_IXUSR) = S_IXUSR) then
AddAttrString(lblAttrOwner, clngPropsAttrExec);
if ((sb.st_mode and S_IRGRP) = S_IRGRP) then
AddAttrString(lblAttrGroup, clngPropsAttrRead);
if ((sb.st_mode and S_IWGRP) = S_IWGRP) then
AddAttrString(lblAttrGroup, clngPropsAttrWrite);
if ((sb.st_mode and S_IXGRP) = S_IXGRP) then
AddAttrString(lblAttrGroup, clngPropsAttrExec);
if ((sb.st_mode and S_IROTH) = S_IROTH) then
AddAttrString(lblAttrOther, clngPropsAttrRead);
if ((sb.st_mode and S_IWOTH) = S_IWOTH) then
AddAttrString(lblAttrOther, clngPropsAttrWrite);
if ((sb.st_mode and S_IXOTH) = S_IXOTH) then
AddAttrString(lblAttrOther, clngPropsAttrExec);
if ((sb.st_mode and S_ISUID) = S_ISUID) then
AddAttrString(lblAttrBits, clngPropsAttrSetUID);
if ((sb.st_mode and S_ISGID) = S_ISGID) then
AddAttrString(lblAttrBits, clngPropsAttrSetGID);
if ((sb.st_mode and S_ISVTX) = S_ISVTX) then
AddAttrString(lblAttrBits, clngPropsAttrSticky);
lblAttrText.Caption:=sModeStr; // + 666 like
if FPS_ISDIR(iMode) then
lblType.Caption:=lngGetString(clngPropsFolder)
else if FPS_ISREG(iMode) then
lblType.Caption:=lngGetString(clngPropsFile)
else if FPS_ISCHR(iMode) then
lblType.Caption:=lngGetString(clngPropsSpChrDev)
else if FPS_ISBLK(iMode) then
lblType.Caption:=lngGetString(clngPropsSpBlkDev)
else if FPS_ISFIFO(iMode) then
lblType.Caption:=lngGetString(clngPropsNmdPipe)
else if FPS_ISLNK(iMode) then
lblType.Caption:=lngGetString(clngPropsSymLink)
else if FPS_ISSOCK(iMode) then
lblType.Caption:=lngGetString(clngPropsSocket)
else
lblType.Caption:=lngGetString(clngPropsUnknownType);
end;
finally
end;
end;
procedure TfrmFileProperties.AddAttrString(lblItem:TLabel; nText:Integer);
begin
if Length(lblItem.Caption) > 0 then
begin
lblItem.Caption := lblItem.Caption + ', ' + lngGetString(nText);
end
else
lblItem.Caption := lngGetString(nText);
end;
procedure TfrmFileProperties.StoreData(FileList:TFileList);
var
i, nSelCount:Integer;
begin
fFileList:=FileList;
iCurrent:=0;
nSelCount:=0;
for i:=iCurrent to fFileList.Count-1 do
begin
if fFileList.GetItem(i)^.bSelected then
inc(nSelCount);
end;
if (nSelCount > 1) then
btnNext.Visible := True
else
btnNext.Visible := False;
end;
function TfrmFileProperties.FindNextSelected:Boolean;
var
i:Integer;
begin
for i:=iCurrent to fFileList.Count-1 do
begin
if fFileList.GetItem(i)^.bSelected then
begin
iCurrent:=i;
Result:=True;
Exit;
end;
end;
Result:=False;
end;
procedure TfrmFileProperties.btnNextClick(Sender: TObject);
begin
inc(iCurrent);
if not FindNextSelected Then
Close
else
ShowFile(iCurrent);
end;
procedure TfrmFileProperties.FormCreate(Sender: TObject);
begin
inherited;
lblFileNameStr.Font.Style:=[fsBold];
lblFileName.Font.Style:=[fsBold];
end;
initialization
{$I fFileProperties.lrs}
end.

62
ffindview.lfm Normal file
View file

@ -0,0 +1,62 @@
object frmFindView: TfrmFindView
ActiveControl = cbDataToFind
Caption = 'frmFindView'
ClientHeight = 94
ClientWidth = 339
OnShow = FormShow
Position = poOwnerFormCenter
TextHeight = 16
HorzScrollBar.Page = 340
HorzScrollBar.Range = 331
VertScrollBar.Page = 95
VertScrollBar.Range = 86
Left = 445
Height = 94
Top = 348
Width = 339
object cbDataToFind: TComboBox
ItemHeight = 18
MaxLength = 0
OnKeyUp = cbDataToFindKeyUp
ParentCtl3D = False
TabOrder = 0
Left = 16
Height = 23
Top = 16
Width = 312
end
object btnFind: TBitBtn
Default = True
OnClick = btnFindClick
Default = True
Caption = 'Find'
TabOrder = 1
OnClick = btnFindClick
Left = 176
Height = 25
Top = 56
Width = 75
end
object btnClose: TBitBtn
Kind = bkCancel
ModalResult = 2
ModalResult = 2
Caption = 'Cancel'
TabOrder = 2
Left = 256
Height = 25
Top = 56
Width = 75
end
object cbCaseSens: TCheckBox
AllowGrayed = True
AutoSize = True
Caption = 'cbCaseSens'
DragCursor = 65524
TabOrder = 3
Left = 16
Height = 30
Top = 56
Width = 153
end
end

20
ffindview.lrs Normal file
View file

@ -0,0 +1,20 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TfrmFindView','FORMDATA',[
'TPF0'#12'TfrmFindView'#11'frmFindView'#13'ActiveControl'#7#12'cbDataToFind'#7
+'Caption'#6#11'frmFindView'#12'ClientHeight'#2'^'#11'ClientWidth'#3'S'#1#6'O'
+'nShow'#7#8'FormShow'#8'Position'#7#17'poOwnerFormCenter'#10'TextHeight'#2#16
+#18'HorzScrollBar.Page'#3'T'#1#19'HorzScrollBar.Range'#3'K'#1#18'VertScrollB'
+'ar.Page'#2'_'#19'VertScrollBar.Range'#2'V'#4'Left'#3#189#1#6'Height'#2'^'#3
+'Top'#3'\'#1#5'Width'#3'S'#1#0#9'TComboBox'#12'cbDataToFind'#10'ItemHeight'#2
+#18#9'MaxLength'#2#0#7'OnKeyUp'#7#17'cbDataToFindKeyUp'#11'ParentCtl3D'#8#8
+'TabOrder'#2#0#4'Left'#2#16#6'Height'#2#23#3'Top'#2#16#5'Width'#3'8'#1#0#0#7
+'TBitBtn'#7'btnFind'#7'Default'#9#7'OnClick'#7#12'btnFindClick'#7'Default'#9
+#7'Caption'#6#4'Find'#8'TabOrder'#2#1#7'OnClick'#7#12'btnFindClick'#4'Left'#3
+#176#0#6'Height'#2#25#3'Top'#2'8'#5'Width'#2'K'#0#0#7'TBitBtn'#8'btnClose'#4
+'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#11'ModalResult'#2#2#7'Caption'#6#6
+'Cancel'#8'TabOrder'#2#2#4'Left'#3#0#1#6'Height'#2#25#3'Top'#2'8'#5'Width'#2
+'K'#0#0#9'TCheckBox'#10'cbCaseSens'#11'AllowGrayed'#9#8'AutoSize'#9#7'Captio'
+'n'#6#10'cbCaseSens'#10'DragCursor'#4#244#255#0#0#8'TabOrder'#2#3#4'Left'#2
+#16#6'Height'#2#30#3'Top'#2'8'#5'Width'#3#153#0#0#0#0
]);

91
ffindview.pas Normal file
View file

@ -0,0 +1,91 @@
{
Seksi Commander
----------------------------
Find dialog for Viewer
Licence : GNU GPL v 2.0
Author : radek.cervinka@centrum.cz
contributors:
}
{$mode objfpc}{$H+}
unit fFindView;
interface
uses
LResources, LClType,
SysUtils, Types, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, Buttons;
type
TfrmFindView = class(TfrmLng)
cbDataToFind: TComboBox;
btnFind: TBitBtn;
btnClose: TBitBtn;
cbCaseSens: TCheckBox;
procedure FormShow(Sender: TObject);
procedure btnFindClick(Sender: TObject);
procedure cbDataToFindKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private declarations }
public
{ Public declarations }
procedure LoadLng; override;
end;
implementation
uses
uLng;
procedure TfrmFindView.LoadLng;
begin
Caption:= lngGetString(clngViewFnd);
btnFind.Caption:= lngGetString(clngbutFind);
cbCaseSens.Caption:= lngGetString(clngViewFndCase);
btnClose.Caption:= lngGetString(clngbutClose);
end;
procedure TfrmFindView.FormShow(Sender: TObject);
begin
inherited;
cbDataToFind.SelectAll;
end;
procedure TfrmFindView.btnFindClick(Sender: TObject);
begin
inherited;
cbDataToFind.Items.Add(cbDataToFind.Text);
ModalResult:=mrOk;
end;
procedure TfrmFindView.cbDataToFindKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
inherited;
if (Key=VK_Down) and (cbDataToFind.Items.Count>0) then
cbDataToFind.DroppedDown:=True;
writeln(Key);
if Key=13 then
begin
Key:=0;
btnFind.Click;
end;
if Key=27 then
begin
Key:=0;
ModalResult:=mrCancel;
end;
end;
initialization
{$I fFindView.lrs}
end.

77
fhardlink.lfm Normal file
View file

@ -0,0 +1,77 @@
object frmHardLink: TfrmHardLink
ActiveControl = edtNew
Caption = 'frmHardLink'
ClientHeight = 148
ClientWidth = 417
KeyPreview = True
OnKeyPress = frmHardLinkKeyPress
PixelsPerInch = 96
Position = poMainFormCenter
TextHeight = 16
HorzScrollBar.Page = 416
HorzScrollBar.Range = 411
VertScrollBar.Page = 147
VertScrollBar.Range = 145
Left = 292
Height = 148
Top = 224
Width = 417
object lblNew: TLabel
Caption = 'lblNew'
Color = clNone
ParentColor = False
Left = 8
Height = 14
Top = 64
Width = 32
end
object lblDst: TLabel
Caption = 'lblDst'
Color = clNone
ParentColor = False
Left = 8
Height = 14
Top = 8
Width = 27
end
object edtNew: TEdit
TabOrder = 1
Left = 8
Height = 24
Top = 88
Width = 401
end
object edtDst: TEdit
TabOrder = 3
Left = 8
Height = 24
Top = 32
Width = 401
end
object btnOK: TBitBtn
BorderSpacing.InnerBorder = 2
Caption = '&OK'
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
OnClick = btnOKClick
TabOrder = 0
Left = 248
Height = 23
Top = 120
Width = 75
end
object btnCancel: TBitBtn
BorderSpacing.InnerBorder = 2
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 2
Left = 336
Height = 23
Top = 120
Width = 75
end
end

85
fhardlink.pas Normal file
View file

@ -0,0 +1,85 @@
unit fHardLink;
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, Buttons;
type
TfrmHardLink = class(TfrmLng)
lblNew: TLabel;
lblDst: TLabel;
edtNew: TEdit;
edtDst: TEdit;
btnOK: TBitBtn;
btnCancel: TBitBtn;
procedure btnOKClick(Sender: TObject);
procedure frmHardLinkKeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
procedure LoadLng; override;
end;
procedure ShowHardLinkForm(const sNew, sDst:String);
implementation
uses
uLng, uShowMsg, uOSUtils;
procedure ShowHardLinkForm(const sNew, sDst:String);
begin
with TfrmHardLink.Create(Application) do
begin
try
edtDst.Text:=sDst;
edtNew.Text:=sNew;
ShowModal;
finally
Free;
end;
end;
end;
procedure TfrmHardLink.LoadLng;
begin
Caption:=lngGetString(clngHardLink);
lblNew.Caption:=lngGetString(clngHardLinkDst);
lblDst.Caption:=lngGetString(clngHardLinkNew);
end;
procedure TfrmHardLink.btnOKClick(Sender: TObject);
var
sSrc,sDst:String;
begin
inherited;
sSrc:=edtNew.Text;
sDst:=edtDst.Text;
if CreateHardLink(sSrc, sDst) then
Close
else
begin
MsgError(lngGetString(clngHardErrCreate));
end;
end;
procedure TfrmHardLink.frmHardLinkKeyPress(Sender: TObject; var Key: Char);
begin
if Key=#27 then
ModalResult:=mrCancel;
if Key=#13 then
begin
ModalResult:=mrOK;
Key:=#0;
end;
end;
initialization
{$I fHardLink.lrs}
end.

68
fhotdir.lfm Normal file
View file

@ -0,0 +1,68 @@
object frmHotDir: TfrmHotDir
ActiveControl = lsHotDir
Caption = 'frmHotDir'
ClientHeight = 423
ClientWidth = 411
Color = clBackground
TextHeight = 16
HorzScrollBar.Page = 412
HorzScrollBar.Range = 403
VertScrollBar.Page = 424
VertScrollBar.Range = 417
Left = 277
Height = 423
Top = 211
Width = 411
object lsHotDir: TListBox
TabOrder = 0
TopIndex = -1
Left = 8
Height = 409
Top = 8
Width = 305
end
object btnOK: TBitBtn
Kind = bkOK
ModalResult = 1
OnClick = btnOKClick
ModalResult = 1
Caption = '&OK'
TabOrder = 1
OnClick = btnOKClick
Left = 328
Height = 25
Top = 8
Width = 75
end
object btnCancel: TBitBtn
Kind = bkCancel
ModalResult = 2
ModalResult = 2
Caption = 'Cancel'
TabOrder = 2
Left = 328
Height = 25
Top = 128
Width = 75
end
object btnADD: TBitBtn
OnClick = btnADDClick
Caption = 'Add'
TabOrder = 3
OnClick = btnADDClick
Left = 328
Height = 25
Top = 48
Width = 75
end
object btnDelete: TBitBtn
OnClick = btnDeleteClick
Caption = 'Delete'
TabOrder = 4
OnClick = btnDeleteClick
Left = 328
Height = 25
Top = 88
Width = 75
end
end

Some files were not shown because too many files have changed in this diff Show more