mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: BriefView - Calculate folder size by space bar
This commit is contained in:
parent
b7082dcc99
commit
d1565ddf24
1 changed files with 34 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ implementation
|
|||
|
||||
uses
|
||||
LCLIntf, LCLType, LCLVersion, LCLProc, math,
|
||||
uGlobs, uPixmapManager,
|
||||
uGlobs, uPixmapManager, uKeyboard,
|
||||
uDCUtils, fMain,
|
||||
uFileSourceProperty,
|
||||
uFileFunctions,
|
||||
|
|
@ -1151,6 +1151,39 @@ begin
|
|||
end;
|
||||
Key := 0;
|
||||
end;
|
||||
|
||||
VK_SPACE:
|
||||
if Shift * KeyModifiersShortcut = [] then
|
||||
begin
|
||||
Index:= GetActiveFileIndex;
|
||||
if IsFileIndexInRange(Index) then
|
||||
begin
|
||||
AFile := FFiles[Index];
|
||||
if IsItemValid(aFile) then
|
||||
begin
|
||||
if (aFile.FSFile.IsDirectory or
|
||||
aFile.FSFile.IsLinkToDirectory) and
|
||||
not aFile.Selected then
|
||||
begin
|
||||
CalculateSpace(aFile);
|
||||
end;
|
||||
|
||||
InvertFileSelection(aFile, False);
|
||||
DoSelectionChanged(Index);
|
||||
|
||||
if gSpaceMovesDown then
|
||||
begin
|
||||
dgPanel.IndexToCell(Index + 1, aCol, aRow);
|
||||
if not ((aCol < 0) and (aRow < 0)) then
|
||||
begin
|
||||
dgPanel.Col:= aCol;
|
||||
dgPanel.Row:= aRow;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
Key := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
inherited DoHandleKeyDown(Key, Shift);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue