ADD: Switch between pages in File Properties dialog with Ctrl+Tab, Ctrl+Shift+Tab (issue [0000133]).

This commit is contained in:
cobines 2011-12-10 01:51:40 +00:00
commit b031f81f36
2 changed files with 24 additions and 1 deletions

View file

@ -9,7 +9,9 @@ object frmFileProperties: TfrmFileProperties
ClientWidth = 458
Constraints.MinHeight = 432
Constraints.MinWidth = 458
KeyPreview = True
OnCreate = FormCreate
OnKeyDown = FormKeyDown
Position = poScreenCenter
LCLVersion = '0.9.31'
object btnClose: TBitBtn

View file

@ -104,6 +104,7 @@ type
procedure FormCreate(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure btnSkipClick(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure tmUpdateFolderSizeTimer(Sender: TObject);
procedure FileSourceOperationStateChangedNotify(Operation: TFileSourceOperation;
State: TFileSourceOperationState);
@ -139,7 +140,7 @@ uses
LCLType, FileUtil, StrUtils, uLng, BaseUnix, uUsersGroups, uDCUtils, uOSUtils,
uDefaultFilePropertyFormatter, uMyUnix, uFileAttributes,
uFileSourceOperationTypes, uFileSystemFileSource, uOperationsManager,
uFileSourceOperationOptions;
uFileSourceOperationOptions, uKeyboard;
procedure ShowFileProperties(aFileSource: IFileSource; const aFiles: TFiles);
begin
@ -415,6 +416,26 @@ begin
ShowFile(iCurrent);
end;
procedure TfrmFileProperties.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case Key of
VK_TAB:
begin
if Shift * KeyModifiersShortcut = [ssCtrl] then
begin
pcPageControl.SelectNextPage(True);
Key := 0;
end
else if Shift * KeyModifiersShortcut = [ssCtrl, ssShift] then
begin
pcPageControl.SelectNextPage(False);
Key := 0;
end;
end;
end;
end;
procedure TfrmFileProperties.tmUpdateFolderSizeTimer(Sender: TObject);
begin
if Assigned(FFileSourceCalcStatisticsOperation) then