Changeset 56


Ignore:
Timestamp:
Jul 26, 2016, 2:13:41 PM (8 years ago)
Author:
chronos
Message:
  • Added: Show how many new acronyms were imported.
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAbout.lfm

    r50 r56  
    2929    Align = alTop
    3030    BorderSpacing.Around = 20
    31     Caption = 'Simple tool for quick search of meaning for various acronyms and abbreviations.'
     31    Caption = 'Simple tool for quick searching of meaning for various acronyms and abbreviations.'
    3232    ParentColor = False
    3333    WordWrap = True
     
    7373    EmailContact = 'robie@centrum.cz'
    7474    AppName = 'Acronym Decoder'
    75     ReleaseDate = 42565
     75    ReleaseDate = 42577
    7676    RegistryKey = '\Software\'
    7777    RegistryRoot = rrKeyCurrentUser
  • trunk/Forms/UFormAbout.lrt

    r28 r56  
    11TFORMABOUT.CAPTION=About
    22TFORMABOUT.LABELAPPNAME.CAPTION=Acronym Decoder
    3 TFORMABOUT.LABELDESCRIPTION.CAPTION=Simple tool for quick search of meaning for various acronyms and abbreviations.
     3TFORMABOUT.LABELDESCRIPTION.CAPTION=Simple tool for quick searching of meaning for various acronyms and abbreviations.
    44TFORMABOUT.BUTTONCLOSE.CAPTION=Close
    55TFORMABOUT.LABELCONTENT.CAPTION=   
  • trunk/Forms/UFormImportSources.pas

    r52 r56  
    162162begin
    163163  if Assigned(ListView1.Selected) then begin
     164    FormMain.AcronymDb.AddedCount := 0;
    164165    JobProgressView1.AddJob(SProcessSelectedSource, ProcessImportJob);
    165166    JobProgressView1.Start;
    166     ShowMessage(Format(SAddedCount, [TImportSource(ListView1.Selected.Data).ItemCount]));
     167    ShowMessage(Format(SAddedCount, [TImportSource(ListView1.Selected.Data).ItemCount, FormMain.AcronymDb.AddedCount]));
    167168  end;
    168169end;
  • trunk/Forms/UFormMain.lfm

    r55 r56  
    6666      ViewStyle = vsReport
    6767      OnData = ListViewAcronymsData
     68      OnResize = ListViewAcronymsResize
    6869      OnSelectItem = ListViewAcronymsSelectItem
    6970    end
  • trunk/Forms/UFormMain.pas

    r51 r56  
    110110    procedure LastOpenedList1Change(Sender: TObject);
    111111    procedure ListViewAcronymsData(Sender: TObject; Item: TListItem);
     112    procedure ListViewAcronymsResize(Sender: TObject);
    112113    procedure ListViewAcronymsSelectItem(Sender: TObject; Item: TListItem;
    113114      Selected: Boolean);
     
    140141
    141142resourcestring
    142   SAddedCount = 'Imported %d acronyms';
     143  SAddedCount = 'Imported %d acronyms. Added %d new.';
    143144  SProcessImportSources = 'Process import sources';
    144145
     
    277278begin
    278279  ImportTotalItemCount := 0;
     280  AcronymDb.AddedCount := 0;
    279281  JobProgressView1.AddJob(SProcessImportSources, ProcessImportsJob);
    280282  JobProgressView1.Start;
    281   ShowMessage(Format(SAddedCount, [ImportTotalItemCount]));
     283  ShowMessage(Format(SAddedCount, [ImportTotalItemCount, AcronymDb.AddedCount]));
    282284  UpdateAcronymsList;
    283285  UpdateInterface;
     
    393395    Item.SubItems.Add(Categories.GetString);
    394396  end;
     397end;
     398
     399procedure TFormMain.ListViewAcronymsResize(Sender: TObject);
     400begin
     401  ListViewFilter1.UpdateFromListView(ListViewAcronyms);
    395402end;
    396403
  • trunk/Languages/AcronymDecoder.cs.po

    r52 r56  
    55"POT-Creation-Date: \n"
    66"PO-Revision-Date: \n"
    7 "Last-Translator: \n"
     7"Last-Translator: Chronos <robie@centrum.cz>\n"
    88"Language-Team: \n"
    99"MIME-Version: 1.0\n"
     
    626626msgstr "Popis"
    627627
     628#: uacronym.sfilenotfound
     629msgid "File %s not found"
     630msgstr "Soubor %s nenalezen"
     631
    628632#: uacronym.smeaning
    629633msgctxt "uacronym.smeaning"
     
    781785#: uformimportsources.sprocessselectedsource
    782786msgid "Process selected import source"
    783 msgstr ""
     787msgstr "Zpracovat vybrané zdroje importu"
    784788
    785789#: uformimportsources.sremoveimportsource
     
    794798
    795799#: uformmain.saddedcount
    796 msgid "Imported %d acronyms"
    797 msgstr "Importováno %d zkratek"
     800msgid "Imported %d acronyms. Added %d new."
     801msgstr "Importováno %d zkratek. Přidáno %d nových."
    798802
    799803#: uformmain.sappexit
     
    812816msgid "Process import sources"
    813817msgstr "Zpracovat zdroje importu"
    814 
  • trunk/Languages/AcronymDecoder.po

    r52 r56  
    616616msgstr ""
    617617
     618#: uacronym.sfilenotfound
     619msgid "File %s not found"
     620msgstr ""
     621
    618622#: uacronym.smeaning
    619623msgctxt "uacronym.smeaning"
     
    784788
    785789#: uformmain.saddedcount
    786 msgid "Imported %d acronyms"
     790msgid "Imported %d acronyms. Added %d new."
    787791msgstr ""
    788792
  • trunk/UAcronym.pas

    r52 r56  
    216216    ImportFormats: TImportFormats;
    217217    Modified: Boolean;
     218    AddedCount: Integer;
    218219    constructor Create;
    219220    destructor Destroy; override;
     
    250251  SRemoveOnStart = 'Remove on start';
    251252  SUnsupportedAuthMethod = 'Unsupported HTTP authorization method';
     253  SFileNotFound = 'File %s not found';
    252254
    253255
     
    323325      NewAcronym.Name := SQLQuery1.FieldByName('Acronym').AsString;
    324326      NewAcronym.Meaning := SQLQuery1.FieldByName('Meaning').AsString;
    325       Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning);
     327      if (NewAcronym.Name <> '') and (NewAcronym.Meaning <> '') then
     328        Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning);
    326329      SQLQuery1.Next;
    327330      Inc(ItemCount);
     
    489492          Delete(S, 1, P + Length(EndString) - 1);
    490493
    491           if (Flag = ipfNewItem) and (Trim(NewAcronym.Name) <> '') and
    492             (Trim(NewAcronym.Meaning) <> '') then begin
     494          if (Flag = ipfNewItem) and (NewAcronym.Name <> '') and
     495            (NewAcronym.Meaning <> '') then begin
    493496              AddedAcronym := Sources.AcronymDb.AddAcronym(NewAcronym.Name, NewAcronym.Meaning);
    494497              AddedAcronym.Description := NewAcronym.Description;
     
    749752      S.Free;
    750753    end;
    751   end else ShowMessage('File ' + URL + ' not found');
     754  end else ShowMessage(SysUtils.Format(SFileNotFound, [URL]));
    752755end;
    753756
     
    823826begin
    824827  Categories := TStringList.Create;
     828  Name := '';
     829  Meaning := '';
     830  Description := '';
    825831end;
    826832
     
    14321438    Meaning.Acronym := Acronym;
    14331439    Acronym.Meanings.Add(Meaning);
     1440    Inc(AddedCount);
    14341441  end;
    14351442  Result := Meaning;
Note: See TracChangeset for help on using the changeset viewer.