mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: support clicking the iCloud download Icon on the seed file to Download in BriefView
This commit is contained in:
parent
7d5a6bdb56
commit
5e4d553cb4
1 changed files with 43 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ type
|
|||
procedure DoMouseMoveScroll(X, Y: Integer);
|
||||
protected
|
||||
procedure KeyDown(var Key : Word; Shift : TShiftState); override;
|
||||
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
|
||||
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
|
||||
function DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
||||
function DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; override;
|
||||
|
|
@ -354,6 +355,48 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TBriefDrawGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
|
||||
procedure handleMBLeft;
|
||||
var
|
||||
handler: TFileSourceUIHandler;
|
||||
params: TFileSourceUIParams;
|
||||
index: Integer;
|
||||
begin
|
||||
params:= Default( TFileSourceUIParams );
|
||||
params.sender:= FBriefView;
|
||||
params.fs:= FBriefView.FileSource;
|
||||
params.multiColumns:= False;
|
||||
|
||||
handler:= params.fs.GetUIHandler;
|
||||
if handler = nil then
|
||||
Exit;
|
||||
|
||||
params.shift:= Shift;
|
||||
params.x:= X;
|
||||
params.y:= Y;
|
||||
MouseToCell( X, Y, params.col, params.row );
|
||||
if NOT self.IsRowIndexValid(params.row) then
|
||||
Exit;
|
||||
|
||||
index:= CellToIndex( params.col, params.row );
|
||||
if index < 0 then
|
||||
Exit;
|
||||
|
||||
ColRowToOffset(True, True, params.col, params.drawingRect.Left, params.drawingRect.Right );
|
||||
ColRowToOffset(False, True, params.row, params.drawingRect.Top, params.drawingRect.Bottom );
|
||||
|
||||
params.displayFile:= FBriefView.FFiles[index];
|
||||
handler.click( params );
|
||||
end;
|
||||
|
||||
begin
|
||||
if Button = mbLeft then
|
||||
handleMBLeft
|
||||
else
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TBriefDrawGrid.MouseMove(Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
inherited MouseMove(Shift, X, Y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue