Changeset 149 for trunk/Forms


Ignore:
Timestamp:
Feb 6, 2017, 2:14:14 PM (8 years ago)
Author:
chronos
Message:
  • Added: Main window switchable acronym filter by enabled categories.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r146 r149  
    8888      Action = AFilterSameLetterCase
    8989      TabOrder = 1
     90    end
     91    object CheckBoxEnabledCategories: TCheckBox
     92      Left = 360
     93      Height = 24
     94      Top = 3
     95      Width = 151
     96      Action = AFilterEnabledCategories
     97      TabOrder = 2
    9098    end
    9199  end
     
    244252      Height = 22
    245253      Top = 5
    246       Width = 47
     254      Width = 70
    247255      Align = alNone
    248256      AutoSize = True
     
    269277        Style = tbsCheck
    270278      end
     279      object ToolButton8: TToolButton
     280        Left = 47
     281        Top = 0
     282        Action = AFilterEnabledCategories
     283        Style = tbsCheck
     284      end
    271285    end
    272286  end
     
    377391      ImageIndex = 17
    378392      OnExecute = AFilterSameLetterCaseExecute
     393    end
     394    object AFilterEnabledCategories: TAction
     395      AutoCheck = True
     396      Caption = 'Enabled categories'
     397      ImageIndex = 19
     398      OnExecute = AFilterEnabledCategoriesExecute
    379399    end
    380400    object AManageAcronym: TAction
  • trunk/Forms/UFormMain.lrt

    r146 r149  
    2222TFORMMAIN.AFILTERSAMELENGTH.CAPTION=Same length
    2323TFORMMAIN.AFILTERSAMELETTERCASE.CAPTION=Same letter case
     24TFORMMAIN.AFILTERENABLEDCATEGORIES.CAPTION=Enabled categories
    2425TFORMMAIN.AMANAGEACRONYM.CAPTION=Manage acronym
    2526TFORMMAIN.MENUITEM8.CAPTION=File
  • 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.