mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-13 23:39:38 +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;
|
procedure FillKeyMappingTreeView;
|
||||||
function KeyMappingRelationToString(Index: Integer): String;
|
function KeyMappingRelationToString(Index: Integer): String;
|
||||||
function KeyMappingRelationToString(KeyRelation: TKeyCommandRelation): String;
|
function KeyMappingRelationToString(KeyRelation: TKeyCommandRelation): String;
|
||||||
|
procedure UpdateKeyFilterButton;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -228,6 +229,7 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
//debugln(['TEditorOptionsForm.KeyMappingFindKeyButtonClick ',KeyAndShiftStateToEditorKeyString(KeyFilter)]);
|
//debugln(['TEditorOptionsForm.KeyMappingFindKeyButtonClick ',KeyAndShiftStateToEditorKeyString(KeyFilter)]);
|
||||||
KeyMapKeyFilter := KeyFilter;
|
KeyMapKeyFilter := KeyFilter;
|
||||||
|
UpdateKeyFilterButton;
|
||||||
FillKeyMappingTreeView;
|
FillKeyMappingTreeView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -422,6 +424,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
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);
|
constructor TEditorKeymappingOptionsFrame.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
|
|||||||
@ -164,6 +164,7 @@ type
|
|||||||
property RelationCount:integer read GetRelationCount;
|
property RelationCount:integer read GetRelationCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IDEShortCutEmpty(const Key: TIDEShortCut): boolean;
|
||||||
function KeyAndShiftStateToEditorKeyString(const Key: TIDEShortCut): String;
|
function KeyAndShiftStateToEditorKeyString(const Key: TIDEShortCut): String;
|
||||||
function FindKeymapConflicts(Keymap: TKeyCommandRelationList;
|
function FindKeymapConflicts(Keymap: TKeyCommandRelationList;
|
||||||
Protocol: TStrings; out Index1, Index2: integer): integer;
|
Protocol: TStrings; out Index1, Index2: integer): integer;
|
||||||
@ -2319,6 +2320,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
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;
|
function KeyAndShiftStateToEditorKeyString(const Key: TIDEShortCut): String;
|
||||||
begin
|
begin
|
||||||
Result := KeyAndShiftStateToKeyString(Key.Key1, Key.Shift1);
|
Result := KeyAndShiftStateToKeyString(Key.Key1, Key.Shift1);
|
||||||
|
|||||||
@ -4504,6 +4504,7 @@ resourcestring
|
|||||||
+'not be deleted, because it is not owned by %s.';
|
+'not be deleted, because it is not owned by %s.';
|
||||||
lisFilter2 = '(filter)';
|
lisFilter2 = '(filter)';
|
||||||
lisFindKeyCombination = 'Find key combination';
|
lisFindKeyCombination = 'Find key combination';
|
||||||
|
lisFilter3 = 'Filter: %s';
|
||||||
lisInvalidPublishingDirectory = 'Invalid publishing Directory';
|
lisInvalidPublishingDirectory = 'Invalid publishing Directory';
|
||||||
lisSourceDirectoryAndDestinationDirectoryAreTheSameMa = 'Source directory %'
|
lisSourceDirectoryAndDestinationDirectoryAreTheSameMa = 'Source directory %'
|
||||||
+'s%s%s%sand destination directory %s%s%s%sare the same.%s%sMaybe you '
|
+'s%s%s%sand destination directory %s%s%s%sare the same.%s%sMaybe you '
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user