Changeset 402


Ignore:
Timestamp:
Aug 9, 2012, 9:46:09 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Used single TRegistryContext parameter in TLastOpenedList class.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Common/ULastOpenedList.pas

    r393 r402  
    2323    destructor Destroy; override;
    2424    procedure LoadToMenuItem(MenuItem: TMenuItem; ClickAction: TNotifyEvent);
    25     procedure LoadFromRegistry(Root: HKEY; Key: string);
    26     procedure SaveToRegistry(Root: HKEY; Key: string);
     25    procedure LoadFromRegistry(Context: TRegistryContext);
     26    procedure SaveToRegistry(Context: TRegistryContext);
    2727    procedure AddItem(FileName: string);
    2828  published
     
    8787end;
    8888
    89 procedure TLastOpenedList.LoadFromRegistry(Root: HKEY; Key: string);
     89procedure TLastOpenedList.LoadFromRegistry(Context: TRegistryContext);
    9090var
    9191  I: Integer;
     
    9696  with Registry do
    9797  try
    98     RootKey := Root;
    99     OpenKey(Key, True);
     98    RootKey := Context.RootKey;
     99    OpenKey(Context.Key, True);
    100100    Items.Clear;
    101101    I := 0;
     
    112112end;
    113113
    114 procedure TLastOpenedList.SaveToRegistry(Root: HKEY; Key: string);
     114procedure TLastOpenedList.SaveToRegistry(Context: TRegistryContext);
    115115var
    116116  I: Integer;
     
    120120  with Registry do
    121121  try
    122     RootKey := Root;
    123     OpenKey(Key, True);
     122    RootKey := Context.RootKey;
     123    OpenKey(Context.Key, True);
    124124    for I := 0 to Items.Count - 1 do
    125125      WriteString('File' + IntToStr(I), UTF8Decode(Items[I]));
  • CoolTranslator/UCoolTranslator.pas

    r306 r402  
    4343    procedure ReloadFiles;
    4444    procedure SetPOFilesFolder(const AValue: string);
    45     procedure Translate;
    4645    procedure SetLanguage(const AValue: TLanguage);
    4746    procedure TranslateProperty(Component: TPersistent; PropInfo: PPropInfo);
     
    5150    Languages: TLanguageList;
    5251    procedure LanguageListToStrings(Strings: TStrings);
     52    procedure Translate;
    5353    procedure TranslateResourceStrings(PoFileName: string);
    5454    procedure TranslateUnitResourceStrings(UnitName: string; PoFileName: string);
Note: See TracChangeset for help on using the changeset viewer.