View Issue Details

IDProjectCategoryView StatusLast Update
0002272Double CommanderLogicpublic2024-09-17 09:17
ReporterCryHam Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
ProjectionnoneETAnone 
Product Version1.0.0 (trunk)Product Buildr8755 
Summary0002272: [patch] Options Hotkeys Filter - search also by hotkeys string
DescriptionI find it very useful.
E.g. If I want to find a command by entering shortcut e.g. Ctrl+D.
Or to find all commands used with e.g. F1 (any modifiers).

I did also 2 other things here:
- Changed keys for actions (actNextCategory) using + and - to PgDn and PgUp, so I can actually write + in filter.

- Changed the hotkey colors from Red to default. For me it is annoying, since I have black background, I can't see it well. Commented it out: //if not (

Patch done on svn rev 8755.
TagsNo tags attached.
Attached Files
foptionshotkeys.patch (2,770 bytes)   
Index: src/frames/foptionshotkeys.lfm
===================================================================
--- src/frames/foptionshotkeys.lfm	(revision 8755)
+++ src/frames/foptionshotkeys.lfm	(working copy)
@@ -383,12 +383,12 @@
     object actPreviousCategory: TAction
       Caption = 'Previous category'
       OnExecute = actPreviousCategoryExecute
-      ShortCut = 109
+      ShortCut = 33
     end
     object actNextCategory: TAction
       Caption = 'Next category'
       OnExecute = actNextCategoryExecute
-      ShortCut = 107
+      ShortCut = 34
     end
     object actSortByCommand: TAction
       Caption = 'Sort by command name'
Index: src/frames/foptionshotkeys.pas
===================================================================
--- src/frames/foptionshotkeys.pas	(revision 8755)
+++ src/frames/foptionshotkeys.pas	(working copy)
@@ -312,7 +312,7 @@
         if Cells[aCol, aRow] <> '' then
         begin
           OffsetY := (DefaultRowHeight - Canvas.TextHeight(Cells[aCol, aRow])) div 2;
-          if not (gdSelected in aState) then Canvas.Font.Color := clRed else Canvas.Font.Color := clWhite;
+          //if not (gdSelected in aState) then Canvas.Font.Color := clRed else Canvas.Font.Color := clWhite;
           Canvas.TextOut(aRect.Left + 3, aRect.Top + OffsetY, Cells[aCol, aRow]);
         end;
       end;
@@ -622,7 +622,7 @@
   lstr: string;
   i, j: integer;
   HMForm: THMForm;
-  sForm: string;
+  sForm,sHotKeys: string;
   CommandsFormClass: TComponentClass;
   CommandsForm: TComponent = nil;
   CommandsFormCreated: boolean = False;
@@ -668,8 +668,23 @@
   begin
     lstr := UTF8LowerCase(Filter);
     for i := pred(slAllCommands.Count) downto 0 do //Remove from our list the commands that does not meet our filter...
-      if (UTF8Pos(lstr, UTF8LowerCase(slAllCommands.Strings[i])) = 0) and (UTF8Pos(lstr, UTF8LowerCase(CommandsIntf.GetCommandCaption(slAllCommands.Strings[i], cctLong))) = 0) then
+    begin
+      // hotkeys string
+      sHotKeys:='';
+      if Assigned(HMForm) then
+      begin
+        slTmp.Clear;
+        GetHotKeyList(HMForm, slAllCommands.Strings[i], slTmp);
+        if (slTmp.Count > 0) then
+          for j := 0 to pred(slTmp.Count) do
+            sHotKeys:= sHotKeys + ShortcutsToText(slTmp[j].Shortcuts) + ';';
+      end;
+
+      if (UTF8Pos(lstr, UTF8LowerCase(sHotKeys)) = 0) and
+         (UTF8Pos(lstr, UTF8LowerCase(slAllCommands.Strings[i])) = 0) and
+         (UTF8Pos(lstr, UTF8LowerCase(CommandsIntf.GetCommandCaption(slAllCommands.Strings[i], cctLong))) = 0) then
         slAllCommands.Delete(i);
+    end;
   end;
 
   // 3. Based on all the commands we got, populate "equally" our three string list of commands, hotkeys and descrition used to fill our grid.
foptionshotkeys.patch (2,770 bytes)   
Fixed in Revision
Operating systemWindows
Widgetset
Architecture

Relationships

related to 0002074 closedcordylus Add an option to filter hotkeys using the name of the keys 

Activities

Issue History

Date Modified Username Field Change
2019-03-28 01:31 CryHam New Issue
2019-03-28 01:31 CryHam File Added: foptionshotkeys.patch
2019-06-23 11:18 Alexx2000 Relationship added related to 0002074
2024-09-17 09:17 Alexx2000 Status new => closed
2024-09-17 09:17 Alexx2000 Resolution open => fixed