mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 09:04:11 +01:00 
			
		
		
		
	IDE: keymapping: show active key filter
git-svn-id: trunk@26299 -
This commit is contained in:
		
							parent
							
								
									e30e46cf41
								
							
						
					
					
						commit
						afb0f90b2b
					
				@ -62,6 +62,7 @@ type
 | 
			
		||||
    procedure FillKeyMappingTreeView;
 | 
			
		||||
    function KeyMappingRelationToString(Index: Integer): String;
 | 
			
		||||
    function KeyMappingRelationToString(KeyRelation: TKeyCommandRelation): String;
 | 
			
		||||
    procedure UpdateKeyFilterButton;
 | 
			
		||||
  public
 | 
			
		||||
    constructor Create(AOwner: TComponent); override;
 | 
			
		||||
    destructor Destroy; override;
 | 
			
		||||
@ -228,6 +229,7 @@ begin
 | 
			
		||||
    Exit;
 | 
			
		||||
  //debugln(['TEditorOptionsForm.KeyMappingFindKeyButtonClick ',KeyAndShiftStateToEditorKeyString(KeyFilter)]);
 | 
			
		||||
  KeyMapKeyFilter := KeyFilter;
 | 
			
		||||
  UpdateKeyFilterButton;
 | 
			
		||||
  FillKeyMappingTreeView;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
@ -422,6 +424,15 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
procedure TEditorKeymappingOptionsFrame.UpdateKeyFilterButton;
 | 
			
		||||
begin
 | 
			
		||||
  if IDEShortCutEmpty(KeyMapKeyFilter) then
 | 
			
		||||
    KeyMappingFindKeyButton.Caption:=lisFindKeyCombination
 | 
			
		||||
  else
 | 
			
		||||
    KeyMappingFindKeyButton.Caption:=
 | 
			
		||||
      Format(lisFilter3, [KeyAndShiftStateToEditorKeyString(KeyMapKeyFilter)]);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
constructor TEditorKeymappingOptionsFrame.Create(AOwner: TComponent);
 | 
			
		||||
begin
 | 
			
		||||
  inherited Create(AOwner);
 | 
			
		||||
 | 
			
		||||
@ -164,6 +164,7 @@ type
 | 
			
		||||
    property RelationCount:integer read GetRelationCount;
 | 
			
		||||
  end;
 | 
			
		||||
 | 
			
		||||
function IDEShortCutEmpty(const Key: TIDEShortCut): boolean;
 | 
			
		||||
function KeyAndShiftStateToEditorKeyString(const Key: TIDEShortCut): String;
 | 
			
		||||
function FindKeymapConflicts(Keymap: TKeyCommandRelationList;
 | 
			
		||||
                      Protocol: TStrings; out Index1, Index2: integer): integer;
 | 
			
		||||
@ -2319,6 +2320,11 @@ begin
 | 
			
		||||
  end;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
function IDEShortCutEmpty(const Key: TIDEShortCut): boolean;
 | 
			
		||||
begin
 | 
			
		||||
  Result:=(Key.Key1=VK_UNKNOWN) and (Key.Key2=VK_UNKNOWN);
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
function KeyAndShiftStateToEditorKeyString(const Key: TIDEShortCut): String;
 | 
			
		||||
begin
 | 
			
		||||
  Result := KeyAndShiftStateToKeyString(Key.Key1, Key.Shift1);
 | 
			
		||||
 | 
			
		||||
@ -4504,6 +4504,7 @@ resourcestring
 | 
			
		||||
    +'not be deleted, because it is not owned by %s.';
 | 
			
		||||
  lisFilter2 = '(filter)';
 | 
			
		||||
  lisFindKeyCombination = 'Find key combination';
 | 
			
		||||
  lisFilter3 = 'Filter: %s';
 | 
			
		||||
  lisInvalidPublishingDirectory = 'Invalid publishing Directory';
 | 
			
		||||
  lisSourceDirectoryAndDestinationDirectoryAreTheSameMa = 'Source directory %'
 | 
			
		||||
    +'s%s%s%sand destination directory %s%s%s%sare the same.%s%sMaybe you '
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user