Changeset 219


Ignore:
Timestamp:
Jan 17, 2025, 9:05:54 PM (4 days ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Modified: Remove U prefix from unit names.
  • Modified: Use Gneeric.Collections instead of fgl.
  • Modified: Do not use global form variables.
Location:
trunk
Files:
45 added
6 deleted
7 edited
1 copied
92 moved

Legend:

Unmodified
Added
Removed
  • trunk/Acronym.pas

    r218 r219  
    1 unit UAcronym;
    2 
    3 {$mode delphi}{$H+}
     1unit Acronym;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Contnrs, XMLRead, XMLWrite, DOM, UXMLUtils,
    9   fphttpclient2, Dialogs, odbcconn, sqldb, LazUTF8, fgl;
     6  Classes, SysUtils, XMLRead, XMLWrite, DOM, XML, fphttpclient2, Dialogs,
     7  odbcconn, sqldb, LazUTF8, Generics.Collections, ListViewSort;
    108
    119type
     
    3432  { TAcronyms }
    3533
    36   TAcronyms = class(TObjectList)
     34  TAcronyms = class(TObjectList<TAcronym>)
    3735    Db: TAcronymDb;
    3836    procedure SaveToNode(Node: TDOMNode);
     
    6159  { TAcronymMeanings }
    6260
    63   TAcronymMeanings = class(TObjectList)
     61  TAcronymMeanings = class(TObjectList<TAcronymMeaning>)
    6462  public
    6563    Acronym: TAcronym;
     
    8078    ImportSources: TImportSources;
    8179    Enabled: Boolean;
     80    procedure Assign(Source: TAcronymCategory);
    8281    procedure SaveToNode(Node: TDOMNode);
    8382    procedure LoadFromNode(Node: TDOMNode);
     
    8887  { TAcronymCategories }
    8988
    90   TAcronymCategories = class(TObjectList)
     89  TAcronymCategories = class(TObjectList<TAcronymCategory>)
    9190    Db: TAcronymDb;
    9291    procedure UpdateIds;
     
    101100    procedure AssignFromStrings(Strings: TStrings);
    102101    procedure AddFromStrings(Strings: TStrings);
    103     procedure AssignToList(List: TFPGObjectList<TObject>);
     102    procedure AssignToList(List: TObjects);
     103    procedure Assign(Source: TAcronymCategories);
    104104    function GetString: string;
    105105    procedure UpdateLinkImportSources(Item: TImportSource);
     
    138138  { TImportPatterns }
    139139
    140   TImportPatterns = class(TObjectList)
     140  TImportPatterns = class(TObjectList<TImportPattern>)
    141141    procedure SaveToNode(Node: TDOMNode);
    142142    procedure LoadFromNode(Node: TDOMNode);
     
    163163  { TImportFormats }
    164164
    165   TImportFormats = class(TObjectList)
     165  TImportFormats = class(TObjectList<TImportFormat>)
    166166    procedure UpdateIds;
    167167    procedure SaveToNode(Node: TDOMNode);
     
    204204  { TImportSources }
    205205
    206   TImportSources = class(TObjectList)
     206  TImportSources = class(TObjectList<TImportSource>)
    207207    AcronymDb: TAcronymDb;
    208208    procedure UpdateIds;
     
    214214    procedure SaveToNode(Node: TDOMNode);
    215215    procedure LoadFromNode(Node: TDOMNode);
    216     procedure AssignToList(List: TFPGObjectList<TObject>);
     216    procedure AssignToList(List: TObjects);
    217217  end;
    218218
     
    230230    Modified: Boolean;
    231231    AddedCount: Integer;
    232     OnUpdate: TFPGList<TNotifyEvent>;
     232    OnUpdate: TList<TNotifyEvent>;
    233233    constructor Create;
    234234    destructor Destroy; override;
     
    243243    procedure RemoveMeaning(Meaning: TAcronymMeaning);
    244244    procedure RemoveAcronym(AcronymName, MeaningName: string);
    245     procedure AssignToList(List: TFPGObjectList<TObject>; EnabledCategoryOnly: Boolean = False);
     245    procedure AssignToList(List: TObjects; EnabledCategoryOnly: Boolean = False);
    246246    procedure BeginUpdate;
    247247    procedure EndUpdate;
     
    249249  end;
    250250
    251 function AcronymComparer(Item1, Item2: Pointer): Integer;
    252 
    253251var
    254252  ImportVariableString: array [TImportVariable] of string;
     
    256254
    257255procedure Translate;
     256
    258257
    259258implementation
     
    285284  ImportPatternFlagString[ipfSkip] := SSkip;
    286285  ImportPatternFlagString[ipfRemove] := SRemoveOnStart;
    287 end;
    288 
    289 function AcronymComparer(Item1, Item2: Pointer): Integer;
    290 begin
    291   Result := CompareStr(TAcronym(Item1).Name, TAcronym(Item2).Name);
    292286end;
    293287
     
    372366begin
    373367  for I := 0 to Count - 1 do
    374   with TImportPattern(Items[I]) do begin
     368  with Items[I] do begin
    375369    NewNode2 := Node.OwnerDocument.CreateElement('Pattern');
    376370    Node.AppendChild(NewNode2);
     
    476470    LastLength := Length(S);
    477471    for I := 0 to Format.ItemPatterns.Count - 1 do
    478     with TImportPattern(Format.ItemPatterns[I]) do
     472    with Format.ItemPatterns[I] do
    479473    if Flag = ipfRemove then begin
    480474      P := Pos(StartString, S);
     
    494488    I := 0;
    495489    while I < Format.ItemPatterns.Count do
    496     with TImportPattern(Format.ItemPatterns[I]) do begin
     490    with Format.ItemPatterns[I] do begin
    497491      if Flag <> ipfRemove then begin
    498492        if Length(StartString) > 0 then begin
     
    559553              P1 := Pos(StartString, S);
    560554              if P1 > 0 then begin
    561                 P2 := Pos(TImportPattern(Format.ItemPatterns[(I + 1) mod Format.ItemPatterns.Count]).StartString, S);
     555                P2 := Pos(TImportPattern(Format.ItemPatterns[(I + 1) mod
     556                  Format.ItemPatterns.Count]).StartString, S);
    562557                if (P2 > 0) and (P1 < P2) then Continue;
    563558              end;
     
    594589end;
    595590
    596 procedure TImportSources.AssignToList(List: TFPGObjectList<TObject>);
     591procedure TImportSources.AssignToList(List: TObjects);
    597592var
    598593  I: Integer;
     
    600595  List.Clear;
    601596  for I := 0 to Count - 1 do
    602     List.Add(TImportSource(Items[I]))
     597    List.Add(Items[I]);
    603598end;
    604599
     
    614609  LastImportTime := Now;
    615610end;
    616 
    617611
    618612{ TImportFormat }
     
    631625    ItemPatterns.Count := Source.ItemPatterns.Count;
    632626  for I := 0 to ItemPatterns.Count - 1 do begin
    633     TImportPattern(ItemPatterns[I]).Assign(TImportPattern(Source.ItemPatterns[I]));
     627    ItemPatterns[I].Assign(Source.ItemPatterns[I]);
    634628  end;
    635629end;
     
    673667destructor TImportFormat.Destroy;
    674668begin
    675   Block.Free;
    676   ItemPatterns.Free;
    677   inherited Destroy;
     669  FreeAndNil(Block);
     670  FreeAndNil(ItemPatterns);
     671  inherited;
    678672end;
    679673
     
    688682  LastId := 0;
    689683  for I := 0 to Count - 1 do begin
    690     if TImportSource(Items[I]).Id > LastId then LastId := TImportSource(Items[I]).Id;
     684    if Items[I].Id > LastId then LastId := Items[I].Id;
    691685  end;
    692686  // Add ID to new items without ID
    693687  for I := 0 to Count - 1 do begin
    694     if TImportSource(Items[I]).Id = 0 then begin
     688    if Items[I].Id = 0 then begin
    695689      Inc(LastId);
    696       TImportSource(Items[I]).Id := LastId;
     690      Items[I].Id := LastId;
    697691    end;
    698692  end;
     
    704698begin
    705699  I := 0;
    706   while (I < Count) and (TImportSource(Items[I]).Id <> Id) do Inc(I);
    707   if I < Count then Result := TImportSource(Items[I])
     700  while (I < Count) and (Items[I].Id <> Id) do Inc(I);
     701  if I < Count then Result := Items[I]
    708702    else Result := nil;
    709703end;
     
    717711    NewNode := Node.OwnerDocument.CreateElement('Ref');
    718712    Node.AppendChild(NewNode);
    719     NewNode.TextContent := WideString(IntToStr(TImportSource(Items[I]).Id));
     713    NewNode.TextContent := WideString(IntToStr(Items[I].Id));
    720714  end;
    721715end;
     
    745739  Strings.Clear;
    746740  for I := 0 to Count - 1 do
    747     Strings.AddObject(TImportSource(Items[I]).Name, Items[I]);
     741    Strings.AddObject(Items[I].Name, Items[I]);
    748742end;
    749743
     
    753747begin
    754748  I := 0;
    755   while (I < Count) and (TImportSource(Items[I]).Name <> Name) do Inc(I);
    756   if I < Count then Result := TImportSource(Items[I])
     749  while (I < Count) and (Items[I].Name <> Name) do Inc(I);
     750  if I < Count then Result := Items[I]
    757751    else Result := nil;
    758752end;
     
    765759  UpdateIds;
    766760  for I := 0 to Count - 1 do
    767   with TImportSource(Items[I]) do begin
     761  with Items[I] do begin
    768762    NewNode2 := Node.OwnerDocument.CreateElement('ImportSource');
    769763    Node.AppendChild(NewNode2);
     
    796790begin
    797791  I := 0;
    798   while (I < Count) and (TImportFormat(Items[I]).Name <> Name) do Inc(I);
    799   if I < Count then Result := TImportFormat(Items[I])
     792  while (I < Count) and (Items[I].Name <> Name) do Inc(I);
     793  if I < Count then Result := Items[I]
    800794    else Result := nil;
    801795end;
     
    809803  LastId := 0;
    810804  for I := 0 to Count - 1 do begin
    811     if TImportFormat(Items[I]).Id > LastId then LastId := TImportFormat(Items[I]).Id;
     805    if Items[I].Id > LastId then LastId := Items[I].Id;
    812806  end;
    813807  // Add ID to new items without ID
    814808  for I := 0 to Count - 1 do begin
    815     if TImportFormat(Items[I]).Id = 0 then begin
     809    if Items[I].Id = 0 then begin
    816810      Inc(LastId);
    817       TImportFormat(Items[I]).Id := LastId;
     811      Items[I].Id := LastId;
    818812    end;
    819813  end;
     
    827821  UpdateIds;
    828822  for I := 0 to Count - 1 do
    829   with TImportFormat(Items[I]) do begin
     823  with Items[I] do begin
    830824    NewNode2 := Node.OwnerDocument.CreateElement('ImportFormat');
    831825    Node.AppendChild(NewNode2);
     
    855849begin
    856850  I := 0;
    857   while (I < Count) and (TImportFormat(Items[I]).Id <> Id) do Inc(I);
    858   if I < Count then Result := TImportFormat(Items[I])
     851  while (I < Count) and (Items[I].Id <> Id) do Inc(I);
     852  if I < Count then Result := Items[I]
    859853    else Result := nil;
    860854end;
     
    869863  if DownloadHTTP(URL, ResponseStream) then begin
    870864    ResponseStream.Position := 0;
     865    S := default(string);
    871866    SetLength(S, ResponseStream.Size);
    872867    ResponseStream.Read(S[1], Length(S));
     
    942937  // Add reverse references
    943938  for I := 0 to Categories.Count - 1 do
    944     TAcronymCategory(Categories[I]).ImportSources.Add(Self);
     939    Categories[I].ImportSources.Add(Self);
    945940end;
    946941
     
    959954begin
    960955  for I := 0 to Categories.Count - 1 do
    961     TAcronymCategory(Categories[I]).ImportSources.Remove(Self);
     956    Categories[I].ImportSources.Remove(Self);
    962957  FreeAndNil(Categories);
    963958  FreeAndNil(ResponseStream);
    964   inherited Destroy;
     959  inherited;
    965960end;
    966961
     
    980975  FreeAndNil(Categories);
    981976  FreeAndNil(Sources);
    982   inherited Destroy;
     977  inherited;
    983978end;
    984979
     
    993988  LastId := 0;
    994989  for I := 0 to Count - 1 do begin
    995     if TAcronymMeaning(Items[I]).Id > LastId then LastId := TAcronymMeaning(Items[I]).Id;
     990    if Items[I].Id > LastId then LastId := Items[I].Id;
    996991  end;
    997992  // Add ID to new items without ID
    998993  for I := 0 to Count - 1 do begin
    999     if TAcronymMeaning(Items[I]).Id = 0 then begin
     994    if Items[I].Id = 0 then begin
    1000995      Inc(LastId);
    1001       TAcronymMeaning(Items[I]).Id := LastId;
     996      Items[I].Id := LastId;
    1002997    end;
    1003998  end;
     
    10111006  UpdateIds;
    10121007  for I := 0 to Count - 1 do
    1013   with TAcronymMeaning(Items[I]) do begin
     1008  with Items[I] do begin
    10141009    NewNode2 := Node.OwnerDocument.CreateElement('Meaning');
    10151010    Node.AppendChild(NewNode2);
     
    10421037  I := 0;
    10431038  if sfCaseInsensitive in Flags then begin
    1044     while (I < Count) and (LowerCase(TAcronymMeaning(Items[I]).Name) <> LowerCase(Name)) do Inc(I);
     1039    while (I < Count) and (LowerCase(Items[I].Name) <> LowerCase(Name)) do Inc(I);
    10451040  end else begin
    1046     while (I < Count) and (TAcronymMeaning(Items[I]).Name <> Name) do Inc(I);
    1047   end;
    1048   if I < Count then Result := TAcronymMeaning(Items[I])
     1041    while (I < Count) and (Items[I].Name <> Name) do Inc(I);
     1042  end;
     1043  if I < Count then Result := Items[I]
    10491044    else Result := nil;
    10501045end;
     
    10631058  Result := '';
    10641059  for I := 0 to Count - 1 do
    1065     Result := Result + ', "' + TAcronymMeaning(Items[I]).Name + '"';
     1060    Result := Result + ', "' + Items[I].Name + '"';
    10661061  System.Delete(Result, 1, 2);
    10671062end;
     
    10761071  if Categories.IndexOf(MergedCategories[I]) = -1 then begin
    10771072    Categories.Add(MergedCategories[I]);
    1078     TAcronymCategory(MergedCategories[I]).AcronymMeanings.Add(Self);
     1073    MergedCategories[I].AcronymMeanings.Add(Self);
    10791074  end;
    10801075end;
     
    11131108    // Add reverse references
    11141109    for I := 0 to Categories.Count - 1 do
    1115       TAcronymCategory(Categories[I]).AcronymMeanings.Add(Self);
     1110      Categories[I].AcronymMeanings.Add(Self);
    11161111  end;
    11171112
     
    11341129begin
    11351130  for I := 0 to Categories.Count - 1 do
    1136     TAcronymCategory(Categories[I]).AcronymMeanings.Remove(Self);
     1131    Categories[I].AcronymMeanings.Remove(Self);
    11371132  FreeAndNil(Categories);
    11381133  FreeAndNil(Sources);
    1139   inherited Destroy;
     1134  inherited;
    11401135end;
    11411136
     
    11481143begin
    11491144  for I := 0 to Count - 1 do
    1150   with TAcronym(Items[I]) do begin
     1145  with Items[I] do begin
    11511146    NewNode2 := Node.OwnerDocument.CreateElement('Acronym');
    11521147    Node.AppendChild(NewNode2);
     
    11771172  I := 0;
    11781173  if sfCaseInsensitive in Flags then begin
    1179     while (I < Count) and (LowerCase(TAcronym(Items[I]).Name) <> LowerCase(Name)) do Inc(I);
     1174    while (I < Count) and (LowerCase(Items[I].Name) <> LowerCase(Name)) do Inc(I);
    11801175  end else begin
    1181     while (I < Count) and (TAcronym(Items[I]).Name <> Name) do Inc(I);
    1182   end;
    1183   if I < Count then Result := TAcronym(Items[I])
     1176    while (I < Count) and (Items[I].Name <> Name) do Inc(I);
     1177  end;
     1178  if I < Count then Result := Items[I]
    11841179    else Result := nil;
    11851180end;
     
    12021197  LastId := 0;
    12031198  for I := 0 to Count - 1 do begin
    1204     if TAcronymCategory(Items[I]).Id > LastId then LastId := TAcronymCategory(Items[I]).Id;
     1199    if Items[I].Id > LastId then LastId := Items[I].Id;
    12051200  end;
    12061201  // Add ID to new items without ID
    12071202  for I := 0 to Count - 1 do begin
    1208     if TAcronymCategory(Items[I]).Id = 0 then begin
     1203    if Items[I].Id = 0 then begin
    12091204      Inc(LastId);
    1210       TAcronymCategory(Items[I]).Id := LastId;
     1205      Items[I].Id := LastId;
    12111206    end;
    12121207  end;
     
    12201215  UpdateIds;
    12211216  for I := 0 to Count - 1 do
    1222   with TAcronymCategory(Items[I]) do begin
     1217  with Items[I] do begin
    12231218    NewNode2 := Node.OwnerDocument.CreateElement('Category');
    12241219    Node.AppendChild(NewNode2);
     
    12511246    NewNode := Node.OwnerDocument.CreateElement('Ref');
    12521247    Node.AppendChild(NewNode);
    1253     NewNode.TextContent := WideString(IntToStr(TAcronymCategory(Items[I]).Id));
     1248    NewNode.TextContent := WideString(IntToStr(Items[I].Id));
    12541249  end;
    12551250end;
     
    12891284begin
    12901285  I := 0;
    1291   while (I < Count) and (TAcronymCategory(Items[I]).Name <> Name) do Inc(I);
    1292   if I < Count then Result := TAcronymCategory(Items[I])
     1286  while (I < Count) and (Items[I].Name <> Name) do Inc(I);
     1287  if I < Count then Result := Items[I]
    12931288    else Result := nil;
    12941289end;
     
    12991294begin
    13001295  I := 0;
    1301   while (I < Count) and (TAcronymCategory(Items[I]).Id <> Id) do Inc(I);
    1302   if I < Count then Result := TAcronymCategory(Items[I])
     1296  while (I < Count) and (Items[I].Id <> Id) do Inc(I);
     1297  if I < Count then Result := Items[I]
    13031298    else Result := nil;
    13041299end;
     
    13171312  Strings.Clear;
    13181313  for I := 0 to Count - 1 do
    1319     Strings.AddObject(TAcronymCategory(Items[I]).Name, Items[I]);
     1314    Strings.AddObject(Items[I].Name, Items[I]);
    13201315end;
    13211316
     
    13351330end;
    13361331
    1337 procedure TAcronymCategories.AssignToList(List: TFPGObjectList<TObject>);
     1332procedure TAcronymCategories.AssignToList(List: TObjects);
    13381333var
    13391334  I: Integer;
     
    13411336  List.Clear;
    13421337  for I := 0 to Count - 1 do
    1343     List.Add(TAcronymCategory(Items[I]))
     1338    List.Add(Items[I]);
     1339end;
     1340
     1341procedure TAcronymCategories.Assign(Source: TAcronymCategories);
     1342var
     1343  I: Integer;
     1344  NewCategory: TAcronymCategory;
     1345begin
     1346  Clear;
     1347  for I := 0 to Source.Count - 1 do begin
     1348    NewCategory := TAcronymCategory.Create;
     1349    NewCategory.Assign(Source[I]);
     1350    Add(NewCategory);
     1351  end;
    13441352end;
    13451353
     
    13501358  Result := '';
    13511359  for I := 0 to Count - 1 do
    1352     Result := Result + TAcronymCategory(Items[I]).Name + ',';
     1360    Result := Result + Items[I].Name + ',';
    13531361  System.Delete(Result, Length(Result), 1);
    13541362end;
     
    13591367begin
    13601368  for I := 0 to Count - 1 do
    1361     if TAcronymCategory(Items[I]).ImportSources.IndexOf(Item) = -1 then
    1362       TAcronymCategory(Items[I]).ImportSources.Add(Item);
     1369    if Items[I].ImportSources.IndexOf(Item) = -1 then
     1370      Items[I].ImportSources.Add(Item);
    13631371end;
    13641372
     
    13681376begin
    13691377  for I := 0 to Count - 1 do
    1370     if TAcronymCategory(Items[I]).AcronymMeanings.IndexOf(Item) = -1 then
    1371       TAcronymCategory(Items[I]).AcronymMeanings.Add(Item);
     1378    if Items[I].AcronymMeanings.IndexOf(Item) = -1 then
     1379      Items[I].AcronymMeanings.Add(Item);
    13721380end;
    13731381
     
    13781386  Result := False;
    13791387  for I := 0 to Count - 1 do
    1380   if TAcronymCategory(Items[I]).Enabled then begin
     1388  if Items[I].Enabled then begin
    13811389    Result := True;
    13821390    Break;
     
    14171425begin
    14181426  FreeAndNil(Meanings);
    1419   inherited Destroy;
     1427  inherited;
    14201428end;
    14211429
    14221430{ TAcronymCategory }
     1431
     1432procedure TAcronymCategory.Assign(Source: TAcronymCategory);
     1433begin
     1434  Id := Source.Id;
     1435  Name := Source.Name;
     1436  // AcronymMeanings.Assign(Source.AcronymMeanings);
     1437  // ImportSources.Assign(Source.ImportSources);
     1438  Enabled := Source.Enabled;
     1439end;
    14231440
    14241441procedure TAcronymCategory.SaveToNode(Node: TDOMNode);
     
    14501467begin
    14511468  for I := 0 to AcronymMeanings.Count - 1 do
    1452     TAcronymMeaning(AcronymMeanings[I]).Categories.Remove(Self);
     1469    AcronymMeanings[I].Categories.Remove(Self);
    14531470  FreeAndNil(AcronymMeanings);
    14541471  for I := 0 to ImportSources.Count - 1 do
    1455     TImportSource(ImportSources[I]).Categories.Remove(Self);
     1472    ImportSources[I].Categories.Remove(Self);
    14561473  FreeAndNil(ImportSources);
    1457   inherited Destroy;
     1474  inherited;
    14581475end;
    14591476
     
    14701487  ImportFormats := TImportFormats.Create;
    14711488  FUpdateCount := 0;
    1472   OnUpdate := TFPGList<TNotifyEvent>.Create;
     1489  OnUpdate := TList<TNotifyEvent>.Create;
    14731490end;
    14741491
     
    14801497  FreeAndNil(Acronyms);
    14811498  FreeAndNil(Categories);
    1482   inherited Destroy;
     1499  inherited;
    14831500end;
    14841501
     
    16361653    Line.Clear;
    16371654    for I := 0 to Acronyms.Count - 1 do
    1638     with TAcronym(Acronyms[I]) do begin
     1655    with Acronyms[I] do begin
    16391656      for K := 0 to Meanings.Count - 1 do
    1640       with TAcronymMeaning(Meanings[K]) do begin
     1657      with Meanings[K] do begin
    16411658        Line.Clear;
    16421659        Line.Add(Acronym.Name);
     
    16441661        Context.Clear;
    16451662        for J := 0 to Categories.Count - 1 do
    1646           Context.Add(TAcronymCategory(Categories[J]).Name);
     1663          Context.Add(Categories[J].Name);
    16471664        Line.Add(Context.DelimitedText);
    16481665        F.Add(Line.CommaText);
     
    16661683  Items.Clear;
    16671684  for I := 0 to Acronyms.Count - 1 do
    1668   with TAcronym(Acronyms[I]) do begin
     1685  with Acronyms[I] do begin
    16691686    for J := 0 to Meanings.Count - 1 do
    1670     with TAcronymMeaning(Meanings[J]) do begin
    1671       if (AName = '') or (Pos(AName, LowerCase(TAcronym(Acronyms[I]).Name)) > 0)
    1672         or (Pos(AName, LowerCase(Name)) > 0) then Items.Add(TAcronymMeaning(Meanings[J]))
     1687    with Meanings[J] do begin
     1688      if (AName = '') or (Pos(AName, LowerCase(Acronyms[I].Name)) > 0)
     1689        or (Pos(AName, LowerCase(Name)) > 0) then Items.Add(Meanings[J])
    16731690    end;
    16741691  end;
     
    16811698  Result := 0;
    16821699  for I := 0 to Acronyms.Count - 1 do
    1683     Result := Result + TAcronym(Acronyms[I]).Meanings.Count;
     1700    Result := Result + Acronyms[I].Meanings.Count;
    16841701end;
    16851702
     
    17461763end;
    17471764
    1748 procedure TAcronymDb.AssignToList(List: TFPGObjectList<TObject>; EnabledCategoryOnly: Boolean = False);
     1765procedure TAcronymDb.AssignToList(List: TObjects; EnabledCategoryOnly: Boolean = False);
    17491766var
    17501767  I: Integer;
     
    17531770  List.Clear;
    17541771  for I := 0 to Acronyms.Count - 1 do
    1755   with TAcronym(Acronyms[I]) do begin
     1772  with Acronyms[I] do begin
    17561773    for J := 0 to Meanings.Count - 1 do
    1757     with TAcronymMeaning(Meanings[J]) do
     1774    with Meanings[J] do
    17581775    if not EnabledCategoryOnly or (EnabledCategoryOnly and Categories.IsAnyEnabled) then begin
    1759       List.Add(TAcronymMeaning(Meanings[J]));
     1776      List.Add(Meanings[J]);
    17601777    end;
    17611778  end;
  • trunk/AcronymDecoder.lpi

    r215 r219  
    105105      </Unit0>
    106106      <Unit1>
    107         <Filename Value="UAcronym.pas"/>
     107        <Filename Value="Acronym.pas"/>
    108108        <IsPartOfProject Value="True"/>
    109109      </Unit1>
    110110      <Unit2>
    111         <Filename Value="Forms\UFormCategorySelect.pas"/>
     111        <Filename Value="Forms\FormCategorySelect.pas"/>
    112112        <IsPartOfProject Value="True"/>
    113113        <ComponentName Value="FormCategorySelect"/>
     
    116116      </Unit2>
    117117      <Unit3>
    118         <Filename Value="Forms\UFormCategories.pas"/>
     118        <Filename Value="Forms\FormCategories.pas"/>
    119119        <IsPartOfProject Value="True"/>
    120120        <ComponentName Value="FormCategories"/>
     
    123123      </Unit3>
    124124      <Unit4>
    125         <Filename Value="Forms\UFormAcronym.pas"/>
     125        <Filename Value="Forms\FormAcronym.pas"/>
    126126        <IsPartOfProject Value="True"/>
    127127        <ComponentName Value="FormAcronym"/>
     
    130130      </Unit4>
    131131      <Unit5>
    132         <Filename Value="Forms\UFormImport.pas"/>
     132        <Filename Value="Forms\FormImport.pas"/>
    133133        <IsPartOfProject Value="True"/>
    134134        <ComponentName Value="FormImport"/>
     
    137137      </Unit5>
    138138      <Unit6>
    139         <Filename Value="Forms\UFormMain.pas"/>
     139        <Filename Value="Forms\FormMain.pas"/>
    140140        <IsPartOfProject Value="True"/>
    141141        <ComponentName Value="FormMain"/>
     
    144144      </Unit6>
    145145      <Unit7>
    146         <Filename Value="Forms\UFormSettings.pas"/>
     146        <Filename Value="Forms\FormSettings.pas"/>
    147147        <IsPartOfProject Value="True"/>
    148148        <ComponentName Value="FormSettings"/>
     
    151151      </Unit7>
    152152      <Unit8>
    153         <Filename Value="Forms\UFormAcronyms.pas"/>
     153        <Filename Value="Forms\FormAcronyms.pas"/>
    154154        <IsPartOfProject Value="True"/>
    155155        <ComponentName Value="FormAcronyms"/>
     
    158158      </Unit8>
    159159      <Unit9>
    160         <Filename Value="Forms\UFormImportSource.pas"/>
     160        <Filename Value="Forms\FormImportSource.pas"/>
    161161        <IsPartOfProject Value="True"/>
    162162        <ComponentName Value="FormImportSource"/>
     
    165165      </Unit9>
    166166      <Unit10>
    167         <Filename Value="Forms\UFormImportSources.pas"/>
     167        <Filename Value="Forms\FormImportSources.pas"/>
    168168        <IsPartOfProject Value="True"/>
    169169        <ComponentName Value="FormImportSources"/>
     
    172172      </Unit10>
    173173      <Unit11>
    174         <Filename Value="Forms\UFormImportFormat.pas"/>
     174        <Filename Value="Forms\FormImportFormat.pas"/>
    175175        <IsPartOfProject Value="True"/>
    176176        <ComponentName Value="FormImportFormat"/>
     
    179179      </Unit11>
    180180      <Unit12>
    181         <Filename Value="Forms\UFormImportFormats.pas"/>
     181        <Filename Value="Forms\FormImportFormats.pas"/>
    182182        <IsPartOfProject Value="True"/>
    183183        <ComponentName Value="FormImportFormats"/>
     
    186186      </Unit12>
    187187      <Unit13>
    188         <Filename Value="Forms\UFormImportPattern.pas"/>
     188        <Filename Value="Forms\FormImportPattern.pas"/>
    189189        <IsPartOfProject Value="True"/>
    190190        <ComponentName Value="FormImportPattern"/>
     
    193193      </Unit13>
    194194      <Unit14>
    195         <Filename Value="UCore.pas"/>
     195        <Filename Value="Core.pas"/>
    196196        <IsPartOfProject Value="True"/>
    197197        <ComponentName Value="Core"/>
     
    200200      </Unit14>
    201201      <Unit15>
    202         <Filename Value="Forms\UFormExport.pas"/>
     202        <Filename Value="Forms\FormExport.pas"/>
    203203        <IsPartOfProject Value="True"/>
    204204        <ComponentName Value="FormExport"/>
     
    207207      </Unit15>
    208208      <Unit16>
    209         <Filename Value="Forms\UFormCheck.pas"/>
     209        <Filename Value="Forms\FormCheck.pas"/>
    210210        <IsPartOfProject Value="True"/>
    211211        <ComponentName Value="FormCheck"/>
     
    246246    <Linking>
    247247      <Debugging>
     248        <DebugInfoType Value="dsDwarf2Set"/>
    248249        <UseHeaptrc Value="True"/>
    249250        <UseExternalDbgSyms Value="True"/>
  • trunk/AcronymDecoder.lpr

    r215 r219  
    11program AcronymDecoder;
    2 
    3 {$mode delphi}{$H+}
    42
    53uses
     
    86  {$ENDIF}
    97  Interfaces, // this includes the LCL widgetset
    10   Forms, UAcronym, Common, SysUtils,
    11   UFormMain, UCore, UFormCheck
     8  Forms, Acronym, Common, SysUtils,
     9  FormMain, Core, FormCheck
    1210  { you can add units after this };
    1311
     
    2624  {$ENDIF}
    2725
    28   Application.Title := 'Acronym Decoder';
     26  Application.Title:='Acronym Decoder';
    2927  RequireDerivedFormResource := True;
    3028  Application.Initialize;
    31   Application.CreateForm(TCore, Core);
    32   Application.CreateForm(TFormMain, FormMain);
     29  Application.CreateForm(TCore, Core.Core);
    3330  Application.Run;
    3431end.
  • trunk/Core.lfm

    r218 r219  
    99  PPI = 144
    1010  object Translator: TTranslator
    11     POFilesFolder = 'Languages'
     11    POFilesFolder = 'Languages;Packages/Common/Languages'
    1212    OnTranslate = TranslatorTranslate
    1313    Left = 228
     
    15051505    AppName = 'Acronym Decoder'
    15061506    Description = 'A simple tool for quick searching of meaning for various acronyms and abbreviations.'
    1507     ReleaseDate = 44582
     1507    ReleaseDate = 45674
    15081508    RegistryKey = '\Software\Chronosoft\Acronym Decoder'
    15091509    RegistryRoot = rrKeyCurrentUser
  • trunk/Core.pas

    r218 r219  
    1 unit UCore;
    2 
    3 {$mode delphi}
     1unit Core;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, FileUtil, UAcronym, UTranslator, UPersistentForm,
    9   UJobProgressView, UScaleDPI, Forms, Controls, ExtCtrls, Menus, LazFileUtils,
    10   URegistry, UApplicationInfo, Registry, UTheme;
     6  Classes, SysUtils, FileUtil, Acronym, Translator, PersistentForm,
     7  JobProgressView, ScaleDPI, Forms, Controls, ExtCtrls, Menus, LazFileUtils,
     8  RegistryEx, ApplicationInfo, Registry, Theme, FormMain;
    119
    1210type
     
    4341    procedure WriteLnConsole(Text: string);
    4442  public
     43    FormMain: TFormMain;
    4544    AcronymDb: TAcronymDb;
    4645    StartOnLogon: Boolean;
     
    5453    procedure SaveConfig;
    5554    procedure ScaleDPI;
     55    function CompareStrings(Strings1, Strings2: TStrings): Boolean;
    5656    property AlwaysOnTop: Boolean read FAlwaysOnTop write SetAlwaysOnTop;
    5757  end;
     
    6262
    6363implementation
    64 
    65 uses
    66   UFormMain;
    6764
    6865const
     
    8784  InitializeFinished := False;
    8885  StoredDimension := TControlDimension.Create;
     86  Application.CreateForm(TFormMain, FormMain);
    8987end;
    9088
     
    9593end;
    9694
     95function TCore.CompareStrings(Strings1, Strings2: TStrings): Boolean;
     96var
     97  I: Integer;
     98begin
     99  Result := Strings1.Count = Strings2.Count;
     100  if not Result then Exit;
     101  for I := 0 to Strings1.Count - 1 do
     102    if (Strings1[I] <> Strings2[I]) or (Strings1.Objects[I] <> Strings2.Objects[I]) then begin
     103      Result := False;
     104      Exit;
     105    end;
     106end;
     107
    97108procedure TCore.TrayIcon1Click(Sender: TObject);
    98109begin
     
    103114procedure TCore.TranslatorTranslate(Sender: TObject);
    104115begin
    105   UAcronym.Translate;
     116  Acronym.Translate;
    106117end;
    107118
     
    276287end;
    277288
    278 
    279 
    280289end.
    281290
  • trunk/Forms/FormAcronym.lfm

    r218 r219  
    11object FormAcronym: TFormAcronym
    22  Left = 845
    3   Height = 744
    4   Top = 528
    5   Width = 858
     3  Height = 893
     4  Top = 480
     5  Width = 1030
    66  Caption = 'Acronym'
    7   ClientHeight = 744
    8   ClientWidth = 858
    9   DesignTimePPI = 120
    10   OnClose = FormClose
    11   OnCreate = FormCreate
     7  ClientHeight = 893
     8  ClientWidth = 1030
     9  DesignTimePPI = 144
    1210  OnShow = FormShow
    1311  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     12  LCLVersion = '3.6.0.0'
    1513  object Label1: TLabel
    16     Left = 10
    17     Height = 20
    18     Top = 20
    19     Width = 43
     14    Left = 12
     15    Height = 26
     16    Top = 24
     17    Width = 56
    2018    Caption = 'Name:'
    2119    ParentColor = False
     
    2321  end
    2422  object EditAcronym: TEdit
    25     Left = 191
    26     Height = 28
    27     Top = 19
    28     Width = 652
    29     Anchors = [akTop, akLeft, akRight]
    30     OnKeyPress = EditMeaningKeyPress
     23    Left = 229
     24    Height = 43
     25    Top = 23
     26    Width = 783
     27    Anchors = [akTop, akLeft, akRight]
    3128    ParentFont = False
    3229    TabOrder = 0
     30    OnKeyPress = EditMeaningKeyPress
    3331  end
    3432  object Label2: TLabel
    35     Left = 10
    36     Height = 20
    37     Top = 61
    38     Width = 61
     33    Left = 12
     34    Height = 26
     35    Top = 73
     36    Width = 79
    3937    Caption = 'Meaning:'
    4038    ParentColor = False
     
    4240  end
    4341  object EditMeaning: TEdit
    44     Left = 191
    45     Height = 28
    46     Top = 61
    47     Width = 652
    48     Anchors = [akTop, akLeft, akRight]
    49     OnKeyPress = EditMeaningKeyPress
     42    Left = 229
     43    Height = 43
     44    Top = 73
     45    Width = 783
     46    Anchors = [akTop, akLeft, akRight]
    5047    ParentFont = False
    5148    TabOrder = 1
     49    OnKeyPress = EditMeaningKeyPress
    5250  end
    5351  object ButtonOk: TButton
    54     Left = 733
    55     Height = 31
    56     Top = 694
    57     Width = 94
     52    Left = 880
     53    Height = 37
     54    Top = 833
     55    Width = 113
    5856    Anchors = [akRight, akBottom]
    5957    Caption = 'Ok'
    6058    ModalResult = 1
    61     OnKeyPress = EditMeaningKeyPress
    6259    ParentFont = False
    6360    TabOrder = 7
     61    OnKeyPress = EditMeaningKeyPress
    6462  end
    6563  object ButtonCancel: TButton
    66     Left = 613
    67     Height = 31
    68     Top = 694
    69     Width = 94
     64    Left = 736
     65    Height = 37
     66    Top = 833
     67    Width = 113
    7068    Anchors = [akRight, akBottom]
    7169    Caption = 'Cancel'
    7270    ModalResult = 2
    73     OnKeyPress = EditMeaningKeyPress
    7471    ParentFont = False
    7572    TabOrder = 6
     73    OnKeyPress = EditMeaningKeyPress
    7674  end
    7775  object Label3: TLabel
    78     Left = 10
    79     Height = 20
    80     Top = 110
    81     Width = 79
     76    Left = 12
     77    Height = 26
     78    Top = 132
     79    Width = 102
    8280    Caption = 'Description:'
    8381    ParentColor = False
     
    8583  end
    8684  object MemoDescription: TMemo
    87     Left = 191
    88     Height = 142
    89     Top = 110
    90     Width = 652
    91     Anchors = [akTop, akLeft, akRight]
    92     OnKeyPress = EditMeaningKeyPress
     85    Left = 229
     86    Height = 170
     87    Top = 132
     88    Width = 783
     89    Anchors = [akTop, akLeft, akRight]
    9390    ParentFont = False
    9491    ScrollBars = ssAutoBoth
    9592    TabOrder = 2
     93    OnKeyPress = EditMeaningKeyPress
    9694  end
    9795  object Label4: TLabel
    98     Left = 15
    99     Height = 20
    100     Top = 260
    101     Width = 74
     96    Left = 18
     97    Height = 26
     98    Top = 312
     99    Width = 95
    102100    Caption = 'Categories:'
    103101    ParentColor = False
     
    105103  end
    106104  object ListBoxCategories: TListBox
    107     Left = 191
    108     Height = 176
    109     Top = 260
    110     Width = 651
     105    Left = 229
     106    Height = 211
     107    Top = 312
     108    Width = 782
    111109    Anchors = [akTop, akLeft, akRight]
    112110    ItemHeight = 0
    113111    MultiSelect = True
    114     OnKeyPress = EditMeaningKeyPress
    115     OnSelectionChange = ListBoxCategoriesSelectionChange
    116112    ParentFont = False
    117113    PopupMenu = PopupMenuCategory
    118114    ScrollWidth = 518
    119115    TabOrder = 3
     116    TopIndex = -1
     117    OnKeyPress = EditMeaningKeyPress
     118    OnSelectionChange = ListBoxCategoriesSelectionChange
    120119  end
    121120  object Button1: TButton
    122     Left = 191
    123     Height = 31
    124     Top = 450
    125     Width = 109
     121    Left = 229
     122    Height = 37
     123    Top = 540
     124    Width = 131
    126125    Action = ACategoryAdd
    127     OnKeyPress = EditMeaningKeyPress
    128126    ParentFont = False
    129127    TabOrder = 4
     128    OnKeyPress = EditMeaningKeyPress
    130129  end
    131130  object Button2: TButton
    132     Left = 320
    133     Height = 31
    134     Top = 450
     131    Left = 384
     132    Height = 37
     133    Top = 540
     134    Width = 156
     135    Action = ACategoryRemove
     136    ParentFont = False
     137    TabOrder = 5
     138    OnKeyPress = EditMeaningKeyPress
     139  end
     140  object Label5: TLabel
     141    Left = 12
     142    Height = 26
     143    Top = 588
    135144    Width = 130
    136     Action = ACategoryRemove
    137     OnKeyPress = EditMeaningKeyPress
    138     ParentFont = False
    139     TabOrder = 5
    140   end
    141   object Label5: TLabel
    142     Left = 10
    143     Height = 20
    144     Top = 490
    145     Width = 101
    146145    Caption = 'Imported from:'
    147146    ParentColor = False
     
    149148  end
    150149  object ListBoxImportSources: TListBox
    151     Left = 191
    152     Height = 140
    153     Top = 490
    154     Width = 652
     150    Left = 229
     151    Height = 168
     152    Top = 588
     153    Width = 783
    155154    Anchors = [akTop, akLeft, akRight]
    156155    ItemHeight = 0
    157156    MultiSelect = True
    158     OnKeyPress = EditMeaningKeyPress
    159     OnSelectionChange = ListBoxCategoriesSelectionChange
    160157    ParentFont = False
    161158    ScrollWidth = 519
    162159    TabOrder = 8
     160    TopIndex = -1
     161    OnKeyPress = EditMeaningKeyPress
     162    OnSelectionChange = ListBoxCategoriesSelectionChange
    163163  end
    164164  object ActionList1: TActionList
    165     left = 451
    166     top = 300
     165    Left = 541
     166    Top = 360
    167167    object ACategoryRemove: TAction
    168168      Caption = 'Remove'
     
    177177  end
    178178  object PopupMenuCategory: TPopupMenu
    179     left = 240
    180     top = 305
     179    Left = 288
     180    Top = 366
    181181    object MenuItem2: TMenuItem
    182182      Action = ACategoryAdd
  • trunk/Forms/FormAcronym.pas

    r218 r219  
    1 unit UFormAcronym;
    2 
    3 {$mode delphi}
     1unit FormAcronym;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   StdCtrls, ActnList, UAcronym;
     7  StdCtrls, ActnList, Acronym, FormEx;
    108
    119type
     
    1311  { TFormAcronym }
    1412
    15   TFormAcronym = class(TForm)
     13  TFormAcronym = class(TFormEx)
    1614    ACategoryRemove: TAction;
    1715    ACategoryAdd: TAction;
     
    3735    procedure ACategoryRemoveExecute(Sender: TObject);
    3836    procedure EditMeaningKeyPress(Sender: TObject; var Key: char);
    39     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    40     procedure FormCreate(Sender: TObject);
    4137    procedure FormShow(Sender: TObject);
    4238    procedure ListBoxCategoriesSelectionChange(Sender: TObject; User: boolean);
     
    4844  end;
    4945
    50 var
    51   FormAcronym: TFormAcronym;
    5246
    5347implementation
     
    5650
    5751uses
    58   UCore, UFormCategorySelect;
     52  FormCategorySelect;
    5953
    6054{ TFormAcronym }
    61 
    62 procedure TFormAcronym.FormClose(Sender: TObject; var CloseAction: TCloseAction
    63   );
    64 begin
    65   Core.PersistentForm1.Save(Self);
    66 end;
    67 
    68 procedure TFormAcronym.FormCreate(Sender: TObject);
    69 begin
    70   Core.Translator.TranslateComponentRecursive(Self);
    71   Core.ThemeManager.UseTheme(Self);
    72 end;
    7355
    7456procedure TFormAcronym.ACategoryAddExecute(Sender: TObject);
    7557var
    7658  I: Integer;
     59  FormCategorySelect: TFormCategorySelect;
    7760begin
    7861  FormCategorySelect := TFormCategorySelect.Create(Self);
     
    11194procedure TFormAcronym.FormShow(Sender: TObject);
    11295begin
    113   Core.PersistentForm1.Load(Self);
    11496  UpdateInterface;
    11597end;
  • trunk/Forms/FormAcronyms.lfm

    r218 r219  
    11object FormAcronyms: TFormAcronyms
    2   Left = 426
    3   Height = 558
    4   Top = 251
    5   Width = 740
     2  Left = 755
     3  Height = 670
     4  Top = 284
     5  Width = 888
    66  Caption = 'Acronyms'
    7   ClientHeight = 558
    8   ClientWidth = 740
    9   DesignTimePPI = 120
    10   OnClose = FormClose
     7  ClientHeight = 670
     8  ClientWidth = 888
     9  DesignTimePPI = 144
    1110  OnCreate = FormCreate
    1211  OnShow = FormShow
    1312  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     13  LCLVersion = '3.6.0.0'
    1514  object ListViewAcronyms: TListView
    16     Left = 4
    17     Height = 466
    18     Top = 34
    19     Width = 732
     15    Left = 5
     16    Height = 563
     17    Top = 41
     18    Width = 878
    2019    Align = alClient
    21     BorderSpacing.Left = 4
    22     BorderSpacing.Right = 4
    23     BorderSpacing.Bottom = 4
     20    BorderSpacing.Left = 5
     21    BorderSpacing.Right = 5
     22    BorderSpacing.Bottom = 5
    2423    Columns = <   
    2524      item
    2625        Caption = 'Name'
    27         Width = 100
     26        Width = 120
    2827      end   
    2928      item
    3029        Caption = 'Description'
    31         Width = 300
     30        Width = 360
    3231      end   
    3332      item
    3433        Caption = 'Categories'
    35         Width = 312
     34        Width = 383
    3635      end>
    3736    MultiSelect = True
     
    4948  end
    5049  object ListViewFilter1: TListViewFilter
    51     Left = 4
    52     Height = 30
    53     Top = 4
    54     Width = 732
     50    Left = 5
     51    Height = 36
     52    Top = 5
     53    Width = 878
    5554    OnChange = ListViewFilter1Change
    5655    Align = alTop
    57     BorderSpacing.Left = 4
    58     BorderSpacing.Top = 4
    59     BorderSpacing.Right = 4
    60   end
    61   object StatusBar1: TStatusBar
    62     Left = 0
    63     Height = 28
    64     Top = 530
    65     Width = 740
    66     Panels = <   
    67       item
    68         Width = 120
    69       end   
    70       item
    71         Width = 120
    72       end>
    73     SimplePanel = False
     56    BorderSpacing.Left = 5
     57    BorderSpacing.Top = 5
     58    BorderSpacing.Right = 5
    7459  end
    7560  object ToolBar1: TToolBar
     61    AnchorSideBottom.Control = StatusBar1
    7662    Left = 0
    77     Height = 26
    78     Top = 504
    79     Width = 740
     63    Height = 33
     64    Top = 609
     65    Width = 888
    8066    Align = alBottom
    8167    Caption = 'ToolBar1'
     
    8369    ParentShowHint = False
    8470    ShowHint = True
    85     TabOrder = 3
     71    TabOrder = 2
    8672    object ToolButton1: TToolButton
    8773      Left = 1
     
    9076    end
    9177    object ToolButton2: TToolButton
    92       Left = 30
     78      Left = 36
    9379      Top = 2
    9480      Action = AModify
    9581    end
    9682    object ToolButton3: TToolButton
    97       Left = 59
     83      Left = 71
    9884      Top = 2
    9985      Action = ARemove
    10086    end
     87  end
     88  object StatusBar1: TStatusBar
     89    Left = 0
     90    Height = 28
     91    Top = 642
     92    Width = 888
     93    Panels = <   
     94      item
     95        Width = 144
     96      end   
     97      item
     98        Width = 144
     99      end>
     100    SimplePanel = False
    101101  end
    102102  object ListViewSort1: TListViewSort
     
    107107    Column = 0
    108108    Order = soUp
    109     left = 248
    110     top = 168
     109    Left = 298
     110    Top = 202
    111111  end
    112112  object ActionList1: TActionList
    113113    Images = Core.ImageList1
    114     left = 248
    115     top = 232
     114    Left = 298
     115    Top = 278
    116116    object AAdd: TAction
    117117      Caption = 'Add'
     
    140140  object PopupMenuAcronym: TPopupMenu
    141141    Images = Core.ImageList1
    142     left = 248
    143     top = 296
     142    Left = 298
     143    Top = 355
    144144    object MenuItem4: TMenuItem
    145145      Action = AAdd
  • trunk/Forms/FormAcronyms.pas

    r218 r219  
    1 unit UFormAcronyms;
    2 
    3 {$mode delphi}
     1unit FormAcronyms;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   Menus, ActnList, UListViewSort, UAcronym, LazUTF8, fgl;
     7  Menus, ActnList, ListViewSort, Acronym, LazUTF8, Generics.Collections,
     8  Generics.Defaults, FormEx;
    109
    1110type
     
    1312  { TFormAcronyms }
    1413
    15   TFormAcronyms = class(TForm)
     14  TFormAcronyms = class(TFormEx)
    1615    AAdd: TAction;
    1716    ASelectAll: TAction;
     
    3635    procedure ARemoveExecute(Sender: TObject);
    3736    procedure ASelectAllExecute(Sender: TObject);
    38     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3937    procedure FormCreate(Sender: TObject);
    4038    procedure FormShow(Sender: TObject);
     
    5250    FAcronyms: TAcronyms;
    5351    MeaningCount: Integer;
    54     procedure FilterList(List: TFPGObjectList<TObject>);
     52    function AcronymComparer(constref Item1, Item2: TAcronym): Integer;
     53    procedure FilterList(List: TObjectList<TObject>);
    5554    procedure SetAcronyms(AValue: TAcronyms);
    5655    procedure UpdateAcronymsList;
     
    6160  end;
    6261
    63 var
    64   FormAcronyms: TFormAcronyms;
    6562
    6663implementation
     
    6966
    7067uses
    71   UCore, UFormMain, UFormAcronym;
     68  Core, FormAcronym;
    7269
    7370resourcestring
     
    117114  I: Integer;
    118115begin
    119   Core.PersistentForm1.Load(Self);
    120116  ListViewFilter1.UpdateFromListView(ListViewAcronyms);
    121117  UpdateAcronymsList;
    122   Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI);
     118  Core.Core.ScaleDPI1.ScaleControl(ToolBar1, Core.Core.ScaleDPI1.DesignDPI);
    123119
    124120  // Focus line with acronym
     
    140136  Meaning: TAcronymMeaning;
    141137  I: Integer;
     138  FormAcronym: TFormAcronym;
    142139begin
    143140  TempEntry := TAcronymEntry.Create;
     
    175172  Meaning: TAcronymMeaning;
    176173  I: Integer;
     174  FormAcronym: TFormAcronym;
    177175begin
    178176  if Assigned(ListViewAcronyms.Selected) then
     
    194192        (TempEntry.Meaning <> Name) or
    195193        (TempEntry.Description <> Description) or
    196         not FormMain.CompareStrings(TempEntry.Categories, TempCategories) then begin
     194        not Core.Core.CompareStrings(TempEntry.Categories, TempCategories) then begin
    197195          // TODO: Update item inplace if possible
    198196          Acronyms.Db.RemoveMeaning(TAcronymMeaning(ListViewAcronyms.Selected.Data));
     
    246244end;
    247245
    248 procedure TFormAcronyms.FormClose(Sender: TObject; var CloseAction: TCloseAction
    249   );
    250 begin
    251   Core.PersistentForm1.Save(Self);
    252 end;
    253 
    254246procedure TFormAcronyms.FormCreate(Sender: TObject);
    255247var
     
    258250  FocusAcronym := nil;
    259251  MeaningCount := 0;
    260   Core.Translator.TranslateComponentRecursive(Self);
    261   Core.ThemeManager.UseTheme(Self);
    262252  for I := 0 to ToolBar1.ButtonCount - 1 do
    263253    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
     
    288278end;
    289279
     280function TFormAcronyms.AcronymComparer(constref Item1, Item2: TAcronym): Integer;
     281begin
     282  Result := CompareStr(TAcronym(Item1).Name, TAcronym(Item2).Name);
     283end;
     284
    290285procedure TFormAcronyms.ListViewSort1Filter(ListViewSort: TListViewSort);
    291286begin
    292   Acronyms.Db.Acronyms.Sort(AcronymComparer);
     287  Acronyms.Db.Acronyms.Sort(TComparer<TAcronym>.Construct(AcronymComparer));
    293288  Acronyms.Db.AssignToList(ListViewSort1.List);
    294289  MeaningCount := ListViewSort1.List.Count;
     
    296291end;
    297292
    298 procedure TFormAcronyms.FilterList(List: TFPGObjectList<TObject>);
     293procedure TFormAcronyms.FilterList(List: TObjectList<TObject>);
    299294var
    300295  I: Integer;
  • trunk/Forms/FormCategories.lfm

    r218 r219  
    11object FormCategories: TFormCategories
    22  Left = 516
    3   Height = 429
     3  Height = 515
    44  Top = 439
    5   Width = 784
     5  Width = 941
    66  Caption = 'Acronym categories'
    7   ClientHeight = 429
    8   ClientWidth = 784
    9   DesignTimePPI = 120
    10   OnClose = FormClose
     7  ClientHeight = 515
     8  ClientWidth = 941
     9  DesignTimePPI = 144
    1110  OnCreate = FormCreate
    1211  OnShow = FormShow
    1312  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     13  LCLVersion = '3.6.0.0'
    1514  object ListViewCategories: TListView
    16     Left = 4
    17     Height = 395
    18     Top = 4
    19     Width = 776
     15    Left = 5
     16    Height = 472
     17    Top = 5
     18    Width = 931
    2019    Align = alClient
    21     BorderSpacing.Around = 4
     20    BorderSpacing.Around = 5
    2221    Checkboxes = True
    2322    Columns = <   
    2423      item
    2524        Caption = 'Name'
    26         Width = 300
     25        Width = 360
    2726      end   
    2827      item
    2928        Caption = 'Used count'
    30         Width = 456
     29        Width = 556
    3130      end>
    3231    MultiSelect = True
     
    4544  object ToolBar1: TToolBar
    4645    Left = 0
    47     Height = 26
    48     Top = 403
    49     Width = 784
     46    Height = 33
     47    Top = 482
     48    Width = 941
    5049    Align = alBottom
    5150    Images = Core.ImageList1
     
    5958    end
    6059    object ToolButton2: TToolButton
    61       Left = 30
     60      Left = 36
    6261      Top = 2
    6362      Action = AModify
    6463    end
    6564    object ToolButton3: TToolButton
    66       Left = 59
     65      Left = 71
    6766      Top = 2
    6867      Action = ARemove
     
    7170  object ActionList1: TActionList
    7271    Images = Core.ImageList1
    73     left = 380
    74     top = 196
     72    Left = 456
     73    Top = 235
    7574    object AAdd: TAction
    7675      Caption = 'Add'
     
    107106  object PopupMenuCategory: TPopupMenu
    108107    Images = Core.ImageList1
    109     left = 119
    110     top = 192
     108    Left = 143
     109    Top = 230
    111110    object MenuItem1: TMenuItem
    112111      Action = AAdd
     
    137136    Column = 0
    138137    Order = soNone
    139     left = 536
    140     top = 184
     138    Left = 643
     139    Top = 221
    141140  end
    142141end
  • trunk/Forms/FormCategories.pas

    r218 r219  
    1 unit UFormCategories;
    2 
    3 {$mode delphi}
     1unit FormCategories;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   ActnList, Menus, UAcronym, UListViewSort;
     7  ActnList, Menus, Acronym, ListViewSort, FormEx;
    108
    119type
     
    1311  { TFormCategories }
    1412
    15   TFormCategories = class(TForm)
     13  TFormCategories = class(TFormEx)
    1614    AAdd: TAction;
    1715    AEnable: TAction;
     
    4139    procedure ARemoveExecute(Sender: TObject);
    4240    procedure ASelectAllExecute(Sender: TObject);
    43     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    4441    procedure FormCreate(Sender: TObject);
    4542    procedure FormShow(Sender: TObject);
     
    5350    function ListViewSort1CompareItem(Item1, Item2: TObject): Integer;
    5451    procedure ListViewSort1Filter(ListViewSort: TListViewSort);
    55   private
    56     { private declarations }
    5752  public
    5853    Categories: TAcronymCategories;
     
    6156  end;
    6257
    63 var
    64   FormCategories: TFormCategories;
    6558
    6659implementation
     
    6962
    7063uses
    71   UCore;
     64  Core;
    7265
    7366resourcestring
     
    8275procedure TFormCategories.FormShow(Sender: TObject);
    8376begin
    84   Core.PersistentForm1.Load(Self);
    8577  UpdateList;
    86   Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI);
     78  Core.Core.ScaleDPI1.ScaleControl(ToolBar1, Core.Core.ScaleDPI1.DesignDPI);
    8779end;
    8880
     
    9284  if Assigned(Item) and (Change = ctState) then begin
    9385    TAcronymCategory(Item.Data).Enabled := Item.Checked;
    94     Core.AcronymDb.Modified := True;
     86    Core.Core.AcronymDb.Modified := True;
    9587  end;
    9688end;
     
    10294  S := InputBox(SCategory, SCategoryQuery, '');
    10395  if S <> '' then begin
    104     if not Assigned(Core.AcronymDb.Categories.SearchByName(S)) then begin;
    105       TAcronymCategory(Core.AcronymDb.Categories[Core.AcronymDb.Categories.Add(TAcronymCategory.Create)]).Name := S;
    106       Core.AcronymDb.Modified := True;
    107       Core.AcronymDb.Update;
     96    if not Assigned(Core.Core.AcronymDb.Categories.SearchByName(S)) then begin;
     97      TAcronymCategory(Core.Core.AcronymDb.Categories[Core.Core.AcronymDb.Categories.Add(TAcronymCategory.Create)]).Name := S;
     98      Core.Core.AcronymDb.Modified := True;
     99      Core.Core.AcronymDb.Update;
    108100      UpdateList;
    109101    end else ShowMessage(Format(SCategoryAlreadyExists, [S]));
     
    118110  if ListViewCategories.Items[I].Selected then begin
    119111    TAcronymCategory(ListViewCategories.Items[I].Data).Enabled := False;
    120     Core.AcronymDb.Modified := True;
     112    Core.Core.AcronymDb.Modified := True;
    121113  end;
    122114  UpdateList;
     
    130122  if ListViewCategories.Items[I].Selected then begin
    131123    TAcronymCategory(ListViewCategories.Items[I].Data).Enabled := True;
    132     Core.AcronymDb.Modified := True;
     124    Core.Core.AcronymDb.Modified := True;
    133125  end;
    134126  UpdateList;
     
    142134    S := InputBox(SCategory, SCategoryQuery, ListViewCategories.Selected.Caption);
    143135    if S <> ListViewCategories.Selected.Caption then begin
    144       if not Assigned(Core.AcronymDb.Categories.SearchByName(S)) then begin;
     136      if not Assigned(Core.Core.AcronymDb.Categories.SearchByName(S)) then begin;
    145137        TAcronymCategory(ListViewCategories.Selected.Data).Name := S;
    146         Core.AcronymDb.Modified := True;
    147         Core.AcronymDb.Update;
     138        Core.Core.AcronymDb.Modified := True;
     139        Core.Core.AcronymDb.Update;
    148140        UpdateList;
    149141      end else ShowMessage(Format(SCategoryAlreadyExists, [S]));
     
    177169end;
    178170
    179 procedure TFormCategories.FormClose(Sender: TObject;
    180   var CloseAction: TCloseAction);
    181 begin
    182   Core.PersistentForm1.Save(Self);
    183 end;
    184 
    185171procedure TFormCategories.FormCreate(Sender: TObject);
    186172var
    187173  I: Integer;
    188174begin
    189   Core.Translator.TranslateComponentRecursive(Self);
    190   Core.ThemeManager.UseTheme(Self);
    191175  for I := 0 to ToolBar1.ButtonCount - 1 do
    192176    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
     
    237221procedure TFormCategories.ListViewSort1Filter(ListViewSort: TListViewSort);
    238222begin
    239   Core.AcronymDb.Categories.AssignToList(ListViewSort1.List);
     223  Core.Core.AcronymDb.Categories.AssignToList(ListViewSort1.List);
    240224end;
    241225
     
    243227begin
    244228  ListViewSort1.Refresh;
    245   ListViewCategories.Items.Count := Core.AcronymDb.Categories.Count;
     229  ListViewCategories.Items.Count := Core.Core.AcronymDb.Categories.Count;
    246230  ListViewCategories.Refresh;
    247231  UpdateInterface;
  • trunk/Forms/FormCategorySelect.lfm

    r218 r219  
    11object FormCategorySelect: TFormCategorySelect
    22  Left = 500
    3   Height = 584
     3  Height = 701
    44  Top = 253
    5   Width = 791
     5  Width = 949
    66  Caption = 'Select categories'
    7   ClientHeight = 584
    8   ClientWidth = 791
    9   DesignTimePPI = 120
    10   OnCreate = FormCreate
    11   OnShow = FormShow
     7  ClientHeight = 701
     8  ClientWidth = 949
     9  DesignTimePPI = 144
    1210  Position = poScreenCenter
    13   LCLVersion = '2.0.2.0'
     11  LCLVersion = '3.6.0.0'
    1412  object ListBox1: TListBox
    15     Left = 16
    16     Height = 518
    17     Top = 8
    18     Width = 761
     13    Left = 19
     14    Height = 621
     15    Top = 10
     16    Width = 913
    1917    Anchors = [akTop, akLeft, akRight, akBottom]
    2018    ItemHeight = 0
    2119    MultiSelect = True
     20    ScrollWidth = 762
     21    TabOrder = 0
     22    TopIndex = -1
    2223    OnDblClick = ListBox1DblClick
    2324    OnKeyPress = ListBox1KeyPress
    24     ScrollWidth = 762
    25     TabOrder = 0
    2625  end
    2726  object ButtonOk: TButton
    28     Left = 701
    29     Height = 25
    30     Top = 541
    31     Width = 75
     27    Left = 841
     28    Height = 30
     29    Top = 649
     30    Width = 90
    3231    Anchors = [akRight, akBottom]
    3332    Caption = 'Select'
     
    3635  end
    3736  object ButtonCancel: TButton
    38     Left = 605
    39     Height = 25
    40     Top = 542
    41     Width = 75
     37    Left = 726
     38    Height = 30
     39    Top = 651
     40    Width = 90
    4241    Anchors = [akRight, akBottom]
    4342    Caption = 'Cancel'
  • trunk/Forms/FormCategorySelect.pas

    r218 r219  
    1 unit UFormCategorySelect;
    2 
    3 {$mode delphi}
     1unit FormCategorySelect;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UAcronym;
     7  Acronym, FormEx;
    108
    119type
     
    1311  { TFormCategorySelect }
    1412
    15   TFormCategorySelect = class(TForm)
     13  TFormCategorySelect = class(TFormeX)
    1614    ButtonOk: TButton;
    1715    ButtonCancel: TButton;
    1816    ListBox1: TListBox;
    19     procedure FormCreate(Sender: TObject);
    20     procedure FormShow(Sender: TObject);
    2117    procedure ListBox1DblClick(Sender: TObject);
    2218    procedure ListBox1KeyPress(Sender: TObject; var Key: char);
    23   private
    24     { private declarations }
    2519  public
    2620    procedure Load(RemoveItems: TStrings);
    2721  end;
    28 
    29 var
    30   FormCategorySelect: TFormCategorySelect;
    3122
    3223resourcestring
     
    3526  SRemoveCategoryQuery = 'Do you really want to remove selected categories?';
    3627
     28
    3729implementation
    3830
     
    4032
    4133uses
    42   UCore;
     34  Core;
    4335
    4436{ TFormCategorySelect }
    45 
    46 procedure TFormCategorySelect.FormShow(Sender: TObject);
    47 begin
    48 end;
    49 
    50 procedure TFormCategorySelect.FormCreate(Sender: TObject);
    51 begin
    52   Core.Translator.TranslateComponentRecursive(Self);
    53   Core.ThemeManager.UseTheme(Self);
    54 end;
    5537
    5638procedure TFormCategorySelect.ListBox1DblClick(Sender: TObject);
     
    6951  I: Integer;
    7052begin
    71   with Core.AcronymDb do begin
     53  with Core.Core.AcronymDb do begin
    7254    ListBox1.Sorted := False;
    7355    while ListBox1.Items.Count < Categories.Count do
     
    7658      ListBox1.Items.Delete(ListBox1.Items.Count - 1);
    7759    for I := 0 to Categories.Count - 1 do begin
    78       ListBox1.Items.Strings[I] := TAcronymCategory(Categories[I]).Name;
     60      ListBox1.Items.Strings[I] := Categories[I].Name;
    7961      ListBox1.Items.Objects[I] := Categories[I];
    8062      ListBox1.Selected[I] := False;
  • trunk/Forms/FormCheck.lfm

    r218 r219  
    11object FormCheck: TFormCheck
    22  Left = 483
    3   Height = 635
     3  Height = 762
    44  Top = 257
    5   Width = 891
     5  Width = 1069
    66  Caption = 'Check document'
    7   ClientHeight = 635
    8   ClientWidth = 891
    9   DesignTimePPI = 120
    10   OnClose = FormClose
     7  ClientHeight = 762
     8  ClientWidth = 1069
     9  DesignTimePPI = 144
    1110  OnCreate = FormCreate
    1211  OnDestroy = FormDestroy
    1312  OnShow = FormShow
    14   LCLVersion = '2.0.2.0'
     13  LCLVersion = '3.6.0.0'
    1514  object Panel1: TPanel
    1615    Left = 0
    17     Height = 635
     16    Height = 762
    1817    Top = 0
    19     Width = 224
     18    Width = 269
    2019    Align = alLeft
    2120    BevelOuter = bvNone
    22     ClientHeight = 635
    23     ClientWidth = 224
     21    ClientHeight = 762
     22    ClientWidth = 269
    2423    TabOrder = 0
    2524    object ButtonCheck: TButton
    26       Left = 11
    27       Height = 31
    28       Top = 13
    29       Width = 94
     25      Left = 13
     26      Height = 37
     27      Top = 16
     28      Width = 113
    3029      Caption = 'Check'
     30      TabOrder = 0
    3131      OnClick = ButtonCheckClick
    32       TabOrder = 0
    3332    end
    3433    object GroupBox1: TGroupBox
    35       Left = 11
    36       Height = 217
    37       Top = 199
    38       Width = 206
     34      Left = 13
     35      Height = 260
     36      Top = 239
     37      Width = 248
    3938      Anchors = [akTop, akLeft, akRight]
    4039      Caption = 'Summary section'
    41       ClientHeight = 192
    42       ClientWidth = 202
     40      ClientHeight = 233
     41      ClientWidth = 246
    4342      TabOrder = 1
    4443      object ButtonAcronymsSummary: TButton
    45         Left = 6
    46         Height = 31
    47         Top = 8
    48         Width = 150
     44        Left = 7
     45        Height = 37
     46        Top = 10
     47        Width = 180
    4948        Caption = 'Acronyms'
     49        TabOrder = 0
    5050        OnClick = ButtonAcronymsSummaryClick
    51         TabOrder = 0
    5251      end
    5352      object LabelAcronymCountSummary: TLabel
    54         Left = 6
    55         Height = 20
    56         Top = 48
    57         Width = 103
     53        Left = 7
     54        Height = 26
     55        Top = 58
     56        Width = 134
    5857        Caption = 'Acronym count:'
    5958        ParentColor = False
    6059      end
    6160      object Label1: TLabel
    62         Left = 8
    63         Height = 20
    64         Top = 72
    65         Width = 75
     61        Left = 10
     62        Height = 26
     63        Top = 86
     64        Width = 98
    6665        Caption = 'Start string:'
    6766        ParentColor = False
    6867      end
    6968      object EditSummaryStart: TEdit
    70         Left = 8
    71         Height = 28
    72         Top = 96
    73         Width = 184
     69        Left = 10
     70        Height = 43
     71        Top = 115
     72        Width = 224
    7473        Anchors = [akTop, akLeft, akRight]
    7574        TabOrder = 1
    7675      end
    7776      object Label2: TLabel
    78         Left = 8
    79         Height = 20
    80         Top = 128
    81         Width = 69
     77        Left = 10
     78        Height = 26
     79        Top = 154
     80        Width = 91
    8281        Caption = 'End string:'
    8382        ParentColor = False
    8483      end
    8584      object EditSummaryEnd: TEdit
    86         Left = 8
    87         Height = 28
    88         Top = 152
    89         Width = 184
     85        Left = 10
     86        Height = 43
     87        Top = 182
     88        Width = 224
    9089        Anchors = [akTop, akLeft, akRight]
    9190        TabOrder = 2
     
    9392    end
    9493    object GroupBox2: TGroupBox
    95       Left = 11
    96       Height = 99
    97       Top = 96
    98       Width = 207
     94      Left = 13
     95      Height = 119
     96      Top = 115
     97      Width = 249
    9998      Anchors = [akTop, akLeft, akRight]
    10099      Caption = 'Content'
    101       ClientHeight = 74
    102       ClientWidth = 203
     100      ClientHeight = 92
     101      ClientWidth = 247
    103102      TabOrder = 2
    104103      object ButtonAcronymsContent: TButton
    105         Left = 8
    106         Height = 31
     104        Left = 10
     105        Height = 37
    107106        Top = 0
    108         Width = 150
     107        Width = 180
    109108        Caption = 'Acronyms'
     109        TabOrder = 0
    110110        OnClick = ButtonAcronymsContentClick
    111         TabOrder = 0
    112111      end
    113112      object LabelAcronymCountContent: TLabel
    114         Left = 8
    115         Height = 20
    116         Top = 40
    117         Width = 103
     113        Left = 10
     114        Height = 26
     115        Top = 48
     116        Width = 134
    118117        Caption = 'Acronym count:'
    119118        ParentColor = False
     
    121120    end
    122121    object ButtonLoadFromFile: TButton
    123       Left = 11
    124       Height = 31
    125       Top = 48
    126       Width = 134
     122      Left = 13
     123      Height = 37
     124      Top = 58
     125      Width = 161
    127126      Caption = 'Load from file'
     127      TabOrder = 3
    128128      OnClick = ButtonLoadFromFileClick
    129       TabOrder = 3
    130129    end
    131130    object CheckBoxCaseSensitive: TCheckBox
    132       Left = 11
    133       Height = 24
    134       Top = 424
    135       Width = 197
     131      Left = 13
     132      Height = 30
     133      Top = 509
     134      Width = 251
    136135      Caption = 'Case sensitive comparison'
    137136      TabOrder = 4
     
    139138  end
    140139  object Splitter1: TSplitter
    141     Left = 224
    142     Height = 635
     140    Left = 269
     141    Height = 762
    143142    Top = 0
    144     Width = 6
     143    Width = 7
    145144  end
    146145  object Panel2: TPanel
    147     Left = 230
    148     Height = 635
     146    Left = 276
     147    Height = 762
    149148    Top = 0
    150     Width = 661
     149    Width = 793
    151150    Align = alClient
    152151    BevelOuter = bvNone
    153     ClientHeight = 635
    154     ClientWidth = 661
     152    ClientHeight = 762
     153    ClientWidth = 793
    155154    TabOrder = 2
    156155    object PageControl1: TPageControl
    157       Left = 8
    158       Height = 619
    159       Top = 8
    160       Width = 645
     156      Left = 10
     157      Height = 742
     158      Top = 10
     159      Width = 773
    161160      ActivePage = TabSheetReport
    162161      Align = alClient
    163       BorderSpacing.Around = 8
     162      BorderSpacing.Around = 10
    164163      TabIndex = 1
    165164      TabOrder = 0
    166165      object TabSheetSource: TTabSheet
    167166        Caption = 'Source'
    168         ClientHeight = 586
    169         ClientWidth = 637
     167        ClientHeight = 702
     168        ClientWidth = 763
    170169        object MemoDocument: TMemo
    171           Left = 8
    172           Height = 570
    173           Top = 8
    174           Width = 620
     170          Left = 10
     171          Height = 682
     172          Top = 10
     173          Width = 742
    175174          Anchors = [akTop, akLeft, akRight, akBottom]
    176175          ScrollBars = ssAutoBoth
     
    181180      object TabSheetReport: TTabSheet
    182181        Caption = 'Report'
    183         ClientHeight = 586
    184         ClientWidth = 637
     182        ClientHeight = 702
     183        ClientWidth = 763
    185184        object ListViewReport: TListView
    186           Left = 7
    187           Height = 564
    188           Top = 13
    189           Width = 625
     185          Left = 8
     186          Height = 675
     187          Top = 16
     188          Width = 749
    190189          Anchors = [akTop, akLeft, akRight, akBottom]
    191190          Columns = <         
    192191            item
    193192              Caption = 'Position'
    194               Width = 80
     193              Width = 96
    195194            end         
    196195            item
    197196              Caption = 'Type'
    198               Width = 100
     197              Width = 120
    199198            end         
    200199            item
    201200              Caption = 'Message'
    202               Width = 800
     201              Width = 960
    203202            end>
    204203          OwnerData = True
     
    216215    DefaultExt = '.txt'
    217216    Filter = 'Text files (.txt)|*.txt|Any file|*.*'
    218     left = 544
    219     top = 288
     217    Left = 653
     218    Top = 346
    220219  end
    221220  object PopupMenuReport: TPopupMenu
    222     left = 376
    223     top = 202
     221    Left = 451
     222    Top = 242
    224223    object MenuItemGoTo: TMenuItem
    225224      Action = AGoToLocation
     
    231230  end
    232231  object ActionList1: TActionList
    233     left = 546
    234     top = 203
     232    Left = 655
     233    Top = 244
    235234    object ASaveToCsv: TAction
    236235      Caption = 'Save to CSV...'
     
    243242  end
    244243  object SaveDialog1: TSaveDialog
    245     left = 378
    246     top = 288
     244    Left = 454
     245    Top = 346
    247246  end
    248247end
  • trunk/Forms/FormCheck.pas

    r218 r219  
    1 unit UFormCheck;
    2 
    3 {$mode delphi}
     1unit FormCheck;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, LazFileUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ExtCtrls, ComCtrls, Menus, ActnList, UAcronym, URegistry, Registry, UCommon,
    10   fgl;
     7  ExtCtrls, ComCtrls, Menus, ActnList, Acronym, RegistryEx, Registry, Common,
     8  Generics.Collections;
    119
    1210type
     
    2119  { TReportItems }
    2220
    23   TReportItems = class(TFPGObjectList<TReportItem>)
     21  TReportItems = class(TObjectList<TReportItem>)
    2422    function AddNew(Message: string; Position: TPoint;
    2523      Kind: TReportType = rtNone): TReportItem;
     
    6563    procedure ButtonCheckClick(Sender: TObject);
    6664    procedure ButtonLoadFromFileClick(Sender: TObject);
    67     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    6865    procedure FormCreate(Sender: TObject);
    6966    procedure FormDestroy(Sender: TObject);
     
    9895  end;
    9996
    100 var
    101   FormCheck: TFormCheck;
    102 
    10397const
    10498  ReportTypeString: array[TReportType] of string = ('', 'Note', 'Warning', 'Error');
     
    110104
    111105uses
    112   UFormAcronyms, UCore;
     106  FormAcronyms, Core;
    113107
    114108resourcestring
     
    198192end;
    199193
    200 procedure TFormCheck.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    201 begin
    202   Core.PersistentForm1.Save(Self);
    203 end;
    204 
    205194procedure TFormCheck.FormCreate(Sender: TObject);
    206195begin
    207196  AcronymDbSummary := TAcronymDb.Create;
    208197  AcronymDbContent := TAcronymDb.Create;
    209   Core.Translator.TranslateComponentRecursive(Self);
    210   Core.ThemeManager.UseTheme(Self);
    211198  ReportItems := TReportItems.Create;
    212199end;
     
    214201procedure TFormCheck.FormDestroy(Sender: TObject);
    215202begin
    216   ReportItems.Free;
    217   AcronymDbSummary.Free;
    218   AcronymDbContent.Free;
     203  FreeAndNil(ReportItems);
     204  FreeAndNil(AcronymDbSummary);
     205  FreeAndNil(AcronymDbContent);
    219206end;
    220207
     
    222209begin
    223210  PageControl1.TabIndex := 0;
    224   Core.PersistentForm1.Load(Self);
    225211  if FileExists(LastDocumentFileName) then
    226212    MemoDocument.Lines.LoadFromFile(LastDocumentFileName);
     
    724710  with TRegistryEx.Create do
    725711  try
    726     RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot];
    727     OpenKey(Core.ApplicationInfo1.RegistryKey, True);
     712    RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot];
     713    OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True);
    728714    EditSummaryStart.Text := ReadStringWithDefault('SummaryStart', 'ACRONYMS AND ABBREVIATIONS');
    729715    EditSummaryEnd.Text := ReadStringWithDefault('SummaryEnd', 'Appendix');
     
    739725  with TRegistryEx.Create do
    740726  try
    741     RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot];
    742     OpenKey(Core.ApplicationInfo1.RegistryKey, True);
     727    RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot];
     728    OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True);
    743729    WriteString('SummaryStart', EditSummaryStart.Text);
    744730    WriteString('SummaryEnd', EditSummaryEnd.Text);
  • trunk/Forms/FormExport.lfm

    r218 r219  
    11object FormExport: TFormExport
    22  Left = 281
    3   Height = 654
     3  Height = 785
    44  Top = 221
    5   Width = 850
     5  Width = 1020
    66  Caption = 'Export'
    7   ClientHeight = 654
    8   ClientWidth = 850
    9   DesignTimePPI = 120
    10   OnClose = FormClose
    11   OnCreate = FormCreate
    12   OnShow = FormShow
     7  ClientHeight = 785
     8  ClientWidth = 1020
     9  DesignTimePPI = 144
    1310  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     11  LCLVersion = '3.6.0.0'
    1512  object ButtonProcess: TButton
    16     Left = 18
    17     Height = 33
    18     Top = 9
    19     Width = 139
     13    Left = 22
     14    Height = 40
     15    Top = 11
     16    Width = 167
    2017    Caption = 'Process'
     18    TabOrder = 0
    2119    OnClick = ButtonProcessClick
    22     TabOrder = 0
    2320  end
    2421  object ComboBoxDataFormat: TComboBox
    25     Left = 341
    26     Height = 28
    27     Top = 5
    28     Width = 182
    29     ItemHeight = 20
     22    Left = 409
     23    Height = 38
     24    Top = 6
     25    Width = 218
     26    ItemHeight = 0
    3027    ItemIndex = 0
    3128    Items.Strings = (
     
    3936  end
    4037  object ButtonSaveToFile: TButton
    41     Left = 653
    42     Height = 33
    43     Top = 9
    44     Width = 181
     38    Left = 784
     39    Height = 40
     40    Top = 11
     41    Width = 217
    4542    Anchors = [akTop, akRight]
    4643    Caption = 'Save to file'
     44    TabOrder = 2
    4745    OnClick = ButtonSaveToFileClick
    48     TabOrder = 2
    4946  end
    5047  object Memo1: TMemo
    51     Left = 8
    52     Height = 597
    53     Top = 51
    54     Width = 830
     48    Left = 10
     49    Height = 717
     50    Top = 61
     51    Width = 996
    5552    Anchors = [akTop, akLeft, akRight, akBottom]
    5653    ScrollBars = ssAutoBoth
     
    5855  end
    5956  object SaveDialog1: TSaveDialog
    60     left = 395
    61     top = 124
     57    Left = 474
     58    Top = 149
    6259  end
    6360end
  • trunk/Forms/FormExport.pas

    r218 r219  
    1 unit UFormExport;
    2 
    3 {$mode delphi}
     1unit FormExport;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UJobProgressView;
     7  JobProgressView;
    108
    119type
     
    2119    procedure ButtonProcessClick(Sender: TObject);
    2220    procedure ButtonSaveToFileClick(Sender: TObject);
    23     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    24     procedure FormCreate(Sender: TObject);
    25     procedure FormShow(Sender: TObject);
    2621  private
    2722    ItemCount: Integer;
     
    3025    procedure JobExportMediaWiki(Job: TJob);
    3126    procedure JobExportMediaWikiTable(Job: TJob);
    32   public
    33     { public declarations }
    3427  end;
    3528
    36 var
    37   FormExport: TFormExport;
    3829
    3930implementation
     
    4233
    4334uses
    44   UCore, UAcronym;
     35  Core, Acronym;
    4536
    4637resourcestring
     
    6051end;
    6152
    62 procedure TFormExport.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    63 begin
    64   Core.PersistentForm1.Save(Self);
    65 end;
    66 
    67 procedure TFormExport.FormCreate(Sender: TObject);
    68 begin
    69   Core.Translator.TranslateComponentRecursive(Self);
    70   Core.ThemeManager.UseTheme(Self);
    71 end;
    72 
    73 procedure TFormExport.FormShow(Sender: TObject);
    74 begin
    75   Core.PersistentForm1.Load(Self);
    76 end;
    77 
    7853procedure TFormExport.JobExportCSV(Job: TJob);
    7954var
     
    8156  J: Integer;
    8257begin
    83   Job.Progress.Max := Core.AcronymDb.Acronyms.Count;
     58  Job.Progress.Max := Core.Core.AcronymDb.Acronyms.Count;
    8459  ItemCount := 0;
    8560  Content := '';
    86   for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
    87   with TAcronym(Core.AcronymDb.Acronyms[I]) do begin
     61  for I := 0 to Core.Core.AcronymDb.Acronyms.Count - 1 do
     62  with Core.Core.AcronymDb.Acronyms[I] do begin
    8863    for J := 0 to Meanings.Count - 1 do
    89     with TAcronymMeaning(Meanings[J]) do begin
     64    with Meanings[J] do begin
    9065      Content := Content + '"' + Acronym.Name + '","' + Name + '","' + Description + '","' + Categories.GetString + '"' + LineEnding;
    9166      Inc(ItemCount);
     
    10176  J: Integer;
    10277begin
    103   Job.Progress.Max := Core.AcronymDb.Acronyms.Count;
     78  Job.Progress.Max := Core.Core.AcronymDb.Acronyms.Count;
    10479  ItemCount := 0;
    10580  Content := '';
    106   for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
    107   with TAcronym(Core.AcronymDb.Acronyms[I]) do begin
     81  for I := 0 to Core.Core.AcronymDb.Acronyms.Count - 1 do
     82  with Core.Core.AcronymDb.Acronyms[I] do begin
    10883    Content := Content + '; ' + Name + LineEnding;
    10984    for J := 0 to Meanings.Count - 1 do
    110     with TAcronymMeaning(Meanings[J]) do begin
     85    with Meanings[J] do begin
    11186      Content := Content + ': ' + Name + LineEnding;
    11287      Inc(ItemCount);
     
    12297  J: Integer;
    12398begin
    124   Job.Progress.Max := Core.AcronymDb.Acronyms.Count;
     99  Job.Progress.Max := Core.Core.AcronymDb.Acronyms.Count;
    125100  ItemCount := 0;
    126101  Content := '{| class="wikitable sortable"' + LineEnding +
    127102    '! Name !! Meaning !! Description !! Categories' + LineEnding;
    128   for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
    129   with TAcronym(Core.AcronymDb.Acronyms[I]) do begin
     103  for I := 0 to Core.Core.AcronymDb.Acronyms.Count - 1 do
     104  with Core.Core.AcronymDb.Acronyms[I] do begin
    130105    for J := 0 to Meanings.Count - 1 do
    131     with TAcronymMeaning(Meanings[J]) do begin
     106    with Meanings[J] do begin
    132107      Content := Content + '|-' + LineEnding +
    133108        '| ' + Acronym.Name + LineEnding + '| ' + Name + LineEnding +
     
    144119begin
    145120  if ComboBoxDataFormat.ItemIndex = 0 then
    146     Core.JobProgressView1.AddJob(SExporting, JobExportCSV);
     121    Core.Core.JobProgressView1.AddJob(SExporting, JobExportCSV);
    147122  if ComboBoxDataFormat.ItemIndex = 1 then
    148     Core.JobProgressView1.AddJob(SExporting, JobExportMediaWiki);
     123    Core.Core.JobProgressView1.AddJob(SExporting, JobExportMediaWiki);
    149124  if ComboBoxDataFormat.ItemIndex = 2 then
    150     Core.JobProgressView1.AddJob(SExporting, JobExportMediaWikiTable);
    151   Core.JobProgressView1.Start;
     125    Core.Core.JobProgressView1.AddJob(SExporting, JobExportMediaWikiTable);
     126  Core.Core.JobProgressView1.Start;
    152127  Memo1.Lines.Text := Content;
    153128  ShowMessage(Format(SExportedAcronyms, [ItemCount]));
  • trunk/Forms/FormImport.lfm

    r218 r219  
    88  ClientWidth = 782
    99  DesignTimePPI = 144
    10   OnClose = FormClose
    11   OnCreate = FormCreate
    12   OnShow = FormShow
    1310  Position = poScreenCenter
    14   LCLVersion = '2.0.12.0'
     11  LCLVersion = '3.6.0.0'
    1512  object ButtonProcess: TButton
    1613    Left = 19
     
    1916    Width = 128
    2017    Caption = 'Process'
    21     OnClick = ButtonProcessClick
    2218    ParentFont = False
    2319    TabOrder = 0
     20    OnClick = ButtonProcessClick
    2421  end
    2522  object Memo1: TMemo
     
    5148  object Label1: TLabel
    5249    Left = 184
    53     Height = 24
     50    Height = 26
    5451    Top = 11
    5552    Width = 106
     
    6562    Anchors = [akTop, akRight]
    6663    Caption = 'Load from file'
    67     OnClick = ButtonLoadFromFileClick
    6864    ParentFont = False
    6965    TabOrder = 2
     66    OnClick = ButtonLoadFromFileClick
    7067  end
    7168  object OpenDialog1: TOpenDialog
  • trunk/Forms/FormImport.pas

    r218 r219  
    1 unit UFormImport;
    2 
    3 {$mode delphi}{$H+}
     1unit FormImport;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UAcronym;
     7  Acronym, FormEx;
    108
    119type
     
    1311  { TFormImport }
    1412
    15   TFormImport = class(TForm)
     13  TFormImport = class(TFormEx)
    1614    ButtonLoadFromFile: TButton;
    1715    ButtonProcess: TButton;
     
    2220    procedure ButtonProcessClick(Sender: TObject);
    2321    procedure ButtonLoadFromFileClick(Sender: TObject);
    24     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    25     procedure FormCreate(Sender: TObject);
    26     procedure FormShow(Sender: TObject);
    2722  private
    2823    procedure ImportMediaWiki;
    2924    procedure ImportCSV;
    30   public
    31     { public declarations }
    3225  end;
    3326
    34 var
    35   FormImport: TFormImport;
    3627
    3728implementation
     
    4031
    4132uses
    42   UCore;
     33  Core;
    4334
    4435resourcestring
    4536  SImportedNewAcronyms = 'Imported %d new acronyms.';
    46 
    4737
    4838{ TFormImport }
     
    6050  if OpenDialog1.Execute then
    6151    Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
    62 end;
    63 
    64 procedure TFormImport.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    65 begin
    66   Core.PersistentForm1.Save(Self);
    67 end;
    68 
    69 procedure TFormImport.FormCreate(Sender: TObject);
    70 begin
    71   Core.Translator.TranslateComponentRecursive(Self);
    72   Core.ThemeManager.UseTheme(Self);
    73 end;
    74 
    75 procedure TFormImport.FormShow(Sender: TObject);
    76 begin
    77   Core.PersistentForm1.Load(Self);
    7852end;
    7953
     
    10175      AcronymMeaning := Trim(Copy(Line, 2, Length(Line)));
    10276      if (AcronymName <> '') and (AcronymMeaning <> '') then begin
    103         Acronym := Core.AcronymDb.Acronyms.SearchByName(AcronymName);
     77        Acronym := Core.Core.AcronymDb.Acronyms.SearchByName(AcronymName);
    10478        if not Assigned(Acronym) then begin
    10579          Acronym := TAcronym.Create;
    10680          Acronym.Name := AcronymName;
    107           Core.AcronymDb.Acronyms.Add(Acronym);
     81          Core.Core.AcronymDb.Acronyms.Add(Acronym);
    10882        end;
    10983        Meaning := Acronym.Meanings.SearchByName(AcronymMeaning);
     
    11892    end;
    11993  end;
    120   if AddedCount > 0 then Core.AcronymDb.Modified := True;
     94  if AddedCount > 0 then Core.Core.AcronymDb.Modified := True;
    12195  ShowMessage(Format(SImportedNewAcronyms, [AddedCount]));
    12296end;
     
    147121      else AcronymDescription := '';
    148122    if (AcronymName <> '') and (AcronymDescription <> '') then begin
    149       Acronym := Core.AcronymDb.Acronyms.SearchByName(AcronymName);
     123      Acronym := Core.Core.AcronymDb.Acronyms.SearchByName(AcronymName);
    150124      if not Assigned(Acronym) then begin
    151125        Acronym := TAcronym.Create;
    152126        Acronym.Name := AcronymName;
    153         Core.AcronymDb.Acronyms.Add(Acronym);
     127        Core.Core.AcronymDb.Acronyms.Add(Acronym);
    154128      end;
    155129      Meaning := Acronym.Meanings.SearchByName(AcronymDescription);
     
    165139  end;
    166140  Columns.Free;
    167   if AddedCount > 0 then Core.AcronymDb.Modified := True;
     141  if AddedCount > 0 then Core.Core.AcronymDb.Modified := True;
    168142  ShowMessage(Format(SImportedNewAcronyms, [AddedCount]));
    169143end;
  • trunk/Forms/FormImportFormat.lfm

    r218 r219  
    11object FormImportFormat: TFormImportFormat
    22  Left = 462
    3   Height = 439
     3  Height = 527
    44  Top = 322
    5   Width = 629
     5  Width = 755
    66  Caption = 'Import format'
    7   ClientHeight = 439
    8   ClientWidth = 629
    9   DesignTimePPI = 120
    10   OnClose = FormClose
     7  ClientHeight = 527
     8  ClientWidth = 755
     9  DesignTimePPI = 144
    1110  OnCreate = FormCreate
    1211  OnShow = FormShow
    1312  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     13  LCLVersion = '3.6.0.0'
    1514  object ButtonOk: TButton
    16     Left = 525
    17     Height = 25
    18     Top = 390
    19     Width = 75
     15    Left = 630
     16    Height = 30
     17    Top = 468
     18    Width = 90
    2019    Anchors = [akRight, akBottom]
    2120    Caption = 'Ok'
     
    2423  end
    2524  object ButtonCancel: TButton
    26     Left = 429
    27     Height = 25
    28     Top = 390
    29     Width = 75
     25    Left = 515
     26    Height = 30
     27    Top = 468
     28    Width = 90
    3029    Anchors = [akRight, akBottom]
    3130    Caption = 'Cancel'
     
    3433  end
    3534  object Label1: TLabel
    36     Left = 20
    37     Height = 20
    38     Top = 53
    39     Width = 43
     35    Left = 24
     36    Height = 26
     37    Top = 64
     38    Width = 56
    4039    Caption = 'Name:'
    4140    ParentColor = False
    4241  end
    4342  object EditName: TEdit
    44     Left = 179
    45     Height = 28
    46     Top = 48
    47     Width = 426
     43    Left = 215
     44    Height = 43
     45    Top = 58
     46    Width = 511
    4847    Anchors = [akTop, akLeft, akRight]
    4948    TabOrder = 1
    5049  end
    5150  object Label8: TLabel
    52     Left = 20
    53     Height = 20
    54     Top = 90
    55     Width = 72
     51    Left = 24
     52    Height = 26
     53    Top = 108
     54    Width = 95
    5655    Caption = 'Block start:'
    5756    ParentColor = False
    5857  end
    5958  object EditBlockStart: TEdit
    60     Left = 179
    61     Height = 28
    62     Top = 85
    63     Width = 426
     59    Left = 215
     60    Height = 43
     61    Top = 102
     62    Width = 511
    6463    Anchors = [akTop, akLeft, akRight]
    6564    TabOrder = 2
    6665  end
    6766  object Label9: TLabel
    68     Left = 20
    69     Height = 20
    70     Top = 130
    71     Width = 68
     67    Left = 24
     68    Height = 26
     69    Top = 156
     70    Width = 89
    7271    Caption = 'Block end:'
    7372    ParentColor = False
    7473  end
    7574  object EditBlockEnd: TEdit
    76     Left = 179
    77     Height = 28
    78     Top = 125
    79     Width = 426
     75    Left = 215
     76    Height = 43
     77    Top = 150
     78    Width = 511
    8079    Anchors = [akTop, akLeft, akRight]
    8180    TabOrder = 3
    8281  end
    8382  object ListViewItemRules: TListView
    84     Left = 20
    85     Height = 198
    86     Top = 181
    87     Width = 585
     83    Left = 24
     84    Height = 238
     85    Top = 217
     86    Width = 702
    8887    Anchors = [akTop, akLeft, akRight, akBottom]
    8988    Columns = <   
    9089      item
    9190        Caption = 'Start string'
    92         Width = 100
     91        Width = 120
    9392      end   
    9493      item
    9594        Caption = 'End string'
    96         Width = 100
     95        Width = 120
    9796      end   
    9897      item
    9998        Caption = 'Action'
    100         Width = 100
     99        Width = 120
    101100      end   
    102101      item
    103102        Caption = 'Variable'
    104         Width = 100
     103        Width = 120
    105104      end   
    106105      item
    107106        Caption = 'Repetition'
    108         Width = 165
     107        Width = 207
    109108      end>
    110109    OwnerData = True
     
    118117  end
    119118  object Label2: TLabel
    120     Left = 20
    121     Height = 20
    122     Top = 157
    123     Width = 68
     119    Left = 24
     120    Height = 26
     121    Top = 188
     122    Width = 91
    124123    Caption = 'Item rules:'
    125124    ParentColor = False
    126125  end
    127126  object Label3: TLabel
    128     Left = 20
    129     Height = 20
    130     Top = 13
    131     Width = 35
     127    Left = 24
     128    Height = 26
     129    Top = 16
     130    Width = 45
    132131    Caption = 'Type:'
    133132    ParentColor = False
    134133  end
    135134  object ComboBoxType: TComboBox
    136     Left = 179
    137     Height = 28
    138     Top = 13
    139     Width = 197
    140     ItemHeight = 20
     135    Left = 215
     136    Height = 38
     137    Top = 16
     138    Width = 236
     139    ItemHeight = 0
    141140    Items.Strings = (
    142141      'Text parse HTTP'
     
    148147  end
    149148  object PopupMenu1: TPopupMenu
    150     left = 181
    151     top = 277
     149    Left = 217
     150    Top = 332
    152151    object MenuItem1: TMenuItem
    153152      Action = AAdd
     
    275274  end
    276275  object ActionList1: TActionList
    277     left = 383
    278     top = 282
     276    Left = 460
     277    Top = 338
    279278    object AAdd: TAction
    280279      Caption = 'Add'
  • trunk/Forms/FormImportFormat.pas

    r218 r219  
    1 unit UFormImportFormat;
    2 
    3 {$mode delphi}
     1unit FormImportFormat;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, Menus, ActnList, UAcronym;
     7  ComCtrls, Menus, ActnList, Acronym;
    108
    119type
     
    4341    procedure AMoveUpExecute(Sender: TObject);
    4442    procedure ARemoveExecute(Sender: TObject);
    45     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    4643    procedure FormCreate(Sender: TObject);
    4744    procedure FormShow(Sender: TObject);
    4845    procedure ListViewItemRulesData(Sender: TObject; Item: TListItem);
    49   private
    50     { private declarations }
    5146  public
    5247    ImportFormat: TImportFormat;
     
    6459
    6560uses
    66   UCore, UFormImportPattern;
     61  Core, FormImportPattern;
    6762
    6863{$R *.lfm}
     
    8075var
    8176  NewImportPattern: TImportPattern;
     77  FormImportPattern: TFormImportPattern;
    8278begin
    8379  FormImportPattern := TFormImportPattern.Create(Self);
     
    10096var
    10197  NewImportPattern: TImportPattern;
     98  FormImportPattern: TFormImportPattern;
    10299begin
    103100  FormImportPattern := TFormImportPattern.Create(Self);
     
    152149end;
    153150
    154 procedure TFormImportFormat.FormClose(Sender: TObject;
    155   var CloseAction: TCloseAction);
    156 begin
    157   Core.PersistentForm1.Save(Self);
    158 end;
    159 
    160151procedure TFormImportFormat.FormCreate(Sender: TObject);
    161152begin
    162   Core.Translator.TranslateComponentRecursive(Self);
    163   Core.ThemeManager.UseTheme(Self);
    164153  YesNoString[False] := SNo;
    165154  YesNoString[True] := SYes;
     
    168157procedure TFormImportFormat.FormShow(Sender: TObject);
    169158begin
    170   Core.PersistentForm1.Load(Self);
    171159  ReloadList;
    172160end;
  • trunk/Forms/FormImportFormats.lfm

    r218 r219  
    11object FormImportFormats: TFormImportFormats
    22  Left = 473
    3   Height = 518
     3  Height = 622
    44  Top = 327
    5   Width = 739
     5  Width = 887
    66  Caption = 'Import formats'
    7   ClientHeight = 518
    8   ClientWidth = 739
    9   DesignTimePPI = 120
    10   OnClose = FormClose
     7  ClientHeight = 622
     8  ClientWidth = 887
     9  DesignTimePPI = 144
    1110  OnCreate = FormCreate
    1211  OnShow = FormShow
    1312  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     13  LCLVersion = '3.6.0.0'
    1514  object ListView1: TListView
    16     Left = 5
    17     Height = 476
    18     Top = 5
    19     Width = 729
     15    Left = 6
     16    Height = 577
     17    Top = 6
     18    Width = 875
    2019    Align = alClient
    21     BorderSpacing.Around = 5
     20    BorderSpacing.Around = 6
    2221    Columns = <   
    2322      item
    2423        Caption = 'Name'
    25         Width = 704
     24        Width = 860
    2625      end>
    2726    MultiSelect = True
     
    4039  object ToolBar1: TToolBar
    4140    Left = 0
    42     Top = 486
    43     Width = 739
     41    Height = 33
     42    Top = 589
     43    Width = 887
    4444    Align = alBottom
    45     Images = Core.ImageList1
    4645    ParentFont = False
    4746    ParentShowHint = False
     
    5453    end
    5554    object ToolButton2: TToolButton
    56       Left = 30
     55      Left = 36
    5756      Top = 2
    5857      Action = AModify
    5958    end
    6059    object ToolButton3: TToolButton
    61       Left = 59
     60      Left = 71
    6261      Top = 2
    6362      Action = ARemove
     
    6564  end
    6665  object ActionList1: TActionList
    67     Images = Core.ImageList1
    68     left = 510
    69     top = 280
     66    Left = 612
     67    Top = 336
    7068    object AAdd: TAction
    7169      Caption = 'Add'
     
    8886  end
    8987  object PopupMenuImportSource: TPopupMenu
    90     Images = Core.ImageList1
    91     left = 184
    92     top = 275
     88    Left = 221
     89    Top = 330
    9390    object MenuItem1: TMenuItem
    9491      Action = AAdd
  • trunk/Forms/FormImportFormats.pas

    r218 r219  
    1 unit UFormImportFormats;
    2 
    3 {$mode delphi}
     1unit FormImportFormats;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   ActnList, Menus, UAcronym;
     7  ActnList, Menus, Acronym, FormEx;
    108
    119type
     
    1311  { TFormImportFormats }
    1412
    15   TFormImportFormats = class(TForm)
     13  TFormImportFormats = class(TFormEx)
    1614    AAdd: TAction;
    1715    ActionList1: TActionList;
     
    3028    procedure AModifyExecute(Sender: TObject);
    3129    procedure ARemoveExecute(Sender: TObject);
    32     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3330    procedure FormCreate(Sender: TObject);
    3431    procedure FormShow(Sender: TObject);
     
    3835    procedure ListView1SelectItem(Sender: TObject; Item: TListItem;
    3936      Selected: Boolean);
    40   private
    41     { private declarations }
    4237  public
    4338    ImportFormats: TImportFormats;
     
    4641  end;
    4742
    48 var
    49   FormImportFormats: TFormImportFormats;
    5043
    5144implementation
     
    5447
    5548uses
    56   UCore, UFormImportFormat;
     49  Core, FormImportFormat;
    5750
    5851resourcestring
     
    10497procedure TFormImportFormats.FormShow(Sender: TObject);
    10598begin
    106   Core.PersistentForm1.Load(Self);
    10799  UpdateList;
    108   Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI);
     100  Core.Core.ScaleDPI1.ScaleControl(ToolBar1, Core.Core.ScaleDPI1.DesignDPI);
    109101end;
    110102
     
    112104var
    113105  NewImportFormat: TImportFormat;
     106  FormImportFormat: TFormImportFormat;
    114107begin
    115108  NewImportFormat := TImportFormat.Create;
     
    123116        ImportFormats.Add(NewImportFormat);
    124117        NewImportFormat := nil;
    125         Core.AcronymDb.Modified := True;
     118        Core.Core.AcronymDb.Modified := True;
    126119        UpdateList;
    127120      end else ShowMessage(Format(SImportFormatAlreadyExists, [NewImportFormat.Name]));
     
    136129var
    137130  NewImportFormat: TImportFormat;
     131  FormImportFormat: TFormImportFormat;
    138132begin
    139133  if Assigned(ListView1.Selected) then begin
     
    148142          if not Assigned(ImportFormats.SearchByName(NewImportFormat.Name)) then begin;
    149143            TImportFormat(ListView1.Selected.Data).Assign(NewImportFormat);
    150             Core.AcronymDb.Modified := True;
     144            Core.Core.AcronymDb.Modified := True;
    151145            UpdateList;
    152146          end else ShowMessage(Format(SImportFormatAlreadyExists, [NewImportFormat.Name]));
    153147        end else begin
    154148          TImportFormat(ListView1.Selected.Data).Assign(NewImportFormat);
    155           Core.AcronymDb.Modified := True;
     149          Core.Core.AcronymDb.Modified := True;
    156150          UpdateList;
    157151        end;
     
    179173end;
    180174
    181 procedure TFormImportFormats.FormClose(Sender: TObject;
    182   var CloseAction: TCloseAction);
    183 begin
    184   Core.PersistentForm1.Save(Self);
    185 end;
    186 
    187175procedure TFormImportFormats.FormCreate(Sender: TObject);
    188176var
    189177  I: Integer;
    190178begin
    191   Core.Translator.TranslateComponentRecursive(Self);
    192   Core.ThemeManager.UseTheme(Self);
    193179  for I := 0 to ToolBar1.ButtonCount - 1 do
    194180    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
  • trunk/Forms/FormImportPattern.lfm

    r218 r219  
    11object FormImportPattern: TFormImportPattern
    22  Left = 459
    3   Height = 431
     3  Height = 517
    44  Top = 235
    5   Width = 662
     5  Width = 794
    66  Caption = 'Import pattern'
    7   ClientHeight = 431
    8   ClientWidth = 662
    9   DesignTimePPI = 120
     7  ClientHeight = 517
     8  ClientWidth = 794
     9  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    1111  OnShow = FormShow
    1212  Position = poScreenCenter
    13   LCLVersion = '2.0.2.0'
     13  LCLVersion = '3.6.0.0'
    1414  object Label8: TLabel
    15     Left = 24
    16     Height = 20
    17     Top = 13
    18     Width = 75
     15    Left = 29
     16    Height = 26
     17    Top = 16
     18    Width = 98
    1919    Caption = 'Start string:'
    2020    ParentColor = False
    2121  end
    2222  object Label9: TLabel
    23     Left = 24
    24     Height = 20
    25     Top = 53
    26     Width = 69
     23    Left = 29
     24    Height = 26
     25    Top = 64
     26    Width = 91
    2727    Caption = 'End string:'
    2828    ParentColor = False
    2929  end
    3030  object EditBlockEnd: TEdit
    31     Left = 183
    32     Height = 28
    33     Top = 48
    34     Width = 461
     31    Left = 220
     32    Height = 43
     33    Top = 58
     34    Width = 552
    3535    Anchors = [akTop, akLeft, akRight]
    3636    TabOrder = 1
    3737  end
    3838  object EditBlockStart: TEdit
    39     Left = 183
    40     Height = 28
    41     Top = 8
    42     Width = 461
     39    Left = 220
     40    Height = 43
     41    Top = 10
     42    Width = 552
    4343    Anchors = [akTop, akLeft, akRight]
    4444    TabOrder = 0
    4545  end
    4646  object ButtonCancel: TButton
    47     Left = 464
    48     Height = 25
    49     Top = 384
    50     Width = 75
     47    Left = 556
     48    Height = 30
     49    Top = 461
     50    Width = 90
    5151    Anchors = [akRight, akBottom]
    5252    Caption = 'Cancel'
     
    5555  end
    5656  object ButtonOk: TButton
    57     Left = 560
    58     Height = 25
    59     Top = 384
    60     Width = 75
     57    Left = 672
     58    Height = 30
     59    Top = 461
     60    Width = 90
    6161    Anchors = [akRight, akBottom]
    6262    Caption = 'Ok'
     
    6565  end
    6666  object Label10: TLabel
    67     Left = 24
    68     Height = 20
    69     Top = 88
    70     Width = 46
     67    Left = 29
     68    Height = 26
     69    Top = 106
     70    Width = 59
    7171    Caption = 'Action:'
    7272    ParentColor = False
    7373  end
    7474  object Label11: TLabel
    75     Left = 24
    76     Height = 20
    77     Top = 120
    78     Width = 58
     75    Left = 29
     76    Height = 26
     77    Top = 144
     78    Width = 73
    7979    Caption = 'Variable:'
    8080    ParentColor = False
    8181  end
    8282  object ComboBoxAction: TComboBox
    83     Left = 183
    84     Height = 28
    85     Top = 87
    86     Width = 461
     83    Left = 220
     84    Height = 42
     85    Top = 104
     86    Width = 552
    8787    Anchors = [akTop, akLeft, akRight]
    88     ItemHeight = 20
     88    ItemHeight = 0
    8989    Style = csDropDownList
    9090    TabOrder = 2
    9191  end
    9292  object ComboBoxVariable: TComboBox
    93     Left = 183
    94     Height = 28
    95     Top = 120
    96     Width = 461
     93    Left = 220
     94    Height = 38
     95    Top = 144
     96    Width = 552
    9797    Anchors = [akTop, akLeft, akRight]
    98     ItemHeight = 20
     98    ItemHeight = 0
    9999    Items.Strings = (
    100100      ''
     
    104104  end
    105105  object CheckBoxRepetition: TCheckBox
    106     Left = 24
    107     Height = 24
    108     Top = 160
    109     Width = 93
     106    Left = 29
     107    Height = 30
     108    Top = 192
     109    Width = 112
    110110    Caption = 'Repetition'
    111111    TabOrder = 4
  • trunk/Forms/FormImportPattern.pas

    r218 r219  
    1 unit UFormImportPattern;
    2 
    3 {$mode delphi}
     1unit FormImportPattern;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   UAcronym;
     7  Acronym;
    108
    119type
     
    3432  end;
    3533
    36 var
    37   FormImportPattern: TFormImportPattern;
    3834
    3935implementation
     
    4238
    4339uses
    44   UCore;
     40  Core;
    4541
    4642{ TFormImportPattern }
     
    5349procedure TFormImportPattern.FormCreate(Sender: TObject);
    5450begin
    55   Core.Translator.TranslateComponentRecursive(Self);
    56   Core.ThemeManager.UseTheme(Self);
    5751  InitControls;
    5852end;
  • trunk/Forms/FormImportSource.lfm

    r218 r219  
    11object FormImportSource: TFormImportSource
    22  Left = 493
    3   Height = 459
     3  Height = 551
    44  Top = 315
    5   Width = 620
     5  Width = 744
    66  Caption = 'Import source'
    7   ClientHeight = 459
    8   ClientWidth = 620
    9   DesignTimePPI = 120
    10   OnClose = FormClose
    11   OnCreate = FormCreate
     7  ClientHeight = 551
     8  ClientWidth = 744
     9  DesignTimePPI = 144
    1210  OnShow = FormShow
    1311  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     12  LCLVersion = '3.6.0.0'
    1513  object EditName: TEdit
    16     Left = 135
    17     Height = 28
    18     Top = 10
    19     Width = 471
     14    Left = 162
     15    Height = 43
     16    Top = 12
     17    Width = 565
    2018    Anchors = [akTop, akLeft, akRight]
    2119    TabOrder = 0
    2220  end
    2321  object Label1: TLabel
    24     Left = 10
    25     Height = 20
    26     Top = 9
    27     Width = 43
     22    Left = 12
     23    Height = 26
     24    Top = 11
     25    Width = 56
    2826    Caption = 'Name:'
    2927    ParentColor = False
    3028  end
    3129  object Label2: TLabel
    32     Left = 10
    33     Height = 20
    34     Top = 49
    35     Width = 78
     30    Left = 12
     31    Height = 26
     32    Top = 59
     33    Width = 101
    3634    Caption = 'Source URL:'
    3735    ParentColor = False
    3836  end
    3937  object EditURL: TEdit
    40     Left = 136
    41     Height = 28
    42     Top = 49
    43     Width = 350
     38    Left = 163
     39    Height = 43
     40    Top = 59
     41    Width = 420
    4442    Anchors = [akTop, akLeft, akRight]
    4543    TabOrder = 1
    4644  end
    4745  object ButtonOk: TButton
    48     Left = 531
    49     Height = 25
    50     Top = 421
    51     Width = 75
     46    Left = 637
     47    Height = 30
     48    Top = 505
     49    Width = 90
    5250    Anchors = [akRight, akBottom]
    5351    Caption = 'Ok'
     
    5654  end
    5755  object ButtonCancel: TButton
    58     Left = 429
    59     Height = 25
    60     Top = 421
    61     Width = 75
     56    Left = 515
     57    Height = 30
     58    Top = 505
     59    Width = 90
    6260    Anchors = [akRight, akBottom]
    6361    Caption = 'Cancel'
     
    6664  end
    6765  object Label3: TLabel
    68     Left = 10
    69     Height = 20
    70     Top = 96
    71     Width = 84
     66    Left = 12
     67    Height = 26
     68    Top = 115
     69    Width = 106
    7270    Caption = 'Data format:'
    7371    ParentColor = False
    7472  end
    7573  object ComboBox1: TComboBox
    76     Left = 135
    77     Height = 28
    78     Top = 91
    79     Width = 350
    80     Anchors = [akTop, akLeft, akRight]
    81     ItemHeight = 20
     74    Left = 162
     75    Height = 42
     76    Top = 109
     77    Width = 420
     78    Anchors = [akTop, akLeft, akRight]
     79    ItemHeight = 0
    8280    Style = csDropDownList
    8381    TabOrder = 2
    8482  end
    8583  object ButtonShowFormat: TButton
    86     Left = 493
    87     Height = 25
    88     Top = 91
    89     Width = 112
     84    Left = 592
     85    Height = 30
     86    Top = 109
     87    Width = 134
    9088    Anchors = [akTop, akRight]
    9189    Caption = 'Configure'
     90    TabOrder = 3
    9291    OnClick = ButtonShowFormatClick
    93     TabOrder = 3
    9492  end
    9593  object CheckBoxEnabled: TCheckBox
    96     Left = 10
    97     Height = 24
    98     Top = 128
    99     Width = 78
     94    Left = 12
     95    Height = 30
     96    Top = 154
     97    Width = 94
    10098    Caption = 'Enabled'
    10199    TabOrder = 4
    102100  end
    103101  object Label4: TLabel
    104     Left = 10
    105     Height = 20
    106     Top = 160
    107     Width = 74
     102    Left = 12
     103    Height = 26
     104    Top = 192
     105    Width = 95
    108106    Caption = 'Categories:'
    109107    ParentColor = False
    110108  end
    111109  object ListBox1: TListBox
    112     Left = 135
    113     Height = 141
    114     Top = 160
    115     Width = 471
     110    Left = 162
     111    Height = 169
     112    Top = 192
     113    Width = 565
    116114    Anchors = [akTop, akLeft, akRight]
    117115    ItemHeight = 0
     
    120118    ScrollWidth = 469
    121119    TabOrder = 5
     120    TopIndex = -1
    122121  end
    123122  object Button1: TButton
    124     Left = 135
    125     Height = 25
    126     Top = 312
    127     Width = 75
     123    Left = 162
     124    Height = 30
     125    Top = 374
     126    Width = 90
    128127    Action = ACategoryAdd
    129128    TabOrder = 6
    130129  end
    131130  object Button2: TButton
    132     Left = 231
    133     Height = 25
    134     Top = 312
    135     Width = 75
     131    Left = 277
     132    Height = 30
     133    Top = 374
     134    Width = 90
    136135    Action = ACategoryRemove
    137136    TabOrder = 7
    138137  end
    139138  object Bevel1: TBevel
    140     Left = 10
     139    Left = 12
    141140    Height = 2
    142     Top = 408
    143     Width = 597
     141    Top = 490
     142    Width = 716
    144143    Anchors = [akLeft, akRight, akBottom]
    145144  end
    146145  object Label5: TLabel
    147     Left = 10
    148     Height = 20
    149     Top = 352
    150     Width = 73
     146    Left = 12
     147    Height = 26
     148    Top = 422
     149    Width = 97
    151150    Caption = 'User name:'
    152151    ParentColor = False
    153152  end
    154153  object Label6: TLabel
    155     Left = 305
    156     Height = 20
    157     Top = 351
    158     Width = 65
     154    Left = 366
     155    Height = 26
     156    Top = 421
     157    Width = 87
    159158    Caption = 'Password:'
    160159    ParentColor = False
    161160  end
    162161  object EditUserName: TEdit
    163     Left = 136
    164     Height = 28
    165     Top = 351
    166     Width = 153
     162    Left = 163
     163    Height = 43
     164    Top = 421
     165    Width = 184
    167166    TabOrder = 8
    168167  end
    169168  object EditPassword: TEdit
    170     Left = 436
    171     Height = 28
    172     Top = 351
    173     Width = 153
     169    Left = 523
     170    Height = 43
     171    Top = 421
     172    Width = 184
    174173    EchoMode = emPassword
    175174    PasswordChar = '*'
     
    177176  end
    178177  object ButtonOpenURL: TButton
    179     Left = 493
    180     Height = 25
    181     Top = 52
    182     Width = 112
     178    Left = 592
     179    Height = 30
     180    Top = 62
     181    Width = 134
    183182    Anchors = [akTop, akRight]
    184183    Caption = 'Open URL'
     184    TabOrder = 12
    185185    OnClick = ButtonOpenURLClick
    186     TabOrder = 12
    187186  end
    188187  object ActionList1: TActionList
    189     left = 384
    190     top = 208
     188    Left = 461
     189    Top = 250
    191190    object ACategoryRemove: TAction
    192191      Caption = 'Remove'
     
    201200  end
    202201  object PopupMenuCategory: TPopupMenu
    203     left = 208
    204     top = 208
     202    Left = 250
     203    Top = 250
    205204    object MenuItem2: TMenuItem
    206205      Action = ACategoryAdd
  • trunk/Forms/FormImportSource.pas

    r218 r219  
    1 unit UFormImportSource;
    2 
    3 {$mode delphi}
     1unit FormImportSource;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ActnList, Menus, ExtCtrls, UAcronym, LCLIntf;
     7  ActnList, Menus, ExtCtrls, Acronym, LCLIntf;
    108
    119type
     
    4442    procedure ButtonOpenURLClick(Sender: TObject);
    4543    procedure ButtonShowFormatClick(Sender: TObject);
    46     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    47     procedure FormCreate(Sender: TObject);
    4844    procedure FormShow(Sender: TObject);
    49   private
    50     { private declarations }
    5145  public
    5246    procedure UpdateInterface;
     
    5549  end;
    5650
    57 var
    58   FormImportSource: TFormImportSource;
    5951
    6052implementation
     
    6355
    6456uses
    65   UCore, UFormImportFormat, UFormCategorySelect;
     57  Core, FormImportFormat, FormCategorySelect;
    6658
    6759{ TFormImportSource }
     
    7062var
    7163  NewImportFormat: TImportFormat;
     64  FormImportFormat: TFormImportFormat;
    7265begin
    7366  if ComboBox1.ItemIndex <> -1 then begin
     
    8073        FormImportFormat.Save(NewImportFormat);
    8174        TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex]).Assign(NewImportFormat);
    82         Core.AcronymDb.Modified := True;
     75        Core.Core.AcronymDb.Modified := True;
    8376        ComboBox1.Items.Strings[ComboBox1.ItemIndex] := NewImportFormat.Name;
    8477      end;
     
    9083end;
    9184
    92 procedure TFormImportSource.FormClose(Sender: TObject;
    93   var CloseAction: TCloseAction);
    94 begin
    95   Core.PersistentForm1.Save(Self);
    96 end;
    97 
    98 procedure TFormImportSource.FormCreate(Sender: TObject);
    99 begin
    100   Core.Translator.TranslateComponentRecursive(Self);
    101   Core.ThemeManager.UseTheme(Self);
    102 end;
    103 
    10485procedure TFormImportSource.FormShow(Sender: TObject);
    10586begin
    106   Core.PersistentForm1.Load(Self);
    10787  UpdateInterface;
    10888end;
     
    11696var
    11797  I: Integer;
     98  FormCategorySelect: TFormCategorySelect;
    11899begin
    119100  FormCategorySelect := TFormCategorySelect.Create(Self);
     
    155136  EditName.Text := ImportSource.Name;
    156137  EditURL.Text := ImportSource.URL;
    157   while ComboBox1.Items.Count > Core.AcronymDb.ImportFormats.Count do
     138  while ComboBox1.Items.Count > Core.Core.AcronymDb.ImportFormats.Count do
    158139    ComboBox1.Items.Delete(ComboBox1.Items.Count - 1);
    159   while ComboBox1.Items.Count < Core.AcronymDb.ImportFormats.Count do
     140  while ComboBox1.Items.Count < Core.Core.AcronymDb.ImportFormats.Count do
    160141    ComboBox1.Items.Add('');
    161   for I := 0 to Core.AcronymDb.ImportFormats.Count - 1 do begin
    162     ComboBox1.Items[I] := TImportFormat(Core.AcronymDb.ImportFormats[I]).Name;
    163     ComboBox1.Items.Objects[I] := Core.AcronymDb.ImportFormats[I];
     142  for I := 0 to Core.Core.AcronymDb.ImportFormats.Count - 1 do begin
     143    ComboBox1.Items[I] := TImportFormat(Core.Core.AcronymDb.ImportFormats[I]).Name;
     144    ComboBox1.Items.Objects[I] := Core.Core.AcronymDb.ImportFormats[I];
    164145  end;
    165146  ComboBox1.ItemIndex := ComboBox1.Items.IndexOfObject(ImportSource.Format);
  • trunk/Forms/FormImportSources.lfm

    r218 r219  
    11object FormImportSources: TFormImportSources
    22  Left = 475
    3   Height = 414
     3  Height = 497
    44  Top = 329
    5   Width = 812
     5  Width = 974
    66  Caption = 'Import sources'
    7   ClientHeight = 414
    8   ClientWidth = 812
    9   DesignTimePPI = 120
    10   OnClose = FormClose
     7  ClientHeight = 497
     8  ClientWidth = 974
     9  DesignTimePPI = 144
    1110  OnCreate = FormCreate
    1211  OnShow = FormShow
    1312  Position = poScreenCenter
    14   LCLVersion = '2.0.2.0'
     13  LCLVersion = '3.6.0.0'
    1514  object ToolBar1: TToolBar
    1615    Left = 0
    17     Height = 26
    18     Top = 388
    19     Width = 812
     16    Height = 33
     17    Top = 464
     18    Width = 974
    2019    Align = alBottom
    2120    Caption = 'ToolBar1'
     
    3029    end
    3130    object ToolButton2: TToolButton
    32       Left = 30
     31      Left = 36
    3332      Top = 2
    3433      Action = AModify
    3534    end
    3635    object ToolButton3: TToolButton
    37       Left = 59
     36      Left = 71
    3837      Top = 2
    3938      Action = ARemove
    4039    end
    4140    object ToolButton4: TToolButton
    42       Left = 88
     41      Left = 106
    4342      Top = 2
    4443      Action = AProcess
     
    4645  end
    4746  object ListView1: TListView
    48     Left = 4
    49     Height = 351
    50     Top = 33
    51     Width = 804
     47    Left = 5
     48    Height = 419
     49    Top = 40
     50    Width = 964
    5251    Align = alClient
    53     BorderSpacing.Left = 4
    54     BorderSpacing.Right = 4
    55     BorderSpacing.Bottom = 4
     52    BorderSpacing.Left = 5
     53    BorderSpacing.Right = 5
     54    BorderSpacing.Bottom = 5
    5655    Checkboxes = True
    5756    Columns = <   
    5857      item
    5958        Caption = 'Name'
    60         Width = 150
     59        Width = 180
    6160      end   
    6261      item
    6362        Caption = 'URL'
    64         Width = 250
     63        Width = 300
    6564      end   
    6665      item
    6766        Caption = 'Categories'
    68         Width = 200
     67        Width = 240
    6968      end   
    7069      item
    7170        Caption = 'Count'
    72         Width = 70
     71        Width = 84
    7372      end   
    7473      item
    7574        Caption = 'Date'
    76         Width = 114
     75        Width = 145
    7776      end>
    7877    MultiSelect = True
     
    9190  end
    9291  object ListViewFilter1: TListViewFilter
    93     Left = 4
    94     Height = 29
    95     Top = 4
    96     Width = 804
     92    Left = 5
     93    Height = 35
     94    Top = 5
     95    Width = 964
    9796    OnChange = ListViewFilter1Change
    9897    Align = alTop
    99     BorderSpacing.Left = 4
    100     BorderSpacing.Top = 4
    101     BorderSpacing.Right = 4
     98    BorderSpacing.Left = 5
     99    BorderSpacing.Top = 5
     100    BorderSpacing.Right = 5
    102101  end
    103102  object ActionList1: TActionList
    104103    Images = Core.ImageList1
    105     left = 408
    106     top = 224
     104    Left = 490
     105    Top = 269
    107106    object AAdd: TAction
    108107      Caption = 'Add'
     
    139138  object PopupMenuImportSource: TPopupMenu
    140139    Images = Core.ImageList1
    141     left = 147
    142     top = 220
     140    Left = 176
     141    Top = 264
    143142    object MenuItem1: TMenuItem
    144143      Action = AAdd
     
    167166    ShowDelay = 0
    168167    AutoClose = False
    169     left = 299
    170     top = 119
     168    Left = 359
     169    Top = 143
    171170  end
    172171  object ListViewSort1: TListViewSort
     
    177176    Column = 0
    178177    Order = soNone
    179     left = 547
    180     top = 172
     178    Left = 656
     179    Top = 206
    181180  end
    182181end
  • trunk/Forms/FormImportSources.pas

    r218 r219  
    1 unit UFormImportSources;
    2 
    3 {$mode delphi}
     1unit FormImportSources;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   ActnList, Menus, UAcronym, UJobProgressView, UListViewSort, LazUTF8, fgl;
     7  ActnList, Menus, Acronym, JobProgressView, ListViewSort, LazUTF8,
     8  Generics.Collections;
    109
    1110type
     
    4443    procedure AProcessExecute(Sender: TObject);
    4544    procedure ARemoveExecute(Sender: TObject);
    46     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    4745    procedure FormCreate(Sender: TObject);
    4846    procedure FormShow(Sender: TObject);
    4947    procedure ListView1Change(Sender: TObject; Item: TListItem;
    5048      Change: TItemChange);
    51     procedure ListView1Click(Sender: TObject);
    5249    procedure ListView1Data(Sender: TObject; Item: TListItem);
    5350    procedure ListView1DblClick(Sender: TObject);
     
    6259  private
    6360    procedure ProcessImportJob(Job: TJob);
    64     procedure FilterList(List: TFPGObjectList<TObject>);
     61    procedure FilterList(List: TObjectList<TObject>);
    6562  public
    6663    ImportSources: TImportSources;
     
    6966  end;
    7067
    71 var
    72   FormImportSources: TFormImportSources;
    7368
    7469implementation
     
    7772
    7873uses
    79   UCore, UFormMain, UFormImportSource;
     74  Core, FormMain, FormImportSource;
    8075
    8176resourcestring
     
    172167procedure TFormImportSources.FormShow(Sender: TObject);
    173168begin
    174   Core.PersistentForm1.Load(Self);
    175169  UpdateList;
    176   Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI);
     170  Core.Core.ScaleDPI1.ScaleControl(ToolBar1, Core.Core.ScaleDPI1.DesignDPI);
    177171end;
    178172
     
    182176  if Assigned(Item) and (Change = ctState) then begin
    183177    TImportSource(Item.Data).Enabled := Item.Checked;
    184     Core.AcronymDb.Modified := True;
    185   end;
    186 end;
    187 
    188 procedure TFormImportSources.ListView1Click(Sender: TObject);
    189 begin
    190 
     178    Core.Core.AcronymDb.Modified := True;
     179  end;
    191180end;
    192181
     
    194183var
    195184  NewImportSource: TImportSource;
     185  FormImportSource: TFormImportSource;
    196186  I: Integer;
    197187begin
     
    212202
    213203        NewImportSource := nil;
    214         Core.AcronymDb.Modified := True;
     204        Core.Core.AcronymDb.Modified := True;
    215205        UpdateList;
    216206      end else ShowMessage(Format(SImportSourceAlreadyExists, [NewImportSource.Name]));
     
    229219  if ListView1.Items[I].Selected then begin
    230220    TImportSource(ListView1.Items[I].Data).Enabled := False;
    231     Core.AcronymDb.Modified := True;
     221    Core.Core.AcronymDb.Modified := True;
    232222  end;
    233223  UpdateList;
     
    241231  if ListView1.Items[I].Selected then begin
    242232    TImportSource(ListView1.Items[I].Data).Enabled := True;
    243     Core.AcronymDb.Modified := True;
     233    Core.Core.AcronymDb.Modified := True;
    244234  end;
    245235  UpdateList;
     
    249239var
    250240  NewImportSource: TImportSource;
     241  FormImportSource: TFormImportSource;
    251242begin
    252243  if Assigned(ListView1.Selected) then begin
     
    261252          if not Assigned(ImportSources.SearchByName(NewImportSource.Name)) then begin;
    262253            TImportSource(ListView1.Selected.Data).Assign(NewImportSource);
    263             Core.AcronymDb.Modified := True;
     254            Core.Core.AcronymDb.Modified := True;
    264255          end else ShowMessage(Format(SImportSourceAlreadyExists, [NewImportSource.Name]));
    265256        end else begin
    266257          TImportSource(ListView1.Selected.Data).Assign(NewImportSource);
    267           Core.AcronymDb.Modified := True;
     258          Core.Core.AcronymDb.Modified := True;
    268259        end;
    269260
     
    283274begin
    284275  if Assigned(ListView1.Selected) then begin
    285     Core.AcronymDb.AddedCount := 0;
     276    Core.Core.AcronymDb.AddedCount := 0;
    286277    JobProgressView1.AddJob(SProcessSelectedSource, ProcessImportJob);
    287278    JobProgressView1.Start;
    288279    ShowMessage(Format(SAddedCount, [TImportSource(ListView1.Selected.Data).ItemCount,
    289       Core.AcronymDb.AddedCount]));
     280      Core.Core.AcronymDb.AddedCount]));
    290281  end;
    291282end;
     
    296287end;
    297288
    298 procedure TFormImportSources.FilterList(List: TFPGObjectList<TObject>);
     289procedure TFormImportSources.FilterList(List: TObjectList<TObject>);
    299290var
    300291  I: Integer;
     
    344335end;
    345336
    346 procedure TFormImportSources.FormClose(Sender: TObject;
    347   var CloseAction: TCloseAction);
    348 begin
    349   Core.PersistentForm1.Save(Self);
    350 end;
    351 
    352337procedure TFormImportSources.FormCreate(Sender: TObject);
    353338var
    354339  I: Integer;
    355340begin
    356   Core.Translator.TranslateComponentRecursive(Self);
    357   Core.ThemeManager.UseTheme(Self);
    358341  for I := 0 to ToolBar1.ButtonCount - 1 do
    359342    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
  • trunk/Forms/FormMain.lfm

    r218 r219  
    11object FormMain: TFormMain
    22  Left = 417
    3   Height = 747
     3  Height = 713
    44  Top = 453
    55  Width = 1106
     
    1212  OnCloseQuery = FormCloseQuery
    1313  OnCreate = FormCreate
    14   OnDestroy = FormDestroy
    1514  OnHide = FormHide
    1615  OnResize = FormResize
    1716  OnShow = FormShow
    18   LCLVersion = '2.0.12.0'
     17  LCLVersion = '3.6.0.0'
    1918  object PanelMain: TPanel
    2019    Left = 0
    21     Height = 605
     20    Height = 604
    2221    Top = 81
    2322    Width = 1106
    2423    Align = alClient
    2524    BevelOuter = bvNone
    26     ClientHeight = 605
     25    ClientHeight = 604
    2726    ClientWidth = 1106
    2827    ParentFont = False
     
    3837    object ListViewAcronyms: TListView
    3938      Left = 5
    40       Height = 549
     39      Height = 548
    4140      Top = 50
    4241      Width = 1095
     
    317316  object StatusBar1: TStatusBar
    318317    Left = 0
    319     Height = 27
    320     Top = 686
     318    Height = 28
     319    Top = 685
    321320    Width = 1106
    322321    Panels = <   
     
    605604    end
    606605  end
    607   object AboutDialog1: TAboutDialog
    608     Translator = Core.Translator
    609     ThemeManager = Core.ThemeManager
    610     ApplicationInfo = Core.ApplicationInfo1
    611     Left = 392
    612     Top = 448
    613   end
    614606end
  • trunk/Forms/FormMain.pas

    r218 r219  
    1 unit UFormMain;
    2 
    3 {$mode delphi}{$H+}
     1unit FormMain;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   ComCtrls, StdCtrls, ExtCtrls, ActnList, Grids, UAcronym, UPersistentForm,
    10   URegistry, ULastOpenedList, UListViewSort, UJobProgressView, UAboutDialog,
    11   Registry, fgl, LazUTF8, LazFileUtils;
     7  ComCtrls, StdCtrls, ExtCtrls, ActnList, Grids, Acronym, PersistentForm,
     8  RegistryEx, LastOpenedList, ListViewSort, JobProgressView, FormAbout,
     9  Registry, Generics.Collections, LazUTF8, LazFileUtils, FormEx;
    1210
    1311type
     
    1513  { TFormMain }
    1614
    17   TFormMain = class(TForm)
    18     AboutDialog1: TAboutDialog;
     15  TFormMain = class(TFormEx)
    1916    AFilterShowItemsWithoutFilter: TAction;
    2017    ADocumentCheck: TAction;
     
    138135    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
    139136    procedure FormCreate(Sender: TObject);
    140     procedure FormDestroy(Sender: TObject);
    141137    procedure LastOpenedList1Change(Sender: TObject);
    142138    procedure ListViewAcronymsData(Sender: TObject; Item: TListItem);
     
    158154    function FilterCell(Text1, Text2: string): Boolean;
    159155    procedure ProcessImportsJob(Job: TJob);
    160     procedure FilterList(List: TFPGObjectList<TObject>);
     156    procedure FilterList(List: TObjectList<TObject>);
    161157    procedure OpenRecentClick(Sender: TObject);
    162158    procedure SetToolbarHints;
     
    167163    procedure UpdateInterface;
    168164    procedure ProjectOpen(FileName: string);
    169     function CompareStrings(Strings1, Strings2: TStrings): Boolean;
    170   end;
    171 
    172 var
    173   FormMain: TFormMain;
     165  end;
    174166
    175167resourcestring
     
    186178
    187179uses
    188   UFormImport, UFormSettings, UFormCategories, UFormAcronyms, UFormExport,
    189   UFormImportSources, UFormImportFormats, UCore, UFormCheck;
     180  FormImport, FormSettings, FormCategories, FormAcronyms, FormExport,
     181  FormImportSources, FormImportFormats, Core, FormCheck;
    190182
    191183resourcestring
     
    232224procedure TFormMain.FormHide(Sender: TObject);
    233225begin
    234   if Core.InitializeFinished then Core.PersistentForm1.Save(Self);
     226  if Core.Core.InitializeFinished then Core.Core.PersistentForm1.Save(Self);
    235227  UpdateInterface;
    236228end;
     
    243235procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    244236begin
    245   Core.PersistentForm1.Save(Self);
    246   Core.SaveConfig;
     237  Core.Core.SaveConfig;
    247238end;
    248239
     
    260251
    261252procedure TFormMain.ADocumentCheckExecute(Sender: TObject);
     253var
     254  FormCheck: TFormCheck;
    262255begin
    263256  FormCheck := TFormCheck.Create(Self);
     
    272265
    273266procedure TFormMain.AExportExecute(Sender: TObject);
     267var
     268  FormExport: TFormExport;
    274269begin
    275270  FormExport := TFormExport.Create(Self);
     
    287282begin
    288283  DoClose := False;
    289   if Assigned(Core.AcronymDb) then begin
    290     if Core.AcronymDb.Modified then begin
     284  if Assigned(Core.Core.AcronymDb) then begin
     285    if Core.Core.AcronymDb.Modified then begin
    291286       ModalResult := MessageDlg(SAppExit, SAppExitQuery,
    292287       mtConfirmation, [mbYes, mbNo, mbCancel], 0);
     
    301296  end;
    302297  if DoClose then begin
    303     FreeAndNil(Core.AcronymDb);
     298    FreeAndNil(Core.Core.AcronymDb);
    304299    UpdateAcronymsList;
    305300    UpdateInterface;
     
    311306begin
    312307  AFileClose.Execute;
    313   if not Assigned(Core.AcronymDb)  then begin
    314     Core.AcronymDb := TAcronymDb.Create;
    315     Core.AcronymDb.FileName := DefaultFileName;
    316     Core.AcronymDb.Acronyms.Clear;
    317     Core.AcronymDb.OnUpdate.Add(AcronymDbUpdate);
     308  if not Assigned(Core.Core.AcronymDb)  then begin
     309    Core.Core.AcronymDb := TAcronymDb.Create;
     310    Core.Core.AcronymDb.FileName := DefaultFileName;
     311    Core.Core.AcronymDb.Acronyms.Clear;
     312    Core.Core.AcronymDb.OnUpdate.Add(AcronymDbUpdate);
    318313    UpdateAcronymsList;
    319314    UpdateInterface;
     
    324319begin
    325320  OpenDialog1.DefaultExt := ProjectExt;
    326   if Assigned(Core.AcronymDb) then begin
    327     OpenDialog1.InitialDir := ExtractFileDir(Core.AcronymDb.FileName);
     321  if Assigned(Core.Core.AcronymDb) then begin
     322    OpenDialog1.InitialDir := ExtractFileDir(Core.Core.AcronymDb.FileName);
    328323    OpenDialog1.Filter := SFileFilter;
    329     OpenDialog1.FileName := ExtractFileName(Core.AcronymDb.FileName);
     324    OpenDialog1.FileName := ExtractFileName(Core.Core.AcronymDb.FileName);
    330325  end;
    331326  if OpenDialog1.Execute then begin
     
    337332begin
    338333  SaveDialog1.DefaultExt := ProjectExt;
    339   SaveDialog1.InitialDir := ExtractFileDir(Core.AcronymDb.FileName);
     334  SaveDialog1.InitialDir := ExtractFileDir(Core.Core.AcronymDb.FileName);
    340335  SaveDialog1.Filter := SFileFilter;
    341   SaveDialog1.FileName := ExtractFileName(Core.AcronymDb.FileName);
     336  SaveDialog1.FileName := ExtractFileName(Core.Core.AcronymDb.FileName);
    342337  if SaveDialog1.Execute then begin
    343     Core.AcronymDb.SaveToFile(SaveDialog1.FileName);
     338    Core.Core.AcronymDb.SaveToFile(SaveDialog1.FileName);
    344339    LastOpenedList1.AddItem(SaveDialog1.FileName);
    345340    UpdateInterface;
     
    349344procedure TFormMain.AFileSaveExecute(Sender: TObject);
    350345begin
    351   if FileExists(Core.AcronymDb.FileName) then begin
    352     Core.AcronymDb.SaveToFile(Core.AcronymDb.FileName);
    353     LastOpenedList1.AddItem(Core.AcronymDb.FileName);
     346  if FileExists(Core.Core.AcronymDb.FileName) then begin
     347    Core.Core.AcronymDb.SaveToFile(Core.Core.AcronymDb.FileName);
     348    LastOpenedList1.AddItem(Core.Core.AcronymDb.FileName);
    354349    UpdateInterface;
    355350  end else AFileSaveAs.Execute;
     
    382377
    383378procedure TFormMain.AImportExecute(Sender: TObject);
     379var
     380  FormImport: TFormImport;
    384381begin
    385382  FormImport := TFormImport.Create(Self);
     
    394391
    395392procedure TFormMain.AManageAcronymExecute(Sender: TObject);
     393var
     394  FormAcronyms: TFormAcronyms;
    396395begin
    397396  FormAcronyms := TFormAcronyms.Create(Self);
     
    399398    if Assigned(ListViewAcronyms.Selected) then
    400399      FormAcronyms.FocusAcronym := ListViewAcronyms.Selected.Data;
    401     FormAcronyms.Acronyms := Core.AcronymDb.Acronyms;
     400    FormAcronyms.Acronyms := Core.Core.AcronymDb.Acronyms;
    402401    FormAcronyms.ShowModal;
    403402    UpdateAcronymsList;
     
    411410begin
    412411  ImportTotalItemCount := 0;
    413   Core.AcronymDb.AddedCount := 0;
    414   Core.JobProgressView1.AddJob(SProcessImportSources, ProcessImportsJob);
    415   Core.JobProgressView1.Start;
    416   ShowMessage(Format(SAddedCount, [ImportTotalItemCount, Core.AcronymDb.AddedCount]));
     412  Core.Core.AcronymDb.AddedCount := 0;
     413  Core.Core.JobProgressView1.AddJob(SProcessImportSources, ProcessImportsJob);
     414  Core.Core.JobProgressView1.Start;
     415  ShowMessage(Format(SAddedCount, [ImportTotalItemCount, Core.Core.AcronymDb.AddedCount]));
    417416  UpdateAcronymsList;
    418417  UpdateInterface;
     
    423422  I: Integer;
    424423begin
    425   for I := 0 to Core.AcronymDb.ImportSources.Count - 1 do
    426   with TImportSource(Core.AcronymDb.ImportSources[I]) do
     424  for I := 0 to Core.Core.AcronymDb.ImportSources.Count - 1 do
     425  with Core.Core.AcronymDb.ImportSources[I] do
    427426  if Enabled then begin
    428427    Process;
    429428    ImportTotalItemCount := ImportTotalItemCount + ItemCount;
    430     Job.Progress.Max := Core.AcronymDb.ImportSources.Count;
     429    Job.Progress.Max := Core.Core.AcronymDb.ImportSources.Count;
    431430    Job.Progress.Value := I;
    432431    if Job.Terminate then Break;
     
    435434
    436435procedure TFormMain.ASettingsExecute(Sender: TObject);
     436var
     437  FormSettings: TFormSettings;
    437438begin
    438439  FormSettings := TFormSettings.Create(Self);
     
    441442    if FormSettings.ShowModal = mrOk then begin
    442443      FormSettings.Save;
    443       Core.SaveConfig;
    444       Core.ThemeManager.UseTheme(Self);
     444      Core.Core.SaveConfig;
     445      Core.Core.ThemeManager.UseTheme(Self);
    445446    end;
    446447  finally
     
    450451
    451452procedure TFormMain.AShowAboutExecute(Sender: TObject);
    452 begin
    453   AboutDialog1.Show;
     453var
     454  FormAbout: TFormAbout;
     455begin
     456  FormAbout := TFormAbout.Create(nil);
     457  try
     458    FormAbout.ApplicationInfo := Core.Core.ApplicationInfo1;
     459    FormAbout.ShowModal;
     460  finally
     461    FormAbout.Free;
     462  end;
    454463end;
    455464
    456465procedure TFormMain.AShowAcronymsExecute(Sender: TObject);
     466var
     467  FormAcronyms: TFormAcronyms;
    457468begin
    458469  FormAcronyms := TFormAcronyms.Create(Self);
    459470  try
    460     FormAcronyms.Acronyms := Core.AcronymDb.Acronyms;
     471    FormAcronyms.Acronyms := Core.Core.AcronymDb.Acronyms;
    461472    FormAcronyms.ShowModal;
    462473    UpdateAcronymsList;
     
    468479
    469480procedure TFormMain.AShowCategoriesExecute(Sender: TObject);
     481var
     482  FormCategories: TFormCategories;
    470483begin
    471484  FormCategories := TFormCategories.Create(Self);
    472485  try
    473     FormCategories.Categories := Core.AcronymDb.Categories;
     486    FormCategories.Categories := Core.Core.AcronymDb.Categories;
    474487    FormCategories.ShowModal;
    475488    UpdateAcronymsList;
     
    487500
    488501procedure TFormMain.AShowImportFormatsExecute(Sender: TObject);
     502var
     503  FormImportFormats: TFormImportFormats;
    489504begin
    490505  FormImportFormats := TFormImportFormats.Create(Self);
    491506  try
    492     FormImportFormats.ImportFormats := Core.AcronymDb.ImportFormats;
     507    FormImportFormats.ImportFormats := Core.Core.AcronymDb.ImportFormats;
    493508    FormImportFormats.ShowModal;
    494509    UpdateInterface;
     
    499514
    500515procedure TFormMain.AShowImportSourcesExecute(Sender: TObject);
     516var
     517  FormImportSources: TFormImportSources;
    501518begin
    502519  FormImportSources := TFormImportSources.Create(Self);
    503520  try
    504     FormImportSources.ImportSources := Core.AcronymDb.ImportSources;
     521    FormImportSources.ImportSources := Core.Core.AcronymDb.ImportSources;
    505522    FormImportSources.ShowModal;
    506523    UpdateAcronymsList;
     
    511528end;
    512529
    513 procedure TFormMain.FormDestroy(Sender: TObject);
    514 begin
    515 end;
    516 
    517530procedure TFormMain.FormShow(Sender: TObject);
    518531begin
    519   Core.Initialize;
     532  Core.Core.Initialize;
    520533
    521534  if Visible then begin
    522     Core.PersistentForm1.Load(Self);
    523     Core.ThemeManager.UseTheme(Self);
    524535    ListViewFilter1.UpdateFromListView(ListViewAcronyms);
    525536    UpdateInterface;
     
    529540    ListViewFilter1.StringGrid.SetFocus;
    530541  end;
    531   Core.ScaleDPI1.ScaleControl(CoolBar1, Core.ScaleDPI1.DesignDPI);
     542  Core.Core.ScaleDPI1.ScaleControl(CoolBar1, Core.Core.ScaleDPI1.DesignDPI);
    532543  CoolBar1.AutosizeBands;
    533544end;
     
    587598procedure TFormMain.ListViewSort1Filter(ListViewSort: TListViewSort);
    588599begin
    589   Core.AcronymDb.AssignToList(ListViewSort1.List, AFilterEnabledCategories.Checked);
     600  Core.Core.AcronymDb.AssignToList(ListViewSort1.List, AFilterEnabledCategories.Checked);
    590601  FilterList(ListViewSort1.List);
    591602end;
     
    628639begin
    629640  AFileClose.Execute;
    630   if not Assigned(Core.AcronymDb) then begin
     641  if not Assigned(Core.Core.AcronymDb) then begin
    631642    try
    632643      AFileNew.Execute;
    633       Core.AcronymDb.LoadFromFile(FileName);
     644      Core.Core.AcronymDb.LoadFromFile(FileName);
    634645      LastOpenedList1.AddItem(FileName);
    635646    finally
     
    640651end;
    641652
    642 function TFormMain.CompareStrings(Strings1, Strings2: TStrings): Boolean;
    643 var
    644   I: Integer;
    645 begin
    646   Result := Strings1.Count = Strings2.Count;
    647   if not Result then Exit;
    648   for I := 0 to Strings1.Count - 1 do
    649     if (Strings1[I] <> Strings2[I]) or (Strings1.Objects[I] <> Strings2.Objects[I]) then begin
    650       Result := False;
    651       Exit;
    652     end;
    653 end;
    654 
    655 procedure TFormMain.FilterList(List: TFPGObjectList<TObject>);
     653procedure TFormMain.FilterList(List: TObjectList<TObject>);
    656654var
    657655  I: Integer;
     
    686684begin
    687685  AFileClose.Execute;
    688   if not Assigned(Core.AcronymDb) then begin
     686  if not Assigned(Core.Core.AcronymDb) then begin
    689687    AFileNew.Execute;
    690     Core.AcronymDb.LoadFromFile(TMenuItem(Sender).Caption);
     688    Core.Core.AcronymDb.LoadFromFile(TMenuItem(Sender).Caption);
    691689    LastOpenedList1.AddItem(TMenuItem(Sender).Caption);
    692690    UpdateAcronymsList;
     
    697695procedure TFormMain.UpdateAcronymsList;
    698696begin
    699   if Assigned(Core.AcronymDb) then begin
     697  if Assigned(Core.Core.AcronymDb) then begin
    700698    ListViewSort1.Refresh;
    701699  end else begin
     
    710708  Title: string;
    711709begin
    712   ListViewAcronyms.Enabled := Assigned(Core.AcronymDb);
    713   AFileClose.Enabled := Assigned(Core.AcronymDb);
    714   AFileSave.Enabled := Assigned(Core.AcronymDb) and Core.AcronymDb.Modified;
    715   AFileSaveAs.Enabled := Assigned(Core.AcronymDb);
    716   AImport.Enabled := Assigned(Core.AcronymDb);
    717   AExport.Enabled := Assigned(Core.AcronymDb);
    718   AProcessImports.Enabled := Assigned(Core.AcronymDb);
    719   AShowCategories.Enabled := Assigned(Core.AcronymDb);
    720   AShowAcronyms.Enabled := Assigned(Core.AcronymDb);
    721   AShowCategories.Enabled := Assigned(Core.AcronymDb);
    722   AShowImportSources.Enabled := Assigned(Core.AcronymDb);
    723   AShowImportFormats.Enabled := Assigned(Core.AcronymDb);
     710  ListViewAcronyms.Enabled := Assigned(Core.Core.AcronymDb);
     711  AFileClose.Enabled := Assigned(Core.Core.AcronymDb);
     712  AFileSave.Enabled := Assigned(Core.Core.AcronymDb) and Core.Core.AcronymDb.Modified;
     713  AFileSaveAs.Enabled := Assigned(Core.Core.AcronymDb);
     714  AImport.Enabled := Assigned(Core.Core.AcronymDb);
     715  AExport.Enabled := Assigned(Core.Core.AcronymDb);
     716  AProcessImports.Enabled := Assigned(Core.Core.AcronymDb);
     717  AShowCategories.Enabled := Assigned(Core.Core.AcronymDb);
     718  AShowAcronyms.Enabled := Assigned(Core.Core.AcronymDb);
     719  AShowCategories.Enabled := Assigned(Core.Core.AcronymDb);
     720  AShowImportSources.Enabled := Assigned(Core.Core.AcronymDb);
     721  AShowImportFormats.Enabled := Assigned(Core.Core.AcronymDb);
    724722  CoolBar1.Visible := MenuItemToolbar.Checked;
    725723  PanelParam.Visible := MenuItemParam.Checked;
    726   AHide.Enabled := FormMain.Visible;
     724  AHide.Enabled := Visible;
    727725  AManageAcronym.Enabled := Assigned(ListViewAcronyms.Selected);
    728726  StatusBar1.Visible := MenuItemStatusBar.Checked;
    729727
    730728  Title := '';
    731   if Assigned(Core.AcronymDb) and (ExtractFileNameWithoutExt(ExtractFileName(Core.AcronymDb.FileName)) <> '') then begin
    732     Title := ExtractFileNameWithoutExt(ExtractFileName(Core.AcronymDb.FileName));
    733     if Core.AcronymDb.Modified then Title := Title + ' (' + SModified + ')';
     729  if Assigned(Core.Core.AcronymDb) and (ExtractFileNameWithoutExt(ExtractFileName(Core.Core.AcronymDb.FileName)) <> '') then begin
     730    Title := ExtractFileNameWithoutExt(ExtractFileName(Core.Core.AcronymDb.FileName));
     731    if Core.Core.AcronymDb.Modified then Title := Title + ' (' + SModified + ')';
    734732  end;
    735733  if Title <> '' then Title := Title + ' - ';
    736   Title := Title + Core.ApplicationInfo1.AppName;
     734  Title := Title + Core.Core.ApplicationInfo1.AppName;
    737735  {$IFDEF WINDOWS}
    738736  // Under Linux title would affect reg.xml path for storing registry settings
     
    740738  {$ENDIF}
    741739  Caption := Title;
    742   if Assigned(Core.AcronymDb) then begin
     740  if Assigned(Core.Core.AcronymDb) then begin
    743741    StatusBar1.Panels[0].Text := Format(SAcronymsCount, [
    744       Core.AcronymDb.Acronyms.Count]);
     742      Core.Core.AcronymDb.Acronyms.Count]);
    745743    StatusBar1.Panels[1].Text := Format(SMeaningsCount, [
    746       Core.AcronymDb.GetMeaningsCount]);
     744      Core.Core.AcronymDb.GetMeaningsCount]);
    747745  end else begin
    748746    StatusBar1.Panels[0].Text := '';
     
    753751procedure TFormMain.LoadConfig;
    754752begin
    755   Core.PersistentForm1.RegistryContext := Core.ApplicationInfo1.GetRegistryContext;
    756   RegistryContext := TRegistryContext.Create(Core.ApplicationInfo1.RegistryRoot,
    757     Core.ApplicationInfo1.RegistryKey + '\RecentFiles');
     753  Core.Core.PersistentForm1.RegistryContext := Core.Core.ApplicationInfo1.GetRegistryContext;
     754  RegistryContext := TRegistryContext.Create(Core.Core.ApplicationInfo1.RegistryRoot,
     755    Core.Core.ApplicationInfo1.RegistryKey + '\RecentFiles');
    758756  LastOpenedList1.LoadFromRegistry(RegistryContext);
    759757
     
    761759  // If installed in Linux system then use installation directory for po files
    762760  if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then
    763     Core.Translator.POFilesFolder := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/languages';
     761    Core.Core.Translator.POFilesFolder := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/languages';
    764762  {$ENDIF}
    765763
    766764  with TRegistryEx.Create do
    767765  try
    768     RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot];
    769     OpenKey(Core.ApplicationInfo1.RegistryKey, True);
     766    RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot];
     767    OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True);
    770768    AFilterSameLength.Checked := ReadBoolWithDefault('SameLength', False);
    771769    AFilterSameLetterCase.Checked := ReadBoolWithDefault('SameLetterCase', False);
     
    784782    RootKey := HKEY_CURRENT_USER;
    785783    OpenKey(RegistryRunKey, True);
    786     Core.StartOnLogon := ValueExists('Acronym Decoder');
     784    Core.Core.StartOnLogon := ValueExists('Acronym Decoder');
    787785  finally
    788786    Free;
     
    792790procedure TFormMain.SaveConfig;
    793791begin
    794   RegistryContext := TRegistryContext.Create(Core.ApplicationInfo1.RegistryRoot,
    795     Core.ApplicationInfo1.RegistryKey + '\RecentFiles');
     792  RegistryContext := TRegistryContext.Create(Core.Core.ApplicationInfo1.RegistryRoot,
     793    Core.Core.ApplicationInfo1.RegistryKey + '\RecentFiles');
    796794  LastOpenedList1.SaveToRegistry(RegistryContext);
    797795
    798796  with TRegistryEx.Create do
    799797  try
    800     RootKey := RegistryRootHKEY[Core.ApplicationInfo1.RegistryRoot];
    801     OpenKey(Core.ApplicationInfo1.RegistryKey, True);
     798    RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot];
     799    OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True);
    802800    WriteBool('SameLength', AFilterSameLength.Checked);
    803801    WriteBool('SameLetterCase', AFilterSameLetterCase.Checked);
     
    815813    RootKey := HKEY_CURRENT_USER;
    816814    OpenKey(RegistryRunKey, True);
    817     if Core.StartOnLogon then begin
    818       if Core.StartMinimizedToTray then WriteString('Acronym Decoder', Application.ExeName + ' ' + Application.OptionChar + 't')
     815    if Core.Core.StartOnLogon then begin
     816      if Core.Core.StartMinimizedToTray then WriteString('Acronym Decoder', Application.ExeName + ' ' + Application.OptionChar + 't')
    819817        else WriteString('Acronym Decoder', Application.ExeName)
    820818    end else DeleteValue('Acronym Decoder');
  • trunk/Forms/FormSettings.lfm

    r218 r219  
    11object FormSettings: TFormSettings
    22  Left = 798
    3   Height = 371
     3  Height = 394
    44  Top = 367
    55  Width = 590
    66  Caption = 'Settings'
    7   ClientHeight = 371
     7  ClientHeight = 394
    88  ClientWidth = 590
    9   Constraints.MinHeight = 328
    10   Constraints.MinWidth = 389
    11   DesignTimePPI = 120
    12   OnClose = FormClose
     9  Constraints.MinHeight = 394
     10  Constraints.MinWidth = 467
     11  DesignTimePPI = 144
    1312  OnCreate = FormCreate
    14   OnShow = FormShow
    1513  Position = poScreenCenter
    16   LCLVersion = '1.8.2.0'
     14  LCLVersion = '3.6.0.0'
    1715  object ComboBoxLanguage: TComboBox
    18     Left = 152
    19     Height = 28
    20     Top = 24
    21     Width = 208
    22     ItemHeight = 20
     16    Left = 182
     17    Height = 42
     18    Top = 29
     19    Width = 250
     20    ItemHeight = 0
    2321    Style = csDropDownList
    2422    TabOrder = 0
    2523  end
    2624  object Label1: TLabel
    27     Left = 16
    28     Height = 20
    29     Top = 24
    30     Width = 68
     25    Left = 19
     26    Height = 26
     27    Top = 29
     28    Width = 88
    3129    Caption = 'Language:'
    3230    ParentColor = False
    3331  end
    3432  object ButtonOk: TButton
    35     Left = 506
    36     Height = 25
    37     Top = 326
    38     Width = 75
     33    Left = 489
     34    Height = 30
     35    Top = 340
     36    Width = 90
    3937    Anchors = [akRight, akBottom]
    4038    Caption = 'Ok'
    4139    ModalResult = 1
    42     OnClick = ButtonOkClick
    4340    TabOrder = 3
    4441  end
    4542  object ButtonCancel: TButton
    46     Left = 410
    47     Height = 25
    48     Top = 326
    49     Width = 75
     43    Left = 374
     44    Height = 30
     45    Top = 340
     46    Width = 90
    5047    Anchors = [akRight, akBottom]
    5148    Caption = 'Cancel'
     
    5451  end
    5552  object CheckBoxAlwaysOnTop: TCheckBox
    56     Left = 16
    57     Height = 24
    58     Top = 64
    59     Width = 118
     53    Left = 19
     54    Height = 30
     55    Top = 77
     56    Width = 145
    6057    Caption = 'Always on top'
    6158    TabOrder = 1
    6259  end
    6360  object CheckBoxStartOnLogon: TCheckBox
    64     Left = 16
    65     Height = 24
    66     Top = 96
    67     Width = 150
     61    Left = 19
     62    Height = 30
     63    Top = 115
     64    Width = 188
    6865    Caption = 'Start on user logon'
    6966    Color = clDefault
    70     OnChange = CheckBoxStartOnLogonChange
    7167    ParentColor = False
    7268    ParentFont = False
    7369    TabOrder = 4
     70    OnChange = CheckBoxStartOnLogonChange
    7471  end
    7572  object CheckBoxStartMinimizedToTray: TCheckBox
    76     Left = 48
    77     Height = 24
    78     Top = 128
    79     Width = 176
     73    Left = 58
     74    Height = 30
     75    Top = 154
     76    Width = 218
    8077    Caption = 'Start minimized to tray'
    8178    TabOrder = 5
    8279  end
    8380  object CheckBoxAutomaticDPI: TCheckBox
    84     Left = 16
    85     Height = 24
    86     Top = 192
    87     Width = 120
     81    Left = 19
     82    Height = 30
     83    Top = 230
     84    Width = 148
    8885    Caption = 'Automatic DPI'
    89     OnChange = CheckBoxAutomaticDPIChange
    9086    TabOrder = 6
    9187    Visible = False
     88    OnChange = CheckBoxAutomaticDPIChange
    9289  end
    9390  object SpinEditDPI: TSpinEdit
    94     Left = 94
    95     Height = 28
    96     Top = 222
    97     Width = 97
     91    Left = 113
     92    Height = 43
     93    Top = 266
     94    Width = 116
    9895    MaxValue = 300
    9996    MinValue = 96
     
    103100  end
    104101  object Label2: TLabel
    105     Left = 46
    106     Height = 20
    107     Top = 222
    108     Width = 26
     102    Left = 55
     103    Height = 26
     104    Top = 266
     105    Width = 35
    109106    Caption = 'DPI:'
    110107    ParentColor = False
     
    112109  end
    113110  object CheckBoxReopenLastFileOnStart: TCheckBox
    114     Left = 16
    115     Height = 24
    116     Top = 160
    117     Width = 181
     111    Left = 19
     112    Height = 30
     113    Top = 192
     114    Width = 226
    118115    Caption = 'Reopen last file on start'
    119116    TabOrder = 8
    120117  end
    121118  object Bevel1: TBevel
    122     Left = 8
     119    Left = 10
    123120    Height = 2
    124     Top = 309
    125     Width = 570
     121    Top = 320
     122    Width = 566
    126123    Anchors = [akLeft, akRight, akBottom]
    127124  end
    128125  object Label3: TLabel
    129     Left = 16
    130     Height = 20
    131     Top = 264
    132     Width = 48
     126    Left = 19
     127    Height = 26
     128    Top = 317
     129    Width = 63
    133130    Caption = 'Theme:'
    134131    ParentColor = False
    135132  end
    136133  object ComboBoxTheme: TComboBox
    137     Left = 152
    138     Height = 28
    139     Top = 264
    140     Width = 208
    141     ItemHeight = 20
     134    Left = 182
     135    Height = 42
     136    Top = 317
     137    Width = 250
     138    ItemHeight = 0
    142139    Style = csDropDownList
    143140    TabOrder = 9
  • trunk/Forms/FormSettings.pas

    r218 r219  
    1 unit UFormSettings;
    2 
    3 {$mode delphi}
     1unit FormSettings;
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   Menus, Spin, ExtCtrls, ULanguages;
     7  Menus, Spin, ExtCtrls, Languages, FormEx;
    108
    119type
     
    1311  { TFormSettings }
    1412
    15   TFormSettings = class(TForm)
     13  TFormSettings = class(TFormEx)
    1614    Bevel1: TBevel;
    1715    ButtonOk: TButton;
     
    2826    Label3: TLabel;
    2927    SpinEditDPI: TSpinEdit;
    30     procedure ButtonOkClick(Sender: TObject);
    3128    procedure CheckBoxAutomaticDPIChange(Sender: TObject);
    3229    procedure CheckBoxStartOnLogonChange(Sender: TObject);
    33     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3430    procedure FormCreate(Sender: TObject);
    35     procedure FormShow(Sender: TObject);
    36   private
    37     { private declarations }
    3831  public
    3932    procedure Load;
     
    4235  end;
    4336
    44 var
    45   FormSettings: TFormSettings;
    4637
    4738implementation
     
    5041
    5142uses
    52   UCore, UTheme;
     43  Core, Theme;
    5344
    5445{ TFormSettings }
    55 
    56 procedure TFormSettings.FormShow(Sender: TObject);
    57 begin
    58   Core.PersistentForm1.Load(Self);
    59 end;
    60 
    61 procedure TFormSettings.ButtonOkClick(Sender: TObject);
    62 begin
    63 end;
    6446
    6547procedure TFormSettings.CheckBoxAutomaticDPIChange(Sender: TObject);
     
    7355end;
    7456
    75 procedure TFormSettings.FormClose(Sender: TObject; var CloseAction: TCloseAction
    76   );
    77 begin
    78   Core.PersistentForm1.Save(Self);
    79 end;
    80 
    8157procedure TFormSettings.FormCreate(Sender: TObject);
    8258begin
    83   Core.Translator.TranslateComponentRecursive(Self);
    84   Core.ThemeManager.UseTheme(Self);
    85   Core.ThemeManager.Themes.LoadToStrings(ComboBoxTheme.Items);
    86   Core.Translator.LanguageListToStrings(ComboBoxLanguage.Items);
     59  Core.Core.Translator.TranslateComponentRecursive(Self);
     60  Core.Core.ThemeManager.Themes.LoadToStrings(ComboBoxTheme.Items);
     61  Core.Core.Translator.LanguageListToStrings(ComboBoxLanguage.Items);
    8762end;
    8863
    8964procedure TFormSettings.Load;
    9065begin
    91   ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Translator.Language);
     66  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Core.Translator.Language);
    9267  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    93   ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.ThemeManager.Theme);
     68  ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.Core.ThemeManager.Theme);
    9469  if ComboBoxTheme.ItemIndex = -1 then ComboBoxTheme.ItemIndex := 0;
    95   CheckBoxAlwaysOnTop.Checked := Core.AlwaysOnTop;
    96   CheckBoxStartOnLogon.Checked := Core.StartOnLogon;
    97   CheckBoxStartMinimizedToTray.Checked := Core.StartMinimizedToTray;
    98   CheckBoxAutomaticDPI.Checked := Core.ScaleDPI1.AutoDetect;
    99   SpinEditDPI.Value := Core.ScaleDPI1.DPI.X;
    100   CheckBoxReopenLastFileOnStart.Checked := Core.ReopenLastFileOnStart;
     70  CheckBoxAlwaysOnTop.Checked := Core.Core.AlwaysOnTop;
     71  CheckBoxStartOnLogon.Checked := Core.Core.StartOnLogon;
     72  CheckBoxStartMinimizedToTray.Checked := Core.Core.StartMinimizedToTray;
     73  CheckBoxAutomaticDPI.Checked := Core.Core.ScaleDPI1.AutoDetect;
     74  SpinEditDPI.Value := Core.Core.ScaleDPI1.DPI.X;
     75  CheckBoxReopenLastFileOnStart.Checked := Core.Core.ReopenLastFileOnStart;
    10176  UpdateInterface;
    10277end;
     
    10580begin
    10681  if ComboBoxLanguage.ItemIndex <> -1 then
    107     Core.Translator.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
     82    Core.Core.Translator.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
    10883  if ComboBoxTheme.ItemIndex <> -1 then
    109     Core.ThemeManager.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
    110   Core.AlwaysOnTop := CheckBoxAlwaysOnTop.Checked;
    111   Core.StartOnLogon := CheckBoxStartOnLogon.Checked;
    112   Core.StartMinimizedToTray := CheckBoxStartMinimizedToTray.Checked;
    113   Core.ScaleDPI1.AutoDetect := CheckBoxAutomaticDPI.Checked;
    114   Core.ScaleDPI1.DPI := Point(SpinEditDPI.Value, SpinEditDPI.Value);
    115   Core.ReopenLastFileOnStart := CheckBoxReopenLastFileOnStart.Checked;
     84    Core.Core.ThemeManager.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
     85  Core.Core.AlwaysOnTop := CheckBoxAlwaysOnTop.Checked;
     86  Core.Core.StartOnLogon := CheckBoxStartOnLogon.Checked;
     87  Core.Core.StartMinimizedToTray := CheckBoxStartMinimizedToTray.Checked;
     88  Core.Core.ScaleDPI1.AutoDetect := CheckBoxAutomaticDPI.Checked;
     89  Core.Core.ScaleDPI1.DPI := Point(SpinEditDPI.Value, SpinEditDPI.Value);
     90  Core.Core.ReopenLastFileOnStart := CheckBoxReopenLastFileOnStart.Checked;
    11691end;
    11792
  • trunk/Languages/AcronymDecoder.cs.po

    r215 r219  
    1212"X-Generator: Poedit 3.0\n"
    1313
     14#: acronym.sacronym
     15#, fuzzy
     16msgctxt "acronym.sacronym"
     17msgid "Acronym"
     18msgstr "Zkratka"
     19
     20#: acronym.scategory
     21#, fuzzy
     22msgctxt "acronym.scategory"
     23msgid "Category"
     24msgstr "Kategorie"
     25
     26#: acronym.sdescription
     27#, fuzzy
     28msgctxt "acronym.sdescription"
     29msgid "Description"
     30msgstr "Popis"
     31
     32#: acronym.sfilenotfound
     33#, object-pascal-format, fuzzy
     34msgctxt "acronym.sfilenotfound"
     35msgid "File %s not found"
     36msgstr "Soubor %s nenalezen"
     37
     38#: acronym.smeaning
     39#, fuzzy
     40msgctxt "acronym.smeaning"
     41msgid "Meaning"
     42msgstr "Význam"
     43
     44#: acronym.snewitem
     45#, fuzzy
     46msgctxt "acronym.snewitem"
     47msgid "New item"
     48msgstr "Nová položka"
     49
     50#: acronym.snone
     51#, fuzzy
     52msgctxt "acronym.snone"
     53msgid "None"
     54msgstr "Žádný"
     55
     56#: acronym.sremoveonstart
     57#, fuzzy
     58msgctxt "acronym.sremoveonstart"
     59msgid "Remove on start"
     60msgstr "Odebrat při startu"
     61
     62#: acronym.sskip
     63#, fuzzy
     64msgctxt "acronym.sskip"
     65msgid "Skip"
     66msgstr "Přeskočit"
     67
     68#: acronym.sunsupportedauthmethod
     69#, fuzzy
     70msgctxt "acronym.sunsupportedauthmethod"
     71msgid "Unsupported HTTP authorization method"
     72msgstr "Nepodporovaná metoda HTTP autorizace"
     73
     74#: acronym.sunsupportedimportformat
     75#, fuzzy
     76msgctxt "acronym.sunsupportedimportformat"
     77msgid "Unsupported import format"
     78msgstr "Nepodporovaný formát importu"
     79
     80#: acronym.swrongfileformat
     81#, fuzzy
     82msgctxt "acronym.swrongfileformat"
     83msgid "Wrong file format"
     84msgstr "Špatný formát souboru"
     85
     86#: core.soptions
     87#, fuzzy
     88msgctxt "core.soptions"
     89msgid "options"
     90msgstr "volby"
     91
     92#: core.sprojectfile
     93#, fuzzy
     94msgctxt "core.sprojectfile"
     95msgid "project file"
     96msgstr "projektový soubor"
     97
     98#: core.sshowthishelp
     99#, fuzzy
     100msgctxt "core.sshowthishelp"
     101msgid "Show this help"
     102msgstr "Ukázat tuto nápovědu"
     103
     104#: core.sstartminimizedintray
     105#, fuzzy
     106msgctxt "core.sstartminimizedintray"
     107msgid "Start minimized in system tray"
     108msgstr "Startovat zmenšený do oznamovací oblasti"
     109
     110#: formacronyms.sfiltered
     111#, fuzzy
     112msgctxt "formacronyms.sfiltered"
     113msgid "Filtered"
     114msgstr "Filtrováno"
     115
     116#: formacronyms.sremoveacronym
     117#, fuzzy
     118msgctxt "formacronyms.sremoveacronym"
     119msgid "Remove acronyms"
     120msgstr "Odebrat zkratky"
     121
     122#: formacronyms.sremoveacronymquery
     123#, fuzzy
     124msgctxt "formacronyms.sremoveacronymquery"
     125msgid "Do you want to remove selected acronyms?"
     126msgstr "Chcete odebrat vybrané zkratky?"
     127
     128#: formacronyms.stotal
     129#, fuzzy
     130msgctxt "formacronyms.stotal"
     131msgid "Total"
     132msgstr "Celkem"
     133
     134#: formcategories.scategory
     135#, fuzzy
     136msgctxt "formcategories.scategory"
     137msgid "Category"
     138msgstr "Kategorie"
     139
     140#: formcategories.scategoryalreadyexists
     141#, object-pascal-format, fuzzy
     142msgctxt "formcategories.scategoryalreadyexists"
     143msgid "Category %s already exists!"
     144msgstr "Kategorie %s již existuje!"
     145
     146#: formcategories.scategoryquery
     147#, fuzzy
     148msgctxt "formcategories.scategoryquery"
     149msgid "Enter name of category"
     150msgstr "Zadejte jméno kategorie"
     151
     152#: formcategories.sremovecategory
     153#, fuzzy
     154msgctxt "formcategories.sremovecategory"
     155msgid "Remove categories"
     156msgstr "Odebrat kategorie"
     157
     158#: formcategories.sremovecategoryquery
     159#, fuzzy
     160msgctxt "formcategories.sremovecategoryquery"
     161msgid "Do you really want to remove selected categories?"
     162msgstr "Opravdu chcete odebrat vybrabé kategorie?"
     163
     164#: formcategoryselect.scategory
     165#, fuzzy
     166msgctxt "formcategoryselect.scategory"
     167msgid "Category"
     168msgstr "Kategorie"
     169
     170#: formcategoryselect.sremovecategory
     171#, fuzzy
     172msgctxt "formcategoryselect.sremovecategory"
     173msgid "Remove categories"
     174msgstr "Odebrat kategorie"
     175
     176#: formcategoryselect.sremovecategoryquery
     177#, fuzzy
     178msgctxt "formcategoryselect.sremovecategoryquery"
     179msgid "Do you really want to remove selected categories?"
     180msgstr "Opravdu chcete odebrat vybrané kategorie?"
     181
     182#: formcheck.sacronymcontentmultiplemeanings
     183#, object-pascal-format, fuzzy
     184msgctxt "formcheck.sacronymcontentmultiplemeanings"
     185msgid "Content acronym %s has multiple meanings: %s."
     186msgstr "Zkratka těla dokumentu %s má více významů: %s."
     187
     188#: formcheck.sacronymcountcontent
     189#, fuzzy
     190msgctxt "formcheck.sacronymcountcontent"
     191msgid "Content acronym count:"
     192msgstr "Počet zkratek obsahu:"
     193
     194#: formcheck.sacronymcountsummary
     195#, fuzzy
     196msgctxt "formcheck.sacronymcountsummary"
     197msgid "Summary acronym count:"
     198msgstr "Počet zkratek přehledu:"
     199
     200#: formcheck.sacronymsummarymultiplemeanings
     201#, object-pascal-format, fuzzy
     202msgctxt "formcheck.sacronymsummarymultiplemeanings"
     203msgid "Summary acronym %s has multiple meanings: %s."
     204msgstr "Zkratka přehledu dokumentu %s má více významů: %s."
     205
     206#: formcheck.sacronymusedbeforedefined
     207#, object-pascal-format, fuzzy
     208msgctxt "formcheck.sacronymusedbeforedefined"
     209msgid "Acronym %s used before it was defined."
     210msgstr "Zkratka %s použita před určením jejího významu."
     211
     212#: formcheck.sacronymwithdifferentmeaning
     213#, object-pascal-format, fuzzy
     214msgctxt "formcheck.sacronymwithdifferentmeaning"
     215msgid "Acronym %s has different meaning for content \"%s\" and for summary \"%s\"."
     216msgstr "Zkratka %s má odlišný význam pro tělo dokumentu \"%s\" a pro přehled \"%s\"."
     217
     218#: formcheck.sacronymwithdifferentmeaningcount
     219#, object-pascal-format, fuzzy
     220msgctxt "formcheck.sacronymwithdifferentmeaningcount"
     221msgid "Acronym %s has different meaning count for content (%d) and for summary (%d)."
     222msgstr "Zkratka %s má odlišný počet významů pro tělo dokumentu (%d) a pro přehled (%d)."
     223
     224#: formcheck.scontentacronyms
     225#, fuzzy
     226msgctxt "formcheck.scontentacronyms"
     227msgid "Content acronyms"
     228msgstr "Zkratky těla dokumentu"
     229
     230#: formcheck.scsvfilter
     231#, fuzzy
     232msgctxt "formcheck.scsvfilter"
     233msgid "CSV file (.csv)|*.csv|Any file|*.*"
     234msgstr "CSV soubor (.csv)|*.csv|Jakýkoliv soubor|*.*"
     235
     236#: formcheck.sduplicateacronymcontent
     237#, object-pascal-format, fuzzy
     238msgctxt "formcheck.sduplicateacronymcontent"
     239msgid "Duplicate acronym %s with \"%s\" in document body."
     240msgstr "Zdvojená zkratka %s s významem \"%s\" v těle dokumentu."
     241
     242#: formcheck.sduplicateacronymsummary
     243#, object-pascal-format, fuzzy
     244msgctxt "formcheck.sduplicateacronymsummary"
     245msgid "Duplicate acronym %s with \"%s\" in acronym summary."
     246msgstr "Zdvojená zkratka %s s významem \"%s\" v přehledu zkratek."
     247
     248#: formcheck.smissingacronymcontent
     249#, object-pascal-format, fuzzy
     250msgctxt "formcheck.smissingacronymcontent"
     251msgid "Document body acronym %s with meaning \"%s\" missing from acronym summary."
     252msgstr "V zkratkách přehledu chybí zkratka těla dokumentu %s s významem \"%s\"."
     253
     254#: formcheck.smissingacronymsummary
     255#, object-pascal-format, fuzzy
     256msgctxt "formcheck.smissingacronymsummary"
     257msgid "Summary acronym %s with meaning \"%s\" missing from document body."
     258msgstr "Ve zkratkách těla dokumentu chybí zkratka přehledu %s s významem \"%s\"."
     259
     260#: formcheck.spluralacronym
     261#, object-pascal-format, fuzzy
     262msgctxt "formcheck.spluralacronym"
     263msgid "Acronym %s is defined as plural in document body."
     264msgstr "Zkratka %s je definována v těle dokumentu v množném čísle."
     265
     266#: formcheck.spluralacronymused
     267#, object-pascal-format, fuzzy
     268msgctxt "formcheck.spluralacronymused"
     269msgid "Acronym %s is used as plural in document body."
     270msgstr "Zkratka %s je použita v množném čísle v těle dokumentu."
     271
     272#: formcheck.ssummaryacronyms
     273#, fuzzy
     274msgctxt "formcheck.ssummaryacronyms"
     275msgid "Summary acronyms"
     276msgstr "Zkratky přehledu"
     277
     278#: formexport.sexportedacronyms
     279#, object-pascal-format, fuzzy
     280msgctxt "formexport.sexportedacronyms"
     281msgid "Exported %d acronyms"
     282msgstr "Exportováno %d zkratek"
     283
     284#: formexport.sexporting
     285#, fuzzy
     286msgctxt "formexport.sexporting"
     287msgid "Exporting"
     288msgstr "Exportování"
     289
     290#: formimport.simportednewacronyms
     291#, object-pascal-format, fuzzy
     292msgctxt "formimport.simportednewacronyms"
     293msgid "Imported %d new acronyms."
     294msgstr "Importováno %d nových zkratek."
     295
     296#: formimportformat.sno
     297#, fuzzy
     298msgctxt "formimportformat.sno"
     299msgid "No"
     300msgstr "Ne"
     301
     302#: formimportformat.sremoveimportpattern
     303#, fuzzy
     304msgctxt "formimportformat.sremoveimportpattern"
     305msgid "Remove import pattern"
     306msgstr "Odstranit vzory importu"
     307
     308#: formimportformat.sremoveimportpatternquery
     309#, fuzzy
     310msgctxt "formimportformat.sremoveimportpatternquery"
     311msgid "Do you really want to remove selected import patterns?"
     312msgstr "Opravdu chcete odstranit vybrané vzory importu?"
     313
     314#: formimportformat.syes
     315#, fuzzy
     316msgctxt "formimportformat.syes"
     317msgid "Yes"
     318msgstr "Ano"
     319
     320#: formimportformats.simportformatalreadyexists
     321#, object-pascal-format, fuzzy
     322msgctxt "formimportformats.simportformatalreadyexists"
     323msgid "Import format %s already exists!"
     324msgstr "Formát importu %s již existuje!"
     325
     326#: formimportformats.sremoveimportformat
     327#, fuzzy
     328msgctxt "formimportformats.sremoveimportformat"
     329msgid "Remove import formats"
     330msgstr "Odebrat formáty importu"
     331
     332#: formimportformats.sremoveimportformatquery
     333#, fuzzy
     334msgctxt "formimportformats.sremoveimportformatquery"
     335msgid "Do you really want to remove selected import formats?"
     336msgstr "Opravdu chcete odebrat vybrané formáty importu?"
     337
     338#: formimportsources.simportsourcealreadyexists
     339#, object-pascal-format, fuzzy
     340msgctxt "formimportsources.simportsourcealreadyexists"
     341msgid "Import source %s already exists!"
     342msgstr "Zdroj importu %s již existuje!"
     343
     344#: formimportsources.sprocessselectedsource
     345#, fuzzy
     346msgctxt "formimportsources.sprocessselectedsource"
     347msgid "Process selected import source"
     348msgstr "Zpracovat vybrané zdroje importu"
     349
     350#: formimportsources.sremoveimportsource
     351#, fuzzy
     352msgctxt "formimportsources.sremoveimportsource"
     353msgid "Remove import sources"
     354msgstr "Odstranit zdroje importu"
     355
     356#: formimportsources.sremoveimportsourcequery
     357#, fuzzy
     358msgctxt "formimportsources.sremoveimportsourcequery"
     359msgid "Do you really want to remove selected import sources?"
     360msgstr "Opravdu chcete odebrat vybrané zdroje importu?"
     361
     362#: formmain.sacronymscount
     363#, object-pascal-format, fuzzy
     364msgctxt "formmain.sacronymscount"
     365msgid "Acronyms count: %d"
     366msgstr "Počet zkratek: %d"
     367
     368#: formmain.saddedcount
     369#, object-pascal-format, fuzzy
     370msgctxt "formmain.saddedcount"
     371msgid "Imported %d acronyms. Added %d new."
     372msgstr "Importováno %d zkratek. Přidáno %d nových."
     373
     374#: formmain.sappexit
     375#, fuzzy
     376msgctxt "formmain.sappexit"
     377msgid "Application exit"
     378msgstr "Ukončení aplikace"
     379
     380#: formmain.sappexitquery
     381#, fuzzy
     382msgctxt "formmain.sappexitquery"
     383msgid "Acronyms were modified. Do you want to save them to file before exit?"
     384msgstr "Zkratky byly upraveny. Chcete je před odchodem uložit do souboru?"
     385
     386#: formmain.sfilefilter
     387#, fuzzy
     388msgctxt "formmain.sfilefilter"
     389msgid "Acronym Decoder project (.adp)|*.adp|All files|*.*"
     390msgstr "Acronym Decoder projekt (.adp)|*.adp|Všechny soubory|*.*"
     391
     392#: formmain.smeaningscount
     393#, object-pascal-format, fuzzy
     394msgctxt "formmain.smeaningscount"
     395msgid "Meanings count: %d"
     396msgstr "Počet významů: %d"
     397
     398#: formmain.smodified
     399#, fuzzy
     400msgctxt "formmain.smodified"
     401msgid "modified"
     402msgstr "upraveno"
     403
     404#: formmain.sprocessimportsources
     405#, fuzzy
     406msgctxt "formmain.sprocessimportsources"
     407msgid "Process import sources"
     408msgstr "Zpracovat zdroje importu"
     409
    14410#: tcore.applicationinfo1.description
    15411msgid "A simple tool for quick searching of meaning for various acronyms and abbreviations."
     
    7631159msgstr "Téma:"
    7641160
    765 #: uacronym.sacronym
    766 msgctxt "uacronym.sacronym"
    767 msgid "Acronym"
    768 msgstr "Zkratka"
    769 
    770 #: uacronym.scategory
    771 msgctxt "uacronym.scategory"
    772 msgid "Category"
    773 msgstr "Kategorie"
    774 
    775 #: uacronym.sdescription
    776 msgctxt "uacronym.sdescription"
    777 msgid "Description"
    778 msgstr "Popis"
    779 
    780 #: uacronym.sfilenotfound
    781 #, object-pascal-format
    782 msgid "File %s not found"
    783 msgstr "Soubor %s nenalezen"
    784 
    785 #: uacronym.smeaning
    786 msgctxt "uacronym.smeaning"
    787 msgid "Meaning"
    788 msgstr "Význam"
    789 
    790 #: uacronym.snewitem
    791 msgid "New item"
    792 msgstr "Nová položka"
    793 
    794 #: uacronym.snone
    795 msgid "None"
    796 msgstr "Žádný"
    797 
    798 #: uacronym.sremoveonstart
    799 msgid "Remove on start"
    800 msgstr "Odebrat při startu"
    801 
    802 #: uacronym.sskip
    803 msgid "Skip"
    804 msgstr "Přeskočit"
    805 
    806 #: uacronym.sunsupportedauthmethod
    807 msgid "Unsupported HTTP authorization method"
    808 msgstr "Nepodporovaná metoda HTTP autorizace"
    809 
    810 #: uacronym.sunsupportedimportformat
    811 msgid "Unsupported import format"
    812 msgstr "Nepodporovaný formát importu"
    813 
    814 #: uacronym.swrongfileformat
    815 msgid "Wrong file format"
    816 msgstr "Špatný formát souboru"
    817 
    818 #: ucore.soptions
    819 msgid "options"
    820 msgstr "volby"
    821 
    822 #: ucore.sprojectfile
    823 msgid "project file"
    824 msgstr "projektový soubor"
    825 
    826 #: ucore.sshowthishelp
    827 msgid "Show this help"
    828 msgstr "Ukázat tuto nápovědu"
    829 
    830 #: ucore.sstartminimizedintray
    831 msgid "Start minimized in system tray"
    832 msgstr "Startovat zmenšený do oznamovací oblasti"
    833 
    834 #: uformacronyms.sfiltered
    835 msgid "Filtered"
    836 msgstr "Filtrováno"
    837 
    838 #: uformacronyms.sremoveacronym
    839 msgctxt "uformacronyms.sremoveacronym"
    840 msgid "Remove acronyms"
    841 msgstr "Odebrat zkratky"
    842 
    843 #: uformacronyms.sremoveacronymquery
    844 msgctxt "uformacronyms.sremoveacronymquery"
    845 msgid "Do you want to remove selected acronyms?"
    846 msgstr "Chcete odebrat vybrané zkratky?"
    847 
    848 #: uformacronyms.stotal
    849 msgid "Total"
    850 msgstr "Celkem"
    851 
    852 #: uformcategories.scategory
    853 msgctxt "uformcategories.scategory"
    854 msgid "Category"
    855 msgstr "Kategorie"
    856 
    857 #: uformcategories.scategoryalreadyexists
    858 #, object-pascal-format
    859 msgid "Category %s already exists!"
    860 msgstr "Kategorie %s již existuje!"
    861 
    862 #: uformcategories.scategoryquery
    863 msgid "Enter name of category"
    864 msgstr "Zadejte jméno kategorie"
    865 
    866 #: uformcategories.sremovecategory
    867 msgctxt "uformcategories.sremovecategory"
    868 msgid "Remove categories"
    869 msgstr "Odebrat kategorie"
    870 
    871 #: uformcategories.sremovecategoryquery
    872 msgctxt "uformcategories.sremovecategoryquery"
    873 msgid "Do you really want to remove selected categories?"
    874 msgstr "Opravdu chcete odebrat vybrabé kategorie?"
    875 
    876 #: uformcategoryselect.scategory
    877 msgctxt "uformcategoryselect.scategory"
    878 msgid "Category"
    879 msgstr "Kategorie"
    880 
    881 #: uformcategoryselect.sremovecategory
    882 msgctxt "uformcategoryselect.sremovecategory"
    883 msgid "Remove categories"
    884 msgstr "Odebrat kategorie"
    885 
    886 #: uformcategoryselect.sremovecategoryquery
    887 msgctxt "uformcategoryselect.sremovecategoryquery"
    888 msgid "Do you really want to remove selected categories?"
    889 msgstr "Opravdu chcete odebrat vybrané kategorie?"
    890 
    891 #: uformcheck.sacronymcontentmultiplemeanings
    892 #, object-pascal-format
    893 msgid "Content acronym %s has multiple meanings: %s."
    894 msgstr "Zkratka těla dokumentu %s má více významů: %s."
    895 
    896 #: uformcheck.sacronymcountcontent
    897 msgctxt "uformcheck.sacronymcountcontent"
    898 msgid "Content acronym count:"
    899 msgstr "Počet zkratek obsahu:"
    900 
    901 #: uformcheck.sacronymcountsummary
    902 msgctxt "uformcheck.sacronymcountsummary"
    903 msgid "Summary acronym count:"
    904 msgstr "Počet zkratek přehledu:"
    905 
    906 #: uformcheck.sacronymsummarymultiplemeanings
    907 #, object-pascal-format
    908 msgid "Summary acronym %s has multiple meanings: %s."
    909 msgstr "Zkratka přehledu dokumentu %s má více významů: %s."
    910 
    911 #: uformcheck.sacronymusedbeforedefined
    912 #, object-pascal-format
    913 msgid "Acronym %s used before it was defined."
    914 msgstr "Zkratka %s použita před určením jejího významu."
    915 
    916 #: uformcheck.sacronymwithdifferentmeaning
    917 #, object-pascal-format
    918 msgid "Acronym %s has different meaning for content \"%s\" and for summary \"%s\"."
    919 msgstr "Zkratka %s má odlišný význam pro tělo dokumentu \"%s\" a pro přehled \"%s\"."
    920 
    921 #: uformcheck.sacronymwithdifferentmeaningcount
    922 #, object-pascal-format
    923 msgid "Acronym %s has different meaning count for content (%d) and for summary (%d)."
    924 msgstr "Zkratka %s má odlišný počet významů pro tělo dokumentu (%d) a pro přehled (%d)."
    925 
    926 #: uformcheck.scontentacronyms
    927 msgid "Content acronyms"
    928 msgstr "Zkratky těla dokumentu"
    929 
    930 #: uformcheck.scsvfilter
    931 msgid "CSV file (.csv)|*.csv|Any file|*.*"
    932 msgstr "CSV soubor (.csv)|*.csv|Jakýkoliv soubor|*.*"
    933 
    934 #: uformcheck.sduplicateacronymcontent
    935 #, object-pascal-format
    936 msgid "Duplicate acronym %s with \"%s\" in document body."
    937 msgstr "Zdvojená zkratka %s s významem \"%s\" v těle dokumentu."
    938 
    939 #: uformcheck.sduplicateacronymsummary
    940 #, object-pascal-format
    941 msgid "Duplicate acronym %s with \"%s\" in acronym summary."
    942 msgstr "Zdvojená zkratka %s s významem \"%s\" v přehledu zkratek."
    943 
    944 #: uformcheck.smissingacronymcontent
    945 #, object-pascal-format
    946 msgid "Document body acronym %s with meaning \"%s\" missing from acronym summary."
    947 msgstr "V zkratkách přehledu chybí zkratka těla dokumentu %s s významem \"%s\"."
    948 
    949 #: uformcheck.smissingacronymsummary
    950 #, object-pascal-format
    951 msgid "Summary acronym %s with meaning \"%s\" missing from document body."
    952 msgstr "Ve zkratkách těla dokumentu chybí zkratka přehledu %s s významem \"%s\"."
    953 
    954 #: uformcheck.spluralacronym
    955 #, object-pascal-format
    956 msgid "Acronym %s is defined as plural in document body."
    957 msgstr "Zkratka %s je definována v těle dokumentu v množném čísle."
    958 
    959 #: uformcheck.spluralacronymused
    960 #, object-pascal-format
    961 msgid "Acronym %s is used as plural in document body."
    962 msgstr "Zkratka %s je použita v množném čísle v těle dokumentu."
    963 
    964 #: uformcheck.ssummaryacronyms
    965 msgid "Summary acronyms"
    966 msgstr "Zkratky přehledu"
    967 
    968 #: uformexport.sexportedacronyms
    969 #, object-pascal-format
    970 msgctxt "uformexport.sexportedacronyms"
    971 msgid "Exported %d acronyms"
    972 msgstr "Exportováno %d zkratek"
    973 
    974 #: uformexport.sexporting
    975 msgid "Exporting"
    976 msgstr "Exportování"
    977 
    978 #: uformimport.simportednewacronyms
    979 #, object-pascal-format
    980 msgid "Imported %d new acronyms."
    981 msgstr "Importováno %d nových zkratek."
    982 
    983 #: uformimportformat.sno
    984 msgid "No"
    985 msgstr "Ne"
    986 
    987 #: uformimportformat.sremoveimportpattern
    988 msgid "Remove import pattern"
    989 msgstr "Odstranit vzory importu"
    990 
    991 #: uformimportformat.sremoveimportpatternquery
    992 msgid "Do you really want to remove selected import patterns?"
    993 msgstr "Opravdu chcete odstranit vybrané vzory importu?"
    994 
    995 #: uformimportformat.syes
    996 msgid "Yes"
    997 msgstr "Ano"
    998 
    999 #: uformimportformats.simportformatalreadyexists
    1000 #, object-pascal-format
    1001 msgid "Import format %s already exists!"
    1002 msgstr "Formát importu %s již existuje!"
    1003 
    1004 #: uformimportformats.sremoveimportformat
    1005 msgid "Remove import formats"
    1006 msgstr "Odebrat formáty importu"
    1007 
    1008 #: uformimportformats.sremoveimportformatquery
    1009 msgid "Do you really want to remove selected import formats?"
    1010 msgstr "Opravdu chcete odebrat vybrané formáty importu?"
    1011 
    1012 #: uformimportsources.simportsourcealreadyexists
    1013 #, object-pascal-format
    1014 msgctxt "uformimportsources.simportsourcealreadyexists"
    1015 msgid "Import source %s already exists!"
    1016 msgstr "Zdroj importu %s již existuje!"
    1017 
    1018 #: uformimportsources.sprocessselectedsource
    1019 msgid "Process selected import source"
    1020 msgstr "Zpracovat vybrané zdroje importu"
    1021 
    1022 #: uformimportsources.sremoveimportsource
    1023 msgctxt "uformimportsources.sremoveimportsource"
    1024 msgid "Remove import sources"
    1025 msgstr "Odstranit zdroje importu"
    1026 
    1027 #: uformimportsources.sremoveimportsourcequery
    1028 msgctxt "uformimportsources.sremoveimportsourcequery"
    1029 msgid "Do you really want to remove selected import sources?"
    1030 msgstr "Opravdu chcete odebrat vybrané zdroje importu?"
    1031 
    1032 #: uformmain.sacronymscount
    1033 #, object-pascal-format
    1034 msgid "Acronyms count: %d"
    1035 msgstr "Počet zkratek: %d"
    1036 
    1037 #: uformmain.saddedcount
    1038 #, object-pascal-format
    1039 msgid "Imported %d acronyms. Added %d new."
    1040 msgstr "Importováno %d zkratek. Přidáno %d nových."
    1041 
    1042 #: uformmain.sappexit
    1043 msgid "Application exit"
    1044 msgstr "Ukončení aplikace"
    1045 
    1046 #: uformmain.sappexitquery
    1047 msgid "Acronyms were modified. Do you want to save them to file before exit?"
    1048 msgstr "Zkratky byly upraveny. Chcete je před odchodem uložit do souboru?"
    1049 
    1050 #: uformmain.sfilefilter
    1051 msgid "Acronym Decoder project (.adp)|*.adp|All files|*.*"
    1052 msgstr "Acronym Decoder projekt (.adp)|*.adp|Všechny soubory|*.*"
    1053 
    1054 #: uformmain.smeaningscount
    1055 #, object-pascal-format
    1056 msgid "Meanings count: %d"
    1057 msgstr "Počet významů: %d"
    1058 
    1059 #: uformmain.smodified
    1060 msgid "modified"
    1061 msgstr "upraveno"
    1062 
    1063 #: uformmain.sprocessimportsources
    1064 msgid "Process import sources"
    1065 msgstr "Zpracovat zdroje importu"
  • trunk/Languages/AcronymDecoder.pot

    r218 r219  
    11msgid ""
    22msgstr "Content-Type: text/plain; charset=UTF-8"
     3
     4#: acronym.sacronym
     5msgctxt "acronym.sacronym"
     6msgid "Acronym"
     7msgstr ""
     8
     9#: acronym.scategory
     10msgctxt "acronym.scategory"
     11msgid "Category"
     12msgstr ""
     13
     14#: acronym.sdescription
     15msgctxt "acronym.sdescription"
     16msgid "Description"
     17msgstr ""
     18
     19#: acronym.sfilenotfound
     20#, object-pascal-format
     21msgctxt "acronym.sfilenotfound"
     22msgid "File %s not found"
     23msgstr ""
     24
     25#: acronym.smeaning
     26msgctxt "acronym.smeaning"
     27msgid "Meaning"
     28msgstr ""
     29
     30#: acronym.snewitem
     31msgctxt "acronym.snewitem"
     32msgid "New item"
     33msgstr ""
     34
     35#: acronym.snone
     36msgctxt "acronym.snone"
     37msgid "None"
     38msgstr ""
     39
     40#: acronym.sremoveonstart
     41msgctxt "acronym.sremoveonstart"
     42msgid "Remove on start"
     43msgstr ""
     44
     45#: acronym.sskip
     46msgctxt "acronym.sskip"
     47msgid "Skip"
     48msgstr ""
     49
     50#: acronym.sunsupportedauthmethod
     51msgctxt "acronym.sunsupportedauthmethod"
     52msgid "Unsupported HTTP authorization method"
     53msgstr ""
     54
     55#: acronym.sunsupportedimportformat
     56msgctxt "acronym.sunsupportedimportformat"
     57msgid "Unsupported import format"
     58msgstr ""
     59
     60#: acronym.swrongfileformat
     61msgctxt "acronym.swrongfileformat"
     62msgid "Wrong file format"
     63msgstr ""
     64
     65#: core.soptions
     66msgctxt "core.soptions"
     67msgid "options"
     68msgstr ""
     69
     70#: core.sprojectfile
     71msgctxt "core.sprojectfile"
     72msgid "project file"
     73msgstr ""
     74
     75#: core.sshowthishelp
     76msgctxt "core.sshowthishelp"
     77msgid "Show this help"
     78msgstr ""
     79
     80#: core.sstartminimizedintray
     81msgctxt "core.sstartminimizedintray"
     82msgid "Start minimized in system tray"
     83msgstr ""
     84
     85#: formacronyms.sfiltered
     86msgctxt "formacronyms.sfiltered"
     87msgid "Filtered"
     88msgstr ""
     89
     90#: formacronyms.sremoveacronym
     91msgctxt "formacronyms.sremoveacronym"
     92msgid "Remove acronyms"
     93msgstr ""
     94
     95#: formacronyms.sremoveacronymquery
     96msgctxt "formacronyms.sremoveacronymquery"
     97msgid "Do you want to remove selected acronyms?"
     98msgstr ""
     99
     100#: formacronyms.stotal
     101msgctxt "formacronyms.stotal"
     102msgid "Total"
     103msgstr ""
     104
     105#: formcategories.scategory
     106msgctxt "formcategories.scategory"
     107msgid "Category"
     108msgstr ""
     109
     110#: formcategories.scategoryalreadyexists
     111#, object-pascal-format
     112msgctxt "formcategories.scategoryalreadyexists"
     113msgid "Category %s already exists!"
     114msgstr ""
     115
     116#: formcategories.scategoryquery
     117msgctxt "formcategories.scategoryquery"
     118msgid "Enter name of category"
     119msgstr ""
     120
     121#: formcategories.sremovecategory
     122msgctxt "formcategories.sremovecategory"
     123msgid "Remove categories"
     124msgstr ""
     125
     126#: formcategories.sremovecategoryquery
     127msgctxt "formcategories.sremovecategoryquery"
     128msgid "Do you really want to remove selected categories?"
     129msgstr ""
     130
     131#: formcategoryselect.scategory
     132msgctxt "formcategoryselect.scategory"
     133msgid "Category"
     134msgstr ""
     135
     136#: formcategoryselect.sremovecategory
     137msgctxt "formcategoryselect.sremovecategory"
     138msgid "Remove categories"
     139msgstr ""
     140
     141#: formcategoryselect.sremovecategoryquery
     142msgctxt "formcategoryselect.sremovecategoryquery"
     143msgid "Do you really want to remove selected categories?"
     144msgstr ""
     145
     146#: formcheck.sacronymcontentmultiplemeanings
     147#, object-pascal-format
     148msgctxt "formcheck.sacronymcontentmultiplemeanings"
     149msgid "Content acronym %s has multiple meanings: %s."
     150msgstr ""
     151
     152#: formcheck.sacronymcountcontent
     153msgctxt "formcheck.sacronymcountcontent"
     154msgid "Content acronym count:"
     155msgstr ""
     156
     157#: formcheck.sacronymcountsummary
     158msgctxt "formcheck.sacronymcountsummary"
     159msgid "Summary acronym count:"
     160msgstr ""
     161
     162#: formcheck.sacronymsummarymultiplemeanings
     163#, object-pascal-format
     164msgctxt "formcheck.sacronymsummarymultiplemeanings"
     165msgid "Summary acronym %s has multiple meanings: %s."
     166msgstr ""
     167
     168#: formcheck.sacronymusedbeforedefined
     169#, object-pascal-format
     170msgctxt "formcheck.sacronymusedbeforedefined"
     171msgid "Acronym %s used before it was defined."
     172msgstr ""
     173
     174#: formcheck.sacronymwithdifferentmeaning
     175#, object-pascal-format
     176msgctxt "formcheck.sacronymwithdifferentmeaning"
     177msgid "Acronym %s has different meaning for content \"%s\" and for summary \"%s\"."
     178msgstr ""
     179
     180#: formcheck.sacronymwithdifferentmeaningcount
     181#, object-pascal-format
     182msgctxt "formcheck.sacronymwithdifferentmeaningcount"
     183msgid "Acronym %s has different meaning count for content (%d) and for summary (%d)."
     184msgstr ""
     185
     186#: formcheck.scontentacronyms
     187msgctxt "formcheck.scontentacronyms"
     188msgid "Content acronyms"
     189msgstr ""
     190
     191#: formcheck.scsvfilter
     192msgctxt "formcheck.scsvfilter"
     193msgid "CSV file (.csv)|*.csv|Any file|*.*"
     194msgstr ""
     195
     196#: formcheck.sduplicateacronymcontent
     197#, object-pascal-format
     198msgctxt "formcheck.sduplicateacronymcontent"
     199msgid "Duplicate acronym %s with \"%s\" in document body."
     200msgstr ""
     201
     202#: formcheck.sduplicateacronymsummary
     203#, object-pascal-format
     204msgctxt "formcheck.sduplicateacronymsummary"
     205msgid "Duplicate acronym %s with \"%s\" in acronym summary."
     206msgstr ""
     207
     208#: formcheck.smissingacronymcontent
     209#, object-pascal-format
     210msgctxt "formcheck.smissingacronymcontent"
     211msgid "Document body acronym %s with meaning \"%s\" missing from acronym summary."
     212msgstr ""
     213
     214#: formcheck.smissingacronymsummary
     215#, object-pascal-format
     216msgctxt "formcheck.smissingacronymsummary"
     217msgid "Summary acronym %s with meaning \"%s\" missing from document body."
     218msgstr ""
     219
     220#: formcheck.spluralacronym
     221#, object-pascal-format
     222msgctxt "formcheck.spluralacronym"
     223msgid "Acronym %s is defined as plural in document body."
     224msgstr ""
     225
     226#: formcheck.spluralacronymused
     227#, object-pascal-format
     228msgctxt "formcheck.spluralacronymused"
     229msgid "Acronym %s is used as plural in document body."
     230msgstr ""
     231
     232#: formcheck.ssummaryacronyms
     233msgctxt "formcheck.ssummaryacronyms"
     234msgid "Summary acronyms"
     235msgstr ""
     236
     237#: formexport.sexportedacronyms
     238#, object-pascal-format
     239msgctxt "formexport.sexportedacronyms"
     240msgid "Exported %d acronyms"
     241msgstr ""
     242
     243#: formexport.sexporting
     244msgctxt "formexport.sexporting"
     245msgid "Exporting"
     246msgstr ""
     247
     248#: formimport.simportednewacronyms
     249#, object-pascal-format
     250msgctxt "formimport.simportednewacronyms"
     251msgid "Imported %d new acronyms."
     252msgstr ""
     253
     254#: formimportformat.sno
     255msgctxt "formimportformat.sno"
     256msgid "No"
     257msgstr ""
     258
     259#: formimportformat.sremoveimportpattern
     260msgctxt "formimportformat.sremoveimportpattern"
     261msgid "Remove import pattern"
     262msgstr ""
     263
     264#: formimportformat.sremoveimportpatternquery
     265msgctxt "formimportformat.sremoveimportpatternquery"
     266msgid "Do you really want to remove selected import patterns?"
     267msgstr ""
     268
     269#: formimportformat.syes
     270msgctxt "formimportformat.syes"
     271msgid "Yes"
     272msgstr ""
     273
     274#: formimportformats.simportformatalreadyexists
     275#, object-pascal-format
     276msgctxt "formimportformats.simportformatalreadyexists"
     277msgid "Import format %s already exists!"
     278msgstr ""
     279
     280#: formimportformats.sremoveimportformat
     281msgctxt "formimportformats.sremoveimportformat"
     282msgid "Remove import formats"
     283msgstr ""
     284
     285#: formimportformats.sremoveimportformatquery
     286msgctxt "formimportformats.sremoveimportformatquery"
     287msgid "Do you really want to remove selected import formats?"
     288msgstr ""
     289
     290#: formimportsources.simportsourcealreadyexists
     291#, object-pascal-format
     292msgctxt "formimportsources.simportsourcealreadyexists"
     293msgid "Import source %s already exists!"
     294msgstr ""
     295
     296#: formimportsources.sprocessselectedsource
     297msgctxt "formimportsources.sprocessselectedsource"
     298msgid "Process selected import source"
     299msgstr ""
     300
     301#: formimportsources.sremoveimportsource
     302msgctxt "formimportsources.sremoveimportsource"
     303msgid "Remove import sources"
     304msgstr ""
     305
     306#: formimportsources.sremoveimportsourcequery
     307msgctxt "formimportsources.sremoveimportsourcequery"
     308msgid "Do you really want to remove selected import sources?"
     309msgstr ""
     310
     311#: formmain.sacronymscount
     312#, object-pascal-format
     313msgctxt "formmain.sacronymscount"
     314msgid "Acronyms count: %d"
     315msgstr ""
     316
     317#: formmain.saddedcount
     318#, object-pascal-format
     319msgctxt "formmain.saddedcount"
     320msgid "Imported %d acronyms. Added %d new."
     321msgstr ""
     322
     323#: formmain.sappexit
     324msgctxt "formmain.sappexit"
     325msgid "Application exit"
     326msgstr ""
     327
     328#: formmain.sappexitquery
     329msgctxt "formmain.sappexitquery"
     330msgid "Acronyms were modified. Do you want to save them to file before exit?"
     331msgstr ""
     332
     333#: formmain.sfilefilter
     334msgctxt "formmain.sfilefilter"
     335msgid "Acronym Decoder project (.adp)|*.adp|All files|*.*"
     336msgstr ""
     337
     338#: formmain.smeaningscount
     339#, object-pascal-format
     340msgctxt "formmain.smeaningscount"
     341msgid "Meanings count: %d"
     342msgstr ""
     343
     344#: formmain.smodified
     345msgctxt "formmain.smodified"
     346msgid "modified"
     347msgstr ""
     348
     349#: formmain.sprocessimportsources
     350msgctxt "formmain.sprocessimportsources"
     351msgid "Process import sources"
     352msgstr ""
    3353
    4354#: tcore.applicationinfo1.description
     
    7441094msgstr ""
    7451095
    746 #: uacronym.sacronym
    747 msgctxt "uacronym.sacronym"
    748 msgid "Acronym"
    749 msgstr ""
    750 
    751 #: uacronym.scategory
    752 msgctxt "uacronym.scategory"
    753 msgid "Category"
    754 msgstr ""
    755 
    756 #: uacronym.sdescription
    757 msgctxt "uacronym.sdescription"
    758 msgid "Description"
    759 msgstr ""
    760 
    761 #: uacronym.sfilenotfound
    762 #, object-pascal-format
    763 msgid "File %s not found"
    764 msgstr ""
    765 
    766 #: uacronym.smeaning
    767 msgctxt "uacronym.smeaning"
    768 msgid "Meaning"
    769 msgstr ""
    770 
    771 #: uacronym.snewitem
    772 msgid "New item"
    773 msgstr ""
    774 
    775 #: uacronym.snone
    776 msgid "None"
    777 msgstr ""
    778 
    779 #: uacronym.sremoveonstart
    780 msgid "Remove on start"
    781 msgstr ""
    782 
    783 #: uacronym.sskip
    784 msgid "Skip"
    785 msgstr ""
    786 
    787 #: uacronym.sunsupportedauthmethod
    788 msgid "Unsupported HTTP authorization method"
    789 msgstr ""
    790 
    791 #: uacronym.sunsupportedimportformat
    792 msgid "Unsupported import format"
    793 msgstr ""
    794 
    795 #: uacronym.swrongfileformat
    796 msgid "Wrong file format"
    797 msgstr ""
    798 
    799 #: ucore.soptions
    800 msgid "options"
    801 msgstr ""
    802 
    803 #: ucore.sprojectfile
    804 msgid "project file"
    805 msgstr ""
    806 
    807 #: ucore.sshowthishelp
    808 msgid "Show this help"
    809 msgstr ""
    810 
    811 #: ucore.sstartminimizedintray
    812 msgid "Start minimized in system tray"
    813 msgstr ""
    814 
    815 #: uformacronyms.sfiltered
    816 msgid "Filtered"
    817 msgstr ""
    818 
    819 #: uformacronyms.sremoveacronym
    820 msgid "Remove acronyms"
    821 msgstr ""
    822 
    823 #: uformacronyms.sremoveacronymquery
    824 msgid "Do you want to remove selected acronyms?"
    825 msgstr ""
    826 
    827 #: uformacronyms.stotal
    828 msgid "Total"
    829 msgstr ""
    830 
    831 #: uformcategories.scategory
    832 msgctxt "uformcategories.scategory"
    833 msgid "Category"
    834 msgstr ""
    835 
    836 #: uformcategories.scategoryalreadyexists
    837 #, object-pascal-format
    838 msgid "Category %s already exists!"
    839 msgstr ""
    840 
    841 #: uformcategories.scategoryquery
    842 msgid "Enter name of category"
    843 msgstr ""
    844 
    845 #: uformcategories.sremovecategory
    846 msgctxt "uformcategories.sremovecategory"
    847 msgid "Remove categories"
    848 msgstr ""
    849 
    850 #: uformcategories.sremovecategoryquery
    851 msgctxt "uformcategories.sremovecategoryquery"
    852 msgid "Do you really want to remove selected categories?"
    853 msgstr ""
    854 
    855 #: uformcategoryselect.scategory
    856 msgctxt "uformcategoryselect.scategory"
    857 msgid "Category"
    858 msgstr ""
    859 
    860 #: uformcategoryselect.sremovecategory
    861 msgctxt "uformcategoryselect.sremovecategory"
    862 msgid "Remove categories"
    863 msgstr ""
    864 
    865 #: uformcategoryselect.sremovecategoryquery
    866 msgctxt "uformcategoryselect.sremovecategoryquery"
    867 msgid "Do you really want to remove selected categories?"
    868 msgstr ""
    869 
    870 #: uformcheck.sacronymcontentmultiplemeanings
    871 #, object-pascal-format
    872 msgid "Content acronym %s has multiple meanings: %s."
    873 msgstr ""
    874 
    875 #: uformcheck.sacronymcountcontent
    876 msgid "Content acronym count:"
    877 msgstr ""
    878 
    879 #: uformcheck.sacronymcountsummary
    880 msgid "Summary acronym count:"
    881 msgstr ""
    882 
    883 #: uformcheck.sacronymsummarymultiplemeanings
    884 #, object-pascal-format
    885 msgid "Summary acronym %s has multiple meanings: %s."
    886 msgstr ""
    887 
    888 #: uformcheck.sacronymusedbeforedefined
    889 #, object-pascal-format
    890 msgid "Acronym %s used before it was defined."
    891 msgstr ""
    892 
    893 #: uformcheck.sacronymwithdifferentmeaning
    894 #, object-pascal-format
    895 msgid "Acronym %s has different meaning for content \"%s\" and for summary \"%s\"."
    896 msgstr ""
    897 
    898 #: uformcheck.sacronymwithdifferentmeaningcount
    899 #, object-pascal-format
    900 msgid "Acronym %s has different meaning count for content (%d) and for summary (%d)."
    901 msgstr ""
    902 
    903 #: uformcheck.scontentacronyms
    904 msgid "Content acronyms"
    905 msgstr ""
    906 
    907 #: uformcheck.scsvfilter
    908 msgid "CSV file (.csv)|*.csv|Any file|*.*"
    909 msgstr ""
    910 
    911 #: uformcheck.sduplicateacronymcontent
    912 #, object-pascal-format
    913 msgid "Duplicate acronym %s with \"%s\" in document body."
    914 msgstr ""
    915 
    916 #: uformcheck.sduplicateacronymsummary
    917 #, object-pascal-format
    918 msgid "Duplicate acronym %s with \"%s\" in acronym summary."
    919 msgstr ""
    920 
    921 #: uformcheck.smissingacronymcontent
    922 #, object-pascal-format
    923 msgid "Document body acronym %s with meaning \"%s\" missing from acronym summary."
    924 msgstr ""
    925 
    926 #: uformcheck.smissingacronymsummary
    927 #, object-pascal-format
    928 msgid "Summary acronym %s with meaning \"%s\" missing from document body."
    929 msgstr ""
    930 
    931 #: uformcheck.spluralacronym
    932 #, object-pascal-format
    933 msgid "Acronym %s is defined as plural in document body."
    934 msgstr ""
    935 
    936 #: uformcheck.spluralacronymused
    937 #, object-pascal-format
    938 msgid "Acronym %s is used as plural in document body."
    939 msgstr ""
    940 
    941 #: uformcheck.ssummaryacronyms
    942 msgid "Summary acronyms"
    943 msgstr ""
    944 
    945 #: uformexport.sexportedacronyms
    946 #, object-pascal-format
    947 msgid "Exported %d acronyms"
    948 msgstr ""
    949 
    950 #: uformexport.sexporting
    951 msgid "Exporting"
    952 msgstr ""
    953 
    954 #: uformimport.simportednewacronyms
    955 #, object-pascal-format
    956 msgid "Imported %d new acronyms."
    957 msgstr ""
    958 
    959 #: uformimportformat.sno
    960 msgid "No"
    961 msgstr ""
    962 
    963 #: uformimportformat.sremoveimportpattern
    964 msgid "Remove import pattern"
    965 msgstr ""
    966 
    967 #: uformimportformat.sremoveimportpatternquery
    968 msgid "Do you really want to remove selected import patterns?"
    969 msgstr ""
    970 
    971 #: uformimportformat.syes
    972 msgid "Yes"
    973 msgstr ""
    974 
    975 #: uformimportformats.simportformatalreadyexists
    976 #, object-pascal-format
    977 msgid "Import format %s already exists!"
    978 msgstr ""
    979 
    980 #: uformimportformats.sremoveimportformat
    981 msgid "Remove import formats"
    982 msgstr ""
    983 
    984 #: uformimportformats.sremoveimportformatquery
    985 msgid "Do you really want to remove selected import formats?"
    986 msgstr ""
    987 
    988 #: uformimportsources.simportsourcealreadyexists
    989 #, object-pascal-format
    990 msgid "Import source %s already exists!"
    991 msgstr ""
    992 
    993 #: uformimportsources.sprocessselectedsource
    994 msgid "Process selected import source"
    995 msgstr ""
    996 
    997 #: uformimportsources.sremoveimportsource
    998 msgid "Remove import sources"
    999 msgstr ""
    1000 
    1001 #: uformimportsources.sremoveimportsourcequery
    1002 msgid "Do you really want to remove selected import sources?"
    1003 msgstr ""
    1004 
    1005 #: uformmain.sacronymscount
    1006 #, object-pascal-format
    1007 msgid "Acronyms count: %d"
    1008 msgstr ""
    1009 
    1010 #: uformmain.saddedcount
    1011 #, object-pascal-format
    1012 msgid "Imported %d acronyms. Added %d new."
    1013 msgstr ""
    1014 
    1015 #: uformmain.sappexit
    1016 msgid "Application exit"
    1017 msgstr ""
    1018 
    1019 #: uformmain.sappexitquery
    1020 msgid "Acronyms were modified. Do you want to save them to file before exit?"
    1021 msgstr ""
    1022 
    1023 #: uformmain.sfilefilter
    1024 msgid "Acronym Decoder project (.adp)|*.adp|All files|*.*"
    1025 msgstr ""
    1026 
    1027 #: uformmain.smeaningscount
    1028 #, object-pascal-format
    1029 msgid "Meanings count: %d"
    1030 msgstr ""
    1031 
    1032 #: uformmain.smodified
    1033 msgid "modified"
    1034 msgstr ""
    1035 
    1036 #: uformmain.sprocessimportsources
    1037 msgid "Process import sources"
    1038 msgstr ""
    1039 
  • trunk/Packages/Common/ApplicationInfo.pas

    r218 r219  
    1 unit UApplicationInfo;
    2 
    3 {$mode delphi}
     1unit ApplicationInfo;
    42
    53interface
    64
    75uses
    8   SysUtils, Classes, Forms, URegistry, Controls, Graphics, LCLType;
     6  SysUtils, Classes, Forms, RegistryEx, Controls, Graphics, LCLType;
    97
    108type
     
    5957procedure Register;
    6058
     59
    6160implementation
    6261
  • trunk/Packages/Common/Common.Delay.pas

    r218 r219  
    1 unit UDelay;
    2 
    3 {$mode delphi}
     1unit Common.Delay;
    42
    53interface
     
    7371
    7472end.
    75 
  • trunk/Packages/Common/Common.lpk

    r215 r219  
    1111      <PathDelim Value="\"/>
    1212      <SearchPaths>
     13        <OtherUnitFiles Value="Forms"/>
    1314        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/>
    1415      </SearchPaths>
     
    3334      <Other>
    3435        <CompilerMessages>
    35           <IgnoredMessages idx6058="True" idx5024="True" idx3124="True" idx3123="True"/>
     36          <IgnoredMessages idx6058="True" idx5071="True" idx5024="True" idx3124="True" idx3123="True"/>
    3637        </CompilerMessages>
    3738      </Other>
     
    4142Source: https://svn.zdechov.net/PascalClassLibrary/Common/"/>
    4243    <License Value="Copy left."/>
    43     <Version Minor="9"/>
    44     <Files Count="29">
     44    <Version Minor="12"/>
     45    <Files Count="40">
    4546      <Item1>
    4647        <Filename Value="StopWatch.pas"/>
     
    4849      </Item1>
    4950      <Item2>
    50         <Filename Value="UCommon.pas"/>
    51         <UnitName Value="UCommon"/>
     51        <Filename Value="Common.pas"/>
     52        <UnitName Value="Common"/>
    5253      </Item2>
    5354      <Item3>
    54         <Filename Value="UDebugLog.pas"/>
    55         <HasRegisterProc Value="True"/>
    56         <UnitName Value="UDebugLog"/>
     55        <Filename Value="DebugLog.pas"/>
     56        <HasRegisterProc Value="True"/>
     57        <UnitName Value="DebugLog"/>
    5758      </Item3>
    5859      <Item4>
    59         <Filename Value="UDelay.pas"/>
    60         <UnitName Value="UDelay"/>
     60        <Filename Value="Common.Delay.pas"/>
     61        <UnitName Value="Common.Delay"/>
    6162      </Item4>
    6263      <Item5>
    63         <Filename Value="UPrefixMultiplier.pas"/>
    64         <HasRegisterProc Value="True"/>
    65         <UnitName Value="UPrefixMultiplier"/>
     64        <Filename Value="PrefixMultiplier.pas"/>
     65        <HasRegisterProc Value="True"/>
     66        <UnitName Value="PrefixMultiplier"/>
    6667      </Item5>
    6768      <Item6>
    68         <Filename Value="UURI.pas"/>
    69         <UnitName Value="UURI"/>
     69        <Filename Value="URI.pas"/>
     70        <UnitName Value="URI"/>
    7071      </Item6>
    7172      <Item7>
    72         <Filename Value="UThreading.pas"/>
    73         <UnitName Value="UThreading"/>
     73        <Filename Value="Threading.pas"/>
     74        <UnitName Value="Threading"/>
    7475      </Item7>
    7576      <Item8>
    76         <Filename Value="UMemory.pas"/>
    77         <UnitName Value="UMemory"/>
     77        <Filename Value="Memory.pas"/>
     78        <UnitName Value="Memory"/>
    7879      </Item8>
    7980      <Item9>
    80         <Filename Value="UResetableThread.pas"/>
    81         <UnitName Value="UResetableThread"/>
     81        <Filename Value="ResetableThread.pas"/>
     82        <UnitName Value="ResetableThread"/>
    8283      </Item9>
    8384      <Item10>
    84         <Filename Value="UPool.pas"/>
    85         <UnitName Value="UPool"/>
     85        <Filename Value="Pool.pas"/>
     86        <UnitName Value="Pool"/>
    8687      </Item10>
    8788      <Item11>
    88         <Filename Value="ULastOpenedList.pas"/>
    89         <HasRegisterProc Value="True"/>
    90         <UnitName Value="ULastOpenedList"/>
     89        <Filename Value="LastOpenedList.pas"/>
     90        <HasRegisterProc Value="True"/>
     91        <UnitName Value="LastOpenedList"/>
    9192      </Item11>
    9293      <Item12>
    93         <Filename Value="URegistry.pas"/>
    94         <UnitName Value="URegistry"/>
     94        <Filename Value="RegistryEx.pas"/>
     95        <UnitName Value="RegistryEx"/>
    9596      </Item12>
    9697      <Item13>
    97         <Filename Value="UJobProgressView.pas"/>
    98         <HasRegisterProc Value="True"/>
    99         <UnitName Value="UJobProgressView"/>
     98        <Filename Value="JobProgressView.pas"/>
     99        <HasRegisterProc Value="True"/>
     100        <UnitName Value="JobProgressView"/>
    100101      </Item13>
    101102      <Item14>
    102         <Filename Value="UXMLUtils.pas"/>
    103         <UnitName Value="UXMLUtils"/>
     103        <Filename Value="XML.pas"/>
     104        <UnitName Value="XML"/>
    104105      </Item14>
    105106      <Item15>
    106         <Filename Value="UApplicationInfo.pas"/>
    107         <HasRegisterProc Value="True"/>
    108         <UnitName Value="UApplicationInfo"/>
     107        <Filename Value="ApplicationInfo.pas"/>
     108        <HasRegisterProc Value="True"/>
     109        <UnitName Value="ApplicationInfo"/>
    109110      </Item15>
    110111      <Item16>
    111         <Filename Value="USyncCounter.pas"/>
    112         <UnitName Value="USyncCounter"/>
     112        <Filename Value="SyncCounter.pas"/>
     113        <UnitName Value="SyncCounter"/>
    113114      </Item16>
    114115      <Item17>
    115         <Filename Value="UListViewSort.pas"/>
    116         <HasRegisterProc Value="True"/>
    117         <UnitName Value="UListViewSort"/>
     116        <Filename Value="ListViewSort.pas"/>
     117        <HasRegisterProc Value="True"/>
     118        <UnitName Value="ListViewSort"/>
    118119      </Item17>
    119120      <Item18>
    120         <Filename Value="UPersistentForm.pas"/>
    121         <HasRegisterProc Value="True"/>
    122         <UnitName Value="UPersistentForm"/>
     121        <Filename Value="PersistentForm.pas"/>
     122        <HasRegisterProc Value="True"/>
     123        <UnitName Value="PersistentForm"/>
    123124      </Item18>
    124125      <Item19>
    125         <Filename Value="UFindFile.pas"/>
    126         <HasRegisterProc Value="True"/>
    127         <UnitName Value="UFindFile"/>
     126        <Filename Value="FindFile.pas"/>
     127        <HasRegisterProc Value="True"/>
     128        <UnitName Value="FindFile"/>
    128129      </Item19>
    129130      <Item20>
    130         <Filename Value="UScaleDPI.pas"/>
    131         <HasRegisterProc Value="True"/>
    132         <UnitName Value="UScaleDPI"/>
     131        <Filename Value="ScaleDPI.pas"/>
     132        <HasRegisterProc Value="True"/>
     133        <UnitName Value="ScaleDPI"/>
    133134      </Item20>
    134135      <Item21>
    135         <Filename Value="UTheme.pas"/>
    136         <HasRegisterProc Value="True"/>
    137         <UnitName Value="UTheme"/>
     136        <Filename Value="Theme.pas"/>
     137        <HasRegisterProc Value="True"/>
     138        <UnitName Value="Theme"/>
    138139      </Item21>
    139140      <Item22>
    140         <Filename Value="UStringTable.pas"/>
    141         <UnitName Value="UStringTable"/>
     141        <Filename Value="StringTable.pas"/>
     142        <UnitName Value="StringTable"/>
    142143      </Item22>
    143144      <Item23>
    144         <Filename Value="UMetaCanvas.pas"/>
    145         <UnitName Value="UMetaCanvas"/>
     145        <Filename Value="MetaCanvas.pas"/>
     146        <UnitName Value="MetaCanvas"/>
    146147      </Item23>
    147148      <Item24>
    148         <Filename Value="UGeometric.pas"/>
    149         <UnitName Value="UGeometric"/>
     149        <Filename Value="Geometric.pas"/>
     150        <UnitName Value="Geometric"/>
    150151      </Item24>
    151152      <Item25>
    152         <Filename Value="UTranslator.pas"/>
    153         <HasRegisterProc Value="True"/>
    154         <UnitName Value="UTranslator"/>
     153        <Filename Value="Translator.pas"/>
     154        <HasRegisterProc Value="True"/>
     155        <UnitName Value="Translator"/>
    155156      </Item25>
    156157      <Item26>
    157         <Filename Value="ULanguages.pas"/>
    158         <UnitName Value="ULanguages"/>
     158        <Filename Value="Languages.pas"/>
     159        <UnitName Value="Languages"/>
    159160      </Item26>
    160161      <Item27>
    161         <Filename Value="UFormAbout.pas"/>
    162         <UnitName Value="UFormAbout"/>
     162        <Filename Value="PixelPointer.pas"/>
     163        <UnitName Value="PixelPointer"/>
    163164      </Item27>
    164165      <Item28>
    165         <Filename Value="UAboutDialog.pas"/>
    166         <HasRegisterProc Value="True"/>
    167         <UnitName Value="UAboutDialog"/>
     166        <Filename Value="DataFile.pas"/>
     167        <UnitName Value="DataFile"/>
    168168      </Item28>
    169169      <Item29>
    170         <Filename Value="UPixelPointer.pas"/>
    171         <UnitName Value="UPixelPointer"/>
     170        <Filename Value="TestCase.pas"/>
     171        <UnitName Value="TestCase"/>
    172172      </Item29>
     173      <Item30>
     174        <Filename Value="Generics.pas"/>
     175        <UnitName Value="Generics"/>
     176      </Item30>
     177      <Item31>
     178        <Filename Value="CommonPackage.pas"/>
     179        <Type Value="Main Unit"/>
     180        <UnitName Value="CommonPackage"/>
     181      </Item31>
     182      <Item32>
     183        <Filename Value="Table.pas"/>
     184        <UnitName Value="Table"/>
     185      </Item32>
     186      <Item33>
     187        <Filename Value="FormEx.pas"/>
     188        <HasRegisterProc Value="True"/>
     189        <UnitName Value="FormEx"/>
     190      </Item33>
     191      <Item34>
     192        <Filename Value="Forms\FormTests.pas"/>
     193        <UnitName Value="FormTests"/>
     194      </Item34>
     195      <Item35>
     196        <Filename Value="Forms\FormTest.pas"/>
     197        <UnitName Value="FormTest"/>
     198      </Item35>
     199      <Item36>
     200        <Filename Value="Forms\FormAbout.pas"/>
     201        <UnitName Value="FormAbout"/>
     202      </Item36>
     203      <Item37>
     204        <Filename Value="Forms\FormKeyShortcuts.pas"/>
     205        <UnitName Value="FormKeyShortcuts"/>
     206      </Item37>
     207      <Item38>
     208        <Filename Value="ItemList.pas"/>
     209        <UnitName Value="ItemList"/>
     210      </Item38>
     211      <Item39>
     212        <Filename Value="Forms\FormItem.pas"/>
     213        <UnitName Value="FormItem"/>
     214      </Item39>
     215      <Item40>
     216        <Filename Value="Forms\FormList.pas"/>
     217        <UnitName Value="FormList"/>
     218      </Item40>
    173219    </Files>
    174220    <CompatibilityMode Value="True"/>
  • trunk/Packages/Common/Common.pas

    r218 r219  
    1 unit UCommon;
    2 
    3 {$mode delphi}
     1unit Common;
    42
    53interface
     
    86  {$IFDEF WINDOWS}Windows,{$ENDIF}
    97  {$IFDEF UNIX}baseunix,{$ENDIF}
    10   Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf,
    11   FileUtil; //, ShFolder, ShellAPI;
     8  Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, Graphics,
     9  FileUtil, Generics.Collections; //, ShFolder, ShellAPI;
    1210
    1311type
    1412  TArrayOfByte = array of Byte;
    15   TArrayOfString = array of string;
    1613  TExceptionEvent = procedure(Sender: TObject; E: Exception) of object;
    1714
     
    3532  DLLHandle1: HModule;
    3633
    37 {$IFDEF WINDOWS}
    38   GetUserNameEx: procedure (NameFormat: DWORD;
    39     lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
    40 {$ENDIF}
     34  {$IFDEF WINDOWS}
     35    GetUserNameEx: procedure (NameFormat: DWORD;
     36      lpNameBuffer: LPSTR; nSize: PULONG); stdcall;
     37  {$ENDIF}
     38
     39const
     40  clLightBlue = TColor($FF8080);
     41  clLightGreen = TColor($80FF80);
     42  clLightRed = TColor($8080FF);
    4143
    4244function AddLeadingZeroes(const aNumber, Length : integer) : string;
     
    5153function ComputerName: string;
    5254procedure DeleteFiles(APath, AFileSpec: string);
    53 procedure ExecuteProgram(Executable: string; Parameters: array of string);
     55function EndsWith(Text, What: string): Boolean;
     56function Explode(Separator: Char; Data: string): TStringArray;
     57procedure ExecuteProgram(Executable: string; Parameters: array of string;
     58  Environment: array of string; CurrentDirectory: string = '');
     59procedure ExecuteProgramOutput(Executable: string; Parameters: array of string;
     60  Environment: array of string; out Output, Error: string;
     61  out ExitCode: Integer; CurrentDirectory: string = '');
    5462procedure FileDialogUpdateFilterFileType(FileDialog: TOpenDialog);
    5563procedure FreeThenNil(var Obj);
     
    5967function GetBit(Variable: QWord; Index: Byte): Boolean;
    6068function GetStringPart(var Text: string; Separator: string): string;
     69function GetEnvironmentVariables: TStringArray;
    6170function GenerateNewName(OldName: string): string;
    6271function GetFileFilterItemExt(Filter: string; Index: Integer): string;
    6372function IntToBin(Data: Int64; Count: Byte): string;
     73function Implode(Separator: string; List: TList<string>): string; overload;
     74function Implode(Separator: string; List: array of string): string; overload;
     75function Implode(Separator: string; List: TStringList; Around: string = ''): string; overload;
    6476function LastPos(const SubStr: String; const S: String): Integer;
    6577function LoadFileToStr(const FileName: TFileName): AnsiString;
    6678function LoggedOnUserNameEx(Format: TUserNameFormat): string;
    67 function MergeArray(A, B: array of string): TArrayOfString;
     79function MergeArray(A, B: array of string): TStringArray;
    6880function OccurenceOfChar(What: Char; Where: string): Integer;
    6981procedure OpenWebPage(URL: string);
     82procedure OpenEmail(Email: string);
    7083procedure OpenFileInShell(FileName: string);
    7184function PosFromIndex(SubStr: string; Text: string;
     
    8194procedure SearchFiles(AList: TStrings; Dir: string;
    8295  FilterMethod: TFilterMethod = nil; FileNameMethod: TFileNameMethod = nil);
     96procedure SortStrings(Strings: TStrings);
    8397function SplitString(var Text: string; Count: Word): string;
    8498function StripTags(const S: string): string;
    85 function TryHexToInt(Data: string; var Value: Integer): Boolean;
    86 function TryBinToInt(Data: string; var Value: Integer): Boolean;
    87 procedure SortStrings(Strings: TStrings);
     99function StartsWith(Text, What: string): Boolean;
     100function TryHexToInt(Data: string; out Value: Integer): Boolean;
     101function TryBinToInt(Data: string; out Value: Integer): Boolean;
    88102
    89103
    90104implementation
    91105
    92 function BinToInt(BinStr : string) : Int64;
    93 var
    94   i : byte;
    95   RetVar : Int64;
     106resourcestring
     107  SExecutionError = 'Excution error: %s (exit code: %d)';
     108
     109function StartsWith(Text, What: string): Boolean;
     110begin
     111  Result := Copy(Text, 1, Length(Text)) = What;
     112end;
     113
     114function EndsWith(Text, What: string): Boolean;
     115begin
     116  Result := Copy(Text, Length(Text) - Length(What) + 1, MaxInt) = What;
     117end;
     118
     119function BinToInt(BinStr: string): Int64;
     120var
     121  I: Byte;
     122  RetVar: Int64;
    96123begin
    97124  BinStr := UpperCase(BinStr);
    98   if BinStr[length(BinStr)] = 'B' then Delete(BinStr,length(BinStr),1);
     125  if BinStr[length(BinStr)] = 'B' then Delete(BinStr, Length(BinStr), 1);
    99126  RetVar := 0;
    100   for i := 1 to length(BinStr) do begin
    101     if not (BinStr[i] in ['0','1']) then begin
     127  for I := 1 to Length(BinStr) do begin
     128    if not (BinStr[I] in ['0','1']) then begin
    102129      RetVar := 0;
    103130      Break;
    104131    end;
    105     RetVar := (RetVar shl 1) + (byte(BinStr[i]) and 1) ;
     132    RetVar := (RetVar shl 1) + (Byte(BinStr[I]) and 1);
    106133  end;
    107134
     
    118145  end;
    119146end;
    120 
    121147
    122148procedure DeleteFiles(APath, AFileSpec: string);
     
    136162  FindClose(SearchRec);
    137163end;
    138 
    139164
    140165function GetFileFilterItemExt(Filter: string; Index: Integer): string;
     
    159184  if FileExt <> '.*' then
    160185    FileDialog.FileName := ChangeFileExt(FileDialog.FileName, FileExt)
     186end;
     187
     188function GetEnvironmentVariables: TStringArray;
     189var
     190  I: Integer;
     191begin
     192  Result := Default(TStringArray);
     193  SetLength(Result, GetEnvironmentVariableCount);
     194  for I := 0 to GetEnvironmentVariableCount - 1 do
     195    Result[I] := GetEnvironmentString(I);
    161196end;
    162197
     
    201236end;*)
    202237
     238function Implode(Separator: string; List: array of string): string;
     239var
     240  I: Integer;
     241begin
     242  Result := '';
     243  for I := 0 to Length(List) - 1 do begin
     244    Result := Result + List[I];
     245    if I < Length(List) - 1 then Result := Result + Separator;
     246  end;
     247end;
     248
     249function Implode(Separator: string; List: TStringList; Around: string = ''): string;
     250var
     251  I: Integer;
     252begin
     253  Result := '';
     254  for I := 0 to List.Count - 1 do begin
     255    Result := Result + Around + List[I] + Around;
     256    if I < List.Count - 1 then Result := Result + Separator;
     257  end;
     258end;
     259
    203260function LastPos(const SubStr: String; const S: String): Integer;
    204261begin
     
    246303end;
    247304
    248 function TryHexToInt(Data: string; var Value: Integer): Boolean;
     305function TryHexToInt(Data: string; out Value: Integer): Boolean;
    249306var
    250307  I: Integer;
     
    262319end;
    263320
    264 function TryBinToInt(Data: string; var Value: Integer): Boolean;
     321function TryBinToInt(Data: string; out Value: Integer): Boolean;
    265322var
    266323  I: Integer;
     
    290347end;
    291348
    292 function Explode(Separator: char; Data: string): TArrayOfString;
    293 begin
    294   Result := nil;
    295   SetLength(Result, 0);
    296   while Pos(Separator, Data) > 0 do begin
     349function Explode(Separator: Char; Data: string): TStringArray;
     350var
     351  Index: Integer;
     352begin
     353  Result := Default(TStringArray);
     354  repeat
     355    Index := Pos(Separator, Data);
     356    if Index > 0 then begin
     357      SetLength(Result, Length(Result) + 1);
     358      Result[High(Result)] := Copy(Data, 1, Index - 1);
     359      Delete(Data, 1, Index);
     360    end else Break;
     361  until False;
     362  if Data <> '' then begin
    297363    SetLength(Result, Length(Result) + 1);
    298     Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1);
    299     Delete(Data, 1, Pos(Separator, Data));
    300   end;
    301   SetLength(Result, Length(Result) + 1);
    302   Result[High(Result)] := Data;
    303 end;
    304 
    305 {$IFDEF Windows}
     364    Result[High(Result)] := Data;
     365  end;
     366end;
     367
     368function Implode(Separator: string; List: TList<string>): string;
     369var
     370  I: Integer;
     371begin
     372  Result := '';
     373  for I := 0 to List.Count - 1 do begin
     374    Result := Result + List[I];
     375    if I < List.Count - 1 then Result := Result + Separator;
     376  end;
     377end;
     378
     379{$IFDEF WINDOWS}
    306380function GetUserName: string;
    307381const
     
    311385begin
    312386  L := MAX_USERNAME_LENGTH + 2;
     387  Result := Default(string);
    313388  SetLength(Result, L);
    314389  if Windows.GetUserName(PChar(Result), L) and (L > 0) then begin
     
    324399  end;
    325400end;
    326 {$endif}
     401{$ENDIF}
    327402
    328403function ComputerName: string;
    329 {$ifdef mswindows}
     404{$IFDEF WINDOWS}
    330405const
    331406 INFO_BUFFER_SIZE = 32767;
     
    342417  end;
    343418end;
    344 {$endif}
    345 {$ifdef unix}
     419{$ENDIF}
     420{$IFDEF UNIX}
    346421var
    347422  Name: UtsName;
     
    351426  Result := Name.Nodename;
    352427end;
    353 {$endif}
    354 
    355 {$ifdef windows}
     428{$ENDIF}
     429
     430{$IFDEF WINDOWS}
    356431function LoggedOnUserNameEx(Format: TUserNameFormat): string;
    357432const
     
    431506procedure LoadLibraries;
    432507begin
    433   {$IFDEF Windows}
     508  {$IFDEF WINDOWS}
    434509  DLLHandle1 := LoadLibrary('secur32.dll');
    435510  if DLLHandle1 <> 0 then
     
    442517procedure FreeLibraries;
    443518begin
    444   {$IFDEF Windows}
     519  {$IFDEF WINDOWS}
    445520  if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1);
    446521  {$ENDIF}
    447522end;
    448523
    449 procedure ExecuteProgram(Executable: string; Parameters: array of string);
     524procedure ExecuteProgram(Executable: string; Parameters: array of string;
     525  Environment: array of string; CurrentDirectory: string = '');
    450526var
    451527  Process: TProcess;
    452528  I: Integer;
    453529begin
     530  Process := TProcess.Create(nil);
    454531  try
    455     Process := TProcess.Create(nil);
    456532    Process.Executable := Executable;
    457533    for I := 0 to Length(Parameters) - 1 do
    458534      Process.Parameters.Add(Parameters[I]);
     535    for I := 0 to Length(Environment) - 1 do
     536      Process.Environment.Add(Environment[I]);
     537    Process.CurrentDirectory := CurrentDirectory;
     538    Process.ShowWindow := swoHIDE;
    459539    Process.Options := [poNoConsole];
    460540    Process.Execute;
     
    464544end;
    465545
     546procedure ExecuteProgramOutput(Executable: string; Parameters: array of string;
     547  Environment: array of string; out Output, Error: string; out ExitCode: Integer;
     548  CurrentDirectory: string);
     549var
     550  Process: TProcess;
     551  I: Integer;
     552  ReadCount: Integer;
     553  Buffer: string;
     554const
     555  BufferSize = 1000;
     556begin
     557  Process := TProcess.Create(nil);
     558  try
     559    Process.Executable := Executable;
     560    for I := 0 to Length(Parameters) - 1 do
     561      Process.Parameters.Add(Parameters[I]);
     562    for I := 0 to Length(Environment) - 1 do
     563      Process.Environment.Add(Environment[I]);
     564    Process.CurrentDirectory := CurrentDirectory;
     565    Process.ShowWindow := swoHIDE;
     566    Process.Options := [poNoConsole, poUsePipes];
     567    Process.Execute;
     568
     569    Output := '';
     570    Error := '';
     571    Buffer := '';
     572    SetLength(Buffer, BufferSize);
     573    while Process.Running do begin
     574      if Process.Output.NumBytesAvailable > 0 then begin
     575        ReadCount := Process.Output.Read(Buffer[1], Length(Buffer));
     576        Output := Output + Copy(Buffer, 1, ReadCount);
     577      end;
     578
     579      if Process.Stderr.NumBytesAvailable > 0 then begin
     580        ReadCount := Process.Stderr.Read(Buffer[1], Length(Buffer));
     581        Error := Error + Copy(Buffer, 1, ReadCount)
     582      end;
     583
     584      Sleep(10);
     585    end;
     586
     587    if Process.Output.NumBytesAvailable > 0 then begin
     588      ReadCount := Process.Output.Read(Buffer[1], Length(Buffer));
     589      Output := Output + Copy(Buffer, 1, ReadCount);
     590    end;
     591
     592    if Process.Stderr.NumBytesAvailable > 0 then begin
     593      ReadCount := Process.Stderr.Read(Buffer[1], Length(Buffer));
     594      Error := Error + Copy(Buffer, 1, ReadCount);
     595    end;
     596
     597    ExitCode := Process.ExitCode;
     598
     599    if (ExitCode <> 0) or (Error <> '') then
     600      raise Exception.Create(Format(SExecutionError, [Output + Error, ExitCode]));
     601  finally
     602    Process.Free;
     603  end;
     604end;
     605
    466606procedure FreeThenNil(var Obj);
    467607begin
     
    475615end;
    476616
     617procedure OpenEmail(Email: string);
     618begin
     619  OpenURL('mailto:' + Email);
     620end;
     621
    477622procedure OpenFileInShell(FileName: string);
    478623begin
    479   ExecuteProgram('cmd.exe', ['/c', 'start', FileName]);
     624  ExecuteProgram('cmd.exe', ['/c', 'start', FileName], []);
    480625end;
    481626
     
    503648end;
    504649
    505 function MergeArray(A, B: array of string): TArrayOfString;
    506 var
    507   I: Integer;
    508 begin
    509   Result := Default(TArrayOfString);
     650function MergeArray(A, B: array of string): TStringArray;
     651var
     652  I: Integer;
     653begin
     654  Result := Default(TStringArray);
    510655  SetLength(Result, Length(A) + Length(B));
    511656  for I := 0 to Length(A) - 1 do
  • trunk/Packages/Common/CommonPackage.pas

    r218 r219  
    33 }
    44
    5 unit Common;
     5unit CommonPackage;
    66
    77{$warn 5023 off : no warning about unused units}
     
    99
    1010uses
    11   StopWatch, UCommon, UDebugLog, UDelay, UPrefixMultiplier, UURI, UThreading,
    12   UMemory, UResetableThread, UPool, ULastOpenedList, URegistry,
    13   UJobProgressView, UXMLUtils, UApplicationInfo, USyncCounter, UListViewSort,
    14   UPersistentForm, UFindFile, UScaleDPI, UTheme, UStringTable, UMetaCanvas,
    15   UGeometric, UTranslator, ULanguages, UFormAbout, UAboutDialog,
    16   UPixelPointer, LazarusPackageIntf;
     11  StopWatch, Common, DebugLog, Common.Delay, PrefixMultiplier, URI, Threading,
     12  Memory, ResetableThread, Pool, LastOpenedList, RegistryEx, JobProgressView,
     13  XML, ApplicationInfo, SyncCounter, ListViewSort, PersistentForm, FindFile,
     14  ScaleDPI, Theme, StringTable, MetaCanvas, Geometric, Translator, Languages,
     15  PixelPointer, DataFile, TestCase, Generics, Table, FormEx, FormTests,
     16  FormTest, FormAbout, FormKeyShortcuts, ItemList, FormItem, FormList,
     17  LazarusPackageIntf;
    1718
    1819implementation
     
    2021procedure Register;
    2122begin
    22   RegisterUnit('UDebugLog', @UDebugLog.Register);
    23   RegisterUnit('UPrefixMultiplier', @UPrefixMultiplier.Register);
    24   RegisterUnit('ULastOpenedList', @ULastOpenedList.Register);
    25   RegisterUnit('UJobProgressView', @UJobProgressView.Register);
    26   RegisterUnit('UApplicationInfo', @UApplicationInfo.Register);
    27   RegisterUnit('UListViewSort', @UListViewSort.Register);
    28   RegisterUnit('UPersistentForm', @UPersistentForm.Register);
    29   RegisterUnit('UFindFile', @UFindFile.Register);
    30   RegisterUnit('UScaleDPI', @UScaleDPI.Register);
    31   RegisterUnit('UTheme', @UTheme.Register);
    32   RegisterUnit('UTranslator', @UTranslator.Register);
    33   RegisterUnit('UAboutDialog', @UAboutDialog.Register);
     23  RegisterUnit('DebugLog', @DebugLog.Register);
     24  RegisterUnit('PrefixMultiplier', @PrefixMultiplier.Register);
     25  RegisterUnit('LastOpenedList', @LastOpenedList.Register);
     26  RegisterUnit('JobProgressView', @JobProgressView.Register);
     27  RegisterUnit('ApplicationInfo', @ApplicationInfo.Register);
     28  RegisterUnit('ListViewSort', @ListViewSort.Register);
     29  RegisterUnit('PersistentForm', @PersistentForm.Register);
     30  RegisterUnit('FindFile', @FindFile.Register);
     31  RegisterUnit('ScaleDPI', @ScaleDPI.Register);
     32  RegisterUnit('Theme', @Theme.Register);
     33  RegisterUnit('Translator', @Translator.Register);
     34  RegisterUnit('FormEx', @FormEx.Register);
    3435end;
    3536
  • trunk/Packages/Common/DebugLog.pas

    r218 r219  
    1 unit UDebugLog;
    2 
    3 {$mode delphi}
     1unit DebugLog;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, FileUtil, fgl, SyncObjs;
     6  Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs;
    97
    108type
     
    1513    Group: string;
    1614    Text: string;
     15  end;
     16
     17  TDebugLogItems = class(TObjectList<TDebugLogItem>)
    1718  end;
    1819
     
    2930    procedure SetMaxCount(const AValue: Integer);
    3031  public
    31     Items: TFPGObjectList<TDebugLogItem>;
     32    Items: TDebugLogItems;
    3233    Lock: TCriticalSection;
    3334    procedure Add(Text: string; Group: string = '');
     
    4445
    4546procedure Register;
     47
    4648
    4749implementation
     
    117119begin
    118120  inherited;
    119   Items := TFPGObjectList<TDebugLogItem>.Create;
     121  Items := TDebugLogItems.Create;
    120122  Lock := TCriticalSection.Create;
    121123  MaxCount := 100;
     
    126128destructor TDebugLog.Destroy;
    127129begin
    128   Items.Free;
    129   Lock.Free;
     130  FreeAndNil(Items);
     131  FreeAndNil(Lock);
    130132  inherited;
    131133end;
    132134
    133135end.
    134 
  • trunk/Packages/Common/FindFile.pas

    r218 r219  
    1919}
    2020
    21 unit UFindFile;
     21unit FindFile;
    2222
    2323interface
     
    3535  private
    3636    s : TStringList;
    37 
    3837    fSubFolder : boolean;
    3938    fAttr: TFileAttrib;
    4039    fPath : string;
    4140    fFileMask : string;
    42 
    4341    procedure SetPath(Value: string);
    4442    procedure FileSearch(const inPath : string);
     
    4644    constructor Create(AOwner: TComponent); override;
    4745    destructor Destroy; override;
    48 
    4946    function SearchForFiles: TStringList;
    5047  published
     
    6562procedure Register;
    6663
     64
    6765implementation
    6866
     
    7775constructor TFindFile.Create(AOwner: TComponent);
    7876begin
    79   inherited Create(AOwner);
     77  inherited;
    8078  Path := IncludeTrailingBackslash(UTF8Encode(GetCurrentDir));
    8179  FileMask := FilterAll;
     
    8785begin
    8886  s.Free;
    89   inherited Destroy;
     87  inherited;
    9088end;
    9189
     
    145143    SysUtils.FindClose(Rec);
    146144  end;
    147 end; 
     145end;
    148146
    149147end.
    150 
  • trunk/Packages/Common/Geometric.pas

    r218 r219  
    1 unit UGeometric;
    2 
    3 {$mode delphi}
     1unit Geometric;
    42
    53interface
     
    108type
    119  TPointArray = array of TPoint;
     10
     11  { TVector }
     12
     13  TVector = record
     14    Position: TPoint;
     15    Direction: TPoint;
     16    function GetLength: Double;
     17    function GetAngle: Double;
     18    procedure SetLength(Value: Double);
     19    class function Create(P1, P2: TPoint): TVector; static;
     20  end;
    1221
    1322function Distance(P1, P2: TPoint): Integer;
     
    1524function AddPoint(const P1, P2: TPoint): TPoint;
    1625function SubPoint(const P1, P2: TPoint): TPoint;
    17 function PointToLineDistance(const P, V, W: TPoint): Integer;
     26function PointToLineDistance(const P, V, W: TPoint; out Intersect: TPoint): Integer;
    1827function ComparePoint(P1, P2: TPoint): Boolean;
    1928function RotatePoint(Center, P: TPoint; Angle: Double): TPoint;
     
    2736function ShiftRect(ARect: TRect; Delta: TPoint): TRect;
    2837
     38
    2939implementation
    3040
     
    5161end;
    5262
    53 function PointToLineDistance(const P, V, W: TPoint): Integer;
     63function PointToLineDistance(const P, V, W: TPoint; out Intersect: TPoint): Integer;
    5464var
    5565  l2, t: Double;
     
    6979  if T < 0 then begin
    7080    Result := Distance(P, V);       // Beyond the 'v' end of the segment
    71     exit;
     81    Intersect := V;
     82    Exit;
    7283  end
    7384  else if T > 1 then begin
    7485    Result := Distance(P, W);  // Beyond the 'w' end of the segment
     86    Intersect := W;
    7587    Exit;
    7688  end;
     
    7890  TT.Y := Trunc(V.Y + T * (W.Y - V.Y));
    7991  Result := Distance(P, TT);
     92  Intersect := TT;
    8093end;
    8194
     
    163176end;
    164177
     178{ TVector }
     179
     180function TVector.GetLength: Double;
     181begin
     182  Result := Sqrt(Sqr(Direction.X) + Sqr(Direction.Y));
     183end;
     184
     185function TVector.GetAngle: Double;
     186begin
     187  Result := ArcTan2(Direction.Y, Direction.X);
     188end;
     189
     190procedure TVector.SetLength(Value: Double);
     191var
     192  Angle: Double;
     193begin
     194  Angle := GetAngle;
     195  Direction := Point(Round(Cos(Angle) * Value),
     196    Round(Sin(Angle) * Value));
     197end;
     198
     199class function TVector.Create(P1, P2: TPoint): TVector;
     200begin
     201  Result.Position := P1;
     202  Result.Direction := Point(P2.X - P1.X, P2.Y - P1.Y);
     203end;
    165204
    166205end.
    167 
  • trunk/Packages/Common/JobProgressView.pas

    r218 r219  
    1 unit UJobProgressView;
    2 
    3 {$MODE Delphi}
     1unit JobProgressView;
    42
    53interface
     
    75uses
    86  SysUtils, Variants, Classes, Graphics, Controls, Forms, Syncobjs,
    9   Dialogs, ComCtrls, StdCtrls, ExtCtrls, fgl, UThreading, Math,
     7  Dialogs, ComCtrls, StdCtrls, ExtCtrls, Generics.Collections, Threading, Math,
    108  DateUtils;
    119
     
    7169  end;
    7270
    73   TJobs = class(TFPGObjectList<TJob>)
     71  TJobs = class(TObjectList<TJob>)
    7472  end;
    7573
     
    156154  end;
    157155
    158   //var
    159   //  FormJobProgressView: TFormJobProgressView;
    160 
    161156procedure Register;
    162157
    163158resourcestring
    164159  SExecuted = 'Executed';
     160
    165161
    166162implementation
     
    186182  try
    187183    try
    188       //raise Exception.Create('Exception in job');
    189184      ProgressView.CurrentJob.Method(Job);
    190185    except
     
    642637begin
    643638  FLock.Free;
    644   inherited Destroy;
     639  inherited;
    645640end;
    646641
  • trunk/Packages/Common/Languages.pas

    r218 r219  
    1 unit ULanguages;
    2 
    3 {$mode delphi}{$H+}
     1unit Languages;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, fgl;
     6  Classes, SysUtils, Generics.Collections;
    97
    108type
     
    1715  { TLanguages }
    1816
    19   TLanguages = class(TFPGObjectList<TLanguage>)
     17  TLanguages = class(TObjectList<TLanguage>)
    2018    function SearchByCode(ACode: string): TLanguage;
    2119    procedure AddNew(Code: string; Name: string);
     
    218216  SLang_za = 'Zhuang';
    219217  SLang_zh = 'Chinese';
     218  SLang_zh_Hans = 'Simplified Chinese';
     219  SLang_zh_Hant = 'Traditional Chinese';
    220220  SLang_zu = 'Zulu';
     221
    221222
    222223implementation
     
    230231begin
    231232  I := 0;
    232   while (I < Count) and (TLanguage(Items[I]).Code < ACode) do Inc(I);
    233   if I < Count then Result := TLanguage(Items[I])
     233  while (I < Count) and (Items[I].Code <> ACode) do Inc(I);
     234  if I < Count then Result := Items[I]
    234235    else Result := nil;
    235236end;
     
    441442  AddNew('za', SLang_za);
    442443  AddNew('zh', SLang_zh);
     444  AddNew('zh-Hant', SLang_zh_Hant);
     445  AddNew('zh-Hans', SLang_zh_Hans);
    443446  AddNew('zu', SLang_zu);
    444447end;
    445448
    446449end.
    447 
  • trunk/Packages/Common/Languages/DebugLog.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: Jiří Hajda <robie@centrum.cz>\n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
     12"X-Generator: Poedit 3.0.1\n"
    1113
    12 #: udebuglog.sfilenamenotdefined
     14#: debuglog.sfilenamenotdefined
     15msgctxt "debuglog.sfilenamenotdefined"
    1316msgid "Filename not defined"
    1417msgstr "Neurčen soubor"
  • trunk/Packages/Common/Languages/DebugLog.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: udebuglog.sfilenamenotdefined
     4#: debuglog.sfilenamenotdefined
    55msgid "Filename not defined"
    66msgstr ""
  • trunk/Packages/Common/Languages/FindFile.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: \n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 "Language: cs\n"
    12 "X-Generator: Poedit 1.8.9\n"
     12"X-Generator: Poedit 3.0.1\n"
    1313
    14 #: ufindfile.sdirnotfound
     14#: findfile.sdirnotfound
     15msgctxt "findfile.sdirnotfound"
    1516msgid "Directory not found"
    1617msgstr "Adresář nenalezen"
  • trunk/Packages/Common/Languages/FindFile.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: ufindfile.sdirnotfound
     4#: findfile.sdirnotfound
    55msgid "Directory not found"
    66msgstr ""
  • trunk/Packages/Common/Languages/FormAbout.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: Chronos <robie@centrum.cz>\n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 "Language: cs\n"
    12 "X-Generator: Poedit 2.4.1\n"
     12"X-Generator: Poedit 3.4.2\n"
    1313
    14 #: uformabout.slicense
     14#: formabout.sclose
     15msgid "Close"
     16msgstr "Zavřít"
     17
     18#: formabout.shomepage
     19msgid "Home page"
     20msgstr "Domovská stránka"
     21
     22#: formabout.slicense
     23msgctxt "formabout.slicense"
    1524msgid "License"
    1625msgstr "Licence"
    1726
    18 #: uformabout.sreleasedate
     27#: formabout.sreleasedate
     28msgctxt "formabout.sreleasedate"
    1929msgid "Release date"
    2030msgstr "Datum uvolnění"
    2131
    22 #: uformabout.sversion
     32#: formabout.sversion
     33msgctxt "formabout.sversion"
    2334msgid "Version"
    2435msgstr "Verze"
  • trunk/Packages/Common/Languages/FormAbout.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: uformabout.slicense
     4#: formabout.sclose
     5msgid "Close"
     6msgstr ""
     7
     8#: formabout.shomepage
     9msgid "Home page"
     10msgstr ""
     11
     12#: formabout.slicense
    513msgid "License"
    614msgstr ""
    715
    8 #: uformabout.sreleasedate
     16#: formabout.sreleasedate
    917msgid "Release date"
    1018msgstr ""
    1119
    12 #: uformabout.sversion
     20#: formabout.sversion
    1321msgid "Version"
    1422msgstr ""
  • trunk/Packages/Common/Languages/JobProgressView.cs.po

    r218 r219  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "X-Generator: Poedit 2.2\n"
     12"X-Generator: Poedit 3.0.1\n"
    1313
    14 #: ujobprogressview.sestimatedtime
     14#: jobprogressview.sestimatedtime
    1515#, object-pascal-format
     16msgctxt "jobprogressview.sestimatedtime"
    1617msgid "Estimated time: %s"
    1718msgstr "Odhadovaný čas: %s"
    1819
    19 #: ujobprogressview.sexecuted
     20#: jobprogressview.sexecuted
     21msgctxt "jobprogressview.sexecuted"
    2022msgid "Executed"
    2123msgstr "Vykonané"
    2224
    23 #: ujobprogressview.sfinished
     25#: jobprogressview.sfinished
     26msgctxt "jobprogressview.sfinished"
    2427msgid "Finished"
    2528msgstr "Dokončené"
    2629
    27 #: ujobprogressview.spleasewait
     30#: jobprogressview.spleasewait
     31msgctxt "jobprogressview.spleasewait"
    2832msgid "Please wait..."
    2933msgstr "Prosím čekejte..."
    3034
    31 #: ujobprogressview.sterminate
     35#: jobprogressview.sterminate
     36msgctxt "jobprogressview.sterminate"
    3237msgid "Termination"
    3338msgstr "Přerušení"
    3439
    35 #: ujobprogressview.stotalestimatedtime
     40#: jobprogressview.stotalestimatedtime
    3641#, object-pascal-format
     42msgctxt "jobprogressview.stotalestimatedtime"
    3743msgid "Total estimated time: %s"
    3844msgstr "Celkový odhadovaný čas: %s"
  • trunk/Packages/Common/Languages/JobProgressView.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: ujobprogressview.sestimatedtime
     4#: jobprogressview.sestimatedtime
    55#, object-pascal-format
    66msgid "Estimated time: %s"
    77msgstr ""
    88
    9 #: ujobprogressview.sexecuted
     9#: jobprogressview.sexecuted
    1010msgid "Executed"
    1111msgstr ""
    1212
    13 #: ujobprogressview.sfinished
     13#: jobprogressview.sfinished
    1414msgid "Finished"
    1515msgstr ""
    1616
    17 #: ujobprogressview.spleasewait
     17#: jobprogressview.spleasewait
    1818msgid "Please wait..."
    1919msgstr ""
    2020
    21 #: ujobprogressview.sterminate
     21#: jobprogressview.sterminate
    2222msgid "Termination"
    2323msgstr ""
    2424
    25 #: ujobprogressview.stotalestimatedtime
     25#: jobprogressview.stotalestimatedtime
    2626#, object-pascal-format
    2727msgid "Total estimated time: %s"
  • trunk/Packages/Common/Languages/Languages.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: Jiří Hajda <software@mezservis.cz>\n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 
    12 #: ulanguages.slangauto
     12"X-Generator: Poedit 3.0.1\n"
     13
     14#: languages.slangauto
     15msgctxt "languages.slangauto"
    1316msgid "Automatic"
    1417msgstr "Automaticky"
    1518
    16 #: ulanguages.slang_aa
     19#: languages.slang_aa
     20msgctxt "languages.slang_aa"
    1721msgid "Afar"
    1822msgstr ""
    1923
    20 #: ulanguages.slang_ab
     24#: languages.slang_ab
     25msgctxt "languages.slang_ab"
    2126msgid "Abkhazian"
    2227msgstr "Abcházština"
    2328
    24 #: ulanguages.slang_ae
     29#: languages.slang_ae
     30msgctxt "languages.slang_ae"
    2531msgid "Avestan"
    2632msgstr ""
    2733
    28 #: ulanguages.slang_af
     34#: languages.slang_af
     35msgctxt "languages.slang_af"
    2936msgid "Afrikaans"
    3037msgstr "Afrikánština"
    3138
    32 #: ulanguages.slang_ak
     39#: languages.slang_ak
     40msgctxt "languages.slang_ak"
    3341msgid "Akan"
    3442msgstr ""
    3543
    36 #: ulanguages.slang_am
     44#: languages.slang_am
     45msgctxt "languages.slang_am"
    3746msgid "Amharic"
    3847msgstr ""
    3948
    40 #: ulanguages.slang_an
     49#: languages.slang_an
     50msgctxt "languages.slang_an"
    4151msgid "Aragonese"
    4252msgstr ""
    4353
    44 #: ulanguages.slang_ar
     54#: languages.slang_ar
     55msgctxt "languages.slang_ar"
    4556msgid "Arabic"
    4657msgstr "Arabština"
    4758
    48 #: ulanguages.slang_as
     59#: languages.slang_as
     60msgctxt "languages.slang_as"
    4961msgid "Assamese"
    5062msgstr ""
    5163
    52 #: ulanguages.slang_av
     64#: languages.slang_av
     65msgctxt "languages.slang_av"
    5366msgid "Avaric"
    5467msgstr ""
    5568
    56 #: ulanguages.slang_ay
     69#: languages.slang_ay
     70msgctxt "languages.slang_ay"
    5771msgid "Aymara"
    5872msgstr ""
    5973
    60 #: ulanguages.slang_az
     74#: languages.slang_az
     75msgctxt "languages.slang_az"
    6176msgid "Azerbaijani"
    6277msgstr ""
    6378
    64 #: ulanguages.slang_ba
     79#: languages.slang_ba
     80msgctxt "languages.slang_ba"
    6581msgid "Bashkir"
    6682msgstr ""
    6783
    68 #: ulanguages.slang_be
     84#: languages.slang_be
     85msgctxt "languages.slang_be"
    6986msgid "Belarusian"
    7087msgstr ""
    7188
    72 #: ulanguages.slang_bg
     89#: languages.slang_bg
     90msgctxt "languages.slang_bg"
    7391msgid "Bulgarian"
    7492msgstr "Maďarština"
    7593
    76 #: ulanguages.slang_bh
     94#: languages.slang_bh
     95msgctxt "languages.slang_bh"
    7796msgid "Bihari"
    7897msgstr ""
    7998
    80 #: ulanguages.slang_bi
     99#: languages.slang_bi
     100msgctxt "languages.slang_bi"
    81101msgid "Bislama"
    82102msgstr ""
    83103
    84 #: ulanguages.slang_bm
     104#: languages.slang_bm
     105msgctxt "languages.slang_bm"
    85106msgid "Bambara"
    86107msgstr ""
    87108
    88 #: ulanguages.slang_bn
     109#: languages.slang_bn
     110msgctxt "languages.slang_bn"
    89111msgid "Bengali"
    90112msgstr ""
    91113
    92 #: ulanguages.slang_bo
     114#: languages.slang_bo
     115msgctxt "languages.slang_bo"
    93116msgid "Tibetan"
    94117msgstr "Tibetština"
    95118
    96 #: ulanguages.slang_br
     119#: languages.slang_br
     120msgctxt "languages.slang_br"
    97121msgid "Breton"
    98122msgstr ""
    99123
    100 #: ulanguages.slang_bs
     124#: languages.slang_bs
     125msgctxt "languages.slang_bs"
    101126msgid "Bosnian"
    102127msgstr ""
    103128
    104 #: ulanguages.slang_ca
     129#: languages.slang_ca
     130msgctxt "languages.slang_ca"
    105131msgid "Catalan"
    106132msgstr "Katalánština"
    107133
    108 #: ulanguages.slang_ce
     134#: languages.slang_ce
     135msgctxt "languages.slang_ce"
    109136msgid "Chechen"
    110137msgstr ""
    111138
    112 #: ulanguages.slang_ch
     139#: languages.slang_ch
     140msgctxt "languages.slang_ch"
    113141msgid "Chamorro"
    114142msgstr ""
    115143
    116 #: ulanguages.slang_co
     144#: languages.slang_co
     145msgctxt "languages.slang_co"
    117146msgid "Corsican"
    118147msgstr ""
    119148
    120 #: ulanguages.slang_cr
     149#: languages.slang_cr
     150msgctxt "languages.slang_cr"
    121151msgid "Cree"
    122152msgstr "Kríjština"
    123153
    124 #: ulanguages.slang_cs
     154#: languages.slang_cs
     155msgctxt "languages.slang_cs"
    125156msgid "Czech"
    126157msgstr "Čeština"
    127158
    128 #: ulanguages.slang_cv
     159#: languages.slang_cv
     160msgctxt "languages.slang_cv"
    129161msgid "Chuvash"
    130162msgstr ""
    131163
    132 #: ulanguages.slang_cy
     164#: languages.slang_cy
     165msgctxt "languages.slang_cy"
    133166msgid "Welsh"
    134167msgstr ""
    135168
    136 #: ulanguages.slang_da
     169#: languages.slang_da
     170msgctxt "languages.slang_da"
    137171msgid "Danish"
    138172msgstr "Dánština"
    139173
    140 #: ulanguages.slang_de
     174#: languages.slang_de
     175msgctxt "languages.slang_de"
    141176msgid "German"
    142177msgstr "Němčina"
    143178
    144 #: ulanguages.slang_de_at
     179#: languages.slang_de_at
     180msgctxt "languages.slang_de_at"
    145181msgid "Austrian German"
    146182msgstr "Australská němčina"
    147183
    148 #: ulanguages.slang_de_ch
     184#: languages.slang_de_ch
     185msgctxt "languages.slang_de_ch"
    149186msgid "Swiss German"
    150187msgstr "Švédská němčina"
    151188
    152 #: ulanguages.slang_dv
     189#: languages.slang_dv
     190msgctxt "languages.slang_dv"
    153191msgid "Divehi"
    154192msgstr ""
    155193
    156 #: ulanguages.slang_dz
     194#: languages.slang_dz
     195msgctxt "languages.slang_dz"
    157196msgid "Dzongkha"
    158197msgstr ""
    159198
    160 #: ulanguages.slang_ee
     199#: languages.slang_ee
     200msgctxt "languages.slang_ee"
    161201msgid "Ewe"
    162202msgstr ""
    163203
    164 #: ulanguages.slang_el
     204#: languages.slang_el
     205msgctxt "languages.slang_el"
    165206msgid "Greek"
    166207msgstr "Řečtina"
    167208
    168 #: ulanguages.slang_en
     209#: languages.slang_en
     210msgctxt "languages.slang_en"
    169211msgid "English"
    170212msgstr "Angličtina"
    171213
    172 #: ulanguages.slang_en_au
     214#: languages.slang_en_au
     215msgctxt "languages.slang_en_au"
    173216msgid "Australian English"
    174217msgstr "Australská angličtina"
    175218
    176 #: ulanguages.slang_en_ca
     219#: languages.slang_en_ca
     220msgctxt "languages.slang_en_ca"
    177221msgid "Canadian English"
    178222msgstr "Kanadská angličtina"
    179223
    180 #: ulanguages.slang_en_gb
     224#: languages.slang_en_gb
     225msgctxt "languages.slang_en_gb"
    181226msgid "British English"
    182227msgstr "Britská angličtina"
    183228
    184 #: ulanguages.slang_en_us
     229#: languages.slang_en_us
     230msgctxt "languages.slang_en_us"
    185231msgid "American English"
    186232msgstr "Americká angličtina"
    187233
    188 #: ulanguages.slang_eo
     234#: languages.slang_eo
     235msgctxt "languages.slang_eo"
    189236msgid "Esperanto"
    190237msgstr "Esperanto"
    191238
    192 #: ulanguages.slang_es
     239#: languages.slang_es
     240msgctxt "languages.slang_es"
    193241msgid "Spanish"
    194242msgstr "Španělština"
    195243
    196 #: ulanguages.slang_et
     244#: languages.slang_et
     245msgctxt "languages.slang_et"
    197246msgid "Estonian"
    198247msgstr "Estonština"
    199248
    200 #: ulanguages.slang_eu
     249#: languages.slang_eu
     250msgctxt "languages.slang_eu"
    201251msgid "Basque"
    202252msgstr ""
    203253
    204 #: ulanguages.slang_fa
     254#: languages.slang_fa
     255msgctxt "languages.slang_fa"
    205256msgid "Persian"
    206257msgstr "Perština"
    207258
    208 #: ulanguages.slang_ff
     259#: languages.slang_ff
     260msgctxt "languages.slang_ff"
    209261msgid "Fulah"
    210262msgstr ""
    211263
    212 #: ulanguages.slang_fi
     264#: languages.slang_fi
     265msgctxt "languages.slang_fi"
    213266msgid "Finnish"
    214267msgstr "Finština"
    215268
    216 #: ulanguages.slang_fj
     269#: languages.slang_fj
     270msgctxt "languages.slang_fj"
    217271msgid "Fijian"
    218272msgstr ""
    219273
    220 #: ulanguages.slang_fo
     274#: languages.slang_fo
     275msgctxt "languages.slang_fo"
    221276msgid "Faroese"
    222277msgstr ""
    223278
    224 #: ulanguages.slang_fr
     279#: languages.slang_fr
     280msgctxt "languages.slang_fr"
    225281msgid "French"
    226282msgstr "Francouzština"
    227283
    228 #: ulanguages.slang_fr_be
    229 msgctxt "ulanguages.slang_fr_be"
     284#: languages.slang_fr_be
     285msgctxt "languages.slang_fr_be"
    230286msgid "Walloon"
    231287msgstr ""
    232288
    233 #: ulanguages.slang_fy
     289#: languages.slang_fy
     290msgctxt "languages.slang_fy"
    234291msgid "Frisian"
    235292msgstr ""
    236293
    237 #: ulanguages.slang_ga
     294#: languages.slang_ga
     295msgctxt "languages.slang_ga"
    238296msgid "Irish"
    239297msgstr "Irština"
    240298
    241 #: ulanguages.slang_gd
     299#: languages.slang_gd
     300msgctxt "languages.slang_gd"
    242301msgid "Gaelic"
    243302msgstr ""
    244303
    245 #: ulanguages.slang_gl
     304#: languages.slang_gl
     305msgctxt "languages.slang_gl"
    246306msgid "Gallegan"
    247307msgstr ""
    248308
    249 #: ulanguages.slang_gn
     309#: languages.slang_gn
     310msgctxt "languages.slang_gn"
    250311msgid "Guarani"
    251312msgstr ""
    252313
    253 #: ulanguages.slang_gu
     314#: languages.slang_gu
     315msgctxt "languages.slang_gu"
    254316msgid "Gujarati"
    255317msgstr ""
    256318
    257 #: ulanguages.slang_gv
     319#: languages.slang_gv
     320msgctxt "languages.slang_gv"
    258321msgid "Manx"
    259322msgstr ""
    260323
    261 #: ulanguages.slang_ha
     324#: languages.slang_ha
     325msgctxt "languages.slang_ha"
    262326msgid "Hausa"
    263327msgstr ""
    264328
    265 #: ulanguages.slang_he
     329#: languages.slang_he
     330msgctxt "languages.slang_he"
    266331msgid "Hebrew"
    267332msgstr "Hebrejština"
    268333
    269 #: ulanguages.slang_hi
     334#: languages.slang_hi
     335msgctxt "languages.slang_hi"
    270336msgid "Hindi"
    271337msgstr ""
    272338
    273 #: ulanguages.slang_ho
     339#: languages.slang_ho
     340msgctxt "languages.slang_ho"
    274341msgid "Hiri Motu"
    275342msgstr ""
    276343
    277 #: ulanguages.slang_hr
     344#: languages.slang_hr
     345msgctxt "languages.slang_hr"
    278346msgid "Croatian"
    279347msgstr "Chorvatština"
    280348
    281 #: ulanguages.slang_ht
     349#: languages.slang_ht
     350msgctxt "languages.slang_ht"
    282351msgid "Haitian"
    283352msgstr ""
    284353
    285 #: ulanguages.slang_hu
     354#: languages.slang_hu
     355msgctxt "languages.slang_hu"
    286356msgid "Hungarian"
    287357msgstr "Maďarština"
    288358
    289 #: ulanguages.slang_hy
     359#: languages.slang_hy
     360msgctxt "languages.slang_hy"
    290361msgid "Armenian"
    291362msgstr "Arménština"
    292363
    293 #: ulanguages.slang_hz
     364#: languages.slang_hz
     365msgctxt "languages.slang_hz"
    294366msgid "Herero"
    295367msgstr ""
    296368
    297 #: ulanguages.slang_ia
     369#: languages.slang_ia
     370msgctxt "languages.slang_ia"
    298371msgid "Interlingua"
    299372msgstr ""
    300373
    301 #: ulanguages.slang_id
     374#: languages.slang_id
     375msgctxt "languages.slang_id"
    302376msgid "Indonesian"
    303377msgstr ""
    304378
    305 #: ulanguages.slang_ie
     379#: languages.slang_ie
     380msgctxt "languages.slang_ie"
    306381msgid "Interlingue"
    307382msgstr ""
    308383
    309 #: ulanguages.slang_ig
     384#: languages.slang_ig
     385msgctxt "languages.slang_ig"
    310386msgid "Igbo"
    311387msgstr ""
    312388
    313 #: ulanguages.slang_ii
     389#: languages.slang_ii
     390msgctxt "languages.slang_ii"
    314391msgid "Sichuan Yi"
    315392msgstr ""
    316393
    317 #: ulanguages.slang_ik
     394#: languages.slang_ik
     395msgctxt "languages.slang_ik"
    318396msgid "Inupiaq"
    319397msgstr ""
    320398
    321 #: ulanguages.slang_io
     399#: languages.slang_io
     400msgctxt "languages.slang_io"
    322401msgid "Ido"
    323402msgstr ""
    324403
    325 #: ulanguages.slang_is
     404#: languages.slang_is
     405msgctxt "languages.slang_is"
    326406msgid "Icelandic"
    327407msgstr "Islandština"
    328408
    329 #: ulanguages.slang_it
     409#: languages.slang_it
     410msgctxt "languages.slang_it"
    330411msgid "Italian"
    331412msgstr "Italština"
    332413
    333 #: ulanguages.slang_iu
     414#: languages.slang_iu
     415msgctxt "languages.slang_iu"
    334416msgid "Inuktitut"
    335417msgstr ""
    336418
    337 #: ulanguages.slang_ja
     419#: languages.slang_ja
     420msgctxt "languages.slang_ja"
    338421msgid "Japanese"
    339422msgstr "Japonština"
    340423
    341 #: ulanguages.slang_jv
     424#: languages.slang_jv
     425msgctxt "languages.slang_jv"
    342426msgid "Javanese"
    343427msgstr ""
    344428
    345 #: ulanguages.slang_ka
     429#: languages.slang_ka
     430msgctxt "languages.slang_ka"
    346431msgid "Georgian"
    347432msgstr "Gruzínština"
    348433
    349 #: ulanguages.slang_kg
     434#: languages.slang_kg
     435msgctxt "languages.slang_kg"
    350436msgid "Kongo"
    351437msgstr "Konžština"
    352438
    353 #: ulanguages.slang_ki
     439#: languages.slang_ki
     440msgctxt "languages.slang_ki"
    354441msgid "Kikuyu"
    355442msgstr ""
    356443
    357 #: ulanguages.slang_kj
     444#: languages.slang_kj
     445msgctxt "languages.slang_kj"
    358446msgid "Kuanyama"
    359447msgstr ""
    360448
    361 #: ulanguages.slang_kk
     449#: languages.slang_kk
     450msgctxt "languages.slang_kk"
    362451msgid "Kazakh"
    363452msgstr ""
    364453
    365 #: ulanguages.slang_kl
     454#: languages.slang_kl
     455msgctxt "languages.slang_kl"
    366456msgid "Greenlandic"
    367457msgstr "Grónština"
    368458
    369 #: ulanguages.slang_km
     459#: languages.slang_km
     460msgctxt "languages.slang_km"
    370461msgid "Khmer"
    371462msgstr ""
    372463
    373 #: ulanguages.slang_kn
     464#: languages.slang_kn
     465msgctxt "languages.slang_kn"
    374466msgid "Kannada"
    375467msgstr "Kannadština"
    376468
    377 #: ulanguages.slang_ko
     469#: languages.slang_ko
     470msgctxt "languages.slang_ko"
    378471msgid "Korean"
    379472msgstr "Korejština"
    380473
    381 #: ulanguages.slang_kr
     474#: languages.slang_kr
     475msgctxt "languages.slang_kr"
    382476msgid "Kanuri"
    383477msgstr ""
    384478
    385 #: ulanguages.slang_ks
     479#: languages.slang_ks
     480msgctxt "languages.slang_ks"
    386481msgid "Kashmiri"
    387482msgstr ""
    388483
    389 #: ulanguages.slang_ku
     484#: languages.slang_ku
     485msgctxt "languages.slang_ku"
    390486msgid "Kurdish"
    391487msgstr ""
    392488
    393 #: ulanguages.slang_kv
     489#: languages.slang_kv
     490msgctxt "languages.slang_kv"
    394491msgid "Komi"
    395492msgstr ""
    396493
    397 #: ulanguages.slang_kw
     494#: languages.slang_kw
     495msgctxt "languages.slang_kw"
    398496msgid "Cornish"
    399497msgstr "Kornština"
    400498
    401 #: ulanguages.slang_ky
     499#: languages.slang_ky
     500msgctxt "languages.slang_ky"
    402501msgid "Kirghiz"
    403502msgstr ""
    404503
    405 #: ulanguages.slang_la
     504#: languages.slang_la
     505msgctxt "languages.slang_la"
    406506msgid "Latin"
    407507msgstr "Latina"
    408508
    409 #: ulanguages.slang_lb
     509#: languages.slang_lb
     510msgctxt "languages.slang_lb"
    410511msgid "Luxembourgish"
    411512msgstr "Lucemburština"
    412513
    413 #: ulanguages.slang_lg
     514#: languages.slang_lg
     515msgctxt "languages.slang_lg"
    414516msgid "Ganda"
    415517msgstr ""
    416518
    417 #: ulanguages.slang_li
     519#: languages.slang_li
     520msgctxt "languages.slang_li"
    418521msgid "Limburgan"
    419522msgstr ""
    420523
    421 #: ulanguages.slang_ln
     524#: languages.slang_ln
     525msgctxt "languages.slang_ln"
    422526msgid "Lingala"
    423527msgstr ""
    424528
    425 #: ulanguages.slang_lo
     529#: languages.slang_lo
     530msgctxt "languages.slang_lo"
    426531msgid "Lao"
    427532msgstr "Laoština"
    428533
    429 #: ulanguages.slang_lt
     534#: languages.slang_lt
     535msgctxt "languages.slang_lt"
    430536msgid "Lithuanian"
    431537msgstr "Litevština"
    432538
    433 #: ulanguages.slang_lu
     539#: languages.slang_lu
     540msgctxt "languages.slang_lu"
    434541msgid "Luba-Katanga"
    435542msgstr ""
    436543
    437 #: ulanguages.slang_lv
     544#: languages.slang_lv
     545msgctxt "languages.slang_lv"
    438546msgid "Latvian"
    439547msgstr "Lotyština"
    440548
    441 #: ulanguages.slang_mg
     549#: languages.slang_mg
     550msgctxt "languages.slang_mg"
    442551msgid "Malagasy"
    443552msgstr ""
    444553
    445 #: ulanguages.slang_mh
     554#: languages.slang_mh
     555msgctxt "languages.slang_mh"
    446556msgid "Marshallese"
    447557msgstr ""
    448558
    449 #: ulanguages.slang_mi
     559#: languages.slang_mi
     560msgctxt "languages.slang_mi"
    450561msgid "Maori"
    451562msgstr ""
    452563
    453 #: ulanguages.slang_mk
     564#: languages.slang_mk
     565msgctxt "languages.slang_mk"
    454566msgid "Macedonian"
    455567msgstr "Makedonština"
    456568
    457 #: ulanguages.slang_ml
     569#: languages.slang_ml
     570msgctxt "languages.slang_ml"
    458571msgid "Malayalam"
    459572msgstr ""
    460573
    461 #: ulanguages.slang_mn
     574#: languages.slang_mn
     575msgctxt "languages.slang_mn"
    462576msgid "Mongolian"
    463577msgstr "Mongolština"
    464578
    465 #: ulanguages.slang_mo
     579#: languages.slang_mo
     580msgctxt "languages.slang_mo"
    466581msgid "Moldavian"
    467582msgstr "Moldavština"
    468583
    469 #: ulanguages.slang_mr
     584#: languages.slang_mr
     585msgctxt "languages.slang_mr"
    470586msgid "Marathi"
    471587msgstr ""
    472588
    473 #: ulanguages.slang_ms
     589#: languages.slang_ms
     590msgctxt "languages.slang_ms"
    474591msgid "Malay"
    475592msgstr ""
    476593
    477 #: ulanguages.slang_mt
     594#: languages.slang_mt
     595msgctxt "languages.slang_mt"
    478596msgid "Maltese"
    479597msgstr ""
    480598
    481 #: ulanguages.slang_my
     599#: languages.slang_my
     600msgctxt "languages.slang_my"
    482601msgid "Burmese"
    483602msgstr ""
    484603
    485 #: ulanguages.slang_na
     604#: languages.slang_na
     605msgctxt "languages.slang_na"
    486606msgid "Nauru"
    487607msgstr ""
    488608
    489 #: ulanguages.slang_nb
     609#: languages.slang_nb
     610msgctxt "languages.slang_nb"
    490611msgid "Norwegian Bokmaal"
    491612msgstr ""
    492613
    493 #: ulanguages.slang_nd
     614#: languages.slang_nd
     615msgctxt "languages.slang_nd"
    494616msgid "Ndebele, North"
    495617msgstr ""
    496618
    497 #: ulanguages.slang_ne
     619#: languages.slang_ne
     620msgctxt "languages.slang_ne"
    498621msgid "Nepali"
    499622msgstr ""
    500623
    501 #: ulanguages.slang_ng
     624#: languages.slang_ng
     625msgctxt "languages.slang_ng"
    502626msgid "Ndonga"
    503627msgstr ""
    504628
    505 #: ulanguages.slang_nl
     629#: languages.slang_nl
     630msgctxt "languages.slang_nl"
    506631msgid "Dutch"
    507632msgstr "Němčina"
    508633
    509 #: ulanguages.slang_nl_be
     634#: languages.slang_nl_be
     635msgctxt "languages.slang_nl_be"
    510636msgid "Flemish"
    511637msgstr ""
    512638
    513 #: ulanguages.slang_nn
     639#: languages.slang_nn
     640msgctxt "languages.slang_nn"
    514641msgid "Norwegian Nynorsk"
    515642msgstr ""
    516643
    517 #: ulanguages.slang_no
     644#: languages.slang_no
     645msgctxt "languages.slang_no"
    518646msgid "Norwegian"
    519647msgstr "Norština"
    520648
    521 #: ulanguages.slang_nr
     649#: languages.slang_nr
     650msgctxt "languages.slang_nr"
    522651msgid "Ndebele, South"
    523652msgstr ""
    524653
    525 #: ulanguages.slang_nv
     654#: languages.slang_nv
     655msgctxt "languages.slang_nv"
    526656msgid "Navajo"
    527657msgstr "Navažština"
    528658
    529 #: ulanguages.slang_ny
     659#: languages.slang_ny
     660msgctxt "languages.slang_ny"
    530661msgid "Chichewa"
    531662msgstr ""
    532663
    533 #: ulanguages.slang_oc
     664#: languages.slang_oc
     665msgctxt "languages.slang_oc"
    534666msgid "Occitan"
    535667msgstr ""
    536668
    537 #: ulanguages.slang_oj
     669#: languages.slang_oj
     670msgctxt "languages.slang_oj"
    538671msgid "Ojibwa"
    539672msgstr ""
    540673
    541 #: ulanguages.slang_om
     674#: languages.slang_om
     675msgctxt "languages.slang_om"
    542676msgid "Oromo"
    543677msgstr ""
    544678
    545 #: ulanguages.slang_or
     679#: languages.slang_or
     680msgctxt "languages.slang_or"
    546681msgid "Oriya"
    547682msgstr ""
    548683
    549 #: ulanguages.slang_os
     684#: languages.slang_os
     685msgctxt "languages.slang_os"
    550686msgid "Ossetian"
    551687msgstr ""
    552688
    553 #: ulanguages.slang_pa
     689#: languages.slang_pa
     690msgctxt "languages.slang_pa"
    554691msgid "Panjabi"
    555692msgstr ""
    556693
    557 #: ulanguages.slang_pi
     694#: languages.slang_pi
     695msgctxt "languages.slang_pi"
    558696msgid "Pali"
    559697msgstr ""
    560698
    561 #: ulanguages.slang_pl
     699#: languages.slang_pl
     700msgctxt "languages.slang_pl"
    562701msgid "Polish"
    563702msgstr "Polština"
    564703
    565 #: ulanguages.slang_ps
     704#: languages.slang_ps
     705msgctxt "languages.slang_ps"
    566706msgid "Pushto"
    567707msgstr ""
    568708
    569 #: ulanguages.slang_pt
     709#: languages.slang_pt
     710msgctxt "languages.slang_pt"
    570711msgid "Portuguese"
    571712msgstr "Portugalština"
    572713
    573 #: ulanguages.slang_pt_br
     714#: languages.slang_pt_br
     715msgctxt "languages.slang_pt_br"
    574716msgid "Brazilian Portuguese"
    575717msgstr "Brazislká portugalština"
    576718
    577 #: ulanguages.slang_qu
     719#: languages.slang_qu
     720msgctxt "languages.slang_qu"
    578721msgid "Quechua"
    579722msgstr ""
    580723
    581 #: ulanguages.slang_rm
     724#: languages.slang_rm
     725msgctxt "languages.slang_rm"
    582726msgid "Raeto-Romance"
    583727msgstr ""
    584728
    585 #: ulanguages.slang_rn
     729#: languages.slang_rn
     730msgctxt "languages.slang_rn"
    586731msgid "Rundi"
    587732msgstr ""
    588733
    589 #: ulanguages.slang_ro
     734#: languages.slang_ro
     735msgctxt "languages.slang_ro"
    590736msgid "Romanian"
    591737msgstr "Romština"
    592738
    593 #: ulanguages.slang_ru
     739#: languages.slang_ru
     740msgctxt "languages.slang_ru"
    594741msgid "Russian"
    595742msgstr "Ruština"
    596743
    597 #: ulanguages.slang_rw
     744#: languages.slang_rw
     745msgctxt "languages.slang_rw"
    598746msgid "Kinyarwanda"
    599747msgstr ""
    600748
    601 #: ulanguages.slang_sa
     749#: languages.slang_sa
     750msgctxt "languages.slang_sa"
    602751msgid "Sanskrit"
    603752msgstr ""
    604753
    605 #: ulanguages.slang_sc
     754#: languages.slang_sc
     755msgctxt "languages.slang_sc"
    606756msgid "Sardinian"
    607757msgstr ""
    608758
    609 #: ulanguages.slang_sd
     759#: languages.slang_sd
     760msgctxt "languages.slang_sd"
    610761msgid "Sindhi"
    611762msgstr ""
    612763
    613 #: ulanguages.slang_se
     764#: languages.slang_se
     765msgctxt "languages.slang_se"
    614766msgid "Northern Sami"
    615767msgstr ""
    616768
    617 #: ulanguages.slang_sg
     769#: languages.slang_sg
     770msgctxt "languages.slang_sg"
    618771msgid "Sango"
    619772msgstr ""
    620773
    621 #: ulanguages.slang_si
     774#: languages.slang_si
     775msgctxt "languages.slang_si"
    622776msgid "Sinhalese"
    623777msgstr ""
    624778
    625 #: ulanguages.slang_sk
     779#: languages.slang_sk
     780msgctxt "languages.slang_sk"
    626781msgid "Slovak"
    627782msgstr "Slovenština"
    628783
    629 #: ulanguages.slang_sl
     784#: languages.slang_sl
     785msgctxt "languages.slang_sl"
    630786msgid "Slovenian"
    631787msgstr "Slovinština"
    632788
    633 #: ulanguages.slang_sm
     789#: languages.slang_sm
     790msgctxt "languages.slang_sm"
    634791msgid "Samoan"
    635792msgstr ""
    636793
    637 #: ulanguages.slang_sn
     794#: languages.slang_sn
     795msgctxt "languages.slang_sn"
    638796msgid "Shona"
    639797msgstr ""
    640798
    641 #: ulanguages.slang_so
     799#: languages.slang_so
     800msgctxt "languages.slang_so"
    642801msgid "Somali"
    643802msgstr ""
    644803
    645 #: ulanguages.slang_sq
     804#: languages.slang_sq
     805msgctxt "languages.slang_sq"
    646806msgid "Albanian"
    647807msgstr "Albánština"
    648808
    649 #: ulanguages.slang_sr
     809#: languages.slang_sr
     810msgctxt "languages.slang_sr"
    650811msgid "Serbian"
    651812msgstr ""
    652813
    653 #: ulanguages.slang_ss
     814#: languages.slang_ss
     815msgctxt "languages.slang_ss"
    654816msgid "Swati"
    655817msgstr ""
    656818
    657 #: ulanguages.slang_st
     819#: languages.slang_st
     820msgctxt "languages.slang_st"
    658821msgid "Sotho, Southern"
    659822msgstr ""
    660823
    661 #: ulanguages.slang_su
     824#: languages.slang_su
     825msgctxt "languages.slang_su"
    662826msgid "Sundanese"
    663827msgstr "Sundština"
    664828
    665 #: ulanguages.slang_sv
     829#: languages.slang_sv
     830msgctxt "languages.slang_sv"
    666831msgid "Swedish"
    667832msgstr "Švédština"
    668833
    669 #: ulanguages.slang_sw
     834#: languages.slang_sw
     835msgctxt "languages.slang_sw"
    670836msgid "Swahili"
    671837msgstr ""
    672838
    673 #: ulanguages.slang_ta
     839#: languages.slang_ta
     840msgctxt "languages.slang_ta"
    674841msgid "Tamil"
    675842msgstr ""
    676843
    677 #: ulanguages.slang_te
     844#: languages.slang_te
     845msgctxt "languages.slang_te"
    678846msgid "Telugu"
    679847msgstr ""
    680848
    681 #: ulanguages.slang_tg
     849#: languages.slang_tg
     850msgctxt "languages.slang_tg"
    682851msgid "Tajik"
    683852msgstr ""
    684853
    685 #: ulanguages.slang_th
     854#: languages.slang_th
     855msgctxt "languages.slang_th"
    686856msgid "Thai"
    687857msgstr ""
    688858
    689 #: ulanguages.slang_ti
     859#: languages.slang_ti
     860msgctxt "languages.slang_ti"
    690861msgid "Tigrinya"
    691862msgstr ""
    692863
    693 #: ulanguages.slang_tk
     864#: languages.slang_tk
     865msgctxt "languages.slang_tk"
    694866msgid "Turkmen"
    695867msgstr ""
    696868
    697 #: ulanguages.slang_tl
     869#: languages.slang_tl
     870msgctxt "languages.slang_tl"
    698871msgid "Tagalog"
    699872msgstr ""
    700873
    701 #: ulanguages.slang_tn
     874#: languages.slang_tn
     875msgctxt "languages.slang_tn"
    702876msgid "Tswana"
    703877msgstr ""
    704878
    705 #: ulanguages.slang_to
     879#: languages.slang_to
     880msgctxt "languages.slang_to"
    706881msgid "Tonga"
    707882msgstr ""
    708883
    709 #: ulanguages.slang_tr
     884#: languages.slang_tr
     885msgctxt "languages.slang_tr"
    710886msgid "Turkish"
    711887msgstr "Turečtina"
    712888
    713 #: ulanguages.slang_ts
     889#: languages.slang_ts
     890msgctxt "languages.slang_ts"
    714891msgid "Tsonga"
    715892msgstr ""
    716893
    717 #: ulanguages.slang_tt
     894#: languages.slang_tt
     895msgctxt "languages.slang_tt"
    718896msgid "Tatar"
    719897msgstr "Tatarština"
    720898
    721 #: ulanguages.slang_tw
     899#: languages.slang_tw
     900msgctxt "languages.slang_tw"
    722901msgid "Twi"
    723902msgstr ""
    724903
    725 #: ulanguages.slang_ty
     904#: languages.slang_ty
     905msgctxt "languages.slang_ty"
    726906msgid "Tahitian"
    727907msgstr ""
    728908
    729 #: ulanguages.slang_ug
     909#: languages.slang_ug
     910msgctxt "languages.slang_ug"
    730911msgid "Uighur"
    731912msgstr ""
    732913
    733 #: ulanguages.slang_uk
     914#: languages.slang_uk
     915msgctxt "languages.slang_uk"
    734916msgid "Ukrainian"
    735917msgstr "Ukrajinština"
    736918
    737 #: ulanguages.slang_ur
     919#: languages.slang_ur
     920msgctxt "languages.slang_ur"
    738921msgid "Urdu"
    739922msgstr ""
    740923
    741 #: ulanguages.slang_uz
     924#: languages.slang_uz
     925msgctxt "languages.slang_uz"
    742926msgid "Uzbek"
    743927msgstr ""
    744928
    745 #: ulanguages.slang_ve
     929#: languages.slang_ve
     930msgctxt "languages.slang_ve"
    746931msgid "Venda"
    747932msgstr ""
    748933
    749 #: ulanguages.slang_vi
     934#: languages.slang_vi
     935msgctxt "languages.slang_vi"
    750936msgid "Vietnamese"
    751937msgstr "Vietnamština"
    752938
    753 #: ulanguages.slang_vo
     939#: languages.slang_vo
     940msgctxt "languages.slang_vo"
    754941msgid "Volapuk"
    755942msgstr ""
    756943
    757 #: ulanguages.slang_wa
    758 msgctxt "ulanguages.slang_wa"
     944#: languages.slang_wa
     945msgctxt "languages.slang_wa"
    759946msgid "Walloon"
    760947msgstr ""
    761948
    762 #: ulanguages.slang_wo
     949#: languages.slang_wo
     950msgctxt "languages.slang_wo"
    763951msgid "Wolof"
    764952msgstr ""
    765953
    766 #: ulanguages.slang_xh
     954#: languages.slang_xh
     955msgctxt "languages.slang_xh"
    767956msgid "Xhosa"
    768957msgstr ""
    769958
    770 #: ulanguages.slang_yi
     959#: languages.slang_yi
     960msgctxt "languages.slang_yi"
    771961msgid "Yiddish"
    772962msgstr ""
    773963
    774 #: ulanguages.slang_yo
     964#: languages.slang_yo
     965msgctxt "languages.slang_yo"
    775966msgid "Yoruba"
    776967msgstr ""
    777968
    778 #: ulanguages.slang_za
     969#: languages.slang_za
     970msgctxt "languages.slang_za"
    779971msgid "Zhuang"
    780972msgstr ""
    781973
    782 #: ulanguages.slang_zh
     974#: languages.slang_zh
     975msgctxt "languages.slang_zh"
    783976msgid "Chinese"
    784977msgstr "Čínština"
    785978
    786 #: ulanguages.slang_zu
     979#: languages.slang_zh_hans
     980msgid "Simplified Chinese"
     981msgstr ""
     982
     983#: languages.slang_zh_hant
     984msgid "Traditional Chinese"
     985msgstr ""
     986
     987#: languages.slang_zu
     988msgctxt "languages.slang_zu"
    787989msgid "Zulu"
    788990msgstr "Zuluština"
  • trunk/Packages/Common/Languages/Languages.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: ulanguages.slangauto
     4#: languages.slangauto
    55msgid "Automatic"
    66msgstr ""
    77
    8 #: ulanguages.slang_aa
     8#: languages.slang_aa
    99msgid "Afar"
    1010msgstr ""
    1111
    12 #: ulanguages.slang_ab
     12#: languages.slang_ab
    1313msgid "Abkhazian"
    1414msgstr ""
    1515
    16 #: ulanguages.slang_ae
     16#: languages.slang_ae
    1717msgid "Avestan"
    1818msgstr ""
    1919
    20 #: ulanguages.slang_af
     20#: languages.slang_af
    2121msgid "Afrikaans"
    2222msgstr ""
    2323
    24 #: ulanguages.slang_ak
     24#: languages.slang_ak
    2525msgid "Akan"
    2626msgstr ""
    2727
    28 #: ulanguages.slang_am
     28#: languages.slang_am
    2929msgid "Amharic"
    3030msgstr ""
    3131
    32 #: ulanguages.slang_an
     32#: languages.slang_an
    3333msgid "Aragonese"
    3434msgstr ""
    3535
    36 #: ulanguages.slang_ar
     36#: languages.slang_ar
    3737msgid "Arabic"
    3838msgstr ""
    3939
    40 #: ulanguages.slang_as
     40#: languages.slang_as
    4141msgid "Assamese"
    4242msgstr ""
    4343
    44 #: ulanguages.slang_av
     44#: languages.slang_av
    4545msgid "Avaric"
    4646msgstr ""
    4747
    48 #: ulanguages.slang_ay
     48#: languages.slang_ay
    4949msgid "Aymara"
    5050msgstr ""
    5151
    52 #: ulanguages.slang_az
     52#: languages.slang_az
    5353msgid "Azerbaijani"
    5454msgstr ""
    5555
    56 #: ulanguages.slang_ba
     56#: languages.slang_ba
    5757msgid "Bashkir"
    5858msgstr ""
    5959
    60 #: ulanguages.slang_be
     60#: languages.slang_be
    6161msgid "Belarusian"
    6262msgstr ""
    6363
    64 #: ulanguages.slang_bg
     64#: languages.slang_bg
    6565msgid "Bulgarian"
    6666msgstr ""
    6767
    68 #: ulanguages.slang_bh
     68#: languages.slang_bh
    6969msgid "Bihari"
    7070msgstr ""
    7171
    72 #: ulanguages.slang_bi
     72#: languages.slang_bi
    7373msgid "Bislama"
    7474msgstr ""
    7575
    76 #: ulanguages.slang_bm
     76#: languages.slang_bm
    7777msgid "Bambara"
    7878msgstr ""
    7979
    80 #: ulanguages.slang_bn
     80#: languages.slang_bn
    8181msgid "Bengali"
    8282msgstr ""
    8383
    84 #: ulanguages.slang_bo
     84#: languages.slang_bo
    8585msgid "Tibetan"
    8686msgstr ""
    8787
    88 #: ulanguages.slang_br
     88#: languages.slang_br
    8989msgid "Breton"
    9090msgstr ""
    9191
    92 #: ulanguages.slang_bs
     92#: languages.slang_bs
    9393msgid "Bosnian"
    9494msgstr ""
    9595
    96 #: ulanguages.slang_ca
     96#: languages.slang_ca
    9797msgid "Catalan"
    9898msgstr ""
    9999
    100 #: ulanguages.slang_ce
     100#: languages.slang_ce
    101101msgid "Chechen"
    102102msgstr ""
    103103
    104 #: ulanguages.slang_ch
     104#: languages.slang_ch
    105105msgid "Chamorro"
    106106msgstr ""
    107107
    108 #: ulanguages.slang_co
     108#: languages.slang_co
    109109msgid "Corsican"
    110110msgstr ""
    111111
    112 #: ulanguages.slang_cr
     112#: languages.slang_cr
    113113msgid "Cree"
    114114msgstr ""
    115115
    116 #: ulanguages.slang_cs
     116#: languages.slang_cs
    117117msgid "Czech"
    118118msgstr ""
    119119
    120 #: ulanguages.slang_cv
     120#: languages.slang_cv
    121121msgid "Chuvash"
    122122msgstr ""
    123123
    124 #: ulanguages.slang_cy
     124#: languages.slang_cy
    125125msgid "Welsh"
    126126msgstr ""
    127127
    128 #: ulanguages.slang_da
     128#: languages.slang_da
    129129msgid "Danish"
    130130msgstr ""
    131131
    132 #: ulanguages.slang_de
     132#: languages.slang_de
    133133msgid "German"
    134134msgstr ""
    135135
    136 #: ulanguages.slang_de_at
     136#: languages.slang_de_at
    137137msgid "Austrian German"
    138138msgstr ""
    139139
    140 #: ulanguages.slang_de_ch
     140#: languages.slang_de_ch
    141141msgid "Swiss German"
    142142msgstr ""
    143143
    144 #: ulanguages.slang_dv
     144#: languages.slang_dv
    145145msgid "Divehi"
    146146msgstr ""
    147147
    148 #: ulanguages.slang_dz
     148#: languages.slang_dz
    149149msgid "Dzongkha"
    150150msgstr ""
    151151
    152 #: ulanguages.slang_ee
     152#: languages.slang_ee
    153153msgid "Ewe"
    154154msgstr ""
    155155
    156 #: ulanguages.slang_el
     156#: languages.slang_el
    157157msgid "Greek"
    158158msgstr ""
    159159
    160 #: ulanguages.slang_en
     160#: languages.slang_en
    161161msgid "English"
    162162msgstr ""
    163163
    164 #: ulanguages.slang_en_au
     164#: languages.slang_en_au
    165165msgid "Australian English"
    166166msgstr ""
    167167
    168 #: ulanguages.slang_en_ca
     168#: languages.slang_en_ca
    169169msgid "Canadian English"
    170170msgstr ""
    171171
    172 #: ulanguages.slang_en_gb
     172#: languages.slang_en_gb
    173173msgid "British English"
    174174msgstr ""
    175175
    176 #: ulanguages.slang_en_us
     176#: languages.slang_en_us
    177177msgid "American English"
    178178msgstr ""
    179179
    180 #: ulanguages.slang_eo
     180#: languages.slang_eo
    181181msgid "Esperanto"
    182182msgstr ""
    183183
    184 #: ulanguages.slang_es
     184#: languages.slang_es
    185185msgid "Spanish"
    186186msgstr ""
    187187
    188 #: ulanguages.slang_et
     188#: languages.slang_et
    189189msgid "Estonian"
    190190msgstr ""
    191191
    192 #: ulanguages.slang_eu
     192#: languages.slang_eu
    193193msgid "Basque"
    194194msgstr ""
    195195
    196 #: ulanguages.slang_fa
     196#: languages.slang_fa
    197197msgid "Persian"
    198198msgstr ""
    199199
    200 #: ulanguages.slang_ff
     200#: languages.slang_ff
    201201msgid "Fulah"
    202202msgstr ""
    203203
    204 #: ulanguages.slang_fi
     204#: languages.slang_fi
    205205msgid "Finnish"
    206206msgstr ""
    207207
    208 #: ulanguages.slang_fj
     208#: languages.slang_fj
    209209msgid "Fijian"
    210210msgstr ""
    211211
    212 #: ulanguages.slang_fo
     212#: languages.slang_fo
    213213msgid "Faroese"
    214214msgstr ""
    215215
    216 #: ulanguages.slang_fr
     216#: languages.slang_fr
    217217msgid "French"
    218218msgstr ""
    219219
    220 #: ulanguages.slang_fr_be
    221 msgctxt "ulanguages.slang_fr_be"
     220#: languages.slang_fr_be
     221msgctxt "languages.slang_fr_be"
    222222msgid "Walloon"
    223223msgstr ""
    224224
    225 #: ulanguages.slang_fy
     225#: languages.slang_fy
    226226msgid "Frisian"
    227227msgstr ""
    228228
    229 #: ulanguages.slang_ga
     229#: languages.slang_ga
    230230msgid "Irish"
    231231msgstr ""
    232232
    233 #: ulanguages.slang_gd
     233#: languages.slang_gd
    234234msgid "Gaelic"
    235235msgstr ""
    236236
    237 #: ulanguages.slang_gl
     237#: languages.slang_gl
    238238msgid "Gallegan"
    239239msgstr ""
    240240
    241 #: ulanguages.slang_gn
     241#: languages.slang_gn
    242242msgid "Guarani"
    243243msgstr ""
    244244
    245 #: ulanguages.slang_gu
     245#: languages.slang_gu
    246246msgid "Gujarati"
    247247msgstr ""
    248248
    249 #: ulanguages.slang_gv
     249#: languages.slang_gv
    250250msgid "Manx"
    251251msgstr ""
    252252
    253 #: ulanguages.slang_ha
     253#: languages.slang_ha
    254254msgid "Hausa"
    255255msgstr ""
    256256
    257 #: ulanguages.slang_he
     257#: languages.slang_he
    258258msgid "Hebrew"
    259259msgstr ""
    260260
    261 #: ulanguages.slang_hi
     261#: languages.slang_hi
    262262msgid "Hindi"
    263263msgstr ""
    264264
    265 #: ulanguages.slang_ho
     265#: languages.slang_ho
    266266msgid "Hiri Motu"
    267267msgstr ""
    268268
    269 #: ulanguages.slang_hr
     269#: languages.slang_hr
    270270msgid "Croatian"
    271271msgstr ""
    272272
    273 #: ulanguages.slang_ht
     273#: languages.slang_ht
    274274msgid "Haitian"
    275275msgstr ""
    276276
    277 #: ulanguages.slang_hu
     277#: languages.slang_hu
    278278msgid "Hungarian"
    279279msgstr ""
    280280
    281 #: ulanguages.slang_hy
     281#: languages.slang_hy
    282282msgid "Armenian"
    283283msgstr ""
    284284
    285 #: ulanguages.slang_hz
     285#: languages.slang_hz
    286286msgid "Herero"
    287287msgstr ""
    288288
    289 #: ulanguages.slang_ia
     289#: languages.slang_ia
    290290msgid "Interlingua"
    291291msgstr ""
    292292
    293 #: ulanguages.slang_id
     293#: languages.slang_id
    294294msgid "Indonesian"
    295295msgstr ""
    296296
    297 #: ulanguages.slang_ie
     297#: languages.slang_ie
    298298msgid "Interlingue"
    299299msgstr ""
    300300
    301 #: ulanguages.slang_ig
     301#: languages.slang_ig
    302302msgid "Igbo"
    303303msgstr ""
    304304
    305 #: ulanguages.slang_ii
     305#: languages.slang_ii
    306306msgid "Sichuan Yi"
    307307msgstr ""
    308308
    309 #: ulanguages.slang_ik
     309#: languages.slang_ik
    310310msgid "Inupiaq"
    311311msgstr ""
    312312
    313 #: ulanguages.slang_io
     313#: languages.slang_io
    314314msgid "Ido"
    315315msgstr ""
    316316
    317 #: ulanguages.slang_is
     317#: languages.slang_is
    318318msgid "Icelandic"
    319319msgstr ""
    320320
    321 #: ulanguages.slang_it
     321#: languages.slang_it
    322322msgid "Italian"
    323323msgstr ""
    324324
    325 #: ulanguages.slang_iu
     325#: languages.slang_iu
    326326msgid "Inuktitut"
    327327msgstr ""
    328328
    329 #: ulanguages.slang_ja
     329#: languages.slang_ja
    330330msgid "Japanese"
    331331msgstr ""
    332332
    333 #: ulanguages.slang_jv
     333#: languages.slang_jv
    334334msgid "Javanese"
    335335msgstr ""
    336336
    337 #: ulanguages.slang_ka
     337#: languages.slang_ka
    338338msgid "Georgian"
    339339msgstr ""
    340340
    341 #: ulanguages.slang_kg
     341#: languages.slang_kg
    342342msgid "Kongo"
    343343msgstr ""
    344344
    345 #: ulanguages.slang_ki
     345#: languages.slang_ki
    346346msgid "Kikuyu"
    347347msgstr ""
    348348
    349 #: ulanguages.slang_kj
     349#: languages.slang_kj
    350350msgid "Kuanyama"
    351351msgstr ""
    352352
    353 #: ulanguages.slang_kk
     353#: languages.slang_kk
    354354msgid "Kazakh"
    355355msgstr ""
    356356
    357 #: ulanguages.slang_kl
     357#: languages.slang_kl
    358358msgid "Greenlandic"
    359359msgstr ""
    360360
    361 #: ulanguages.slang_km
     361#: languages.slang_km
    362362msgid "Khmer"
    363363msgstr ""
    364364
    365 #: ulanguages.slang_kn
     365#: languages.slang_kn
    366366msgid "Kannada"
    367367msgstr ""
    368368
    369 #: ulanguages.slang_ko
     369#: languages.slang_ko
    370370msgid "Korean"
    371371msgstr ""
    372372
    373 #: ulanguages.slang_kr
     373#: languages.slang_kr
    374374msgid "Kanuri"
    375375msgstr ""
    376376
    377 #: ulanguages.slang_ks
     377#: languages.slang_ks
    378378msgid "Kashmiri"
    379379msgstr ""
    380380
    381 #: ulanguages.slang_ku
     381#: languages.slang_ku
    382382msgid "Kurdish"
    383383msgstr ""
    384384
    385 #: ulanguages.slang_kv
     385#: languages.slang_kv
    386386msgid "Komi"
    387387msgstr ""
    388388
    389 #: ulanguages.slang_kw
     389#: languages.slang_kw
    390390msgid "Cornish"
    391391msgstr ""
    392392
    393 #: ulanguages.slang_ky
     393#: languages.slang_ky
    394394msgid "Kirghiz"
    395395msgstr ""
    396396
    397 #: ulanguages.slang_la
     397#: languages.slang_la
    398398msgid "Latin"
    399399msgstr ""
    400400
    401 #: ulanguages.slang_lb
     401#: languages.slang_lb
    402402msgid "Luxembourgish"
    403403msgstr ""
    404404
    405 #: ulanguages.slang_lg
     405#: languages.slang_lg
    406406msgid "Ganda"
    407407msgstr ""
    408408
    409 #: ulanguages.slang_li
     409#: languages.slang_li
    410410msgid "Limburgan"
    411411msgstr ""
    412412
    413 #: ulanguages.slang_ln
     413#: languages.slang_ln
    414414msgid "Lingala"
    415415msgstr ""
    416416
    417 #: ulanguages.slang_lo
     417#: languages.slang_lo
    418418msgid "Lao"
    419419msgstr ""
    420420
    421 #: ulanguages.slang_lt
     421#: languages.slang_lt
    422422msgid "Lithuanian"
    423423msgstr ""
    424424
    425 #: ulanguages.slang_lu
     425#: languages.slang_lu
    426426msgid "Luba-Katanga"
    427427msgstr ""
    428428
    429 #: ulanguages.slang_lv
     429#: languages.slang_lv
    430430msgid "Latvian"
    431431msgstr ""
    432432
    433 #: ulanguages.slang_mg
     433#: languages.slang_mg
    434434msgid "Malagasy"
    435435msgstr ""
    436436
    437 #: ulanguages.slang_mh
     437#: languages.slang_mh
    438438msgid "Marshallese"
    439439msgstr ""
    440440
    441 #: ulanguages.slang_mi
     441#: languages.slang_mi
    442442msgid "Maori"
    443443msgstr ""
    444444
    445 #: ulanguages.slang_mk
     445#: languages.slang_mk
    446446msgid "Macedonian"
    447447msgstr ""
    448448
    449 #: ulanguages.slang_ml
     449#: languages.slang_ml
    450450msgid "Malayalam"
    451451msgstr ""
    452452
    453 #: ulanguages.slang_mn
     453#: languages.slang_mn
    454454msgid "Mongolian"
    455455msgstr ""
    456456
    457 #: ulanguages.slang_mo
     457#: languages.slang_mo
    458458msgid "Moldavian"
    459459msgstr ""
    460460
    461 #: ulanguages.slang_mr
     461#: languages.slang_mr
    462462msgid "Marathi"
    463463msgstr ""
    464464
    465 #: ulanguages.slang_ms
     465#: languages.slang_ms
    466466msgid "Malay"
    467467msgstr ""
    468468
    469 #: ulanguages.slang_mt
     469#: languages.slang_mt
    470470msgid "Maltese"
    471471msgstr ""
    472472
    473 #: ulanguages.slang_my
     473#: languages.slang_my
    474474msgid "Burmese"
    475475msgstr ""
    476476
    477 #: ulanguages.slang_na
     477#: languages.slang_na
    478478msgid "Nauru"
    479479msgstr ""
    480480
    481 #: ulanguages.slang_nb
     481#: languages.slang_nb
    482482msgid "Norwegian Bokmaal"
    483483msgstr ""
    484484
    485 #: ulanguages.slang_nd
     485#: languages.slang_nd
    486486msgid "Ndebele, North"
    487487msgstr ""
    488488
    489 #: ulanguages.slang_ne
     489#: languages.slang_ne
    490490msgid "Nepali"
    491491msgstr ""
    492492
    493 #: ulanguages.slang_ng
     493#: languages.slang_ng
    494494msgid "Ndonga"
    495495msgstr ""
    496496
    497 #: ulanguages.slang_nl
     497#: languages.slang_nl
    498498msgid "Dutch"
    499499msgstr ""
    500500
    501 #: ulanguages.slang_nl_be
     501#: languages.slang_nl_be
    502502msgid "Flemish"
    503503msgstr ""
    504504
    505 #: ulanguages.slang_nn
     505#: languages.slang_nn
    506506msgid "Norwegian Nynorsk"
    507507msgstr ""
    508508
    509 #: ulanguages.slang_no
     509#: languages.slang_no
    510510msgid "Norwegian"
    511511msgstr ""
    512512
    513 #: ulanguages.slang_nr
     513#: languages.slang_nr
    514514msgid "Ndebele, South"
    515515msgstr ""
    516516
    517 #: ulanguages.slang_nv
     517#: languages.slang_nv
    518518msgid "Navajo"
    519519msgstr ""
    520520
    521 #: ulanguages.slang_ny
     521#: languages.slang_ny
    522522msgid "Chichewa"
    523523msgstr ""
    524524
    525 #: ulanguages.slang_oc
     525#: languages.slang_oc
    526526msgid "Occitan"
    527527msgstr ""
    528528
    529 #: ulanguages.slang_oj
     529#: languages.slang_oj
    530530msgid "Ojibwa"
    531531msgstr ""
    532532
    533 #: ulanguages.slang_om
     533#: languages.slang_om
    534534msgid "Oromo"
    535535msgstr ""
    536536
    537 #: ulanguages.slang_or
     537#: languages.slang_or
    538538msgid "Oriya"
    539539msgstr ""
    540540
    541 #: ulanguages.slang_os
     541#: languages.slang_os
    542542msgid "Ossetian"
    543543msgstr ""
    544544
    545 #: ulanguages.slang_pa
     545#: languages.slang_pa
    546546msgid "Panjabi"
    547547msgstr ""
    548548
    549 #: ulanguages.slang_pi
     549#: languages.slang_pi
    550550msgid "Pali"
    551551msgstr ""
    552552
    553 #: ulanguages.slang_pl
     553#: languages.slang_pl
    554554msgid "Polish"
    555555msgstr ""
    556556
    557 #: ulanguages.slang_ps
     557#: languages.slang_ps
    558558msgid "Pushto"
    559559msgstr ""
    560560
    561 #: ulanguages.slang_pt
     561#: languages.slang_pt
    562562msgid "Portuguese"
    563563msgstr ""
    564564
    565 #: ulanguages.slang_pt_br
     565#: languages.slang_pt_br
    566566msgid "Brazilian Portuguese"
    567567msgstr ""
    568568
    569 #: ulanguages.slang_qu
     569#: languages.slang_qu
    570570msgid "Quechua"
    571571msgstr ""
    572572
    573 #: ulanguages.slang_rm
     573#: languages.slang_rm
    574574msgid "Raeto-Romance"
    575575msgstr ""
    576576
    577 #: ulanguages.slang_rn
     577#: languages.slang_rn
    578578msgid "Rundi"
    579579msgstr ""
    580580
    581 #: ulanguages.slang_ro
     581#: languages.slang_ro
    582582msgid "Romanian"
    583583msgstr ""
    584584
    585 #: ulanguages.slang_ru
     585#: languages.slang_ru
    586586msgid "Russian"
    587587msgstr ""
    588588
    589 #: ulanguages.slang_rw
     589#: languages.slang_rw
    590590msgid "Kinyarwanda"
    591591msgstr ""
    592592
    593 #: ulanguages.slang_sa
     593#: languages.slang_sa
    594594msgid "Sanskrit"
    595595msgstr ""
    596596
    597 #: ulanguages.slang_sc
     597#: languages.slang_sc
    598598msgid "Sardinian"
    599599msgstr ""
    600600
    601 #: ulanguages.slang_sd
     601#: languages.slang_sd
    602602msgid "Sindhi"
    603603msgstr ""
    604604
    605 #: ulanguages.slang_se
     605#: languages.slang_se
    606606msgid "Northern Sami"
    607607msgstr ""
    608608
    609 #: ulanguages.slang_sg
     609#: languages.slang_sg
    610610msgid "Sango"
    611611msgstr ""
    612612
    613 #: ulanguages.slang_si
     613#: languages.slang_si
    614614msgid "Sinhalese"
    615615msgstr ""
    616616
    617 #: ulanguages.slang_sk
     617#: languages.slang_sk
    618618msgid "Slovak"
    619619msgstr ""
    620620
    621 #: ulanguages.slang_sl
     621#: languages.slang_sl
    622622msgid "Slovenian"
    623623msgstr ""
    624624
    625 #: ulanguages.slang_sm
     625#: languages.slang_sm
    626626msgid "Samoan"
    627627msgstr ""
    628628
    629 #: ulanguages.slang_sn
     629#: languages.slang_sn
    630630msgid "Shona"
    631631msgstr ""
    632632
    633 #: ulanguages.slang_so
     633#: languages.slang_so
    634634msgid "Somali"
    635635msgstr ""
    636636
    637 #: ulanguages.slang_sq
     637#: languages.slang_sq
    638638msgid "Albanian"
    639639msgstr ""
    640640
    641 #: ulanguages.slang_sr
     641#: languages.slang_sr
    642642msgid "Serbian"
    643643msgstr ""
    644644
    645 #: ulanguages.slang_ss
     645#: languages.slang_ss
    646646msgid "Swati"
    647647msgstr ""
    648648
    649 #: ulanguages.slang_st
     649#: languages.slang_st
    650650msgid "Sotho, Southern"
    651651msgstr ""
    652652
    653 #: ulanguages.slang_su
     653#: languages.slang_su
    654654msgid "Sundanese"
    655655msgstr ""
    656656
    657 #: ulanguages.slang_sv
     657#: languages.slang_sv
    658658msgid "Swedish"
    659659msgstr ""
    660660
    661 #: ulanguages.slang_sw
     661#: languages.slang_sw
    662662msgid "Swahili"
    663663msgstr ""
    664664
    665 #: ulanguages.slang_ta
     665#: languages.slang_ta
    666666msgid "Tamil"
    667667msgstr ""
    668668
    669 #: ulanguages.slang_te
     669#: languages.slang_te
    670670msgid "Telugu"
    671671msgstr ""
    672672
    673 #: ulanguages.slang_tg
     673#: languages.slang_tg
    674674msgid "Tajik"
    675675msgstr ""
    676676
    677 #: ulanguages.slang_th
     677#: languages.slang_th
    678678msgid "Thai"
    679679msgstr ""
    680680
    681 #: ulanguages.slang_ti
     681#: languages.slang_ti
    682682msgid "Tigrinya"
    683683msgstr ""
    684684
    685 #: ulanguages.slang_tk
     685#: languages.slang_tk
    686686msgid "Turkmen"
    687687msgstr ""
    688688
    689 #: ulanguages.slang_tl
     689#: languages.slang_tl
    690690msgid "Tagalog"
    691691msgstr ""
    692692
    693 #: ulanguages.slang_tn
     693#: languages.slang_tn
    694694msgid "Tswana"
    695695msgstr ""
    696696
    697 #: ulanguages.slang_to
     697#: languages.slang_to
    698698msgid "Tonga"
    699699msgstr ""
    700700
    701 #: ulanguages.slang_tr
     701#: languages.slang_tr
    702702msgid "Turkish"
    703703msgstr ""
    704704
    705 #: ulanguages.slang_ts
     705#: languages.slang_ts
    706706msgid "Tsonga"
    707707msgstr ""
    708708
    709 #: ulanguages.slang_tt
     709#: languages.slang_tt
    710710msgid "Tatar"
    711711msgstr ""
    712712
    713 #: ulanguages.slang_tw
     713#: languages.slang_tw
    714714msgid "Twi"
    715715msgstr ""
    716716
    717 #: ulanguages.slang_ty
     717#: languages.slang_ty
    718718msgid "Tahitian"
    719719msgstr ""
    720720
    721 #: ulanguages.slang_ug
     721#: languages.slang_ug
    722722msgid "Uighur"
    723723msgstr ""
    724724
    725 #: ulanguages.slang_uk
     725#: languages.slang_uk
    726726msgid "Ukrainian"
    727727msgstr ""
    728728
    729 #: ulanguages.slang_ur
     729#: languages.slang_ur
    730730msgid "Urdu"
    731731msgstr ""
    732732
    733 #: ulanguages.slang_uz
     733#: languages.slang_uz
    734734msgid "Uzbek"
    735735msgstr ""
    736736
    737 #: ulanguages.slang_ve
     737#: languages.slang_ve
    738738msgid "Venda"
    739739msgstr ""
    740740
    741 #: ulanguages.slang_vi
     741#: languages.slang_vi
    742742msgid "Vietnamese"
    743743msgstr ""
    744744
    745 #: ulanguages.slang_vo
     745#: languages.slang_vo
    746746msgid "Volapuk"
    747747msgstr ""
    748748
    749 #: ulanguages.slang_wa
    750 msgctxt "ulanguages.slang_wa"
     749#: languages.slang_wa
     750msgctxt "languages.slang_wa"
    751751msgid "Walloon"
    752752msgstr ""
    753753
    754 #: ulanguages.slang_wo
     754#: languages.slang_wo
    755755msgid "Wolof"
    756756msgstr ""
    757757
    758 #: ulanguages.slang_xh
     758#: languages.slang_xh
    759759msgid "Xhosa"
    760760msgstr ""
    761761
    762 #: ulanguages.slang_yi
     762#: languages.slang_yi
    763763msgid "Yiddish"
    764764msgstr ""
    765765
    766 #: ulanguages.slang_yo
     766#: languages.slang_yo
    767767msgid "Yoruba"
    768768msgstr ""
    769769
    770 #: ulanguages.slang_za
     770#: languages.slang_za
    771771msgid "Zhuang"
    772772msgstr ""
    773773
    774 #: ulanguages.slang_zh
     774#: languages.slang_zh
    775775msgid "Chinese"
    776776msgstr ""
    777777
    778 #: ulanguages.slang_zu
     778#: languages.slang_zh_hans
     779msgid "Simplified Chinese"
     780msgstr ""
     781
     782#: languages.slang_zh_hant
     783msgid "Traditional Chinese"
     784msgstr ""
     785
     786#: languages.slang_zu
    779787msgid "Zulu"
    780788msgstr ""
  • trunk/Packages/Common/Languages/Pool.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: Chronos <robie@centrum.cz>\n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
     12"X-Generator: Poedit 3.0.1\n"
    1113
    12 #: upool.sobjectpoolempty
     14#: pool.sobjectpoolempty
     15msgctxt "pool.sobjectpoolempty"
    1316msgid "Object pool is empty"
    1417msgstr "Zásobník objektů je prázdný"
    1518
    16 #: upool.sreleaseerror
     19#: pool.sreleaseerror
     20msgctxt "pool.sreleaseerror"
    1721msgid "Unknown object for release from pool"
    1822msgstr "Neznýmý objekt pro uvolnění ze zásobníku"
  • trunk/Packages/Common/Languages/Pool.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: upool.sobjectpoolempty
     4#: pool.sobjectpoolempty
    55msgid "Object pool is empty"
    66msgstr ""
    77
    8 #: upool.sreleaseerror
     8#: pool.sreleaseerror
    99msgid "Unknown object for release from pool"
    1010msgstr ""
  • trunk/Packages/Common/Languages/ResetableThread.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: Chronos <robie@centrum.cz>\n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
     12"X-Generator: Poedit 3.0.1\n"
    1113
    12 #: uresetablethread.swaiterror
     14#: resetablethread.swaiterror
     15msgctxt "resetablethread.swaiterror"
    1316msgid "WaitFor error"
    1417msgstr "Chyba WaitFor"
  • trunk/Packages/Common/Languages/ResetableThread.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: uresetablethread.swaiterror
     4#: resetablethread.swaiterror
    55msgid "WaitFor error"
    66msgstr ""
  • trunk/Packages/Common/Languages/ScaleDPI.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: \n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
    11 "Language: cs\n"
    12 "X-Generator: Poedit 1.8.9\n"
     12"X-Generator: Poedit 3.0.1\n"
    1313
    14 #: uscaledpi.swrongdpi
     14#: scaledpi.swrongdpi
    1515#, object-pascal-format
     16msgctxt "scaledpi.swrongdpi"
    1617msgid "Wrong DPI [%d,%d]"
    1718msgstr "Chybné DPI [%d,%d]"
  • trunk/Packages/Common/Languages/ScaleDPI.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: uscaledpi.swrongdpi
     4#: scaledpi.swrongdpi
    55#, object-pascal-format
    66msgid "Wrong DPI [%d,%d]"
  • trunk/Packages/Common/Languages/Threading.cs.po

    r218 r219  
    11msgid ""
    22msgstr ""
    3 "Content-Type: text/plain; charset=UTF-8\n"
    43"Project-Id-Version: \n"
    54"POT-Creation-Date: \n"
     
    76"Last-Translator: Chronos <robie@centrum.cz>\n"
    87"Language-Team: \n"
     8"Language: cs\n"
    99"MIME-Version: 1.0\n"
     10"Content-Type: text/plain; charset=UTF-8\n"
    1011"Content-Transfer-Encoding: 8bit\n"
     12"X-Generator: Poedit 3.0.1\n"
    1113
    12 #: uthreading.scurrentthreadnotfound
     14#: threading.scurrentthreadnotfound
    1315#, object-pascal-format
     16msgctxt "threading.scurrentthreadnotfound"
    1417msgid "Current thread ID %d not found in virtual thread list."
    1518msgstr "Aktuální vlákno ID %d nenalezeno v seznamu virtuálních vláken."
  • trunk/Packages/Common/Languages/Threading.pot

    r218 r219  
    22msgstr "Content-Type: text/plain; charset=UTF-8"
    33
    4 #: uthreading.scurrentthreadnotfound
     4#: threading.scurrentthreadnotfound
    55#, object-pascal-format
    66msgid "Current thread ID %d not found in virtual thread list."
  • trunk/Packages/Common/LastOpenedList.pas

    r218 r219  
    1 unit ULastOpenedList;
    2 
    3 {$mode delphi}
     1unit LastOpenedList;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Registry, URegistry, Menus, XMLConf, DOM;
     6  Classes, SysUtils, Registry, RegistryEx, Menus, XMLConf, DOM;
    97
    108type
     
    8482destructor TLastOpenedList.Destroy;
    8583begin
    86   Items.Free;
     84  FreeAndNil(Items);
    8785  inherited;
    8886end;
     
    9492begin
    9593  if Assigned(MenuItem) then begin
    96     MenuItem.Clear;
     94    while MenuItem.Count > Items.Count do
     95      MenuItem.Delete(MenuItem.Count - 1);
     96    while MenuItem.Count < Items.Count do begin
     97      NewMenuItem := TMenuItem.Create(MenuItem);
     98      MenuItem.Add(NewMenuItem);
     99    end;
    97100    for I := 0 to Items.Count - 1 do begin
    98       NewMenuItem := TMenuItem.Create(MenuItem);
    99       NewMenuItem.Caption := Items[I];
    100       NewMenuItem.OnClick := ClickAction;
    101       MenuItem.Add(NewMenuItem);
     101      MenuItem.Items[I].Caption := Items[I];
     102      MenuItem.Items[I].OnClick := ClickAction;
    102103    end;
    103104  end;
     
    193194
    194195end.
    195 
  • trunk/Packages/Common/ListViewSort.pas

    r218 r219  
    1 unit UListViewSort;
     1unit ListViewSort;
    22
    33// Date: 2019-05-17
    4 
    5 {$mode delphi}
    64
    75interface
     
    97uses
    108  {$IFDEF Windows}Windows, CommCtrl, LMessages, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils,
    11   Controls, DateUtils, Dialogs, fgl, Forms, Grids, StdCtrls, ExtCtrls,
    12   LclIntf, LclType, LResources;
     9  Controls, DateUtils, Dialogs, Forms, Grids, StdCtrls, ExtCtrls,
     10  LclIntf, LclType, LResources, Generics.Collections, Generics.Defaults;
    1311
    1412type
     
    1917  TCompareEvent = function (Item1, Item2: TObject): Integer of object;
    2018  TListFilterEvent = procedure (ListViewSort: TListViewSort) of object;
     19
     20  TObjects = TObjectList<TObject>;
    2121
    2222  { TListViewSort }
     
    5252    {$ENDIF}
    5353  public
    54     List: TFPGObjectList<TObject>;
    55     Source: TFPGObjectList<TObject>;
     54    Source: TObjects;
     55    List: TObjects;
    5656    constructor Create(AOwner: TComponent); override;
    5757    destructor Destroy; override;
     
    136136constructor TListViewEx.Create(TheOwner: TComponent);
    137137begin
    138   inherited Create(TheOwner);
     138  inherited;
    139139  Filter := TListViewFilter.Create(Self);
    140140  Filter.Parent := Self;
     
    149149destructor TListViewEx.Destroy;
    150150begin
    151   inherited Destroy;
     151  inherited;
    152152end;
    153153
     
    172172constructor TListViewFilter.Create(AOwner: TComponent);
    173173begin
    174   inherited Create(AOwner);
     174  inherited;
    175175  FStringGrid1 := TStringGrid.Create(Self);
    176176  FStringGrid1.Align := alClient;
     
    338338  ListViewSortCompare: TCompareEvent;
    339339
    340 function ListViewCompare(const Item1, Item2: TObject): Integer;
     340function ListViewCompare(constref Item1, Item2: TObject): Integer;
    341341begin
    342342  Result := ListViewSortCompare(Item1, Item2);
     
    349349  ListViewSortCompare := Compare;
    350350  if (List.Count > 0) then
    351     List.Sort(ListViewCompare);
     351    List.Sort(TComparer<TObject>.Construct(ListViewCompare));
    352352end;
    353353
     
    355355begin
    356356  if Assigned(FOnFilter) then FOnFilter(Self)
    357   else if Assigned(Source) then
    358     List.Assign(Source) else
     357  else if Assigned(Source) then begin
    359358    List.Clear;
     359    List.AddRange(Source);
     360  end;
    360361  if ListView.Items.Count <> List.Count then
    361362    ListView.Items.Count := List.Count;
     
    412413begin
    413414  inherited;
    414   List := TFPGObjectList<TObject>.Create;
    415   List.FreeObjects := False;
     415  List := TObjects.Create;
     416  List.OwnsObjects := False;
    416417end;
    417418
    418419destructor TListViewSort.Destroy;
    419420begin
    420   List.Free;
     421  FreeAndNil(List);
    421422  inherited;
    422423end;
  • trunk/Packages/Common/Memory.pas

    r218 r219  
    1 unit UMemory;
    2 
    3 {$mode Delphi}{$H+}
     1unit Memory;
    42
    53interface
     
    4442  end;
    4543
     44
    4645implementation
    4746
     
    5049procedure TPositionMemory.SetSize(AValue: Integer);
    5150begin
    52   inherited SetSize(AValue);
     51  inherited;
    5352  if FPosition > FSize then FPosition := FSize;
    5453end;
     
    107106begin
    108107  Size := 0;
    109   inherited Destroy;
     108  inherited;
    110109end;
    111110
     
    121120
    122121end.
    123 
  • trunk/Packages/Common/MetaCanvas.pas

    r218 r219  
    1 unit UMetaCanvas;
    2 
    3 {$mode delphi}
     1unit MetaCanvas;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Graphics, Types, fgl;
     6  Classes, SysUtils, Graphics, Types, Generics.Collections;
    97
    108type
     
    1917  end;
    2018
    21   TCanvasObjects = class(TFPGObjectList<TCanvasObject>)
     19  TCanvasObjects = class(TObjectList<TCanvasObject>)
    2220  end;
    2321
     
    6563
    6664  TCanvasPolygon = class(TCanvasObject)
     65    Pen: TPen;
     66    Brush: TBrush;
     67    Points: array of TPoint;
     68    procedure Paint(Canvas: TCanvas); override;
     69    procedure Zoom(Factor: Double); override;
     70    procedure Move(Delta: TPoint); override;
     71    constructor Create;
     72    destructor Destroy; override;
     73  end;
     74
     75  { TCanvasPolyline }
     76
     77  TCanvasPolyline = class(TCanvasObject)
     78    Pen: TPen;
     79    Brush: TBrush;
     80    Points: array of TPoint;
     81    procedure Paint(Canvas: TCanvas); override;
     82    procedure Zoom(Factor: Double); override;
     83    procedure Move(Delta: TPoint); override;
     84    constructor Create;
     85    destructor Destroy; override;
     86  end;
     87
     88  { TCanvasPolyBezier }
     89
     90  TCanvasPolyBezier = class(TCanvasObject)
    6791    Pen: TPen;
    6892    Brush: TBrush;
     
    126150    procedure SetWidth(AValue: Integer); override;
    127151    function GetWidth: Integer; override;
    128     procedure DoLine (x1,y1,x2,y2:integer); override;
     152    procedure DoLine(X1, Y1, X2, Y2: Integer); override;
    129153    procedure DoTextOut(X, Y: Integer; Text: string); override;
    130154    procedure DoRectangle(const Bounds: TRect); override;
     
    135159    procedure DoMoveTo(X, Y: Integer); override;
    136160    procedure DoLineTo(X, Y: Integer); override;
     161    procedure DoPolyline(const Points: array of TPoint); override;
     162    procedure DoPolyBezier(Points: PPoint; NumPts: Integer;
     163      Filled: Boolean = False; Continuous: Boolean = False); override;
    137164  public
    138165    Objects: TCanvasObjects;
     
    143170    procedure TextOut(X,Y: Integer; const Text: String); override;
    144171    procedure Polygon(Points: PPoint; NumPts: Integer; Winding: Boolean = False); override;
     172    procedure Polyline(Points: PPoint; NumPts: Integer); override;
     173    procedure PolyBezier(Points: PPoint; NumPts: Integer;
     174      Filled: Boolean = False; Continuous: Boolean = True); override;
    145175    procedure Ellipse(x1, y1, x2, y2: Integer); override;
    146176    procedure StretchDraw(const DestRect: TRect; SrcGraphic: TGraphic); override;
     
    161191
    162192uses
    163   UGeometric, LCLIntf;
     193  Geometric, LCLIntf;
     194
     195{ TCanvasPolyBezier }
     196
     197procedure TCanvasPolyBezier.Paint(Canvas: TCanvas);
     198begin
     199  Canvas.Pen.Assign(Pen);
     200  Canvas.Brush.Assign(Brush);
     201  Canvas.PolyBezier(Points);
     202end;
     203
     204procedure TCanvasPolyBezier.Zoom(Factor: Double);
     205var
     206  I: Integer;
     207begin
     208  for I := 0 to High(Points) do
     209    Points[I] := Point(Trunc(Points[I].X * Factor),
     210      Trunc(Points[I].Y * Factor));
     211  Pen.Width := Trunc(Pen.Width * Factor);
     212end;
     213
     214procedure TCanvasPolyBezier.Move(Delta: TPoint);
     215var
     216  I: Integer;
     217begin
     218  for I := 0 to High(Points) do
     219    Points[I] := AddPoint(Points[I], Delta);
     220end;
     221
     222constructor TCanvasPolyBezier.Create;
     223begin
     224  Pen := TPen.Create;
     225  Brush := TBrush.Create;
     226end;
     227
     228destructor TCanvasPolyBezier.Destroy;
     229begin
     230  FreeAndNil(Brush);
     231  FreeAndNil(Pen);
     232  inherited;
     233end;
     234
     235{ TCanvasPolyline }
     236
     237procedure TCanvasPolyline.Paint(Canvas: TCanvas);
     238begin
     239  Canvas.Pen.Assign(Pen);
     240  Canvas.Brush.Assign(Brush);
     241  Canvas.Polyline(Points);
     242end;
     243
     244procedure TCanvasPolyline.Zoom(Factor: Double);
     245var
     246  I: Integer;
     247begin
     248  for I := 0 to High(Points) do
     249    Points[I] := Point(Trunc(Points[I].X * Factor),
     250      Trunc(Points[I].Y * Factor));
     251  Pen.Width := Trunc(Pen.Width * Factor);
     252end;
     253
     254procedure TCanvasPolyline.Move(Delta: TPoint);
     255var
     256  I: Integer;
     257begin
     258  for I := 0 to High(Points) do
     259    Points[I] := AddPoint(Points[I], Delta);
     260end;
     261
     262constructor TCanvasPolyline.Create;
     263begin
     264  Pen := TPen.Create;
     265  Brush := TBrush.Create;
     266end;
     267
     268destructor TCanvasPolyline.Destroy;
     269begin
     270  FreeAndNil(Brush);
     271  FreeAndNil(Pen);
     272  inherited;
     273end;
    164274
    165275{ TCanvasPie }
     
    306416destructor TCanvasPolygon.Destroy;
    307417begin
    308   Brush.Free;
    309   Pen.Free;
     418  FreeAndNil(Brush);
     419  FreeAndNil(Pen);
    310420  inherited;
    311421end;
     
    453563end;
    454564
    455 procedure TMetaCanvas.DoLine(x1, y1, x2, y2: integer);
     565procedure TMetaCanvas.DoLine(X1, Y1, X2, Y2: integer);
    456566var
    457567  NewObj: TCanvasLine;
     
    513623    APoints[I] := Points[I];
    514624  DoPolygon(APoints);
     625end;
     626
     627procedure TMetaCanvas.Polyline(Points: PPoint; NumPts: Integer);
     628var
     629  APoints: array of TPoint;
     630  I: Integer;
     631begin
     632  APoints := nil;
     633  SetLength(APoints, NumPts);
     634  for I := 0 to High(APoints) do
     635    APoints[I] := Points[I];
     636  DoPolyline(APoints);
     637end;
     638
     639procedure TMetaCanvas.PolyBezier(Points: PPoint; NumPts: Integer;
     640  Filled: Boolean; Continuous: Boolean);
     641begin
     642  DoPolyBezier(Points, NumPts, Filled, Continuous);
    515643end;
    516644
     
    582710end;
    583711
     712procedure TMetaCanvas.DoPolyline(const Points: array of TPoint);
     713var
     714  NewObj: TCanvasPolyline;
     715  I: Integer;
     716begin
     717  NewObj := TCanvasPolyline.Create;
     718  NewObj.Brush.Assign(Brush);
     719  NewObj.Pen.Assign(Pen);
     720  SetLength(NewObj.Points, Length(Points));
     721  for I := 0 to High(Points) do
     722    NewObj.Points[I] := Points[I];
     723  Objects.Add(NewObj);
     724end;
     725
     726procedure TMetaCanvas.DoPolyBezier(Points: PPoint; NumPts: Integer;
     727  Filled: Boolean; Continuous: Boolean);
     728var
     729  NewObj: TCanvasPolyBezier;
     730  I: Integer;
     731begin
     732  NewObj := TCanvasPolyBezier.Create;
     733  NewObj.Brush.Assign(Brush);
     734  NewObj.Pen.Assign(Pen);
     735  SetLength(NewObj.Points, NumPts);
     736  for I := 0 to High(NewObj.Points) do
     737    NewObj.Points[I] := Points[I];
     738  Objects.Add(NewObj);
     739end;
     740
    584741procedure TMetaCanvas.FillRect(const ARect: TRect);
    585742begin
     
    666823
    667824end.
    668 
  • trunk/Packages/Common/PersistentForm.pas

    r218 r219  
    1 unit UPersistentForm;
    2 
    3 {$mode delphi}
    4 
    5 // Date: 2020-11-26
     1unit PersistentForm;
    62
    73interface
    84
    95uses
    10   Classes, SysUtils, Forms, URegistry, LCLIntf, Registry, Controls, ComCtrls,
     6  Classes, SysUtils, Forms, RegistryEx, LCLIntf, Registry, Controls, ComCtrls,
    117  ExtCtrls, LCLType;
    128
     
    2016    FMinVisiblePart: Integer;
    2117    FRegistryContext: TRegistryContext;
     18    FResizeEventOccured: Boolean;
    2219    procedure LoadControl(Control: TControl);
    2320    procedure SaveControl(Control: TControl);
     21    procedure WindowStateChange(Sender: TObject);
    2422  public
    25     FormNormalSize: TRect;
    2623    FormRestoredSize: TRect;
    2724    FormWindowState: TWindowState;
     
    157154    RootKey := RegistryContext.RootKey;
    158155    OpenKey(RegistryContext.Key + '\Forms\' + Form.Name, True);
    159     // Normal size
    160     FormNormalSize.Left := ReadIntegerWithDefault('NormalLeft', FormNormalSize.Left);
    161     FormNormalSize.Top := ReadIntegerWithDefault('NormalTop', FormNormalSize.Top);
    162     FormNormalSize.Right := ReadIntegerWithDefault('NormalWidth', FormNormalSize.Right - FormNormalSize.Left)
    163       + FormNormalSize.Left;
    164     FormNormalSize.Bottom := ReadIntegerWithDefault('NormalHeight', FormNormalSize.Bottom - FormNormalSize.Top)
    165       + FormNormalSize.Top;
     156
    166157    // Restored size
    167158    FormRestoredSize.Left := ReadIntegerWithDefault('RestoredLeft', FormRestoredSize.Left);
     
    171162    FormRestoredSize.Bottom := ReadIntegerWithDefault('RestoredHeight', FormRestoredSize.Bottom - FormRestoredSize.Top)
    172163      + FormRestoredSize.Top;
     164
    173165    // Other state
    174166    FormWindowState := TWindowState(ReadIntegerWithDefault('WindowState', Integer(FormWindowState)));
     
    185177    RootKey := RegistryContext.RootKey;
    186178    OpenKey(RegistryContext.Key + '\Forms\' + Form.Name, True);
    187     // Normal state
    188     WriteInteger('NormalWidth', FormNormalSize.Right - FormNormalSize.Left);
    189     WriteInteger('NormalHeight', FormNormalSize.Bottom - FormNormalSize.Top);
    190     WriteInteger('NormalTop', FormNormalSize.Top);
    191     WriteInteger('NormalLeft', FormNormalSize.Left);
    192     // Restored state
     179
     180    // Restored size
    193181    WriteInteger('RestoredWidth', FormRestoredSize.Right - FormRestoredSize.Left);
    194182    WriteInteger('RestoredHeight', FormRestoredSize.Bottom - FormRestoredSize.Top);
    195183    WriteInteger('RestoredTop', FormRestoredSize.Top);
    196184    WriteInteger('RestoredLeft', FormRestoredSize.Left);
     185
    197186    // Other state
    198187    WriteInteger('WindowState', Integer(FormWindowState));
     
    259248begin
    260249  Self.Form := Form;
     250
    261251  // Set default
    262   FormNormalSize := Bounds((Screen.Width - Form.Width) div 2,
    263     (Screen.Height - Form.Height) div 2, Form.Width, Form.Height);
    264252  FormRestoredSize := Bounds((Screen.Width - Form.Width) div 2,
    265253    (Screen.Height - Form.Height) div 2, Form.Width, Form.Height);
     
    269257  LoadFromRegistry(RegistryContext);
    270258
    271   if not EqualRect(FormNormalSize, FormRestoredSize) or
    272     DefaultMaximized then begin
     259  if (FormWindowState = wsMaximized) or DefaultMaximized then begin
    273260    // Restore to maximized state
    274261    Form.WindowState := wsNormal;
     
    279266    // Restore to normal state
    280267    Form.WindowState := wsNormal;
    281     if FEntireVisible then FormNormalSize := CheckEntireVisible(FormNormalSize)
     268    if FEntireVisible then FormRestoredSize := CheckEntireVisible(FormRestoredSize)
    282269      else if FMinVisiblePart > 0 then
    283     FormNormalSize := CheckPartVisible(FormNormalSize, FMinVisiblePart);
    284     if not EqualRect(FormNormalSize, Form.BoundsRect) then
    285       Form.BoundsRect := FormNormalSize;
     270        FormRestoredSize := CheckPartVisible(FormRestoredSize, FMinVisiblePart);
     271    if not EqualRect(FormRestoredSize, Form.BoundsRect) then
     272      Form.BoundsRect := FormRestoredSize;
    286273  end;
    287274  if FormFullScreen then SetFullScreen(True);
     
    292279begin
    293280  Self.Form := Form;
    294   FormNormalSize := Bounds(Form.Left, Form.Top, Form.Width, Form.Height);
    295   if not FormFullScreen then
    296     FormRestoredSize := Bounds(Form.RestoredLeft, Form.RestoredTop, Form.RestoredWidth,
    297       Form.RestoredHeight);
    298   FormWindowState := Form.WindowState;
     281  if not FormFullScreen then begin
     282    FormWindowState := Form.WindowState;
     283    if FormWindowState = wsMaximized then begin
     284      FormRestoredSize := Bounds(Form.RestoredLeft, Form.RestoredTop, Form.RestoredWidth,
     285        Form.RestoredHeight);
     286    end else
     287    if FormWindowState = wsNormal then begin
     288      FormRestoredSize := Bounds(Form.Left, Form.Top, Form.Width, Form.Height);
     289    end;
     290  end;
    299291  SaveToRegistry(RegistryContext);
    300292  SaveControl(Form);
     
    311303
    312304procedure TPersistentForm.SetFullScreen(State: Boolean);
     305{$IFDEF UNIX}
     306var
     307  OldHandler: TNotifyEvent;
     308var
     309  I: Integer;
     310{$ENDIF}
    313311begin
    314312  if State then begin
    315313    FormFullScreen := True;
    316     FormNormalSize := Form.BoundsRect;
    317     FormRestoredSize := Bounds(Form.RestoredLeft, Form.RestoredTop, Form.RestoredWidth,
    318       Form.RestoredHeight);
     314    if Form.WindowState = wsMaximized then begin
     315      FormRestoredSize := Bounds(Form.RestoredLeft, Form.RestoredTop, Form.RestoredWidth,
     316        Form.RestoredHeight);
     317    end else
     318    if Form.WindowState = wsNormal then begin
     319      FormRestoredSize := Bounds(Form.Left, Form.Top, Form.Width, Form.Height);
     320    end;
    319321    FormWindowState := Form.WindowState;
    320     ShowWindow(Form.Handle, SW_SHOWFULLSCREEN);
    321322    {$IFDEF WINDOWS}
    322323    Form.BorderStyle := bsNone;
    323324    {$ENDIF}
     325    Form.WindowState := wsFullscreen;
     326    {$IFDEF UNIX}
     327    // Workaround on Linux, WindowState is rewriten by WMSize event to wsNormal.
     328    // We need for that even to occure
     329    OldHandler := Form.OnWindowStateChange;
     330    Form.OnWindowStateChange := WindowStateChange;
     331    FResizeEventOccured := False;
     332    for I := 0 to 10 do begin
     333      if FResizeEventOccured then Break;
     334      Application.ProcessMessages;
     335      Sleep(1);
     336    end;
     337    Form.OnWindowStateChange := OldHandler;
     338    FormFullScreen := True;
     339    {$ENDIF}
    324340  end else begin
    325341    FormFullScreen := False;
     342    Form.WindowState := wsNormal;
    326343    {$IFDEF WINDOWS}
    327344    Form.BorderStyle := bsSizeable;
    328345    {$ENDIF}
    329     ShowWindow(Form.Handle, SW_SHOWNORMAL);
    330346    if FormWindowState = wsNormal then begin
    331       Form.BoundsRect := FormNormalSize;
     347      Form.WindowState := wsNormal;
     348      Form.BoundsRect := FormRestoredSize;
    332349    end else
    333350    if FormWindowState = wsMaximized then begin
     
    338355end;
    339356
     357procedure TPersistentForm.WindowStateChange(Sender: TObject);
     358begin
     359  Form.WindowState := wsFullscreen;
     360  FResizeEventOccured := True;
     361end;
     362
    340363end.
    341 
  • trunk/Packages/Common/PixelPointer.pas

    r218 r219  
    1 unit UPixelPointer;
     1unit PixelPointer;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, Graphics;
     6  Math, Classes, SysUtils, Graphics;
    77
    88type
    99  TColor32 = type Cardinal;
    1010  TColor32Component = (ccBlue, ccGreen, ccRed, ccAlpha);
     11  TColor32Planes = array[0..3] of Byte;
    1112
    1213  { TPixel32 }
     
    1415  TPixel32 = packed record
    1516  private
    16     procedure SetRGB(AValue: Cardinal);
    17     function GetRGB: Cardinal;    
     17    procedure SetRGB(AValue: Cardinal); inline;
     18    function GetRGB: Cardinal; inline;
    1819  public
     20    class function CreateRGB(R, G, B: Byte): TPixel32; static;
     21    class function CreateRGBA(R, G, B, A: Byte): TPixel32; static;
    1922    property RGB: Cardinal read GetRGB write SetRGB;
    2023    case Integer of
    2124      0: (B, G, R, A: Byte);
    2225      1: (ARGB: TColor32);
    23       2: (Planes: array[0..3] of Byte);
     26      2: (Planes: TColor32Planes);
    2427      3: (Components: array[TColor32Component] of Byte);
    2528  end;
     
    2932
    3033  TPixelPointer = record
     34  private
     35    function GetPixelARGB: TColor32; inline;
     36    function GetPixelB: Byte; inline;
     37    function GetPixelG: Byte; inline;
     38    function GetPixelPlane(Index: Byte): Byte; inline;
     39    function GetPixelR: Byte; inline;
     40    function GetPixelA: Byte; inline;
     41    function GetPixelPlanes: TColor32Planes;
     42    function GetPixelRGB: Cardinal; inline;
     43    procedure SetPixelARGB(Value: TColor32); inline;
     44    procedure SetPixelB(Value: Byte); inline;
     45    procedure SetPixelG(Value: Byte); inline;
     46    procedure SetPixelPlane(Index: Byte; AValue: Byte); inline;
     47    procedure SetPixelR(Value: Byte); inline;
     48    procedure SetPixelA(Value: Byte); inline;
     49    procedure SetPixelRGB(Value: Cardinal); inline;
     50  public
    3151    Base: PPixel32;
    3252    Pixel: PPixel32;
     
    3555    BytesPerPixel: Integer;
    3656    BytesPerLine: Integer;
     57    Data: PPixel32;
     58    Width: Integer;
     59    Height: Integer;
    3760    procedure NextLine; inline; // Move pointer to start of next line
    3861    procedure PreviousLine; inline; // Move pointer to start of previous line
     
    4164    procedure SetXY(X, Y: Integer); inline; // Set pixel position relative to base
    4265    procedure SetX(X: Integer); inline; // Set horizontal pixel position relative to base
     66    procedure CheckRange; inline; // Check if current pixel position is not out of range
     67    function PosValid: Boolean;
     68    class function Create(Bitmap: TRasterImage; BaseX: Integer = 0; BaseY: Integer = 0): TPixelPointer; static;
     69    property PixelARGB: TColor32 read GetPixelARGB write SetPixelARGB;
     70    property PixelRGB: Cardinal read GetPixelRGB write SetPixelRGB;
     71    property PixelB: Byte read GetPixelB write SetPixelB;
     72    property PixelG: Byte read GetPixelG write SetPixelG;
     73    property PixelR: Byte read GetPixelR write SetPixelR;
     74    property PixelA: Byte read GetPixelA write SetPixelA;
     75    property PixelPlane[Index: Byte]: Byte read GetPixelPlane write SetPixelPlane;
    4376  end;
    4477  PPixelPointer = ^TPixelPointer;
    4578
    46   function PixelPointer(Bitmap: TRasterImage; BaseX: Integer = 0; BaseY: Integer = 0): TPixelPointer; inline;
    4779  function SwapRedBlue(Color: TColor32): TColor32;
    4880  procedure BitmapCopyRect(DstBitmap: TRasterImage; DstRect: TRect; SrcBitmap: TRasterImage; SrcPos: TPoint);
     
    6092  function ColorToColor32(Color: TColor): TColor32;
    6193
     94
    6295implementation
    6396
     97resourcestring
     98  SOutOfRange = 'Pixel pointer out of range [X: %d, Y: %d, Width: %d, Height: %d]';
     99  SWrongBitmapSize = 'Wrong bitmap size [width: %d, height: %d]';
     100
    64101{ TPixel32 }
    65102
     
    69106end;
    70107
     108class function TPixel32.CreateRGB(R, G, B: Byte): TPixel32;
     109begin
     110  Result.R := R;
     111  Result.G := G;
     112  Result.B := B;
     113  Result.A := 0;
     114end;
     115
     116class function TPixel32.CreateRGBA(R, G, B, A: Byte): TPixel32;
     117begin
     118  Result.R := R;
     119  Result.G := G;
     120  Result.B := B;
     121  Result.A := A;
     122end;
     123
    71124procedure TPixel32.SetRGB(AValue: Cardinal);
    72125begin
    73   R := (AValue shr 16) and $ff;
    74   G := (AValue shr 8) and $ff;
    75   B := (AValue shr 0) and $ff;
     126  ARGB := (ARGB and $ff000000) or (AValue and $ffffff);
    76127end;
    77128
     
    111162end;
    112163
     164procedure TPixelPointer.CheckRange;
     165{$IFOPT R+}
     166var
     167  X: Integer;
     168  Y: Integer;
     169{$ENDIF}
     170begin
     171  {$IFOPT R+}
     172  if (PByte(Pixel) < PByte(Data)) or
     173    (PByte(Pixel) >= PByte(Data) + Height * BytesPerLine) then begin
     174    X := PByte(Pixel) - PByte(Data);
     175    Y := Floor(X / BytesPerLine);
     176    X := X - Y * BytesPerLine;
     177    X := Floor(X / BytesPerPixel);
     178    raise Exception.Create(Format(SOutOfRange, [X, Y, Width, Height]));
     179  end;
     180  {$ENDIF}
     181end;
     182
     183function TPixelPointer.PosValid: Boolean;
     184begin
     185  Result := not ((PByte(Pixel) < PByte(Data)) or
     186    (PByte(Pixel) >= PByte(Data) + Height * BytesPerLine));
     187end;
     188
     189function TPixelPointer.GetPixelPlanes: TColor32Planes;
     190begin
     191  CheckRange;
     192  Result := Pixel^.Planes;
     193end;
     194
     195function TPixelPointer.GetPixelRGB: Cardinal;
     196begin
     197  CheckRange;
     198  Result := Pixel^.RGB;
     199end;
     200
     201procedure TPixelPointer.SetPixelARGB(Value: TColor32);
     202begin
     203  CheckRange;
     204  Pixel^.ARGB := Value;
     205end;
     206
     207procedure TPixelPointer.SetPixelB(Value: Byte);
     208begin
     209  CheckRange;
     210  Pixel^.B := Value;
     211end;
     212
     213procedure TPixelPointer.SetPixelG(Value: Byte);
     214begin
     215  CheckRange;
     216  Pixel^.G := Value;
     217end;
     218
     219procedure TPixelPointer.SetPixelPlane(Index: Byte; AValue: Byte);
     220begin
     221  CheckRange;
     222  Pixel^.Planes[Index] := AValue;
     223end;
     224
     225procedure TPixelPointer.SetPixelR(Value: Byte);
     226begin
     227  CheckRange;
     228  Pixel^.R := Value;
     229end;
     230
     231procedure TPixelPointer.SetPixelA(Value: Byte);
     232begin
     233  CheckRange;
     234  Pixel^.A := Value;
     235end;
     236
     237function TPixelPointer.GetPixelARGB: TColor32;
     238begin
     239  CheckRange;
     240  Result := Pixel^.ARGB;
     241end;
     242
     243function TPixelPointer.GetPixelB: Byte;
     244begin
     245  CheckRange;
     246  Result := Pixel^.B;
     247end;
     248
     249function TPixelPointer.GetPixelG: Byte;
     250begin
     251  CheckRange;
     252  Result := Pixel^.G;
     253end;
     254
     255function TPixelPointer.GetPixelPlane(Index: Byte): Byte;
     256begin
     257  CheckRange;
     258  Result := Pixel^.Planes[Index];
     259end;
     260
     261function TPixelPointer.GetPixelR: Byte;
     262begin
     263  CheckRange;
     264  Result := Pixel^.R;
     265end;
     266
     267function TPixelPointer.GetPixelA: Byte;
     268begin
     269  CheckRange;
     270  Result := Pixel^.A;
     271end;
     272
     273procedure TPixelPointer.SetPixelRGB(Value: Cardinal);
     274begin
     275  CheckRange;
     276  Pixel^.RGB := Value;
     277end;
     278
    113279procedure BitmapCopyRect(DstBitmap: TRasterImage; DstRect: TRect;
    114280  SrcBitmap: TRasterImage; SrcPos: TPoint);
     
    119285  SrcBitmap.BeginUpdate(True);
    120286  DstBitmap.BeginUpdate(True);
    121   SrcPtr := PixelPointer(SrcBitmap, SrcPos.X, SrcPos.Y);
    122   DstPtr := PixelPointer(DstBitmap, DstRect.Left, DstRect.Top);
     287  SrcPtr := TPixelPointer.Create(SrcBitmap, SrcPos.X, SrcPos.Y);
     288  DstPtr := TPixelPointer.Create(DstBitmap, DstRect.Left, DstRect.Top);
    123289  for Y := 0 to DstRect.Height - 1 do begin
    124290    for X := 0 to DstRect.Width - 1 do begin
    125       DstPtr.Pixel^.ARGB := SrcPtr.Pixel^.ARGB;
     291      DstPtr.PixelARGB := SrcPtr.PixelARGB;
    126292      SrcPtr.NextPixel;
    127293      DstPtr.NextPixel;
     
    149315  SrcBitmap.BeginUpdate(True);
    150316  DstBitmap.BeginUpdate(True);
    151   SrcPtr := PixelPointer(SrcBitmap, SrcRect.Left, SrcRect.Top);
    152   DstPtr := PixelPointer(DstBitmap, DstRect.Left, DstRect.Top);
     317  SrcPtr := TPixelPointer.Create(SrcBitmap, SrcRect.Left, SrcRect.Top);
     318  DstPtr := TPixelPointer.Create(DstBitmap, DstRect.Left, DstRect.Top);
    153319  for Y := 0 to DstRect.Height - 1 do begin
    154320    for X := 0 to DstRect.Width - 1 do begin
     
    159325      DstPtr.SetXY(X, Y);
    160326      SrcPtr.SetXY(R.Left, R.Top);
    161       C := SrcPtr.Pixel^.ARGB;
    162       DstPtr.Pixel^.ARGB := C;
     327      C := SrcPtr.PixelARGB;
     328      DstPtr.PixelARGB := C;
    163329      for YY := 0 to R.Height - 1 do begin
    164330        for XX := 0 to R.Width - 1 do begin
    165           DstPtr.Pixel^.ARGB := C;
     331          DstPtr.PixelARGB := C;
    166332          DstPtr.NextPixel;
    167333        end;
     
    180346begin
    181347  Bitmap.BeginUpdate(True);
    182   Ptr := PixelPointer(Bitmap);
     348  Ptr := TPixelPointer.Create(Bitmap);
    183349  for Y := 0 to Bitmap.Height - 1 do begin
    184350    for X := 0 to Bitmap.Width - 1 do begin
    185       Ptr.Pixel^.ARGB := Color;
     351      Ptr.PixelARGB := Color;
    186352      Ptr.NextPixel;
    187353    end;
     
    197363begin
    198364  Bitmap.BeginUpdate(True);
    199   Ptr := PixelPointer(Bitmap, Rect.Left, Rect.Top);
     365  Ptr := TPixelPointer.Create(Bitmap, Rect.Left, Rect.Top);
    200366  for Y := 0 to Rect.Height - 1 do begin
    201367    for X := 0 to Rect.Width - 1 do begin
    202       Ptr.Pixel^.ARGB := Color;
     368      Ptr.PixelARGB := Color;
    203369      Ptr.NextPixel;
    204370    end;
     
    214380begin
    215381  Bitmap.BeginUpdate(True);
    216   Ptr := PixelPointer(Bitmap);
     382  Ptr := TPixelPointer.Create(Bitmap);
    217383  for Y := 0 to Bitmap.Height - 1 do begin
    218384    for X := 0 to Bitmap.Width - 1 do begin
    219       Ptr.Pixel^.ARGB := SwapRedBlue(Ptr.Pixel^.ARGB);
     385      Ptr.PixelARGB := SwapRedBlue(Ptr.PixelARGB);
    220386      Ptr.NextPixel;
    221387    end;
     
    231397begin
    232398  Bitmap.BeginUpdate(True);
    233   Ptr := PixelPointer(Bitmap);
     399  Ptr := TPixelPointer.Create(Bitmap);
    234400  for Y := 0 to Bitmap.Height - 1 do begin
    235401    for X := 0 to Bitmap.Width - 1 do begin
    236       Ptr.Pixel^.ARGB := Ptr.Pixel^.ARGB xor $ffffff;
     402      Ptr.PixelARGB := Ptr.PixelARGB xor $ffffff;
    237403      Ptr.NextPixel;
    238404    end;
     
    251417  Pixel := Color32ToPixel32(Color);
    252418  Bitmap.BeginUpdate(True);
    253   Ptr := PixelPointer(Bitmap);
     419  Ptr := TPixelPointer.Create(Bitmap);
    254420  for Y := 0 to Bitmap.Height - 1 do begin
    255421    for X := 0 to Bitmap.Width - 1 do begin
    256       A := Ptr.Pixel^.A; //(Ptr.Pixel^.A + Pixel.A) shr 1;
    257       R := (Ptr.Pixel^.R + Pixel.R) shr 1;
    258       G := (Ptr.Pixel^.G + Pixel.G) shr 1;
    259       B := (Ptr.Pixel^.B + Pixel.B) shr 1;
    260       Ptr.Pixel^.ARGB := Color32(A, R, G, B);
     422      A := Ptr.PixelA; //(Ptr.PixelA + Pixel.A) shr 1;
     423      R := (Ptr.PixelR + Pixel.R) shr 1;
     424      G := (Ptr.PixelG + Pixel.G) shr 1;
     425      B := (Ptr.PixelB + Pixel.B) shr 1;
     426      Ptr.PixelARGB := Color32(A, R, G, B);
    261427      Ptr.NextPixel;
    262428    end;
     
    294460end;
    295461
    296 function PixelPointer(Bitmap: TRasterImage; BaseX: Integer;
     462class function TPixelPointer.Create(Bitmap: TRasterImage; BaseX: Integer;
    297463  BaseY: Integer): TPixelPointer;
    298464begin
     465  Result.Width := Bitmap.Width;
     466  Result.Height := Bitmap.Height;
     467  if (Result.Width < 0) or (Result.Height < 0) then
     468    raise Exception.Create(Format(SWrongBitmapSize, [Result.Width, Result.Height]));
    299469  Result.BytesPerLine := Bitmap.RawImage.Description.BytesPerLine;
    300470  Result.BytesPerPixel := Bitmap.RawImage.Description.BitsPerPixel shr 3;
     471  Result.Data := PPixel32(Bitmap.RawImage.Data);
    301472  Result.Base := PPixel32(Bitmap.RawImage.Data + BaseX * Result.BytesPerPixel +
    302473    BaseY * Result.BytesPerLine);
     
    309480end;
    310481
    311 
    312482end.
    313 
  • trunk/Packages/Common/Pool.pas

    r218 r219  
    1 unit UPool;
    2 
    3 {$mode Delphi}{$H+}
     1unit Pool;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, syncobjs, fgl, UThreading;
     6  Classes, SysUtils, syncobjs, Generics.Collections, Threading;
    97
    108type
     
    2220    function NewItemObject: TObject; virtual;
    2321  public
    24     Items: TFPGObjectList<TObject>;
    25     FreeItems: TFPGObjectList<TObject>;
     22    Items: TObjectList<TObject>;
     23    FreeItems: TObjectList<TObject>;
    2624    function Acquire: TObject; virtual;
    2725    procedure Release(Item: TObject); virtual;
     
    5957  try
    6058    Lock.Acquire;
    61     inherited SetTotalCount(AValue);
     59    inherited;
    6260  finally
    6361    Lock.Release;
     
    6967  try
    7068    Lock.Acquire;
    71     Result := inherited GetUsedCount;
     69    Result := inherited;
    7270  finally
    7371    Lock.Release;
     
    9088      end;
    9189    end;
    92     Result := inherited Acquire;
     90    Result := inherited;
    9391  finally
    9492    Lock.Release;
     
    10098  try
    10199    Lock.Acquire;
    102     inherited Release(Item);
     100    inherited;
    103101  finally
    104102    Lock.Release;
     
    108106constructor TThreadedPool.Create;
    109107begin
    110   inherited Create;
     108  inherited;
    111109  Lock := TCriticalSection.Create;
    112110end;
     
    115113begin
    116114  TotalCount := 0;
    117   Lock.Free;
    118   inherited Destroy;
     115  FreeAndNil(Lock);
     116  inherited;
    119117end;
    120118
     
    185183begin
    186184  inherited;
    187   Items := TFPGObjectList<TObject>.Create;
    188   FreeItems := TFPGObjectList<TObject>.Create;
    189   FreeItems.FreeObjects := False;
     185  Items := TObjectList<TObject>.Create;
     186  FreeItems := TObjectList<TObject>.Create;
     187  FreeItems.OwnsObjects := False;
    190188  FReleaseEvent := TEvent.Create(nil, False, False, '');
    191189end;
     
    201199
    202200end.
    203 
  • trunk/Packages/Common/PrefixMultiplier.pas

    r218 r219  
    1 unit UPrefixMultiplier;
     1unit PrefixMultiplier;
    22
    33// Date: 2010-06-01
    4 
    5 {$mode delphi}
    64
    75interface
     
    3331  (
    3432    (ShortText: 'y'; FullText: 'yocto'; Value: 1e-24),
    35           (ShortText: 'z'; FullText: 'zepto'; Value: 1e-21),
     33    (ShortText: 'z'; FullText: 'zepto'; Value: 1e-21),
    3634    (ShortText: 'a'; FullText: 'atto'; Value: 1e-18),
    3735    (ShortText: 'f'; FullText: 'femto'; Value: 1e-15),
     
    5452  (
    5553    (ShortText: 'ys'; FullText: 'yocto'; Value: 1e-24),
    56           (ShortText: 'zs'; FullText: 'zepto'; Value: 1e-21),
     54    (ShortText: 'zs'; FullText: 'zepto'; Value: 1e-21),
    5755    (ShortText: 'as'; FullText: 'atto'; Value: 1e-18),
    5856    (ShortText: 'fs'; FullText: 'femto'; Value: 1e-15),
     
    126124
    127125end.
    128 
  • trunk/Packages/Common/RegistryEx.pas

    r218 r219  
    1 unit URegistry;
    2 
    3 {$MODE delphi}
     1unit RegistryEx;
    42
    53interface
     
    3836    function ReadFloatWithDefault(const Name: string;
    3937      DefaultValue: Double): Double;
     38    function ReadDateTimeWithDefault(const Name: string; DefaultValue: TDateTime): TDateTime;
    4039    function DeleteKeyRecursive(const Key: string): Boolean;
    4140    function OpenKey(const Key: string; CanCreate: Boolean): Boolean;
     
    4847    HKEY_CURRENT_CONFIG, HKEY_DYN_DATA);
    4948
     49
    5050implementation
    51 
    5251
    5352{ TRegistryContext }
     
    112111end;
    113112
     113function TRegistryEx.ReadDateTimeWithDefault(const Name: string;
     114  DefaultValue: TDateTime): TDateTime;
     115begin
     116  if ValueExists(Name) then Result := ReadDateTime(Name)
     117    else begin
     118      WriteDateTime(Name, DefaultValue);
     119      Result := DefaultValue;
     120    end;
     121end;
     122
    114123function TRegistryEx.DeleteKeyRecursive(const Key: string): Boolean;
    115124var
     
    135144  //CloseKey;
    136145  {$ENDIF}
    137   Result := inherited OpenKey(Key, CanCreate);
     146  Result := inherited;
    138147end;
    139148
  • trunk/Packages/Common/ResetableThread.pas

    r218 r219  
    1 unit UResetableThread;
    2 
    3 {$mode Delphi}{$H+}
     1unit ResetableThread;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, syncobjs, UThreading, UPool;
     6  Classes, SysUtils, syncobjs, Threading, Pool;
    97
    108type
     
    167165  FreeAndNil(FStopEvent);
    168166  FreeAndNil(FLock);
    169   inherited Destroy;
     167  inherited;
    170168end;
    171169
     
    286284constructor TThreadPool.Create;
    287285begin
    288   inherited Create;
     286  inherited;
    289287end;
    290288
     
    293291  TotalCount := 0;
    294292  WaitForEmpty;
    295   inherited Destroy;
     293  inherited;
    296294end;
    297295
    298296end.
    299 
  • trunk/Packages/Common/ScaleDPI.pas

    r218 r219  
    1 unit UScaleDPI;
     1unit ScaleDPI;
    22
    33{ See: http://wiki.lazarus.freepascal.org/High_DPI }
    44
    5 {$mode delphi}{$H+}
    6 
    75interface
    86
    97uses
    10   Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils, fgl;
     8  Classes, Forms, Graphics, Controls, ComCtrls, LCLType, SysUtils,
     9  Generics.Collections;
    1110
    1211type
     
    2827  end;
    2928
    30   TControlDimensions = class(TFPGObjectList<TControlDimension>)
     29  TControlDimensions = class(TObjectList<TControlDimension>)
    3130  end;
    3231
  • trunk/Packages/Common/StopWatch.pas

    r3 r219  
    55
    66uses
    7   {$IFDEF Windows}Windows,{$ENDIF}
     7  {$IFDEF WINDOWS}Windows,{$ENDIF}
    88  SysUtils, DateUtils;
    99
     
    1313  TStopWatch = class
    1414  private
    15     fFrequency : TLargeInteger;
    16     fIsRunning: Boolean;
    17     fIsHighResolution: Boolean;
    18     fStartCount, fStopCount : TLargeInteger;
    19     procedure SetTickStamp(var lInt : TLargeInteger) ;
     15    FFrequency: TLargeInteger;
     16    FIsRunning: Boolean;
     17    FIsHighResolution: Boolean;
     18    FStartCount, fStopCount: TLargeInteger;
     19    procedure SetTickStamp(var Value: TLargeInteger);
    2020    function GetElapsedTicks: TLargeInteger;
    2121    function GetElapsedMiliseconds: TLargeInteger;
    2222    function GetElapsed: string;
    2323  public
    24     constructor Create(const startOnCreate : Boolean = False) ;
     24    constructor Create(const StartOnCreate: Boolean = False) ;
    2525    procedure Start;
    2626    procedure Stop;
    27     property IsHighResolution : Boolean read fIsHighResolution;
    28     property ElapsedTicks : TLargeInteger read GetElapsedTicks;
    29     property ElapsedMiliseconds : TLargeInteger read GetElapsedMiliseconds;
    30     property Elapsed : string read GetElapsed;
    31     property IsRunning : Boolean read fIsRunning;
     27    property IsHighResolution: Boolean read FIsHighResolution;
     28    property ElapsedTicks: TLargeInteger read GetElapsedTicks;
     29    property ElapsedMiliseconds: TLargeInteger read GetElapsedMiliseconds;
     30    property Elapsed: string read GetElapsed;
     31    property IsRunning: Boolean read FIsRunning;
    3232  end;
     33
    3334
    3435implementation
    3536
    36 constructor TStopWatch.Create(const startOnCreate : boolean = false) ;
     37constructor TStopWatch.Create(const StartOnCreate: Boolean = False);
    3738begin
    38   inherited Create;
     39  FIsRunning := False;
    3940
    40   fIsRunning := False;
    41 
    42   {$IFDEF Windows}
     41  {$IFDEF WINDOWS}
    4342  fIsHighResolution := QueryPerformanceFrequency(fFrequency) ;
    4443  {$ELSE}
    45   fIsHighResolution := False;
     44  FIsHighResolution := False;
    4645  {$ENDIF}
    47   if NOT fIsHighResolution then fFrequency := MSecsPerSec;
     46  if NOT FIsHighResolution then FFrequency := MSecsPerSec;
    4847
    4948  if StartOnCreate then Start;
     
    5251function TStopWatch.GetElapsedTicks: TLargeInteger;
    5352begin
    54   Result := fStopCount - fStartCount;
     53  Result := FStopCount - FStartCount;
    5554end;
    5655
    57 procedure TStopWatch.SetTickStamp(var lInt : TLargeInteger) ;
     56procedure TStopWatch.SetTickStamp(var Value: TLargeInteger);
    5857begin
    59   if fIsHighResolution then
     58  if FIsHighResolution then
    6059    {$IFDEF Windows}
    61     QueryPerformanceCounter(lInt)
     60    QueryPerformanceCounter(Value)
    6261    {$ELSE}
    6362    {$ENDIF}
    6463  else
    65     lInt := MilliSecondOf(Now) ;
     64    Value := MilliSecondOf(Now);
    6665end;
    6766
    6867function TStopWatch.GetElapsed: string;
    6968var
    70   dt: TDateTime;
     69  Elapsed: TDateTime;
    7170begin
    72   dt := ElapsedMiliseconds / MSecsPerSec / SecsPerDay;
    73   result := Format('%d days, %s', [Trunc(dt), FormatDateTime('hh:nn:ss.z', Frac(dt))]) ;
     71  Elapsed := ElapsedMiliseconds / MSecsPerSec / SecsPerDay;
     72  Result := Format('%d days, %s', [Trunc(Elapsed), FormatDateTime('hh:nn:ss.z', Frac(Elapsed))]) ;
    7473end;
    7574
    7675function TStopWatch.GetElapsedMiliseconds: TLargeInteger;
    7776begin
    78   Result := (MSecsPerSec * (fStopCount - fStartCount)) div fFrequency;
     77  Result := (MSecsPerSec * (fStopCount - FStartCount)) div FFrequency;
    7978end;
    8079
    8180procedure TStopWatch.Start;
    8281begin
    83   SetTickStamp(fStartCount);
    84   fIsRunning := True;
     82  SetTickStamp(FStartCount);
     83  FIsRunning := True;
    8584end;
    8685
    8786procedure TStopWatch.Stop;
    8887begin
    89   SetTickStamp(fStopCount);
    90   fIsRunning := False;
     88  SetTickStamp(FStopCount);
     89  FIsRunning := False;
    9190end;
    9291
  • trunk/Packages/Common/StringTable.pas

    r218 r219  
    1 unit UStringTable;
    2 
    3 {$mode objfpc}{$H+}
     1unit StringTable;
    42
    53interface
     
    7169end;
    7270
    73 
    7471end.
    75 
  • trunk/Packages/Common/SyncCounter.pas

    r218 r219  
    1 unit USyncCounter;
    2 
    3 {$mode delphi}
     1unit SyncCounter;
    42
    53interface
     
    2523    procedure Assign(Source: TSyncCounter);
    2624  end;
     25
    2726
    2827implementation
     
    6968begin
    7069  Lock.Free;
    71   inherited Destroy;
     70  inherited;
    7271end;
    7372
     
    7978
    8079end.
    81 
  • trunk/Packages/Common/Theme.pas

    r218 r219  
    1 unit UTheme;
     1unit Theme;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, Graphics, ComCtrls, Controls, ExtCtrls, Menus, StdCtrls,
    7   Spin, Forms, fgl, Grids;
     7  Spin, Forms, Generics.Collections, Grids, Registry, LCLType;
    88
    99type
     
    1919  { TThemes }
    2020
    21   TThemes = class(TFPGObjectList<TTheme>)
     21  TThemes = class(TObjectList<TTheme>)
    2222    function AddNew(Name: string): TTheme;
    2323    function FindByName(Name: string): TTheme;
     
    2525  end;
    2626
     27  TDwmSetWindowAttribute = function(hwnd: HWND; dwAttribute: DWORD; pvAttribute: Pointer; cbAttribute: DWORD): HRESULT; stdcall;
     28
    2729  { TThemeManager }
    2830
     
    3032  private
    3133    FTheme: TTheme;
     34    FActualTheme: TTheme;
     35    DwmapiLib: TLibHandle;
     36    DwmSetWindowAttribute: TDwmSetWindowAttribute;
     37    function Gray(C: TColor): Byte;
    3238    procedure SetTheme(AValue: TTheme);
    33     procedure SetThemeName(AValue: TTheme);
     39    procedure SetThemeName(Name: string);
     40    procedure SetThemedTitleBar(AForm: TForm; Active: Bool);
     41    function IsWindows10OrGreater(BuildNumber: Integer): Boolean;
    3442  public
    3543    Used: Boolean;
    3644    Themes: TThemes;
     45    function IsDarkTheme: Boolean;
    3746    procedure ApplyTheme(Component: TComponent);
    3847    constructor Create(AOwner: TComponent); override;
     
    4049    procedure UseTheme(Form: TForm);
    4150    property Theme: TTheme read FTheme write SetTheme;
    42   end;
     51    property ActualTheme: TTheme read FActualTheme;
     52  end;
     53
     54const
     55  ThemeNameSystem = 'System';
     56  ThemeNameLight = 'Light';
     57  ThemeNameDark = 'Dark';
     58  DwmapiLibName = 'dwmapi.dll';
     59  DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1 = 19;
     60  DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
    4361
    4462procedure Register;
     63
    4564
    4665implementation
     
    89108end;
    90109
    91 procedure TThemeManager.SetThemeName(AValue: TTheme);
     110{ TThemeManager }
     111
     112function TThemeManager.Gray(C: TColor): Byte;
     113begin
     114  Result := Trunc(Red(C) * 0.3 + Green(C) * 0.59 + Blue(C) * 0.11);
     115end;
     116
     117function TThemeManager.IsDarkTheme: Boolean;
     118{$IFDEF WINDOWS}
     119var
     120  LightKey: Boolean;
     121  Registry: TRegistry;
     122const
     123  KeyPath = '\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize';
     124  KeyName = 'AppsUseLightTheme';
     125{$ELSE}
     126var
     127  ColorWindow: TColor;
     128  ColorWindowText: TColor;
     129{$ENDIF}
     130begin
     131  Result := False;
     132  {$IFDEF WINDOWS}
     133  Registry := TRegistry.Create;
     134  try
     135    Registry.RootKey := HKEY_CURRENT_USER;
     136    if Registry.OpenKeyReadOnly(KeyPath) then begin
     137      if Registry.ValueExists(KeyName) then
     138        LightKey := Registry.ReadBool(KeyName)
     139      else LightKey := True;
     140    end else LightKey := True;
     141    Result := not LightKey;
     142  finally
     143    Registry.Free;
     144  end;
     145  {$ELSE}
     146  ColorWindow := ColorToRGB(clWindow);
     147  ColorWindowText := ColorToRGB(clWindowText);
     148  Result := Gray(ColorWindow) < Gray(ColorWindowText);
     149  {$ENDIF}
     150end;
     151
     152procedure TThemeManager.SetThemeName(Name: string);
     153begin
     154  Theme := Themes.FindByName(Name);
     155end;
     156
     157function TThemeManager.IsWindows10OrGreater(BuildNumber: Integer): Boolean;
     158begin
     159  {$IFDEF WINDOWS}
     160  Result := (Win32MajorVersion >= 10) and (Win32BuildNumber >= BuildNumber);
     161  {$ELSE}
     162  Result := False;
     163  {$ENDIF}
     164end;
     165
     166procedure TThemeManager.SetThemedTitleBar(AForm: TForm; Active: Bool);
     167var
     168  Attr: DWord;
     169begin
     170  if Assigned(DwmSetWindowAttribute) and IsWindows10OrGreater(17763) then begin
     171    Attr := DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1;
     172    if IsWindows10OrGreater(18985) then Attr := DWMWA_USE_IMMERSIVE_DARK_MODE;
     173
     174    DwmSetWindowAttribute(AForm.Handle, Attr, @Active, SizeOf(Active));
     175  end;
     176end;
     177
     178procedure TThemeManager.SetTheme(AValue: TTheme);
    92179begin
    93180  if FTheme = AValue then Exit;
    94181  FTheme := AValue;
    95 end;
    96 
    97 procedure TThemeManager.SetTheme(AValue: TTheme);
    98 begin
    99   if FTheme = AValue then Exit;
    100   FTheme := AValue;
     182  FActualTheme := FTheme;
     183  {$IFDEF WINDOWS}
     184  if Assigned(FTheme) and (FTheme = Themes.FindByName(ThemeNameSystem)) and IsDarkTheme then
     185    FActualTheme := Themes.FindByName(ThemeNameDark);
     186  {$ENDIF}
    101187end;
    102188
     
    104190begin
    105191  inherited;
     192  {$IFDEF WINDOWS}
     193  DwmapiLib := LoadLibrary(DwmapiLibName);
     194  if DwmapiLib <> 0 then DwmSetWindowAttribute := GetProcAddress(DwmapiLib, 'DwmSetWindowAttribute')
     195    else DwmSetWindowAttribute := nil;
     196  {$ENDIF}
     197
    106198  Themes := TThemes.Create;
    107   with Themes.AddNew('System') do begin
     199  with Themes.AddNew(ThemeNameSystem) do begin
    108200    ColorWindow := clWindow;
    109201    ColorWindowText := clWindowText;
     
    112204    ColorControlSelected := clWindow;
    113205  end;
    114   Theme := TTheme(Themes.First);
    115   with Themes.AddNew('Dark') do begin
     206  with Themes.AddNew(ThemeNameDark) do begin
    116207    ColorWindow := RGBToColor($20, $20, $20);
    117208    ColorWindowText := clWhite;
     
    120211    ColorControlSelected := RGBToColor(96, 125, 155);
    121212  end;
    122   with Themes.AddNew('Light') do begin
     213  with Themes.AddNew(ThemeNameLight) do begin
    123214    ColorWindow := clWhite;
    124215    ColorWindowText := clBlack;
     
    127218    ColorControlSelected := RGBToColor(196, 225, 255);
    128219  end;
     220  Theme := TTheme(Themes.First);
    129221end;
    130222
     
    132224begin
    133225  FreeAndNil(Themes);
     226  {$IFDEF WINDOWS}
     227  if DwmapiLib <> 0 then FreeLibrary(DwmapiLib);
     228  {$ENDIF}
    134229  inherited;
    135230end;
     
    150245    (Control is TMemo) or (Control is TListView) or (Control is TCustomDrawGrid) or
    151246    (Control is TCheckBox) or (Control is TPageControl) or (Control is TRadioButton) then begin
    152       Control.Color := FTheme.ColorWindow;
    153       Control.Font.Color := FTheme.ColorWindowText;
     247      Control.Color := FActualTheme.ColorWindow;
     248      Control.Font.Color := FActualTheme.ColorWindowText;
    154249    end else begin
    155       Control.Color := FTheme.ColorControl;
    156       Control.Font.Color := FTheme.ColorControlText;
     250      Control.Color := FActualTheme.ColorControl;
     251      Control.Font.Color := FActualTheme.ColorControlText;
    157252    end;
    158253
    159254    if Control is TCustomDrawGrid then begin
    160       (Control as TCustomDrawGrid).Editor.Color := FTheme.ColorWindow;
    161       (Control as TCustomDrawGrid).Editor.Font.Color := FTheme.ColorWindowText;
     255      (Control as TCustomDrawGrid).Editor.Color := FActualTheme.ColorWindow;
     256      (Control as TCustomDrawGrid).Editor.Font.Color := FActualTheme.ColorWindowText;
    162257    end;
    163258
     
    175270procedure TThemeManager.UseTheme(Form: TForm);
    176271begin
    177   if not Used and (FTheme.Name = 'System') then Exit;
     272  if not Used and (FActualTheme.Name = ThemeNameSystem) then Exit;
    178273  ApplyTheme(Form);
     274  SetThemedTitleBar(Form, FActualTheme.Name = ThemeNameDark);
    179275  Used := True;
    180276end;
    181277
    182 
    183278end.
  • trunk/Packages/Common/Threading.pas

    r218 r219  
    1 unit UThreading;
    2 
    3 {$mode delphi}
     1unit Threading;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, fgl, SyncObjs;
     6  Classes, SysUtils, Forms, Generics.Collections, SyncObjs;
    97
    108type
    119  TExceptionEvent = procedure (Sender: TObject; E: Exception) of object;
    1210  TMethodCall = procedure of object;
    13 
    1411
    1512  { TVirtualThread }
     
    10299  { TThreadList }
    103100
    104   TThreadList = class(TFPGObjectList<TVirtualThread>)
     101  TThreadList = class(TObjectList<TVirtualThread>)
    105102    function FindById(Id: TThreadID): TVirtualThread;
    106103    constructor Create; virtual;
     
    191188constructor TThreadList.Create;
    192189begin
    193   inherited Create;
     190  inherited;
    194191end;
    195192
     
    294291    ThreadListLock.Release;
    295292  end;
    296   FThread.Free;
    297   inherited Destroy;
     293  FreeAndNil(FThread);
     294  inherited;
    298295end;
    299296
     
    361358ThreadListLock := TCriticalSection.Create;
    362359ThreadList := TThreadList.Create;
    363 ThreadList.FreeObjects := False;
     360ThreadList.OwnsObjects := False;
    364361
    365362finalization
    366363
    367 ThreadList.Free;
    368 ThreadListLock.Free;
     364FreeAndNil(ThreadList);
     365FreeAndNil(ThreadListLock);
    369366
    370367end.
    371 
  • trunk/Packages/Common/Translator.pas

    r218 r219  
    1 unit UTranslator;
    2 
    3 {$mode delphi}{$H+}
     1unit Translator;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, Forms, ExtCtrls, Controls, fgl, LazFileUtils, LazUTF8,
    9   Translations, TypInfo, Dialogs, FileUtil, LCLProc, ULanguages, LCLType,
    10   LCLVersion;
     6  Classes, SysUtils, Forms, ExtCtrls, Controls, LazFileUtils, LazUTF8,
     7  Translations, TypInfo, Dialogs, FileUtil, LCLProc, Languages, LCLType,
     8  LCLVersion, Generics.Collections;
    119
    1210type
    1311  THandleStringEvent = function (AValue: string): string of object;
    1412
    15   TPoFiles = class(TFPGObjectList<TPOFile>)
     13  TPoFiles = class(TObjectList<TPOFile>)
    1614  end;
    1715
     
    2725  { TComponentExcludesList }
    2826
    29   TComponentExcludesList = class(TFPGObjectList<TComponentExcludes>)
     27  TComponentExcludesList = class(TObjectList<TComponentExcludes>)
    3028    function FindByClassType(AClassType: TClass): TComponentExcludes;
    3129    procedure DumpToStrings(Strings: TStrings);
     
    5048    procedure TranslateProperty(Component: TPersistent; PropInfo: PPropInfo);
    5149    function IsExcluded(Component: TPersistent; PropertyName: string): Boolean;
    52     function GetLangFileDir: string;
     50    function GetLangFileDirs: TStrings;
    5351  public
    5452    ComponentExcludes: TComponentExcludesList;
     
    7371  end;
    7472
     73const
     74  PoExt = '.po';
     75
    7576procedure Register;
    7677
    77 const
    78   PoFileExt = '.po';
    79 
    8078
    8179implementation
     80
     81uses
     82  Common;
    8283
    8384procedure Register;
     
    166167  FileList: TStringList;
    167168  I: Integer;
     169  J: Integer;
    168170  LocaleShort: string;
    169171  SearchMask: string;
     172  LangDirs: TStrings;
    170173begin
    171174  FPoFiles.Clear;
    172   if Assigned(FLanguage) then
    173   try
     175  if Assigned(FLanguage) then begin
    174176    LocaleShort := GetLocaleShort;
    175177    SearchMask := '*';
    176178    if LocaleShort <> '' then SearchMask := SearchMask + '.' + LocaleShort;
    177     SearchMask := SearchMask + PoFileExt;
    178     FileList := FindAllFiles(GetLangFileDir, SearchMask);
    179     for I := 0 to FileList.Count - 1 do begin
    180       FileName := FileList[I];
    181       if FileExists(FileName) and (
    182       ((LocaleShort = '') and (Pos('.', FileName) = Pos(PoFileExt, FileName))) or
    183       (LocaleShort <> '')) then FPoFiles.Add(TPOFile.Create(FileName));
    184     end;
    185   finally
    186     FileList.Free;
     179    SearchMask := SearchMask + PoExt;
     180    LangDirs := GetLangFileDirs;
     181    for J := 0 to LangDirs.Count - 1 do begin
     182      FileList := FindAllFiles(LangDirs[J], SearchMask);
     183      try
     184        for I := 0 to FileList.Count - 1 do begin
     185          FileName := FileList[I];
     186          //FileName := FindLocaleFileName('.po');
     187           if FileExists(FileName) and (
     188          ((LocaleShort = '') and (Pos('.', FileName) = Pos(PoExt, FileName))) or
     189          (LocaleShort <> '')) then FPoFiles.Add(TPOFile.Create(FileName));
     190        end;
     191      finally
     192        FileList.Free;
     193      end;
     194    end;
     195    LangDirs.Free;
    187196  end;
    188197end;
     
    245254  I: Integer;
    246255begin
     256
    247257//  PropInfo^.Name;
    248258  // Using IsDefaultPropertyValue will tell us if we should write out
     
    300310end;
    301311
    302 function TTranslator.GetLangFileDir: string;
    303 begin
    304   Result := FPoFilesFolder;
    305   if not FilenameIsAbsolute(Result) then
    306     Result := ExtractFileDir(Application.ExeName) + DirectorySeparator + Result;
     312function TTranslator.GetLangFileDirs: TStrings;
     313var
     314  I: Integer;
     315begin
     316  Result := TStringList.Create;
     317  Result.Delimiter := ';';
     318  Result.StrictDelimiter := True;
     319  Result.DelimitedText := FPoFilesFolder;
     320
     321  for I := 0 to Result.Count - 1 do begin
     322    Result[I] := StringReplace(Result[I], '/', DirectorySeparator, [rfReplaceAll]);
     323    Result[I] := StringReplace(Result[I], '\', DirectorySeparator, [rfReplaceAll]);
     324    if (Copy(Result[I], 1, 1) <> DirectorySeparator) and (Copy(Result[I], 2, 2) <> ':\') then
     325      Result[I] := ExtractFileDir(Application.ExeName) +
     326        DirectorySeparator + Result[I];
     327  end;
    307328end;
    308329
     
    371392var
    372393  I: Integer;
    373   LangDir: string;
    374 begin
    375   LangDir := GetLangFileDir;
     394  J: Integer;
     395  LangDirs: TStrings;
     396begin
     397  LangDirs := GetLangFileDirs;
    376398  Languages.SearchByCode('').Available := True; // Automatic
    377399
    378400  for I := 1 to Languages.Count - 1 do
    379401  with Languages[I] do begin
    380     Available := FileExists(LangDir + DirectorySeparator + ExtractFileNameOnly(Application.ExeName) +
    381       '.' + Code + PoFileExt) or (Code = 'en');
    382   end;
     402    for J := 0 to LangDirs.Count - 1 do begin
     403      if FileExists(LangDirs[J] + DirectorySeparator + ExtractFileNameOnly(Application.ExeName) +
     404        '.' + Code + PoExt) or (Code = 'en') then begin
     405          Available := True;
     406          Continue;
     407        end;
     408    end;
     409  end;
     410  LangDirs.Free;
    383411end;
    384412
     
    468496
    469497  begin
     498
    470499    // ParamStrUTF8(0) is said not to work properly in linux, but I've tested it
    471500    Result := ExtractFilePath(ParamStrUTF8(0)) + LangID +
     
    568597end;
    569598
    570 
    571599end.
    572 
  • trunk/Packages/Common/URI.pas

    r218 r219  
    1 unit UURI;
     1unit URI;
    22
    33// Date: 2011-04-04
    4 
    5 {$mode delphi}
    64
    75interface
     
    8583  end;
    8684
     85
    8786implementation
    8887
     
    183182begin
    184183  Items.Free;
    185   inherited Destroy;
     184  inherited;
    186185end;
    187186
     
    232231begin
    233232  Path.Free;
    234   inherited Destroy;
     233  inherited;
    235234end;
    236235
     
    243242    Fragment := TURI(Source).Fragment;
    244243    Query := TURI(Source).Query;
    245   end else inherited Assign(Source);
     244  end else inherited;
    246245end;
    247246
     
    291290destructor TURL.Destroy;
    292291begin
    293   inherited Destroy;
     292  inherited;
    294293end;
    295294
     
    344343begin
    345344  Directory.Free;
    346   inherited Destroy;
    347 end;
    348 
     345  inherited;
     346end;
    349347
    350348end.
    351 
  • trunk/Packages/Common/XML.pas

    r218 r219  
    1 unit UXMLUtils;
    2 
    3 {$mode delphi}
     1unit XML;
    42
    53interface
     
    1614procedure WriteString(Node: TDOMNode; Name: string; Value: string);
    1715procedure WriteDateTime(Node: TDOMNode; Name: string; Value: TDateTime);
     16procedure WriteDouble(Node: TDOMNode; Name: string; Value: Double);
    1817function ReadInteger(Node: TDOMNode; Name: string; DefaultValue: Integer): Integer;
    1918function ReadInt64(Node: TDOMNode; Name: string; DefaultValue: Int64): Int64;
     
    2120function ReadString(Node: TDOMNode; Name: string; DefaultValue: string): string;
    2221function ReadDateTime(Node: TDOMNode; Name: string; DefaultValue: TDateTime): TDateTime;
     22function ReadDouble(Node: TDOMNode; Name: string; DefaultValue: Double): Double;
    2323procedure ReadXMLFileParser(out Doc: TXMLDocument; FileName: string);
    2424
    2525
    2626implementation
     27
     28function ReadDouble(Node: TDOMNode; Name: string; DefaultValue: Double): Double;
     29var
     30  NewNode: TDOMNode;
     31begin
     32  Result := DefaultValue;
     33  NewNode := Node.FindNode(DOMString(Name));
     34  if Assigned(NewNode) then
     35    Result := StrToFloat(string(NewNode.TextContent));
     36end;
    2737
    2838procedure ReadXMLFileParser(out Doc: TXMLDocument; FileName: string);
     
    202212end;
    203213
     214procedure WriteDouble(Node: TDOMNode; Name: string; Value: Double);
     215var
     216  NewNode: TDOMNode;
     217begin
     218  NewNode := Node.OwnerDocument.CreateElement(DOMString(Name));
     219  NewNode.TextContent := DOMString(FloatToStr(Value));
     220  Node.AppendChild(NewNode);
     221end;
     222
    204223function ReadInteger(Node: TDOMNode; Name: string; DefaultValue: Integer): Integer;
    205224var
     
    254273
    255274end.
    256 
  • trunk/Read Me.txt

    r215 r219  
    1616* Home page: https://app.zdechov.net/AcronymDecoder/
    1717* Source code: https://svn.zdechov.net/AcronymDecoder/
    18 * Developed in [http://www.lazarus-ide.org/ Lazarus/FPC] 2.2.0
    19 * To build new Windows installer run Install/build.bat. InnoSetup (http://www.jrsoftware.org/isdl.php) needs to be installed).
     18* Developed in [https://www.lazarus-ide.org/ Lazarus/FPC] 3.6.0
     19* To build new Windows installer run Install/build.bat. InnoSetup (https://www.jrsoftware.org/isdl.php) needs to be installed).
Note: See TracChangeset for help on using the changeset viewer.