Browse Source

ADD: Quick Search - ignore diacritics and ligatures option

Alexander Koblov 3 months ago
parent
commit
6d34bc2488

+ 4 - 3
src/frames/foptionsquicksearchfilter.lfm

@@ -122,7 +122,7 @@ inherited frmOptionsQuickSearchFilter: TfrmOptionsQuickSearchFilter
     AnchorSideRight.Control = Owner
     AnchorSideRight.Side = asrBottom
     Left = 6
-    Height = 68
+    Height = 109
     Top = 229
     Width = 690
     Anchors = [akTop, akLeft, akRight]
@@ -137,15 +137,16 @@ inherited frmOptionsQuickSearchFilter: TfrmOptionsQuickSearchFilter
     ChildSizing.ShrinkVertical = crsScaleChilds
     ChildSizing.Layout = cclLeftToRightThenTopToBottom
     ChildSizing.ControlsPerLine = 1
-    ClientHeight = 50
+    ClientHeight = 84
     ClientWidth = 686
     Items.Strings = (
+      'Ignore &diacritics and ligatures'
       'Hide filter panel when not focused'
       'Keep saving setting modifications for next session'
     )
     TabOrder = 3
     Data = {
-      020000000202
+      03000000020202
     }
   end
 end

+ 5 - 2
src/frames/foptionsquicksearchfilter.pas

@@ -57,8 +57,9 @@ uses
   DCStrUtils, uGlobs, uLng, fQuickSearch;
 
 const
-  OPTION_AUTOHIDE_POSITION = 0;
-  OPTION_SAVE_SESSION_MODIFICATIONS = 1;
+  OPTION_IGNORE_DIACRITICS = 0;
+  OPTION_AUTOHIDE_POSITION = 1;
+  OPTION_SAVE_SESSION_MODIFICATIONS = 2;
 
 { TfrmOptionsQuickSearchFilter }
 
@@ -87,6 +88,7 @@ begin
   rgpSearchItems.ItemIndex := Integer(gQuickSearchOptions.Items);
   rgpSearchCase.ItemIndex := Integer(gQuickSearchOptions.SearchCase);
   cgpOptions.Checked[OPTION_AUTOHIDE_POSITION] := gQuickFilterAutoHide;
+  cgpOptions.Checked[OPTION_IGNORE_DIACRITICS] := not gQuickSearchOptions.Diacritics;
   cgpOptions.Checked[OPTION_SAVE_SESSION_MODIFICATIONS] := gQuickFilterSaveSessionModifications;
 end;
 
@@ -107,6 +109,7 @@ begin
   gQuickSearchOptions.Items := TQuickSearchItems(rgpSearchItems.ItemIndex);
   gQuickSearchOptions.SearchCase := TQuickSearchCase(rgpSearchCase.ItemIndex);
   gQuickFilterAutoHide := cgpOptions.Checked[OPTION_AUTOHIDE_POSITION];
+  gQuickSearchOptions.Diacritics := not cgpOptions.Checked[OPTION_IGNORE_DIACRITICS];
   gQuickFilterSaveSessionModifications := cgpOptions.Checked[OPTION_SAVE_SESSION_MODIFICATIONS];
 end;
 

+ 1 - 1
src/ulng.pas

@@ -1000,7 +1000,7 @@ resourcestring
   // Quick Search/Filter
   rsOptSearchItems = '&Files;Di&rectories;Files a&nd Directories';
   rsOptSearchCase = '&Sensitive;&Insensitive';
-  rsOptSearchOpt = '&Hide filter panel when not focused;Keep saving setting modifications for next session';
+  rsOptSearchOpt = 'Ignore &diacritics and ligatures;&Hide filter panel when not focused;Keep saving setting modifications for next session';
 
   // Toolbar
   rsOptToolbarButtonType = 'S&eparator;Inte&rnal command;E&xternal command;Men&u';