Ignore:
Timestamp:
Feb 6, 2017, 2:14:14 PM (8 years ago)
Author:
chronos
Message:
  • Added: Main window switchable acronym filter by enabled categories.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r148 r149  
    1616
    1717  TFormMain = class(TForm)
     18    AFilterEnabledCategories: TAction;
    1819    AManageAcronym: TAction;
    1920    AFilterSameLetterCase: TAction;
     
    3738    AExit: TAction;
    3839    ActionList1: TActionList;
     40    CheckBoxEnabledCategories: TCheckBox;
    3941    CheckBoxExactLength: TCheckBox;
    4042    CheckBoxCaseSensitive: TCheckBox;
     
    9193    ToolButton6: TToolButton;
    9294    ToolButton7: TToolButton;
     95    ToolButton8: TToolButton;
    9396    ToolButton9: TToolButton;
    9497    procedure AExitExecute(Sender: TObject);
     
    99102    procedure AFileSaveAsExecute(Sender: TObject);
    100103    procedure AFileSaveExecute(Sender: TObject);
     104    procedure AFilterEnabledCategoriesExecute(Sender: TObject);
    101105    procedure AFilterSameLetterCaseExecute(Sender: TObject);
    102106    procedure AFilterSameLengthExecute(Sender: TObject);
     
    299303end;
    300304
     305procedure TFormMain.AFilterEnabledCategoriesExecute(Sender: TObject);
     306begin
     307  UpdateAcronymsList;
     308end;
     309
    301310procedure TFormMain.AFilterSameLetterCaseExecute(Sender: TObject);
    302311begin
     
    519528procedure TFormMain.ListViewSort1Filter(ListViewSort: TListViewSort);
    520529begin
    521   Core.AcronymDb.AssignToList(ListViewSort1.List, True);
     530  Core.AcronymDb.AssignToList(ListViewSort1.List, AFilterEnabledCategories.Checked);
    522531  FilterList(ListViewSort1.List);
    523532end;
     
    687696    AFilterSameLength.Checked := ReadBoolWithDefault('SameLength', False);
    688697    AFilterSameLetterCase.Checked := ReadBoolWithDefault('SameLetterCase', False);
     698    AFilterEnabledCategories.Checked := ReadBoolWithDefault('EnabledCategories', False);
    689699    MenuItemToolbar.Checked := ReadBoolWithDefault('ToolBarVisible', True);
    690700    MenuItemParam.Checked := ReadBoolWithDefault('FilterParamVisible', True);
     
    719729    WriteBool('SameLength', AFilterSameLength.Checked);
    720730    WriteBool('SameLetterCase', AFilterSameLetterCase.Checked);
     731    WriteBool('EnabledCategories', AFilterEnabledCategories.Checked);
    721732    WriteBool('ToolBarVisible', MenuItemToolbar.Checked);
    722733    WriteBool('FilterParamVisible', MenuItemParam.Checked);
Note: See TracChangeset for help on using the changeset viewer.