Changeset 97


Ignore:
Timestamp:
Aug 22, 2016, 1:16:56 PM (8 years ago)
Author:
chronos
Message:
  • Added: Add support for acronym category selection in import source format.
  • Modified: Optimalized export speed.
  • Fixed: Export to MediaWiki tables was not correctly generated for multi line strings.
  • Fixed: Add back links from categories to import sources.
  • Added: Multi select support in category list.
Location:
trunk
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/AcronymDecoder.lpi

    r95 r97  
    377377        <StackChecks Value="True"/>
    378378      </Checks>
     379      <VerifyObjMethodCallValidity Value="True"/>
    379380    </CodeGeneration>
    380381    <Linking>
  • trunk/Forms/UFormAcronyms.pas

    r96 r97  
    131131      Meaning.Description := TempEntry.Description;
    132132      Meaning.Categories.AssignFromStrings(TempEntry.Categories);
     133
     134      // Update reverse references
    133135      for I := 0 to Meaning.Categories.Count - 1 do
    134         TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     136        if TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.IndexOf(Meaning) = -1 then
     137          TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     138
    135139      UpdateAcronymsList;
    136140      UpdateInterface;
     
    173177          Meaning.Description := TempEntry.Description;
    174178          Meaning.Categories.AssignFromStrings(TempEntry.Categories);
     179
     180          // Update reverse references
    175181          for I := 0 to Meaning.Categories.Count - 1 do
    176             TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     182            if TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.IndexOf(Meaning) = -1 then
     183              TAcronymCategory(Meaning.Categories.Items[I]).AcronymMeanings.Add(Meaning);
     184
    177185          UpdateAcronymsList;
    178186          UpdateInterface;
  • trunk/Forms/UFormCategories.lfm

    r85 r97  
    2626        Width = 440
    2727      end>
     28    MultiSelect = True
    2829    OwnerData = True
    2930    PopupMenu = PopupMenuCategory
     
    8586      OnExecute = AModifyExecute
    8687      ShortCut = 13
     88    end
     89    object ASelectAll: TAction
     90      Caption = 'Select all'
     91      OnExecute = ASelectAllExecute
     92      ShortCut = 16449
    8793    end
    8894  end
     
    208214      }
    209215    end
     216    object MenuItem4: TMenuItem
     217      Action = ASelectAll
     218    end
    210219  end
    211220end
  • trunk/Forms/UFormCategories.lrt

    r51 r97  
    66TFORMCATEGORIES.AREMOVE.CAPTION=Remove
    77TFORMCATEGORIES.AMODIFY.CAPTION=Modify
     8TFORMCATEGORIES.ASELECTALL.CAPTION=Select all
  • trunk/Forms/UFormCategories.pas

    r96 r97  
    1515  TFormCategories = class(TForm)
    1616    AAdd: TAction;
     17    ASelectAll: TAction;
    1718    ARemove: TAction;
    1819    AModify: TAction;
     
    2223    MenuItem2: TMenuItem;
    2324    MenuItem3: TMenuItem;
     25    MenuItem4: TMenuItem;
    2426    PopupMenuCategory: TPopupMenu;
    2527    ToolBar1: TToolBar;
     
    3032    procedure AModifyExecute(Sender: TObject);
    3133    procedure ARemoveExecute(Sender: TObject);
     34    procedure ASelectAllExecute(Sender: TObject);
    3235    procedure FormCreate(Sender: TObject);
    3336    procedure FormShow(Sender: TObject);
     
    114117end;
    115118
     119procedure TFormCategories.ASelectAllExecute(Sender: TObject);
     120var
     121  I: Integer;
     122begin
     123  for I := 0 to ListViewCategories.Items.Count - 1 do
     124    ListViewCategories.Items[I].Selected := True;
     125end;
     126
    116127procedure TFormCategories.FormCreate(Sender: TObject);
    117128var
  • trunk/Forms/UFormExport.pas

    r96 r97  
    66
    77uses
    8   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
     9  UJobProgressView;
    910
    1011type
     
    2223    procedure FormCreate(Sender: TObject);
    2324  private
    24     procedure ExportCSV;
    25     procedure ExportMediaWiki;
    26     procedure ExportMediaWikiTable;
     25    ItemCount: Integer;
     26    procedure JobExportCSV(Job: TJob);
     27    procedure JobExportMediaWiki(Job: TJob);
     28    procedure JobExportMediaWikiTable(Job: TJob);
    2729  public
    2830    { public declarations }
     
    4042
    4143resourcestring
    42   SExpotedAcronyms = 'Exported %d acronyms';
     44  SExportedAcronyms = 'Exported %d acronyms';
     45  SExporting = 'Exporting';
    4346
    4447{ TFormExport }
     
    5962end;
    6063
    61 procedure TFormExport.ExportCSV;
     64procedure TFormExport.JobExportCSV(Job: TJob);
    6265var
    6366  I: Integer;
    6467  J: Integer;
    65   ItemCount: Integer;
     68  Content: string;
    6669begin
    67   Memo1.Lines.Clear;
    68   Memo1.Lines.BeginUpdate;
     70  Job.Progress.Max := Core.AcronymDb.Acronyms.Count;
    6971  ItemCount := 0;
    70   for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
    71   with TAcronym(Core.AcronymDb.Acronyms[I]) do
    72     for J := 0 to Meanings.Count - 1 do
    73     with TAcronymMeaning(Meanings[J]) do begin
    74       Memo1.Lines.Add('"' + Acronym.Name + '","' + Name + '","' + Description + '","' + Categories.GetString + '"');
    75       Inc(ItemCount);
    76     end;
    77   Memo1.Lines.EndUpdate;
    78   ShowMessage(Format(SExpotedAcronyms, [ItemCount]));
    79 end;
    80 
    81 procedure TFormExport.ExportMediaWiki;
    82 var
    83   I: Integer;
    84   J: Integer;
    85   ItemCount: Integer;
    86 begin
    87   Memo1.Lines.Clear;
    88   Memo1.Lines.BeginUpdate;
    89   ItemCount := 0;
    90   for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
    91   with TAcronym(Core.AcronymDb.Acronyms[I]) do begin
    92     Memo1.Lines.Add('; ' + Name);
    93     for J := 0 to Meanings.Count - 1 do
    94     with TAcronymMeaning(Meanings[J]) do begin
    95       Memo1.Lines.Add(': ' + Name);
    96       Inc(ItemCount);
    97     end;
    98   end;
    99   Memo1.Lines.EndUpdate;
    100   ShowMessage(Format(SExpotedAcronyms, [ItemCount]));
    101 end;
    102 
    103 procedure TFormExport.ExportMediaWikiTable;
    104 var
    105   I: Integer;
    106   J: Integer;
    107   ItemCount: Integer;
    108 begin
    109   Memo1.Lines.Clear;
    110   Memo1.Lines.BeginUpdate;
    111   ItemCount := 0;
    112   Memo1.Lines.Add('{| class="wikitable sortable"');
    113   Memo1.Lines.Add('! Name !! Meaning !! Description !! Categories');
     72  Content := '';
    11473  for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
    11574  with TAcronym(Core.AcronymDb.Acronyms[I]) do begin
    11675    for J := 0 to Meanings.Count - 1 do
    11776    with TAcronymMeaning(Meanings[J]) do begin
    118       Memo1.Lines.Add('|-');
    119       Memo1.Lines.Add('| ' + Acronym.Name + ' || ' + Name + ' || ' + Description + ' || ' + Categories.GetString);
     77      Content := Content + '"' + Acronym.Name + '","' + Name + '","' + Description + '","' + Categories.GetString + '"' + LineEnding;
    12078      Inc(ItemCount);
    12179    end;
     80    Job.Progress.Increment;
     81    if Job.Terminate then Break;
    12282  end;
    123   Memo1.Lines.Add('|}');
    124   Memo1.Lines.EndUpdate;
    125   ShowMessage(Format(SExpotedAcronyms, [ItemCount]));
     83  Memo1.Lines.Text := Content;
     84end;
     85
     86procedure TFormExport.JobExportMediaWiki(Job: TJob);
     87var
     88  I: Integer;
     89  J: Integer;
     90  Content: string;
     91begin
     92  Job.Progress.Max := Core.AcronymDb.Acronyms.Count;
     93  ItemCount := 0;
     94  Content := '';
     95  for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
     96  with TAcronym(Core.AcronymDb.Acronyms[I]) do begin
     97    Content := Content + '; ' + Name + LineEnding;
     98    for J := 0 to Meanings.Count - 1 do
     99    with TAcronymMeaning(Meanings[J]) do begin
     100      Content := Content + ': ' + Name + LineEnding;
     101      Inc(ItemCount);
     102    end;
     103    Job.Progress.Increment;
     104    if Job.Terminate then Break;
     105  end;
     106  Memo1.Lines.Text := Content;
     107end;
     108
     109procedure TFormExport.JobExportMediaWikiTable(Job: TJob);
     110var
     111  I: Integer;
     112  J: Integer;
     113  Line: string;
     114  Content: string;
     115begin
     116  Job.Progress.Max := Core.AcronymDb.Acronyms.Count;
     117  ItemCount := 0;
     118  Content := '{| class="wikitable sortable"' + LineEnding +
     119    '! Name !! Meaning !! Description !! Categories' + LineEnding;
     120  for I := 0 to Core.AcronymDb.Acronyms.Count - 1 do
     121  with TAcronym(Core.AcronymDb.Acronyms[I]) do begin
     122    for J := 0 to Meanings.Count - 1 do
     123    with TAcronymMeaning(Meanings[J]) do begin
     124      Content := Content + '|-' + LineEnding +
     125        '| ' + Acronym.Name + LineEnding + '| ' + Name + LineEnding +
     126        '| ' + Description + LineEnding + '| ' + Categories.GetString + LineEnding;
     127      Inc(ItemCount);
     128    end;
     129    Job.Progress.Increment;
     130    if Job.Terminate then Break;
     131  end;
     132  Content := Content + '|}' + LineEnding;
     133  Memo1.Lines.Text := Content;
    126134end;
    127135
    128136procedure TFormExport.ButtonProcessClick(Sender: TObject);
    129137begin
    130   if ComboBoxDataFormat.ItemIndex = 0 then ExportCSV;
    131   if ComboBoxDataFormat.ItemIndex = 1 then ExportMediaWiki;
    132   if ComboBoxDataFormat.ItemIndex = 2 then ExportMediaWikiTable;
     138  if ComboBoxDataFormat.ItemIndex = 0 then
     139    Core.JobProgressView1.AddJob(SExporting, JobExportCSV);
     140  if ComboBoxDataFormat.ItemIndex = 1 then
     141    Core.JobProgressView1.AddJob(SExporting, JobExportMediaWiki);
     142  if ComboBoxDataFormat.ItemIndex = 2 then
     143    Core.JobProgressView1.AddJob(SExporting, JobExportMediaWikiTable);
     144  Core.JobProgressView1.Start;
     145  ShowMessage(Format(SExportedAcronyms, [ItemCount]));
    133146end;
    134147
  • trunk/Forms/UFormImportSources.pas

    r96 r97  
    184184var
    185185  NewImportSource: TImportSource;
     186  I: Integer;
    186187begin
    187188  NewImportSource := TImportSource.Create;
     
    194195      if not Assigned(ImportSources.SearchByName(NewImportSource.Name)) then begin;
    195196        ImportSources.Add(NewImportSource);
     197
     198        // Update reverse references
     199        for I := 0 to NewImportSource.Categories.Count - 1 do
     200          if TAcronymCategory(NewImportSource.Categories.Items[I]).ImportSources.IndexOf(NewImportSource) = -1 then
     201            TAcronymCategory(NewImportSource.Categories.Items[I]).ImportSources.Add(NewImportSource);
     202
    196203        NewImportSource := nil;
    197204        Core.AcronymDb.Modified := True;
     
    228235var
    229236  NewImportSource: TImportSource;
     237  I: Integer;
    230238begin
    231239  if Assigned(ListView1.Selected) then begin
     
    241249            TImportSource(ListView1.Selected.Data).Assign(NewImportSource);
    242250            Core.AcronymDb.Modified := True;
    243             UpdateList;
    244251          end else ShowMessage(Format(SImportSourceAlreadyExists, [NewImportSource.Name]));
    245252        end else begin
    246253          TImportSource(ListView1.Selected.Data).Assign(NewImportSource);
    247254          Core.AcronymDb.Modified := True;
    248           UpdateList;
    249255        end;
     256
     257        // Update reverse references
     258        TImportSource(ListView1.Selected.Data).Categories.UpdateLinkImportSources(TImportSource(ListView1.Selected.Data));
     259
     260        UpdateList;
    250261      end;
    251262      if Assigned(NewImportSource) then NewImportSource.Free;
  • trunk/Forms/UFormMain.lfm

    r96 r97  
    685685      0000
    686686    }
     687    Hint = 'Acronym Decoder'
    687688    Visible = True
    688689    OnClick = TrayIcon1Click
     
    19891990    }
    19901991  end
    1991   object JobProgressView1: TJobProgressView
    1992     OwnerDraw = False
    1993     ShowDelay = 0
    1994     AutoClose = False
    1995     left = 264
    1996     top = 296
    1997   end
    19981992  object PopupMenuOpenRecent: TPopupMenu
    19991993    left = 672
  • trunk/Forms/UFormMain.pas

    r96 r97  
    3535    CheckBoxExactMath: TCheckBox;
    3636    ImageList1: TImageList;
    37     JobProgressView1: TJobProgressView;
    3837    LastOpenedList1: TLastOpenedList;
    3938    ListViewAcronyms: TListView;
     
    104103    procedure AShowImportSourcesExecute(Sender: TObject);
    105104    procedure CheckBoxExactMathChange(Sender: TObject);
    106     procedure CoolTranslator1Translate(Sender: TObject);
    107105    procedure EditSearchChange(Sender: TObject);
    108106    procedure FormHide(Sender: TObject);
     
    298296  ImportTotalItemCount := 0;
    299297  Core.AcronymDb.AddedCount := 0;
    300   JobProgressView1.AddJob(SProcessImportSources, ProcessImportsJob);
    301   JobProgressView1.Start;
     298  Core.JobProgressView1.AddJob(SProcessImportSources, ProcessImportsJob);
     299  Core.JobProgressView1.Start;
    302300  ShowMessage(Format(SAddedCount, [ImportTotalItemCount, Core.AcronymDb.AddedCount]));
    303301  UpdateAcronymsList;
     
    403401begin
    404402  UpdateAcronymsList;
    405 end;
    406 
    407 procedure TFormMain.CoolTranslator1Translate(Sender: TObject);
    408 begin
    409   UAcronym.Translate;
    410403end;
    411404
  • trunk/Languages/AcronymDecoder.cs.po

    r95 r97  
    104104
    105105#: tformacronyms.aselectall.caption
     106msgctxt "tformacronyms.aselectall.caption"
    106107msgid "Select all"
    107108msgstr "Vybrat vše"
     
    147148msgstr "Odebrat"
    148149
     150#: tformcategories.aselectall.caption
     151msgctxt "tformcategories.aselectall.caption"
     152msgid "Select all"
     153msgstr "Vybrat vše"
     154
    149155#: tformcategories.caption
    150156msgid "Acronym categories"
     
    671677msgstr "Zkratka"
    672678
     679#: uacronym.scategory
     680msgctxt "uacronym.scategory"
     681msgid "Category"
     682msgstr "Kategorie"
     683
    673684#: uacronym.sdescription
    674685msgctxt "uacronym.sdescription"
     
    796807msgstr "Opravdu chcete odebrat vybrané kategorie?"
    797808
    798 #: uformexport.sexpotedacronyms
     809#: uformexport.sexportedacronyms
     810msgctxt "uformexport.sexportedacronyms"
    799811msgid "Exported %d acronyms"
    800812msgstr "Exportováno %d zkratek"
     813
     814#: uformexport.sexporting
     815msgid "Exporting"
     816msgstr "Exportování"
    801817
    802818#: uformimport.simportednewacronyms
     
    870886msgid "Process import sources"
    871887msgstr "Zpracovat zdroje importu"
    872 
  • trunk/Languages/AcronymDecoder.po

    r90 r97  
    9494
    9595#: tformacronyms.aselectall.caption
     96msgctxt "tformacronyms.aselectall.caption"
    9697msgid "Select all"
    9798msgstr ""
     
    137138msgstr ""
    138139
     140#: tformcategories.aselectall.caption
     141msgctxt "TFORMCATEGORIES.ASELECTALL.CAPTION"
     142msgid "Select all"
     143msgstr ""
     144
    139145#: tformcategories.caption
    140146msgid "Acronym categories"
     
    661667msgstr ""
    662668
     669#: uacronym.scategory
     670msgctxt "uacronym.scategory"
     671msgid "Category"
     672msgstr ""
     673
    663674#: uacronym.sdescription
    664675msgctxt "uacronym.sdescription"
     
    786797msgstr ""
    787798
    788 #: uformexport.sexpotedacronyms
     799#: uformexport.sexportedacronyms
     800msgctxt "uformexport.sexportedacronyms"
    789801msgid "Exported %d acronyms"
     802msgstr ""
     803
     804#: uformexport.sexporting
     805msgid "Exporting"
    790806msgstr ""
    791807
  • trunk/UAcronym.pas

    r89 r97  
    77uses
    88  Classes, SysUtils, Contnrs, XMLRead, XMLWrite, DOM, UXMLUtils,
    9   SpecializedList, fphttpclient, Dialogs, odbcconn, sqldb;
     9  SpecializedList, fphttpclient2, Dialogs, odbcconn, sqldb;
    1010
    1111type
     
    1313  TAcronymMeanings = class;
    1414  TAcronymDb = class;
     15  TImportSource = class;
    1516  TImportSources = class;
    1617  TImportFormats = class;
     
    7374    Name: string;
    7475    AcronymMeanings: TAcronymMeanings;
     76    ImportSources: TImportSources;
    7577    procedure SaveToNode(Node: TDOMNode);
    7678    procedure LoadFromNode(Node: TDOMNode);
     
    9395    procedure AssignToStrings(Strings: TStrings);
    9496    procedure AssignFromStrings(Strings: TStrings);
     97    procedure AddFromStrings(Strings: TStrings);
    9598    function GetString: string;
     99    procedure UpdateLinkImportSources(Item: TImportSource);
     100    procedure UpdateLinkAcronymMeanings(Item: TAcronymMeaning);
    96101  end;
    97102
     
    108113  end;
    109114
    110   TImportPatternFlag = (ipfNone, ipfNewItem, ipfSkip, ipfRemove);
    111   TImportVariable = (ivNone, ivAcronym, ivMeaning, ivDescription);
     115  TImportPatternFlag = (ipfSet, ipfNewItem, ipfSkip, ipfRemove, ipfCleanSet);
     116  TImportVariable = (ivNone, ivAcronym, ivMeaning, ivDescription, ivCategory);
    112117
    113118  { TImportPattern }
     
    244249  SMeaning = 'Meaning';
    245250  SAcronym = 'Acronym';
     251  SCategory = 'Category';
    246252  SNone = 'None';
    247253  SNewItem = 'New item';
     
    258264  ImportVariableString[ivMeaning] := SMeaning;
    259265  ImportVariableString[ivDescription] := SDescription;
    260   ImportPatternFlagString[ipfNone] := SNone;
     266  ImportVariableString[ivCategory] := SCategory;
     267  ImportPatternFlagString[ipfSet] := SNone;
    261268  ImportPatternFlagString[ipfNewItem] := SNewItem;
    262269  ImportPatternFlagString[ipfSkip] := SSkip;
     
    429436  I: Integer;
    430437  T: string;
     438  TT: string;
    431439  LastLength: Integer;
    432440  AddedAcronym: TAcronymMeaning;
     441  NewCategory: TAcronymCategory;
    433442begin
    434443  NewAcronym := TAcronymEntry.Create;
     
    492501              ivMeaning: NewAcronym.Meaning := T;
    493502              ivDescription: NewAcronym.Description := T;
     503              ivCategory: begin
     504                NewAcronym.Categories.Clear;
     505                while T <> '' do begin
     506                  if Pos(',', T) > 0 then begin
     507                    TT := Copy(T, 1, Pos(',', T) - 1);
     508                    Delete(T, 1, Length(TT) + 1);
     509                  end else begin
     510                    TT := T;
     511                    T := '';
     512                  end;
     513                  TT := Trim(TT);
     514                  NewCategory := Sources.AcronymDb.Categories.SearchByName(TT);
     515                  if not Assigned(NewCategory) then begin
     516                    NewCategory := TAcronymCategory.Create;
     517                    NewCategory.Name := TT;
     518                    Sources.AcronymDb.Categories.Add(NewCategory);
     519                  end;
     520                  NewAcronym.Categories.AddObject(TT, NewCategory);
     521                end;
     522              end;
    494523            end;
    495524          end;
     
    501530              AddedAcronym.Description := NewAcronym.Description;
    502531              AddedAcronym.MergeCategories(Categories);
     532              AddedAcronym.Categories.AddFromStrings(NewAcronym.Categories);
     533              AddedAcronym.Categories.UpdateLinkAcronymMeanings(AddedAcronym);
    503534              if AddedAcronym.Sources.IndexOf(Self) = -1 then
    504535                AddedAcronym.Sources.Add(Self);
     
    877908var
    878909  Node2: TDOMNode;
     910  I: Integer;
    879911begin
    880912  Name := ReadString(Node, 'Name', '');
     
    890922  if Assigned(Node2) then
    891923    Categories.LoadRefFromNode(Node2);
     924
     925  // Add reverse references
     926  for I := 0 to Categories.Count - 1 do
     927    TAcronymCategory(Categories[I]).ImportSources.Add(Self);
    892928end;
    893929
     
    902938
    903939destructor TImportSource.Destroy;
    904 begin
     940var
     941  I: Integer;
     942begin
     943  for I := 0 to Categories.Count - 1 do
     944    TAcronymCategory(Categories[I]).ImportSources.Remove(Self);
     945  FreeAndNil(Categories);
    905946  FreeAndNil(ResponseStream);
    906   FreeAndNil(Categories);
    907947  inherited Destroy;
    908948end;
     
    12451285
    12461286procedure TAcronymCategories.AssignFromStrings(Strings: TStrings);
    1247 var
    1248   I: Integer;
    12491287begin
    12501288  Clear;
     1289  AddFromStrings(Strings);
     1290end;
     1291
     1292procedure TAcronymCategories.AddFromStrings(Strings: TStrings);
     1293var
     1294  I: Integer;
     1295begin
    12511296  for I := 0 to Strings.Count - 1 do begin
    12521297    Add(TAcronymCategory(Strings.Objects[I]));
     
    12641309end;
    12651310
     1311procedure TAcronymCategories.UpdateLinkImportSources(Item: TImportSource);
     1312var
     1313  I: Integer;
     1314begin
     1315  for I := 0 to Count - 1 do
     1316    if TAcronymCategory(Items[I]).ImportSources.IndexOf(Item) = -1 then
     1317      TAcronymCategory(Items[I]).ImportSources.Add(Item);
     1318end;
     1319
     1320procedure TAcronymCategories.UpdateLinkAcronymMeanings(Item: TAcronymMeaning);
     1321var
     1322  I: Integer;
     1323begin
     1324  for I := 0 to Count - 1 do
     1325    if TAcronymCategory(Items[I]).AcronymMeanings.IndexOf(Item) = -1 then
     1326      TAcronymCategory(Items[I]).AcronymMeanings.Add(Item);
     1327end;
     1328
    12661329
    12671330{ TAcronym }
     
    13181381begin
    13191382  AcronymMeanings := TAcronymMeanings.Create(False);
     1383  ImportSources := TImportSources.Create(False);
    13201384end;
    13211385
     
    13271391    TAcronymMeaning(AcronymMeanings[I]).Categories.Remove(Self);
    13281392  FreeAndNil(AcronymMeanings);
     1393  for I := 0 to ImportSources.Count - 1 do
     1394    TImportSource(ImportSources[I]).Categories.Remove(Self);
     1395  FreeAndNil(ImportSources);
    13291396  inherited Destroy;
    13301397end;
  • trunk/UCore.lfm

    r96 r97  
    99  object CoolTranslator1: TCoolTranslator
    1010    POFilesFolder = 'Languages'
     11    OnTranslate = CoolTranslator1Translate
    1112    left = 152
    1213    top = 152
     
    1819    top = 156
    1920  end
     21  object JobProgressView1: TJobProgressView
     22    OwnerDraw = False
     23    ShowDelay = 0
     24    AutoClose = False
     25    left = 292
     26    top = 272
     27  end
    2028end
  • trunk/UCore.pas

    r96 r97  
    77uses
    88  Classes, SysUtils, FileUtil, UAcronym, UCoolTranslator, UPersistentForm,
    9   Forms, Controls, LazFileUtils;
     9  UJobProgressView, Forms, Controls, LazFileUtils;
    1010
    1111type
     
    1515  TCore = class(TDataModule)
    1616    CoolTranslator1: TCoolTranslator;
     17    JobProgressView1: TJobProgressView;
    1718    PersistentForm1: TPersistentForm;
     19    procedure CoolTranslator1Translate(Sender: TObject);
    1820    procedure DataModuleCreate(Sender: TObject);
    1921    procedure DataModuleDestroy(Sender: TObject);
     
    5860begin
    5961  FreeAndNil(AcronymDb);
     62end;
     63
     64procedure TCore.CoolTranslator1Translate(Sender: TObject);
     65begin
     66  UAcronym.Translate;
    6067end;
    6168
Note: See TracChangeset for help on using the changeset viewer.