ADD: All option on "Layout" page is working now

This commit is contained in:
Alexander Koblov 2007-09-15 21:16:59 +00:00
commit 9ffc4af052
20 changed files with 1922 additions and 1554 deletions

View file

@ -8,6 +8,8 @@ del /Q *.~*
del /Q doublecmd*.exe
del /Q doublecmd.compiled
del /Q doc\help\*.*
del /Q plugins\wcx\cpio\bin\*.*
del /Q plugins\wcx\rpm\bin\*.*
del /Q plugins\wcx\deb\bin\*.*

View file

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

View file

@ -70,6 +70,7 @@ type
procedure SetButton(Index : Integer; Value : TSpeedButton);
procedure SetCommand(Index: Integer; const AValue: String);
procedure SetIconPath(Index: Integer; const AValue: String);
procedure SetFlatButtons(const AValue : Boolean);
procedure ToolButtonClick(Sender: TObject);
procedure UpdateButtonsTag;
@ -100,7 +101,7 @@ type
property OnToolButtonClick: TOnToolButtonClick read FOnToolButtonClick write FOnToolButtonClick;
property OnChangeLineCount : TChangeLineCount read FChangeLineCount write FChangeLineCount;
property CheckToolButton : Boolean read FCheckToolButton write FCheckToolButton default False;
property FlatButtons : Boolean read FFlatButtons write FFlatButtons default False;
property FlatButtons : Boolean read FFlatButtons write SetFlatButtons default False;
property IsDiskPanel : Boolean read FDiskPanel write FDiskPanel default False;
property ChangePath : String read FChangePath write FChangePath;
@ -271,6 +272,15 @@ begin
ShowMessage('File "' + AValue + '" not found!' );
end;
procedure TKAStoolBar.SetFlatButtons(const AValue: Boolean);
var
I :Integer;
begin
FFlatButtons := AValue;
for I := 0 to FButtonsList.Count - 1 do
TSpeedButton(FButtonsList.Items[I]).Flat := FFlatButtons;
end;
procedure TKAStoolBar.ToolButtonClick(Sender: TObject);
begin
inherited Click;

View file

@ -8,4 +8,5 @@
11.06.2007 Добавил возможность определить различные цвета для различных типов файлов.
Можно указать для одного цвета несколько масок, разделяя их точкой с запятой,
например, *.zip;*.rar;*.arj.
09.09.2007 Добавил опции "Вид окна"
09.09.2007 Добавил опции "Вид окна"
16.09.2007 Все опции на вкладке "Layout" теперь работают

2
docgen.bat Normal file
View file

@ -0,0 +1,2 @@
REM http://pasdoc.sourceforge.net
pasdoc --marker en --output doc\help --define MSWINDOWS --source units.txt

3
docgen.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/sh
# http://pasdoc.sourceforge.net
pasdoc --marker en --output doc/help --define UNIX --source units.txt

View file

@ -1,7 +1,7 @@
inherited frmCompareFiles: TfrmCompareFiles
Left = 235
Left = 13
Height = 540
Top = 94
Top = 153
Width = 783
HorzScrollBar.Page = 782
HorzScrollBar.Range = 365
@ -9,19 +9,23 @@ inherited frmCompareFiles: TfrmCompareFiles
VertScrollBar.Range = 52
ActiveControl = edtFileNameLeft
Caption = 'Compare files'
ClientHeight = 540
ClientWidth = 783
Position = poScreenCenter
object Splitter1: TSplitter
Left = 361
Height = 476
Height = 479
Top = 41
Width = 5
end
object Panel1: TPanel
Height = 476
object pnlLeft: TPanel
Height = 479
Top = 41
Width = 361
Align = alLeft
BevelOuter = bvNone
ClientHeight = 479
ClientWidth = 361
FullRepaint = False
TabOrder = 0
object pnlLeftBox: TPanel
@ -29,25 +33,22 @@ inherited frmCompareFiles: TfrmCompareFiles
Width = 361
Align = alTop
BevelOuter = bvNone
ClientHeight = 25
ClientWidth = 361
FullRepaint = False
TabOrder = 0
OnResize = pnlLeftBoxResize
object edtFileNameLeft: TEdit
Height = 20
Width = 307
object edtFileNameLeft: TFileNameEdit
Height = 23
Width = 336
ButtonWidth = 23
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]
ParentColor = False
TabOrder = 0
Text = 'pp'
end
object btnFileNameLeft: TButton
Left = 323
Height = 20
Width = 20
Caption = '...'
TabOrder = 1
end
end
object lstLeft: TSynEdit
Height = 451
Height = 454
Top = 25
Width = 361
Align = alClient
@ -59,12 +60,10 @@ inherited frmCompareFiles: TfrmCompareFiles
ParentCtl3D = False
TabOrder = 1
BookMarkOptions.Xoffset = -18
BookMarkOptions.OnChange = nil
Gutter.DigitCount = 2
Gutter.LeftOffset = 0
Gutter.Visible = False
Gutter.Width = 15
Gutter.OnChange = nil
Gutter.CodeFoldingWidth = 14
Keystrokes = <
item
@ -388,18 +387,19 @@ inherited frmCompareFiles: TfrmCompareFiles
ShortCut = 24642
end>
ReadOnly = True
SelectedColor.OnChange = nil
OnSpecialLineColors = lstLeftSpecialLineColors
OnStatusChange = lstLeftStatusChange
end
end
object Panel2: TPanel
object pnlRight: TPanel
Left = 366
Height = 476
Height = 479
Top = 41
Width = 417
Align = alClient
BevelOuter = bvNone
ClientHeight = 479
ClientWidth = 417
FullRepaint = False
TabOrder = 1
object pnlRightBox: TPanel
@ -407,26 +407,22 @@ inherited frmCompareFiles: TfrmCompareFiles
Width = 417
Align = alTop
BevelOuter = bvNone
ClientHeight = 25
ClientWidth = 417
FullRepaint = False
TabOrder = 0
OnResize = pnlRightBoxResize
object edtFileNameRight: TEdit
Left = 10
Height = 20
Width = 344
object edtFileNameRight: TFileNameEdit
Height = 23
Width = 392
ButtonWidth = 23
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]
ParentColor = False
TabOrder = 0
Text = 'ppp'
end
object btnFileNameRight: TButton
Left = 370
Height = 20
Width = 20
Caption = '...'
TabOrder = 1
end
end
object lstRight: TSynEdit
Height = 451
Height = 454
Top = 25
Width = 417
Align = alClient
@ -438,9 +434,7 @@ inherited frmCompareFiles: TfrmCompareFiles
ParentCtl3D = False
TabOrder = 1
BookMarkOptions.Xoffset = -18
BookMarkOptions.OnChange = nil
Gutter.Visible = False
Gutter.OnChange = nil
Gutter.CodeFoldingWidth = 14
Keystrokes = <
item
@ -764,14 +758,13 @@ inherited frmCompareFiles: TfrmCompareFiles
ShortCut = 24642
end>
ReadOnly = True
SelectedColor.OnChange = nil
OnSpecialLineColors = lstRightSpecialLineColors
OnStatusChange = lstRightStatusChange
end
end
object pnlStatusBar: TStatusBar
Height = 23
Top = 517
Height = 20
Top = 520
Width = 783
Panels = <
item
@ -784,6 +777,8 @@ inherited frmCompareFiles: TfrmCompareFiles
Width = 783
Align = alTop
BevelOuter = bvNone
ClientHeight = 41
ClientWidth = 783
FullRepaint = False
TabOrder = 2
object btnCompare: TButton
@ -791,6 +786,7 @@ inherited frmCompareFiles: TfrmCompareFiles
Height = 23
Top = 8
Width = 96
BorderSpacing.InnerBorder = 4
Caption = 'Compare files'
OnClick = btnCompareClick
TabOrder = 0
@ -800,6 +796,7 @@ inherited frmCompareFiles: TfrmCompareFiles
Height = 23
Top = 8
Width = 122
BorderSpacing.InnerBorder = 4
Caption = 'Next difference'
TabOrder = 1
end
@ -808,6 +805,7 @@ inherited frmCompareFiles: TfrmCompareFiles
Height = 23
Top = 8
Width = 147
BorderSpacing.InnerBorder = 4
Caption = 'Previous difference'
TabOrder = 2
end
@ -825,6 +823,7 @@ inherited frmCompareFiles: TfrmCompareFiles
Height = 23
Top = 8
Width = 50
BorderSpacing.InnerBorder = 4
Caption = 'Close'
OnClick = btnCloseClick
TabOrder = 4

View file

@ -6,19 +6,20 @@ uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, fLngForm,
ComCtrls, Buttons, SynEdit;
ComCtrls, Buttons, SynEdit, EditBtn;
type
{ TfrmCompareFiles }
TfrmCompareFiles = class(TFrmLng)
Panel1: TPanel;
edtFileNameLeft: TFileNameEdit;
edtFileNameRight: TFileNameEdit;
pnlLeft: TPanel;
Splitter1: TSplitter;
Panel2: TPanel;
pnlRight: TPanel;
pnlLeftBox: TPanel;
pnlRightBox: TPanel;
edtFileNameLeft: TEdit;
btnFileNameLeft: TButton;
edtFileNameRight: TEdit;
btnFileNameRight: TButton;
lstRight: TSynEdit;
lstLeft: TSynEdit;
pnlStatusBar: TStatusBar;
@ -36,8 +37,6 @@ type
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 }
@ -150,20 +149,6 @@ begin
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;

View file

@ -1,7 +1,7 @@
object ButtonChangeDlg: TButtonChangeDlg
Left = 17
Left = 218
Height = 304
Top = 251
Top = 132
Width = 578
HelpContext = 270
HorzScrollBar.Page = 577
@ -169,10 +169,13 @@ object ButtonChangeDlg: TButtonChangeDlg
TabOrder = 6
end
object kedtParams: TKASEdit
AnchorSideTop.Control = cbCommand
AnchorSideTop.Side = asrBottom
Left = 120
Height = 21
Top = 111
Top = 113
Width = 298
BorderSpacing.Top = 6
Font.Height = -11
Font.Name = 'MS Sans Serif'
MaxLength = 259
@ -249,10 +252,13 @@ object ButtonChangeDlg: TButtonChangeDlg
TabOrder = 15
end
object btnCancel: TButton
AnchorSideTop.Control = btnOK
AnchorSideTop.Side = asrBottom
Left = 455
Height = 32
Top = 224
Width = 109
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 4
Cancel = True
Caption = 'Cancel'
@ -260,10 +266,13 @@ object ButtonChangeDlg: TButtonChangeDlg
TabOrder = 17
end
object btnHelp: TButton
AnchorSideTop.Control = btnCancel
AnchorSideTop.Side = asrBottom
Left = 455
Height = 32
Top = 262
Width = 109
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 4
Caption = '&Help'
TabOrder = 16
@ -287,7 +296,6 @@ object ButtonChangeDlg: TButtonChangeDlg
object lblSize: TLabel
Left = 6
Height = 14
Top = 7
Width = 55
AutoSize = False
Caption = 'S&ize:'
@ -304,20 +312,27 @@ object ButtonChangeDlg: TButtonChangeDlg
Text = '0'
end
object cbFlatIcons: TCheckBox
AnchorSideTop.Control = lblSize
AnchorSideTop.Side = asrBottom
Left = 6
Height = 13
Top = 18
Top = 22
Width = 65
BorderSpacing.Top = 8
Caption = 'F&lat icons'
Checked = True
OnChange = cbFlatIconsChange
State = cbChecked
TabOrder = 1
end
object cbSmallIcons: TCheckBox
AnchorSideTop.Control = cbFlatIcons
AnchorSideTop.Side = asrBottom
Left = 6
Height = 13
Top = 38
Top = 41
Width = 73
BorderSpacing.Top = 6
Caption = 'S&mall icons'
TabOrder = 2
end

View file

@ -57,6 +57,7 @@ type
lblSize: TLabel;
lblStartpath: TLabel;
lblTooltip: TLabel;
procedure cbFlatIconsChange(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure btnAddButtonClick(Sender: TObject);
@ -78,7 +79,7 @@ var
LastToolButton, NewToolButton : Integer;
implementation
uses fMain, uGlobsPaths;
uses fMain, uGlobsPaths, uGlobs;
procedure ShowConfigToolbar;
begin
@ -97,16 +98,25 @@ end;
procedure TButtonChangeDlg.FormShow(Sender: TObject);
begin
cbFlatIcons.Checked := gToolBarFlat;
ktbBar.FlatButtons := gToolBarFlat;
ktbBar.ChangePath := gpExePath;
ktbBar.EnvVar := '%commander_path%';
ktbBar.LoadFromFile(gpIniDir + 'default.bar');
end;
procedure TButtonChangeDlg.cbFlatIconsChange(Sender: TObject);
begin
ktbBar.FlatButtons := cbFlatIcons.Checked;
end;
procedure TButtonChangeDlg.btnOKClick(Sender: TObject);
begin
Save;
gToolBarFlat := cbFlatIcons.Checked;
ktbBar.SaveToFile(gpIniDir + 'default.bar');
frmMain.MainToolBar.DeleteAllToolButtons;
frmMain.MainToolBar.FlatButtons := gToolBarFlat;
//frmMain.MainToolBar.CreateWnd;
frmMain.MainToolBar.LoadFromFile(gpIniDir + 'default.bar');
Close;

View file

@ -1,35 +1,44 @@
inherited frmEditorConf: TfrmEditorConf
Left = 324
Height = 295
Top = 201
Width = 483
AutoScroll = True
Left = 259
Height = 353
Top = 76
Width = 473
HorzScrollBar.Page = 472
HorzScrollBar.Range = 457
VertScrollBar.Page = 352
VertScrollBar.Range = 343
ActiveControl = grColor
Caption = 'Editor configuration'
ClientHeight = 353
ClientWidth = 473
Position = poScreenCenter
object lbSample: TLabel
AnchorSideTop.Control = cmbPredefined
AnchorSideTop.Side = asrBottom
Left = 8
Height = 14
Top = 184
Top = 185
Width = 35
BorderSpacing.Top = 6
Caption = 'Sample'
Color = clNone
ParentColor = False
end
object lbPredefined: TLabel
AnchorSideTop.Control = grColor
AnchorSideTop.Side = asrBottom
Left = 8
Height = 14
Top = 136
Top = 138
Width = 53
BorderSpacing.Top = 6
Caption = 'Predefined'
Color = clNone
ParentColor = False
end
object grColor: TDrawGrid
Left = 8
Height = 128
Height = 124
Top = 8
Width = 128
Width = 124
AutoAdvance = aaDown
Color = clWhite
ColCount = 4
@ -49,18 +58,23 @@ inherited frmEditorConf: TfrmEditorConf
OnMouseDown = grColorMouseDown
end
object lbNames: TListBox
Left = 240
Height = 192
Width = 201
Left = 280
Height = 250
Top = 8
Width = 187
Anchors = [akTop, akLeft, akRight, akBottom]
OnClick = lbNamesClick
TabOrder = 1
end
object cbBold: TCheckBox
AnchorSideTop.Control = cbItalic
AnchorSideTop.Side = asrBottom
Left = 137
Height = 13
Top = 56
Width = 53
AllowGrayed = True
BorderSpacing.Top = 3
Caption = 'cbBold'
OnClick = cbBoldClick
TabOrder = 2
@ -76,32 +90,41 @@ inherited frmEditorConf: TfrmEditorConf
TabOrder = 3
end
object cbStrikeOut: TCheckBox
AnchorSideTop.Control = cbUnderline
AnchorSideTop.Side = asrBottom
Left = 136
Height = 13
Top = 24
Width = 76
AllowGrayed = True
BorderSpacing.Top = 3
Caption = 'cbStrikeOut'
OnClick = cbBoldClick
TabOrder = 4
end
object cbItalic: TCheckBox
AnchorSideTop.Control = cbStrikeOut
AnchorSideTop.Side = asrBottom
Left = 136
Height = 13
Top = 40
Width = 54
AllowGrayed = True
BorderSpacing.Top = 3
Caption = 'cbItalic'
OnClick = cbBoldClick
TabOrder = 5
end
object cmbPredefined: TComboBox
AnchorSideTop.Control = lbPredefined
AnchorSideTop.Side = asrBottom
Left = 8
Height = 21
Top = 152
Top = 158
Width = 208
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 18
BorderSpacing.Top = 6
ItemHeight = 13
MaxLength = 0
OnChange = cmbPredefinedChange
ParentCtl3D = False
@ -109,10 +132,11 @@ inherited frmEditorConf: TfrmEditorConf
TabOrder = 6
end
object btnCancel: TBitBtn
Left = 366
Height = 25
Top = 240
Width = 75
Left = 377
Height = 32
Top = 312
Width = 82
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 2
Caption = 'Cancel'
Kind = bkCancel
@ -122,10 +146,11 @@ inherited frmEditorConf: TfrmEditorConf
TabOrder = 9
end
object btnOK: TBitBtn
Left = 272
Height = 25
Top = 240
Width = 75
Left = 260
Height = 32
Top = 312
Width = 82
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 2
Caption = '&OK'
Default = True
@ -136,15 +161,21 @@ inherited frmEditorConf: TfrmEditorConf
TabOrder = 7
end
object edtSample: TSynEdit
AnchorSideTop.Control = lbSample
AnchorSideTop.Side = asrBottom
Left = 8
Height = 56
Top = 209
Height = 97
Top = 205
Width = 232
BorderSpacing.Top = 6
Anchors = [akTop, akLeft, akBottom]
Font.Height = -12
Font.Name = 'courier'
ParentColor = False
ParentCtl3D = False
TabOrder = 8
BookMarkOptions.OnChange = nil
Gutter.OnChange = nil
Gutter.CodeFoldingWidth = 14
Keystrokes = <
item
@ -471,5 +502,6 @@ inherited frmEditorConf: TfrmEditorConf
'bla bla ble ble blu blu'
'blu blu ble ble bla bla'
)
SelectedColor.OnChange = nil
end
end

View file

@ -1,385 +1,388 @@
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, uFindEx;
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.
unit fEditorConf;
interface
uses
LResources,
SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, fLngForm, SynEditHighlighter, SynEditStrConst,
Grids, Buttons, ComCtrls, uGlobsPaths, SynEdit, ButtonPanel;
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 }
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, uFindEx;
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.

405
fmain.lfm
View file

@ -1,15 +1,15 @@
inherited frmMain: TfrmMain
Left = 290
Left = 261
Height = 336
Top = 146
Width = 525
HorzScrollBar.Page = 524
Top = 81
Width = 540
HorzScrollBar.Page = 539
VertScrollBar.Page = 316
VertScrollBar.Range = 79
ActiveControl = pnlNotebooks
Caption = 'Double Commander'
ClientHeight = 317
ClientWidth = 525
ClientWidth = 540
Font.Color = clBlack
Font.Height = 13
Font.Name = 'Helvetica'
@ -29,14 +29,15 @@ inherited frmMain: TfrmMain
object pnlSyncSize: TPanel
Height = 26
Top = 23
Width = 525
Width = 540
Align = alTop
BevelOuter = bvNone
ClientHeight = 26
ClientWidth = 525
ClientWidth = 540
FullRepaint = False
TabOrder = 0
object pnlDisk: TPanel
Left = 15
Height = 26
Width = 525
Align = alRight
@ -77,167 +78,36 @@ inherited frmMain: TfrmMain
end
end
end
object pnlCommand: TPanel
Height = 62
Top = 255
Width = 525
Align = alBottom
Anchors = [akLeft, akRight]
BevelOuter = bvLowered
ClientHeight = 62
ClientWidth = 525
FullRepaint = False
ParentColor = False
TabOrder = 1
object lblCommandPath: TLabel
Left = 1
Height = 14
Top = 8
Width = 23
Alignment = taRightJustify
Caption = 'Path'
ParentColor = False
ShowAccelChar = False
end
object pnlKeys: TPanel
Left = 1
Height = 27
Top = 34
Width = 523
Align = alBottom
Anchors = [akLeft, akRight]
BevelOuter = bvLowered
ClientHeight = 27
ClientWidth = 523
FullRepaint = False
TabOrder = 0
OnResize = pnlKeysResize
object btnF3: TSpeedButton
Left = 1
Height = 23
Top = 4
Width = 75
Action = actView
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF4: TSpeedButton
Left = 76
Height = 23
Top = 4
Width = 75
Action = actEdit
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF5: TSpeedButton
Left = 151
Height = 23
Top = 4
Width = 75
Action = actCopy
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF6: TSpeedButton
Left = 226
Height = 23
Top = 4
Width = 75
Action = actRename
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF7: TSpeedButton
Left = 301
Height = 23
Top = 4
Width = 75
Action = actMakeDir
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF8: TSpeedButton
Left = 376
Height = 23
Top = 4
Width = 75
Action = actDelete
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF10: TSpeedButton
Left = 539
Height = 23
Top = 4
Width = 75
Action = actExit
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF9: TSpeedButton
Left = 448
Height = 22
Top = 4
Width = 89
Action = actShowMenu
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
end
object edtCommand: TComboBox
Left = 56
Height = 21
Top = 8
Width = 688
TabStop = False
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 13
MaxLength = 0
OnKeyDown = edtCommandKeyDown
OnKeyUp = edtCommandKeyUp
ParentCtl3D = False
TabOrder = 1
end
end
object pnlNotebooks: TPanel
Height = 206
Height = 241
Top = 49
Width = 525
Width = 540
Align = alClient
ClientHeight = 206
ClientWidth = 525
ClientHeight = 241
ClientWidth = 540
FullRepaint = False
TabOrder = 2
TabOrder = 1
TabStop = True
object MainSplitter: TSplitter
Left = 171
Height = 204
Height = 201
Top = 1
Width = 4
ResizeStyle = rsLine
end
object pnlLeft: TPanel
Left = 1
Height = 204
Height = 201
Top = 1
Width = 170
Align = alLeft
BevelOuter = bvNone
Caption = 'pnlLeft'
ClientHeight = 204
ClientHeight = 201
ClientWidth = 170
TabOrder = 0
object nbLeft: TNotebook
Height = 180
Height = 177
Hint = 'Left'
Top = 24
Width = 170
@ -305,20 +175,20 @@ inherited frmMain: TfrmMain
end
object pnlRight: TPanel
Left = 175
Height = 204
Height = 201
Top = 1
Width = 349
Width = 364
Align = alClient
BevelOuter = bvNone
Caption = 'pnlRight'
ClientHeight = 204
ClientWidth = 349
ClientHeight = 201
ClientWidth = 364
TabOrder = 1
object nbRight: TNotebook
Height = 180
Height = 177
Hint = 'Right'
Top = 24
Width = 349
Width = 364
Align = alClient
OnCloseTabClicked = NoteBookCloseTabClicked
OnPageChanged = nbPageChanged
@ -327,11 +197,11 @@ inherited frmMain: TfrmMain
end
object pnlRightTools: TPanel
Height = 24
Width = 349
Width = 364
Align = alTop
BevelOuter = bvNone
ClientHeight = 24
ClientWidth = 349
ClientWidth = 364
TabOrder = 1
object btnRightDrive: TSpeedButton
Height = 24
@ -342,7 +212,7 @@ inherited frmMain: TfrmMain
NumGlyphs = 0
end
object btnRightHome: TSpeedButton
Left = 326
Left = 341
Height = 24
Width = 23
Align = alRight
@ -352,7 +222,7 @@ inherited frmMain: TfrmMain
OnClick = btnRightClick
end
object btnRightUp: TSpeedButton
Left = 303
Left = 318
Height = 24
Width = 23
Align = alRight
@ -362,7 +232,7 @@ inherited frmMain: TfrmMain
OnClick = btnRightClick
end
object btnRightRoot: TSpeedButton
Left = 280
Left = 295
Height = 24
Width = 23
Align = alRight
@ -374,24 +244,155 @@ inherited frmMain: TfrmMain
object lblRightDriveInfo: TLabel
Left = 48
Height = 24
Width = 232
Width = 247
Align = alClient
Alignment = taCenter
ParentColor = False
end
end
end
object pnlCommand: TPanel
Left = 1
Height = 38
Top = 202
Width = 538
Align = alBottom
Anchors = [akLeft, akRight]
BevelOuter = bvLowered
ClientHeight = 38
ClientWidth = 538
FullRepaint = False
ParentColor = False
TabOrder = 2
object lblCommandPath: TLabel
Left = 1
Height = 14
Top = 8
Width = 23
Alignment = taRightJustify
Caption = 'Path'
ParentColor = False
ShowAccelChar = False
end
object edtCommand: TComboBox
Left = 56
Height = 21
Top = 8
Width = 688
TabStop = False
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
ItemHeight = 13
MaxLength = 0
OnKeyDown = edtCommandKeyDown
OnKeyUp = edtCommandKeyUp
ParentCtl3D = False
TabOrder = 0
end
end
end
object MainToolBar: TKAStoolBar
Height = 23
Width = 525
Width = 540
Align = alTop
TabOrder = 3
TabOrder = 2
OnMouseDown = MainToolBarMouseDown
OnToolButtonClick = MainToolBarToolButtonClick
FlatButtons = True
EnvVar = '%commander_path%'
end
object pnlKeys: TPanel
Height = 27
Top = 290
Width = 540
Align = alBottom
Anchors = [akLeft, akRight]
BevelOuter = bvLowered
ClientHeight = 27
ClientWidth = 540
FullRepaint = False
TabOrder = 3
OnResize = pnlKeysResize
object btnF3: TSpeedButton
Left = 1
Height = 23
Top = 4
Width = 75
Action = actView
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF4: TSpeedButton
Left = 76
Height = 23
Top = 4
Width = 75
Action = actEdit
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF5: TSpeedButton
Left = 151
Height = 23
Top = 4
Width = 75
Action = actCopy
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF6: TSpeedButton
Left = 226
Height = 23
Top = 4
Width = 75
Action = actRename
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF7: TSpeedButton
Left = 301
Height = 23
Top = 4
Width = 75
Action = actMakeDir
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF8: TSpeedButton
Left = 376
Height = 23
Top = 4
Width = 75
Action = actDelete
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF10: TSpeedButton
Left = 539
Height = 23
Top = 4
Width = 75
Action = actExit
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
object btnF9: TSpeedButton
Left = 448
Height = 22
Top = 4
Width = 89
Action = actShowMenu
Color = clBtnFace
Flat = True
NumGlyphs = 0
end
end
object mnuMain: TMainMenu
left = 283
top = 8
@ -583,6 +584,7 @@ inherited frmMain: TfrmMain
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actExitExecute
ShortCut = 32856
end
object actView: TAction
Category = 'Classic'
@ -667,6 +669,7 @@ inherited frmMain: TfrmMain
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actShowMenuExecute
ShortCut = 120
end
object actRefresh: TAction
Category = 'Show'
@ -713,20 +716,6 @@ inherited frmMain: TfrmMain
HelpType = htKeyword
OnExecute = actMarkUnmarkAllExecute
end
object actDelete2: TAction
Category = 'Classic'
Caption = 'actDelete2'
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actDelete2Execute
end
object actPathToCmdLine: TAction
Caption = 'actPathToCmdLine'
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actPathToCmdLineExecute
ShortCut = 16464
end
object actMarkPlus: TAction
Category = 'Mark'
Caption = 'Select a group'
@ -741,12 +730,6 @@ inherited frmMain: TfrmMain
HelpType = htKeyword
OnExecute = actMarkMinusExecute
end
object actChMod: TAction
Category = 'File'
Caption = 'Change Attributes'
DisableIfNoHandler = True
HelpType = htKeyword
end
object actSymLink: TAction
Category = 'File'
Caption = 'Create symlink...'
@ -810,21 +793,21 @@ inherited frmMain: TfrmMain
HelpType = htKeyword
OnExecute = actMultiRenameExecute
end
object actShiftF5: TAction
object actCopySamePanel: TAction
Category = 'Commands'
Caption = 'actShiftF5'
Caption = 'actCopySamePanel'
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actShiftF5Execute
ShortCut = 12340
OnExecute = actCopySamePanelExecute
ShortCut = 8308
end
object actShiftF6: TAction
object actRenameOnly: TAction
Category = 'Commands'
Caption = 'actShiftF6'
Caption = 'actRenameOnly'
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actShiftF6Execute
ShortCut = 12341
OnExecute = actRenameOnlyExecute
ShortCut = 8309
end
object actShiftF4: TAction
Category = 'Commands'
@ -855,7 +838,7 @@ inherited frmMain: TfrmMain
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actRunTermExecute
ShortCut = 16468
ShortCut = 16472
end
object actCalculateSpace: TAction
Category = 'File'
@ -871,12 +854,6 @@ inherited frmMain: TfrmMain
HelpType = htKeyword
OnExecute = actFilePropertiesExecute
end
object actChown: TAction
Category = 'File'
Caption = 'Chown'
DisableIfNoHandler = True
HelpType = htKeyword
end
object actFileLinker: TAction
Category = 'File'
Caption = 'Link Files'
@ -897,6 +874,7 @@ inherited frmMain: TfrmMain
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actNewTabExecute
ShortCut = 16468
end
object actRemoveTab: TAction
Category = 'Tabs'
@ -904,6 +882,7 @@ inherited frmMain: TfrmMain
DisableIfNoHandler = True
HelpType = htKeyword
OnExecute = actRemoveTabExecute
ShortCut = 16471
end
object actPackFiles: TAction
Category = 'File'
@ -937,6 +916,40 @@ inherited frmMain: TfrmMain
OnExecute = actRightOpenDrivesExecute
ShortCut = 32881
end
object actAddPathToCmdLine: TAction
Category = 'Commands'
Caption = 'actAddPathToCmdLine'
DisableIfNoHandler = True
OnExecute = actAddPathToCmdLineExecute
ShortCut = 16464
end
object actFocusCmdLine: TAction
Category = 'Commands'
Caption = 'actFocusCmdLine'
DisableIfNoHandler = True
OnExecute = actFocusCmdLineExecute
ShortCut = 8305
end
object actTransferLeft: TAction
Category = 'Commands'
Caption = 'actTransferLeft'
DisableIfNoHandler = True
OnExecute = actTransferLeftExecute
ShortCut = 16421
end
object actTransferRight: TAction
Category = 'Commands'
Caption = 'actTransferRight'
DisableIfNoHandler = True
OnExecute = actTransferRightExecute
ShortCut = 16423
end
object actContextMenu: TAction
Category = 'Commands'
Caption = 'actContextMenu'
DisableIfNoHandler = True
OnExecute = actContextMenuExecute
end
end
object pmHotList: TPopupMenu
left = 152

364
fmain.pas
View file

@ -52,15 +52,26 @@ type
{ TfrmMain }
TfrmMain = class(TfrmLng)
actChMod: TAction;
actChown: TAction;
actExtractFiles: TAction;
actAddPathToCmdLine: TAction;
actFocusCmdLine: TAction;
actContextMenu: TAction;
actTransferRight: TAction;
actTransferLeft: TAction;
actRightOpenDrives: TAction;
actLeftOpenDrives: TAction;
actOpenVFSList: TAction;
actPackFiles: TAction;
actRemoveTab: TAction;
actNewTab: TAction;
btnF10: TSpeedButton;
btnF3: TSpeedButton;
btnF4: TSpeedButton;
btnF5: TSpeedButton;
btnF6: TSpeedButton;
btnF7: TSpeedButton;
btnF8: TSpeedButton;
btnF9: TSpeedButton;
dskLeft: TKAStoolBar;
dskRight: TKAStoolBar;
lblRightDriveInfo: TLabel;
@ -70,6 +81,7 @@ type
mnuExtractFiles: TMenuItem;
nbLeft: TNotebook;
nbRight: TNotebook;
pnlKeys: TPanel;
pnlLeftTools: TPanel;
pnlRightTools: TPanel;
pnlRight: TPanel;
@ -135,14 +147,6 @@ type
mnuCmdSearch: TMenuItem;
actionLst: TActionList;
actExit: TAction;
pnlKeys: TPanel;
btnF3: TSpeedButton;
btnF4: TSpeedButton;
btnF5: TSpeedButton;
btnF6: TSpeedButton;
btnF7: TSpeedButton;
btnF8: TSpeedButton;
btnF10: TSpeedButton;
actView: TAction;
actEdit: TAction;
actCopy: TAction;
@ -155,7 +159,6 @@ type
edtCommand: TComboBox;
mnuFilesCmpCnt: TMenuItem;
actCompareContents: TAction;
btnF9: TSpeedButton;
actShowMenu: TAction;
actRefresh: TAction;
actSearch: TAction;
@ -164,8 +167,6 @@ type
actMarkInvert: TAction;
actMarkUnmarkAll: TAction;
pmHotList: TPopupMenu;
actDelete2: TAction;
actPathToCmdLine: TAction;
actMarkPlus: TAction;
actMarkMinus: TAction;
actSymLink: TAction;
@ -180,8 +181,8 @@ type
miExit: TMenuItem;
actMultiRename: TAction;
miMultiRename: TMenuItem;
actShiftF5: TAction;
actShiftF6: TAction;
actCopySamePanel: TAction;
actRenameOnly: TAction;
actShiftF4: TAction;
actDirHistory: TAction;
pmDirHistory: TPopupMenu;
@ -195,11 +196,16 @@ type
actFileSpliter: TAction;
pmToolBar: TPopupMenu;
MainSplitter: TSplitter;
procedure actAddPathToCmdLineExecute(Sender: TObject);
procedure actContextMenuExecute(Sender: TObject);
procedure actExtractFilesExecute(Sender: TObject);
procedure actFocusCmdLineExecute(Sender: TObject);
procedure actLeftOpenDrivesExecute(Sender: TObject);
procedure actOpenVFSListExecute(Sender: TObject);
procedure actPackFilesExecute(Sender: TObject);
procedure actRightOpenDrivesExecute(Sender: TObject);
procedure actTransferLeftExecute(Sender: TObject);
procedure actTransferRightExecute(Sender: TObject);
procedure btnLeftClick(Sender: TObject);
procedure btnRightClick(Sender: TObject);
procedure DeleteClick(Sender: TObject);
@ -242,7 +248,6 @@ type
procedure actDelete2Execute(Sender: TObject);
procedure edtCommandKeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure actPathToCmdLineExecute(Sender: TObject);
procedure actMarkPlusExecute(Sender: TObject);
procedure actMarkMinusExecute(Sender: TObject);
procedure actSymLinkExecute(Sender: TObject);
@ -254,8 +259,8 @@ type
procedure actSortByDateExecute(Sender: TObject);
procedure actSortByAttrExecute(Sender: TObject);
procedure actMultiRenameExecute(Sender: TObject);
procedure actShiftF5Execute(Sender: TObject);
procedure actShiftF6Execute(Sender: TObject);
procedure actCopySamePanelExecute(Sender: TObject);
procedure actRenameOnlyExecute(Sender: TObject);
procedure actShiftF4Execute(Sender: TObject);
procedure actDirHistoryExecute(Sender: TObject);
procedure actCtrlF8Execute(Sender: TObject);
@ -289,6 +294,7 @@ type
IsPanelsCreated : Boolean;
function ExecuteCommandFromEdit(sCmd:String):Boolean;
procedure AddSpecialButtons(dskPanel: TKASToolBar);
public
// frameLeft, frameRight:TFrameFilePanel;
@ -326,6 +332,7 @@ type
procedure LoadTabs(ANoteBook:TNoteBook);
procedure SaveTabs(ANoteBook:TNoteBook);
function ExecCmd(Cmd : String) : Boolean;
procedure UpdateWindowView;
procedure SaveShortCuts;
procedure LoadShortCuts;
end;
@ -391,6 +398,18 @@ begin
pmDrivesMenu.PopUp(p.x, p.y);
end;
procedure TfrmMain.actTransferLeftExecute(Sender: TObject);
begin
if (PanelSelected = fpRight) then
SetNotActFrmByActFrm;
end;
procedure TfrmMain.actTransferRightExecute(Sender: TObject);
begin
if (PanelSelected = fpLeft) then
SetNotActFrmByActFrm;
end;
procedure TfrmMain.btnLeftClick(Sender: TObject);
begin
with Sender as TSpeedButton do
@ -444,6 +463,28 @@ begin
end;
procedure TfrmMain.actFocusCmdLineExecute(Sender: TObject);
begin
edtCommand.SetFocus;
end;
procedure TfrmMain.actAddPathToCmdLineExecute(Sender: TObject);
begin
with ActiveFrame do
begin
edtCmdLine.Text := edtCmdLine.Text + (pnlFile.ActiveDir);
end;
end;
procedure TfrmMain.actContextMenuExecute(Sender: TObject);
var
pfri : PFileRecItem;
begin
pfri := ActiveFrame.GetActiveItem;
pfri^.sPath := ActiveFrame.ActiveDir;
ShowContextMenu(Handle, pfri, Mouse.CursorPos.x, Mouse.CursorPos.y);
end;
procedure TfrmMain.actLeftOpenDrivesExecute(Sender: TObject);
var
p : TPoint;
@ -623,6 +664,8 @@ begin
end;
procedure TfrmMain.frmMainShow(Sender: TObject);
var
I : Integer;
begin
DebugLn('frmMainShow');
(* If panels already created then refresh their and exit *)
@ -674,17 +717,43 @@ begin
(*/Create Disk Panels*)
(*Tool Bar*)
MainToolBar.ChangePath := gpExePath;
MainToolBar.EnvVar := '%commander_path%';
MainToolBar.LoadFromFile(gpIniDir + 'default.bar');
if gButtonBar then
begin
MainToolBar.FlatButtons := gToolBarFlat;
MainToolBar.ChangePath := gpExePath;
MainToolBar.EnvVar := '%commander_path%';
MainToolBar.LoadFromFile(gpIniDir + 'default.bar');
end;
(*Tool Bar*)
LoadShortCuts;
{Load some options from layout page}
for I := 0 to pnlKeys.ControlCount - 1 do // function keys
if pnlKeys.Controls[I] is TSpeedButton then
(pnlKeys.Controls[I] as TSpeedButton).Flat := gInterfaceFlat;
MainToolBar.Visible := gButtonBar;
btnLeftDrive.Visible := gDriveMenuButton;
btnLeftDrive.Flat := gInterfaceFlat;
btnLeftRoot.Visible := gDriveMenuButton;
btnLeftRoot.Flat := gInterfaceFlat;
btnLeftUp.Visible := gDriveMenuButton;
btnLeftUp.Flat := gInterfaceFlat;
btnLeftHome.Visible := gDriveMenuButton;
btnLeftHome.Flat := gInterfaceFlat;
btnRightDrive.Visible := gDriveMenuButton;
btnRightDrive.Flat := gInterfaceFlat;
btnRightRoot.Visible := gDriveMenuButton;
btnRightRoot.Flat := gInterfaceFlat;
btnRightUp.Visible := gDriveMenuButton;
btnRightUp.Flat := gInterfaceFlat;
btnRightHome.Visible := gDriveMenuButton;;
btnRightHome.Flat := gInterfaceFlat;
pnlCommand.Visible := gCmdLine;
pnlKeys.Visible := gKeyButtons;
nbLeft.ShowTabs := gDirectoryTabs;
@ -1071,17 +1140,11 @@ begin
Exit;
end;
end;
VK_F9:
begin
actShowMenu.Execute;
Exit;
end;
VK_APPS:
begin
pfri := ActiveFrame.GetActiveItem;
pfri^.sPath := ActiveFrame.ActiveDir;
ShowContextMenu(Handle, pfri, Mouse.CursorPos.x, Mouse.CursorPos.y);
actContextMenu.Execute;
Exit;
end;
@ -1124,7 +1187,7 @@ begin
if Shift=[ssShift] then
begin
Chdir(ActiveDir);
pnlFile.ExecuteFile('./'+pnlFile.GetActiveItem^.sName, True);
pnlFile.ExecuteFile(pnlFile.GetActiveItem^.sName, True);
Exit;
end;
// alt enter
@ -1160,11 +1223,6 @@ begin
if Shift=[ssShift] then
begin
if (Key=VK_F2) then
begin
edtCommand.SetFocus;
Exit;
end;
{Kylix:
this strange: KEY_15 is at real KEY_5
@ -1177,45 +1235,13 @@ begin
Exit;
end;
if ((Key=VK_F5){ or (Key=VK_F15)}) then
begin
actShiftF5.Execute;
Exit;
end;
if ((Key=VK_F6) {or (Key=VK_F16)})then
begin
actShiftF6.Execute;
Exit;
end;
end;
if Shift=[ssCtrl] then
begin
// handle ctrl+q
if (Key=VK_Q) then
begin
actExit.Execute;
Exit;
end;
if (Key=VK_D) then
begin
actDirHotList.Execute;
Exit;
end;
if (Key=VK_H) then
begin
actDirHistory.Execute;
Exit;
end;
if (Key=VK_R) then
begin
actRefresh.Execute;
Exit;
end;
{
// handle Ctrl+Enter
if ((Key=VK_Return) or (Key=VK_SELECT)) and (edtCommand.Text='') then
@ -1231,15 +1257,15 @@ begin
SetNotActFrmByActFrm;
Exit;
end;
// handle ctrl+left
if (Key=VK_Left) then
if (Key=VK_Right) then
begin
if (PanelSelected = fpRight) then
SetNotActFrmByActFrm;
Exit;
end;
if (Key=VK_X) then
begin
if not edtCommand.Focused then
@ -1249,27 +1275,6 @@ begin
end;
end;
if (Key=VK_T) then
begin
actNewTab.Execute;
Exit;
end;
if (Key=VK_W) then
begin
actRemoveTab.Execute;
Exit;
end;
if (Key=VK_P) then
begin
with ActiveFrame do
begin
edtCmdLine.Text:=edtCmdLine.Text+(pnlFile.ActiveDir);
end;
Exit;
end;
end;
// not handled
@ -1585,16 +1590,6 @@ begin
end;
end;
procedure TfrmMain.actPathToCmdLineExecute(Sender: TObject);
begin
inherited;
with ActiveFrame do
begin
edtCmdLine.Text:=edtCmdLine.Text+ActiveDir;
end;
end;
procedure TfrmMain.CalculateSpace(bDisplayMessage:Boolean);
var
fl:TFileList;
@ -1948,12 +1943,12 @@ begin
end;
procedure TfrmMain.actShiftF5Execute(Sender: TObject);
procedure TfrmMain.actCopySamePanelExecute(Sender: TObject);
begin
CopyFile('');
end;
procedure TfrmMain.actShiftF6Execute(Sender: TObject);
procedure TfrmMain.actRenameOnlyExecute(Sender: TObject);
begin
RenameFile('');
end;
@ -2001,7 +1996,8 @@ end;
procedure TfrmMain.actRunTermExecute(Sender: TObject);
begin
ExecCmdFork(gRunTerm);
if not edtCommand.Focused then
ExecCmdFork(gRunTerm);
end;
procedure TfrmMain.FormKeyDown(Sender: TObject; var Key: Word;
@ -2395,11 +2391,25 @@ begin
end;
end;
procedure TfrmMain.AddSpecialButtons(dskPanel: TKASToolBar);
var
btnIndex : Integer;
begin
(*root button*)
btnIndex := dskPanel.AddButton('/', '/', 'root', '');
dskPanel.Buttons[btnIndex].GroupIndex := 0;
(*up button*)
btnIndex := dskPanel.AddButton('..', '..', 'Up', '');
dskPanel.Buttons[btnIndex].GroupIndex := 0;
(*home button*)
btnIndex := dskPanel.AddButton('~', '~', 'Home', '');
dskPanel.Buttons[btnIndex].GroupIndex := 0;
end;
procedure TfrmMain.CreateDiskPanel(dskPanel: TKASToolBar);
var
I, Count, btnIndex : Integer;
Drive : PDrive;
ButtonIcon : TBitMap;
I, Count : Integer;
Drive : PDrive;
begin
//dskPanel.InitBounds; // Update information
@ -2444,17 +2454,9 @@ begin
dskPanel.Buttons[I].Layout := blGlyphLeft;
end; // with
end; // for
{Add special buttons}
(*root button*)
btnIndex := dskPanel.AddButton('/', '/', 'root', '');
dskPanel.Buttons[btnIndex].GroupIndex := 0;
(*up button*)
btnIndex := dskPanel.AddButton('..', '..', 'Up', '');
dskPanel.Buttons[btnIndex].GroupIndex := 0;
(*home button*)
btnIndex := dskPanel.AddButton('~', '~', 'Home', '');
dskPanel.Buttons[btnIndex].GroupIndex := 0;
if not gDriveMenuButton then {Add special buttons}
AddSpecialButtons(dskPanel);
end;
procedure TfrmMain.CreatePanel(AOwner: TWinControl; APanel:TFilePanelSelect; sPath : String);
@ -2635,6 +2637,134 @@ begin
Result := (ExecCmdFork(Cmd) = 0);
end;
procedure TfrmMain.UpdateWindowView;
var
I : Integer;
begin
(* Disk Panels *)
if (dskRight.FlatButtons <> gDriveBarFlat) then // if change
begin
dskLeft.FlatButtons := gDriveBarFlat;
dskRight.FlatButtons := gDriveBarFlat;
end;
if (dskLeft.Visible <> gDriveBar2) or (dskRight.Visible <> gDriveBar1) then // if change
begin
if gDriveBar1 and gDriveBar2 then // left visible only then right visible
begin
CreateDiskPanel(dskLeft);
dskLeft.Visible := gDriveBar2;
end
else
begin
dskLeft.Visible := gDriveBar2;
dskLeft.DeleteAllToolButtons;
end;
end;
if dskRight.Visible <> gDriveBar1 then // if change
begin
if gDriveBar1 then
begin
CreateDiskPanel(dskRight);
dskRight.Visible := gDriveBar1;
end
else
begin
dskRight.Visible := gDriveBar1;
dskRight.DeleteAllToolButtons;
end;
end;
pnlSyncSize.Visible := gDriveBar1;
(*/ Disk Panels *)
(*Tool Bar*)
if MainToolBar.FlatButtons <> gToolBarFlat then
MainToolBar.FlatButtons := gToolBarFlat;
if MainToolBar.Visible <> gButtonBar then // if change
begin
if gButtonBar then
begin
MainToolBar.ChangePath := gpExePath;
MainToolBar.EnvVar := '%commander_path%';
MainToolBar.LoadFromFile(gpIniDir + 'default.bar');
MainToolBar.Visible := gButtonBar;
end
else
begin
MainToolBar.Visible := gButtonBar;
MainToolBar.DeleteAllToolButtons;
end;
end;
(*Tool Bar*)
{Load some options from layout page}
if btnLeftDrive.Visible <> gDriveMenuButton then
if gDriveMenuButton then
begin
if gDriveBar1 and gDriveBar2 then // left visible only then right visible
for I := 1 to 3 do
dskLeft.RemoveButton(dskLeft.ButtonCount - 1);
if gDriveBar1 then
for I := 1 to 3 do
dskRight.RemoveButton(dskRight.ButtonCount - 1);
end
else
begin
if gDriveBar1 and gDriveBar2 then // left visible only then right visible
AddSpecialButtons(dskLeft);
if gDriveBar1 then
AddSpecialButtons(dskRight);
end;
if btnLeftDrive.Flat <> gInterfaceFlat then
begin
btnLeftDrive.Flat := gInterfaceFlat;
btnLeftRoot.Flat := gInterfaceFlat;
btnLeftUp.Flat := gInterfaceFlat;
btnLeftHome.Flat := gInterfaceFlat;
btnRightDrive.Flat := gInterfaceFlat;
btnRightRoot.Flat := gInterfaceFlat;
btnRightUp.Flat := gInterfaceFlat;
btnRightHome.Flat := gInterfaceFlat;
end;
for I := 0 to nbLeft.PageCount - 1 do // change on all tabs
with nbLeft.Page[I].Controls[0] as TFrameFilePanel do
begin
pnlHeader.Visible := gCurDir; // Current directory
pnlFooter.Visible := gStatusBar; // Status bar
end;
for I := 0 to nbRight.PageCount - 1 do // change on all tabs
with nbRight.Page[I].Controls[0] as TFrameFilePanel do
begin
pnlHeader.Visible := gCurDir; // Current directory
pnlFooter.Visible := gStatusBar; // Status bar
end;
for I := 0 to pnlKeys.ControlCount - 1 do // function keys
if pnlKeys.Controls[I] is TSpeedButton then
(pnlKeys.Controls[I] as TSpeedButton).Flat := gInterfaceFlat;
btnLeftDrive.Visible := gDriveMenuButton;
btnLeftRoot.Visible := gDriveMenuButton;
btnLeftUp.Visible := gDriveMenuButton;
btnLeftHome.Visible := gDriveMenuButton;
btnRightDrive.Visible := gDriveMenuButton;
btnRightRoot.Visible := gDriveMenuButton;
btnRightUp.Visible := gDriveMenuButton;
btnRightHome.Visible := gDriveMenuButton;
pnlCommand.Visible := gCmdLine;
pnlKeys.Visible := gKeyButtons;
nbLeft.ShowTabs := gDirectoryTabs;
nbRight.ShowTabs := gDirectoryTabs;
end;
procedure TfrmMain.edtCommandKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin

View file

@ -1,16 +1,16 @@
inherited frmOptions: TfrmOptions
Left = 259
Height = 398
Top = 82
Left = 229
Height = 409
Top = 207
Width = 577
HorzScrollBar.Page = 576
VertScrollBar.Page = 397
VertScrollBar.Page = 408
VertScrollBar.Range = 41
ActiveControl = btnOK
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Options'
ClientHeight = 398
ClientHeight = 409
ClientWidth = 577
Icon.Data = {
36030000424D3603000000000000360000002800000010000000100000000100
@ -43,7 +43,7 @@ inherited frmOptions: TfrmOptions
Position = poMainFormCenter
object Panel1: TPanel
Height = 43
Top = 355
Top = 366
Width = 577
Align = alBottom
ClientHeight = 43
@ -77,7 +77,7 @@ inherited frmOptions: TfrmOptions
end
end
object tvTreeView: TTreeView
Height = 355
Height = 366
Width = 121
Align = alLeft
DefaultItemHeight = 16
@ -91,28 +91,28 @@ inherited frmOptions: TfrmOptions
FFFFFF00000000000000000000000000090000004265686176696F7273020000
0002000000FFFFFFFFFFFFFFFF0000000000000000000000000005000000546F
6F6C730300000003000000FFFFFFFFFFFFFFFF00000000000000000000000000
05000000466F6E7473080000000800000000000000FFFFFFFF00000000020000
05000000466F6E7473090000000900000000000000FFFFFFFF00000000020000
00000000000106000000436F6C6F72730400000004000000FFFFFFFFFFFFFFFF
000000000000000000000000000B00000046696C652070616E656C7307000000
07000000FFFFFFFFFFFFFFFF000000000000000000000000000A00000046696C
652074797065730500000005000000FFFFFFFFFFFFFFFF000000000000000000
0000000008000000486F74206B6579730600000006000000FFFFFFFFFFFFFFFF
0000000000000000000000000007000000506C7567696E7308000000FFFFFFFF
0000000000000000000000000007000000506C7567696E730800000008000000
FFFFFFFFFFFFFFFF00000000000000000000000000060000004C61796F7574
}
end
object Panel3: TPanel
Left = 121
Height = 355
Height = 366
Width = 456
Align = alClient
Caption = 'Panel3'
ClientHeight = 355
ClientHeight = 366
ClientWidth = 456
TabOrder = 2
object nbNotebook: TNotebook
Left = 1
Height = 330
Height = 341
Top = 24
Width = 454
Align = alClient
@ -122,7 +122,7 @@ inherited frmOptions: TfrmOptions
object pgLng: TPage
Caption = 'pgLng'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object lngList: TListBox
Height = 300
Width = 446
@ -133,7 +133,7 @@ inherited frmOptions: TfrmOptions
object pgBehav: TPage
Caption = 'pgBehav'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object lblTerm: TLabel
Left = 8
Height = 14
@ -171,8 +171,8 @@ inherited frmOptions: TfrmOptions
Height = 164
Top = 66
Width = 202
ClientHeight = 164
ClientWidth = 202
ClientHeight = 146
ClientWidth = 198
ParentCtl3D = False
TabOrder = 2
object cbDirSelect: TCheckBox
@ -226,8 +226,8 @@ inherited frmOptions: TfrmOptions
Height = 162
Top = 66
Width = 188
ClientHeight = 162
ClientWidth = 188
ClientHeight = 144
ClientWidth = 184
TabOrder = 3
object lblIconsSize: TLabel
Left = 6
@ -268,7 +268,7 @@ inherited frmOptions: TfrmOptions
object pgTools: TPage
Caption = 'pgTools'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object cbExtEditor: TCheckBox
Left = 3
Height = 13
@ -327,7 +327,7 @@ inherited frmOptions: TfrmOptions
object pgFonts: TPage
Caption = 'pgFonts'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object lblMainFont: TLabel
Left = 6
Height = 14
@ -488,7 +488,7 @@ inherited frmOptions: TfrmOptions
object pgColor: TPage
Caption = 'pgColor'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object cTextLabel: TLabel
Left = 25
Height = 14
@ -828,7 +828,7 @@ inherited frmOptions: TfrmOptions
object pgHotKey: TPage
Caption = 'pgHotKey'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object lblActions: TLabel
Left = 6
Height = 14
@ -893,9 +893,9 @@ inherited frmOptions: TfrmOptions
object pgPlugins: TPage
Caption = 'pgPlugins'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object pcPluginsTypes: TPageControl
Height = 304
Height = 333
Width = 446
ActivePage = tsWCX
Align = alClient
@ -903,6 +903,8 @@ inherited frmOptions: TfrmOptions
TabOrder = 0
object tsWCX: TTabSheet
Caption = 'Packer plugins (.WCX)'
ClientHeight = 307
ClientWidth = 438
OnShow = tsWCXShow
object lblAbout: TLabel
Left = 14
@ -990,7 +992,7 @@ inherited frmOptions: TfrmOptions
object tsWFX: TTabSheet
Caption = 'File system plugins (.WFX)'
ChildSizing.LeftRightSpacing = 239
ClientHeight = 278
ClientHeight = 307
ClientWidth = 438
OnShow = tsWFXShow
object lblInstalledPlugins: TLabel
@ -1054,7 +1056,7 @@ inherited frmOptions: TfrmOptions
object pgFileTypesColors: TPage
Caption = 'pgFileTypesColors'
ClientWidth = 446
ClientHeight = 304
ClientHeight = 333
object gbFileTypesColors: TGroupBox
Left = 10
Height = 274
@ -1190,110 +1192,159 @@ inherited frmOptions: TfrmOptions
object pgLayout: TPage
Caption = 'Layout'
ClientWidth = 446
ClientHeight = 322
ClientHeight = 333
object gbScreenLayout: TGroupBox
Left = 11
Height = 292
Height = 312
Top = 4
Width = 389
Caption = ' Screen layout '
ClientHeight = 274
ClientHeight = 294
ClientWidth = 385
TabOrder = 0
object cbShowMainToolBar: TCheckBox
Left = 10
Height = 13
Top = 16
Top = 8
Width = 98
Caption = 'Show &button bar'
TabOrder = 0
end
object cbShowDiskPanel: TCheckBox
AnchorSideTop.Control = cbFlatToolBar
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 38
Top = 50
Width = 111
BorderSpacing.Top = 8
Caption = 'Show &drive buttons'
OnChange = cbShowDiskPanelChange
TabOrder = 1
end
object cbShowDriveMenuButton: TCheckBox
AnchorSideTop.Control = cbFlatDiskPanel
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 96
Top = 113
Width = 135
BorderSpacing.Top = 8
Caption = 'Show d&rive menu button'
TabOrder = 4
end
object cbShowCurDir: TCheckBox
AnchorSideTop.Control = cbShowTabs
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 140
Top = 155
Width = 126
BorderSpacing.Top = 8
Caption = 'Show &current directory'
TabOrder = 6
end
object cbShowTabHeader: TCheckBox
AnchorSideTop.Control = cbShowCurDir
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 162
Top = 176
Width = 121
BorderSpacing.Top = 8
Caption = 'Show &tabstop header'
Checked = True
Enabled = False
State = cbChecked
TabOrder = 7
end
object cbShowStatusBar: TCheckBox
AnchorSideTop.Control = cbShowTabHeader
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 184
Top = 197
Width = 96
BorderSpacing.Top = 8
Caption = 'Show &status bar'
TabOrder = 8
end
object cbShowCmdLine: TCheckBox
AnchorSideTop.Control = cbShowStatusBar
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 206
Top = 218
Width = 115
BorderSpacing.Top = 8
Caption = 'Show command &line'
TabOrder = 9
end
object cbShowKeysPanel: TCheckBox
AnchorSideTop.Control = cbShowCmdLine
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 228
Top = 239
Width = 146
BorderSpacing.Top = 8
Caption = 'Show &function key buttons'
TabOrder = 10
end
object cbFlatDiskPanel: TCheckBox
AnchorSideTop.Control = cbTwoDiskPanels
AnchorSideTop.Side = asrBottom
Left = 26
Height = 13
Top = 74
Width = 65
Caption = 'Flat icons'
Top = 92
Width = 75
BorderSpacing.Top = 8
Caption = 'Flat buttons'
Enabled = False
TabOrder = 3
end
object cbTwoDiskPanels: TCheckBox
AnchorSideTop.Control = cbShowDiskPanel
AnchorSideTop.Side = asrBottom
Left = 26
Height = 13
Top = 57
Top = 71
Width = 304
BorderSpacing.Top = 8
Caption = 'Show two drive button bars (fixed width, above file windows)'
Enabled = False
TabOrder = 2
end
object cbShowTabs: TCheckBox
AnchorSideTop.Control = cbShowDriveMenuButton
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 118
Top = 134
Width = 99
BorderSpacing.Top = 8
Caption = 'Sho&w folder tabs'
TabOrder = 5
end
object cbFlatInterface: TCheckBox
AnchorSideTop.Control = cbShowKeysPanel
AnchorSideTop.Side = asrBottom
Left = 10
Height = 13
Top = 260
Width = 81
BorderSpacing.Top = 8
Caption = 'Flat interface'
TabOrder = 11
end
object cbFlatToolBar: TCheckBox
AnchorSideTop.Control = cbShowMainToolBar
AnchorSideTop.Side = asrBottom
Left = 26
Height = 13
Top = 29
Width = 75
BorderSpacing.Top = 8
Caption = 'Flat buttons'
TabOrder = 12
end
end
end
end
@ -1325,7 +1376,7 @@ inherited frmOptions: TfrmOptions
left = 16
top = 320
Bitmap = {
6C690900000010000000100000006D0400002F2A2058504D202A2F0A73746174
6C690A00000010000000100000006D0400002F2A2058504D202A2F0A73746174
69632063686172202A677261706869635B5D203D207B0A223136203136203531
2031222C0A222E20632023354333353636222C0A222C2063204E6F6E65222C0A
222D20632023414639354233222C0A222A20632023433341434336222C0A2261
@ -1646,73 +1697,106 @@ inherited frmOptions: TfrmOptions
717263612E222C0A222E2D2A686765696D7374726F7063612E222C0A222E2D2A
6575757575757575757663612E222C0A222E2D2A696F7071767778797A416361
2E222C0A222E2D2A636363636363636363632A612E222C0A222E2C6161616161
61616161616161422E227D0A500800002F2A2058504D202A2F0A737461746963
2063686172202A677261706869635B5D203D207B0A2231362031362039342032
222C0A222E2E20632023343434343434222C0A222E2C20632023424142414241
222C0A222E2D20632023343634363436222C0A222E2A20632023424442444244
222C0A222E6120632023334633463346222C0A222E6220632023433543354335
222C0A222E6320632023333433343334222C0A222E6420632023443144314431
222C0A222E6520632023323632363236222C0A222E6620632023453245324532
222C0A222E6720632023313231323132222C0A222E6820632023433137443131
222C0A222E6920632023464646464646222C0A222E6A2063204E6F6E65222C0A
222E6B20632023454444463932222C0A222E6C20632023454444453932222C0A
222E6D20632023454345434543222C0A222E6E20632023353235323532222C0A
222E6F20632023373037303730222C0A222E7020632023434639443432222C0A
222E7120632023434539443142222C0A222E7220632023454444443932222C0A
222E7320632023433144354144222C0A222E7420632023393142443638222C0A
222E7520632023454344443932222C0A222E7620632023444242423235222C0A
222E7720632023454344433931222C0A222E7820632023384143343534222C0A
222E7920632023413445323638222C0A222E7A20632023443241333434222C0A
222E4120632023444142393234222C0A222E4220632023453643453739222C0A
222E4320632023454345434544222C0A222E4420632023393944423539222C0A
222E4520632023454244423931222C0A222E4620632023443942373234222C0A
222E4720632023453543453739222C0A222E4820632023454445444544222C0A
222E4920632023394239423942222C0A222E4A20632023383042343446222C0A
222E4B20632023413745343642222C0A222E4C20632023393844413537222C0A
222E4D20632023443241323433222C0A222E4E20632023443842353233222C0A
222E4F20632023453443443738222C0A222E5020632023454445434544222C0A
222E5120632023454545444544222C0A222E5220632023393242443639222C0A
222E5320632023413545323638222C0A222E5420632023394144423539222C0A
222E5520632023454244383930222C0A222E5620632023443742323233222C0A
222E5720632023453443423738222C0A222E5820632023454445454545222C0A
222E5920632023373239464346222C0A222E5A20632023363839443938222C0A
222E3020632023363541433442222C0A222E3120632023374643413546222C0A
222E3220632023443141313433222C0A222E3320632023443642313232222C0A
222E3420632023453443413738222C0A222E3520632023454545444545222C0A
222E3620632023324333453531222C0A222E3720632023353035433631222C0A
222E3820632023383541463946222C0A222E3920632023364541363546222C0A
222E4020632023454144363846222C0A222E2320632023443541463232222C0A
222E3B20632023444543313635222C0A222E3A20632023454545454546222C0A
222E3D20632023323733373438222C0A222E2B20632023343134383532222C0A
222E2520632023383638433934222C0A222E2420632023434639423431222C0A
222E2820632023434239353139222C0A222E2920632023444543303635222C0A
222E5B20632023454645454545222C0A222E5D20632023364437413932222C0A
222C2E20632023364437393846222C0A222C2C20632023363937343836222C0A
222C2D20632023453944343846222C0A222C2A20632023443441423146222C0A
222C6120632023444542463635222C0A222C6220632023454545464546222C0A
222C6320632023443039463433222C0A222C6420632023443341383146222C0A
222C6520632023444542453634222C0A222C6620632023453844323845222C0A
222C6720632023443341373146222C0A222C6820632023444142373535222C0A
222C6920632023333533353335222C0A222C6A20632023453145314531222C0A
222C6B20632023443039453433222C0A222C6C20632023443141343145222C0A
222E2E2E2C2E2D2E2A2E612E622E632E642E652E662E672E682E682E682E682E
68222C0A222E2C2E692E692E692E692E692E692E6A2E6A2E6A2E6A2E682E6B2E
6C2E6C2E68222C0A222E2D2E692E6D2E6E2E6F2E6D2E6D2E6A2E6A2E6A2E6A2E
682E702E712E722E68222C0A222E2C2E692E6D2E6F2E6F2E732E742E6A2E6A2E
6A2E6A2E682E752E762E772E68222C0A222E2D2E692E6D2E6D2E732E782E792E
6A2E6A2E6A2E6A2E682E7A2E412E422E68222C0A222E2C2E692E6D2E432E742E
792E442E6A2E6A2E6A2E6A2E682E452E462E472E68222C0A222E2D2E692E482E
492E4A2E4B2E4C2E6A2E6A2E6A2E6A2E682E4D2E4E2E4F2E68222C0A222E2C2E
692E502E512E522E532E542E6A2E6A2E6A2E6A2E682E552E562E572E68222C0A
222E2D2E692E582E592E5A2E302E312E6A2E6A2E6A2E6A2E682E322E332E342E
68222C0A222E2C2E692E352E362E372E382E392E6A2E6A2E6A2E6A2E682E402E
232E3B2E68222C0A222E2D2E692E3A2E3D2E2B2E252E252E6A2E6A2E6A2E6A2E
682E242E282E292E68222C0A222E2C2E692E5B2E592E5D2C2E2C2C2E6A2E6A2E
6A2E6A2E682C2D2C2A2C612E68222C0A222E2D2E692C622E592E592E592E592E
6A2E6A2E6A2E6A2E682C632C642C652E68222C0A222E2C2E692E692E692E692E
692E692E6A2E6A2E6A2E6A2E682C662C672C682E68222C0A222E2E2E2C2E2D2E
2A2E612E622C692E642E652C6A2E672E682C6B2C6C2C682E68222C0A222E6A2E
6A2E6A2E6A2E6A2E6A2E6A2E6A2E6A2E6A2E6A2E682E682E682E682E68227D0A
61616161616161422E227D0A040400002F2A2058504D202A2F0A737461746963
2063686172202A677261706869635B5D203D207B0A2231362031362034342031
222C0A222E2063204E6F6E65222C0A222C20632023424142444236222C0A222D
20632023464646464646222C0A222A20632023464546454645222C0A22612063
2023323034413837222C0A226220632023464446444644222C0A226320632023
464346434642222C0A226420632023333436354134222C0A2265206320234642
46424642222C0A226620632023464146424641222C0A22672063202346394639
4639222C0A226820632023453245334530222C0A226920632023463846384638
222C0A226A20632023463646364636222C0A226B20632023463546364636222C
0A226C20632023463746374637222C0A226D20632023463446334633222C0A22
6E20632023463346334633222C0A226F20632023463246324632222C0A227020
632023454545454545222C0A227120632023454645464546222C0A2272206320
23454645464630222C0A227320632023454245414541222C0A22742063202345
4145414541222C0A227520632023463846394638222C0A227620632023454545
464545222C0A227720632023453545354536222C0A2278206320234535453545
35222C0A227920632023463646354636222C0A227A2063202346364635463522
2C0A224120632023463546354635222C0A224220632023463346324632222C0A
224320632023454646304546222C0A224420632023463045464546222C0A2245
20632023463246334633222C0A224620632023463246324633222C0A22472063
2023463346324633222C0A224820632023463146324631222C0A224920632023
453945394539222C0A224A20632023454145394539222C0A224B206320234541
45394541222C0A224C20632023453545364535222C0A224D2063202345454545
4544222C0A224E20632023454646304630222C0A222E2C2C2C2C2C2C2C2C2C2C
2E2E2E2E2E222C0A222C2D2D2D2D2D2D2D2D2D2D2C2E2E2E2E222C0A222C2A61
61616161616161622C2E2E2E2E222C0A222C636464646464646464652C2E2E2E
2E222C0A222C666767682C2C2C2C2C2C2C2C2C2C2E222C0A222C696A6B2C2D2D
2D2D2D2D2D2D2D2D2C222C0A222C6C6D6E2C2A6161616161616161622C222C0A
222C6F70712C636464646464646464652C222C0A222C7273742C666767677569
696969752C222C0A222C7677782C696A6B796A7A417A7A6C2C222C0A222C4243
442C6C6D6E6E6E456E46476A2C222C0A222E2C2C2C2C6F707171717171717048
2C222C0A222E2E2E2E2C727374747449744A4B712C222C0A222E2E2E2E2C7677
784C78787878784D2C222C0A222E2E2E2E2C424344714E71714471712C222C0A
222E2E2E2E2E2C2C2C2C2C2C2C2C2C2C2E227D0A500800002F2A2058504D202A
2F0A7374617469632063686172202A677261706869635B5D203D207B0A223136
2031362039342032222C0A222E2E20632023343434343434222C0A222E2C2063
2023424142414241222C0A222E2D20632023343634363436222C0A222E2A2063
2023424442444244222C0A222E6120632023334633463346222C0A222E622063
2023433543354335222C0A222E6320632023333433343334222C0A222E642063
2023443144314431222C0A222E6520632023323632363236222C0A222E662063
2023453245324532222C0A222E6720632023313231323132222C0A222E682063
2023433137443131222C0A222E6920632023464646464646222C0A222E6A2063
204E6F6E65222C0A222E6B20632023454444463932222C0A222E6C2063202345
4444453932222C0A222E6D20632023454345434543222C0A222E6E2063202335
3235323532222C0A222E6F20632023373037303730222C0A222E702063202343
4639443432222C0A222E7120632023434539443142222C0A222E722063202345
4444443932222C0A222E7320632023433144354144222C0A222E742063202339
3142443638222C0A222E7520632023454344443932222C0A222E762063202344
4242423235222C0A222E7720632023454344433931222C0A222E782063202338
4143343534222C0A222E7920632023413445323638222C0A222E7A2063202344
3241333434222C0A222E4120632023444142393234222C0A222E422063202345
3643453739222C0A222E4320632023454345434544222C0A222E442063202339
3944423539222C0A222E4520632023454244423931222C0A222E462063202344
3942373234222C0A222E4720632023453543453739222C0A222E482063202345
4445444544222C0A222E4920632023394239423942222C0A222E4A2063202338
3042343446222C0A222E4B20632023413745343642222C0A222E4C2063202339
3844413537222C0A222E4D20632023443241323433222C0A222E4E2063202344
3842353233222C0A222E4F20632023453443443738222C0A222E502063202345
4445434544222C0A222E5120632023454545444544222C0A222E522063202339
3242443639222C0A222E5320632023413545323638222C0A222E542063202339
4144423539222C0A222E5520632023454244383930222C0A222E562063202344
3742323233222C0A222E5720632023453443423738222C0A222E582063202345
4445454545222C0A222E5920632023373239464346222C0A222E5A2063202336
3839443938222C0A222E3020632023363541433442222C0A222E312063202337
4643413546222C0A222E3220632023443141313433222C0A222E332063202344
3642313232222C0A222E3420632023453443413738222C0A222E352063202345
4545444545222C0A222E3620632023324333453531222C0A222E372063202335
3035433631222C0A222E3820632023383541463946222C0A222E392063202336
4541363546222C0A222E4020632023454144363846222C0A222E232063202344
3541463232222C0A222E3B20632023444543313635222C0A222E3A2063202345
4545454546222C0A222E3D20632023323733373438222C0A222E2B2063202334
3134383532222C0A222E2520632023383638433934222C0A222E242063202343
4639423431222C0A222E2820632023434239353139222C0A222E292063202344
4543303635222C0A222E5B20632023454645454545222C0A222E5D2063202336
4437413932222C0A222C2E20632023364437393846222C0A222C2C2063202336
3937343836222C0A222C2D20632023453944343846222C0A222C2A2063202344
3441423146222C0A222C6120632023444542463635222C0A222C622063202345
4545464546222C0A222C6320632023443039463433222C0A222C642063202344
3341383146222C0A222C6520632023444542453634222C0A222C662063202345
3844323845222C0A222C6720632023443341373146222C0A222C682063202344
4142373535222C0A222C6920632023333533353335222C0A222C6A2063202345
3145314531222C0A222C6B20632023443039453433222C0A222C6C2063202344
3141343145222C0A222E2E2E2C2E2D2E2A2E612E622E632E642E652E662E672E
682E682E682E682E68222C0A222E2C2E692E692E692E692E692E692E6A2E6A2E
6A2E6A2E682E6B2E6C2E6C2E68222C0A222E2D2E692E6D2E6E2E6F2E6D2E6D2E
6A2E6A2E6A2E6A2E682E702E712E722E68222C0A222E2C2E692E6D2E6F2E6F2E
732E742E6A2E6A2E6A2E6A2E682E752E762E772E68222C0A222E2D2E692E6D2E
6D2E732E782E792E6A2E6A2E6A2E6A2E682E7A2E412E422E68222C0A222E2C2E
692E6D2E432E742E792E442E6A2E6A2E6A2E6A2E682E452E462E472E68222C0A
222E2D2E692E482E492E4A2E4B2E4C2E6A2E6A2E6A2E6A2E682E4D2E4E2E4F2E
68222C0A222E2C2E692E502E512E522E532E542E6A2E6A2E6A2E6A2E682E552E
562E572E68222C0A222E2D2E692E582E592E5A2E302E312E6A2E6A2E6A2E6A2E
682E322E332E342E68222C0A222E2C2E692E352E362E372E382E392E6A2E6A2E
6A2E6A2E682E402E232E3B2E68222C0A222E2D2E692E3A2E3D2E2B2E252E252E
6A2E6A2E6A2E6A2E682E242E282E292E68222C0A222E2C2E692E5B2E592E5D2C
2E2C2C2E6A2E6A2E6A2E6A2E682C2D2C2A2C612E68222C0A222E2D2E692C622E
592E592E592E592E6A2E6A2E6A2E6A2E682C632C642C652E68222C0A222E2C2E
692E692E692E692E692E692E6A2E6A2E6A2E6A2E682C662C672C682E68222C0A
222E2E2E2C2E2D2E2A2E612E622C692E642E652C6A2E672E682C6B2C6C2C682E
68222C0A222E6A2E6A2E6A2E6A2E6A2E6A2E6A2E6A2E6A2E6A2E6A2E682E682E
682E682E68227D0A
}
end
object odOpenDialog: TOpenDialog

View file

@ -80,6 +80,8 @@ type
cbExt: TComboBox;
cbWCXPath: TComboBox;
cbDropReadOnlyFlag: TCheckBox;
cbFlatInterface: TCheckBox;
cbFlatToolBar: TCheckBox;
clbWFXList: TCheckListBox;
clbWCXList: TCheckListBox;
cbBackColor2: TColorBox;
@ -375,6 +377,7 @@ begin
{Layout page}
cbShowMainToolBar.Checked := gButtonBar;
cbFlatToolBar.Checked := gToolBarFlat;
cbShowDiskPanel.Checked := gDriveBar1;
cbTwoDiskPanels.Checked := gDriveBar2;
cbFlatDiskPanel.Checked := gDriveBarFlat;
@ -385,6 +388,7 @@ begin
cbShowStatusBar.Checked := gStatusBar;
cbShowCmdLine.Checked := gCmdLine;
cbShowKeysPanel.Checked := gKeyButtons;
cbFlatInterface.Checked := gInterfaceFlat;
cbDirSelect.Checked:=gDirSelect;
@ -467,6 +471,7 @@ begin
{Layout page}
gButtonBar := cbShowMainToolBar.Checked;
gToolBarFlat := cbFlatToolBar.Checked;
gDriveBar1 := cbShowDiskPanel.Checked;
gDriveBar2 := cbTwoDiskPanels.Checked;
gDriveBarFlat := cbFlatDiskPanel.Checked;
@ -477,7 +482,7 @@ begin
gStatusBar := cbShowStatusBar.Checked;
gCmdLine := cbShowCmdLine.Checked;
gKeyButtons := cbShowKeysPanel.Checked;
// gInterfaceFlat :=
gInterfaceFlat := cbFlatInterface.Checked;
gTerm:=edtTerm.Text;
if lngList.ItemIndex>-1 then
@ -520,6 +525,7 @@ begin
gCursorColor := cbCursorColor.Color;
gCursorText := cbCursorText.Color;
frmMain.UpdateWindowView;
frmMain.Repaint; // for panels repaint
frmMain.SaveShortCuts;

View file

@ -422,7 +422,10 @@ begin
iTextTop := Rect.Top + (gIconsSize div 2) - (dgPanel.Canvas.TextHeight('Pp') div 2);
if ARow=0 then
if dgPanel.FixedRows <> Integer(gTabHeader) then
dgPanel.FixedRows := Integer(gTabHeader);
if (ARow = 0) and gTabHeader then
begin
// Draw fixed header
if not (ACol in [0..4]) then Exit;
@ -437,7 +440,7 @@ begin
if (ARow>=dgPanel.RowCount)or (ARow<0) then Exit;
if (ACol>=dgPanel.ColCount)or (ACol<0) then Exit;
frp:=pnlFile.GetReferenceItemPtr(ARow-1); // substract 1 fixed row (header)
frp:=pnlFile.GetReferenceItemPtr(ARow - dgPanel.FixedRows); // substract fixed rows (header)
if not assigned(frp) then
Exit;
with frp^, dgPanel do
@ -704,7 +707,7 @@ begin
dgPanel:=TDrawGrid.Create(Self);
dgPanel.Parent:=Self;
dgPanel.FixedCols:=0;
dgPanel.FixedRows:=1;
dgPanel.FixedRows:=0;
dgPanel.DefaultDrawing:=True;
dgPanel.Width:=Self.Width;
@ -753,8 +756,8 @@ begin
dgPanel.OnHeaderClick:=@dgPanelHeaderClick;
dgPanel.OnPrepareCanvas:=@dgPanelPrepareCanvas;
{Alexx2000}
dgPanel.OnMouseWheelUp := @dgPanelMouseWheelUp;
dgPanel.OnMouseWheelDown := @dgPanelMouseWheelDown;
//dgPanel.OnMouseWheelUp := @dgPanelMouseWheelUp;
//dgPanel.OnMouseWheelDown := @dgPanelMouseWheelDown;
{/Alexx2000}
edtSearch.OnChange:=@edSearchChange;
edtSearch.OnKeyPress:=@edSearchKeyPress;

File diff suppressed because it is too large Load diff

View file

@ -34,6 +34,7 @@ type
var
{Layout page}
gButtonBar,
gToolBarFlat,
gDriveBar1,
gDriveBar2,
gDriveBarFlat,
@ -210,6 +211,7 @@ begin
{Layout page}
gButtonBar := gIni.ReadBool('Layout', 'ButtonBar', True);
gToolBarFlat := gIni.ReadBool('ButtonBar', 'FlatIcons', True);
gDriveBar1 := gIni.ReadBool('Layout', 'DriveBar1', True);
gDriveBar2 := gIni.ReadBool('Layout', 'DriveBar2', True);
gDriveBarFlat := gIni.ReadBool('Layout', 'DriveBarFlat', True);
@ -327,6 +329,7 @@ begin
{Layout page}
gIni.WriteBool('Layout', 'ButtonBar', gButtonBar);
gIni.WriteBool('ButtonBar', 'FlatIcons', gToolBarFlat);
gIni.WriteBool('Layout', 'DriveBar1', gDriveBar1);
gIni.WriteBool('Layout', 'DriveBar2', gDriveBar2);
gIni.WriteBool('Layout', 'DriveBarFlat', gDriveBarFlat);

1
units.txt Normal file
View file

@ -0,0 +1 @@
uOSUtils.pas