Changeset 29 for trunk


Ignore:
Timestamp:
Jul 12, 2016, 4:41:03 PM (8 years ago)
Author:
chronos
Message:
  • Added: New import source state called Enabled to allow to select only currently needed imports for importing from all sources.
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormImportSource.lfm

    r28 r29  
    11object FormImportSource: TFormImportSource
    22  Left = 506
    3   Height = 422
     3  Height = 282
    44  Top = 363
    5   Width = 599
     5  Width = 507
    66  Caption = 'Import source'
    7   ClientHeight = 422
    8   ClientWidth = 599
     7  ClientHeight = 282
     8  ClientWidth = 507
    99  LCLVersion = '1.6.0.4'
    1010  object EditName: TEdit
     
    1212    Height = 28
    1313    Top = 10
    14     Width = 432
     14    Width = 340
    1515    Anchors = [akTop, akLeft, akRight]
    1616    TabOrder = 0
     
    3636    Height = 28
    3737    Top = 49
    38     Width = 432
     38    Width = 340
    3939    Anchors = [akTop, akLeft, akRight]
    4040    TabOrder = 1
    4141  end
    4242  object ButtonOk: TButton
    43     Left = 504
     43    Left = 412
    4444    Height = 25
    45     Top = 384
     45    Top = 244
    4646    Width = 75
    4747    Anchors = [akRight, akBottom]
     
    5151  end
    5252  object ButtonCancel: TButton
    53     Left = 408
     53    Left = 316
    5454    Height = 25
    55     Top = 384
     55    Top = 244
    5656    Width = 75
    5757    Anchors = [akRight, akBottom]
     
    7272    Height = 28
    7373    Top = 91
    74     Width = 304
     74    Width = 212
    7575    Anchors = [akTop, akLeft, akRight]
    7676    ItemHeight = 20
     
    7979  end
    8080  object ButtonShowFormat: TButton
    81     Left = 472
     81    Left = 380
    8282    Height = 25
    8383    Top = 91
     
    8888    TabOrder = 5
    8989  end
     90  object CheckBoxEnabled: TCheckBox
     91    Left = 11
     92    Height = 24
     93    Top = 136
     94    Width = 78
     95    Caption = 'Enabled'
     96    TabOrder = 6
     97  end
    9098end
  • trunk/Forms/UFormImportSource.lrt

    r28 r29  
    66TFORMIMPORTSOURCE.LABEL3.CAPTION=Data format:
    77TFORMIMPORTSOURCE.BUTTONSHOWFORMAT.CAPTION=Configure
     8TFORMIMPORTSOURCE.CHECKBOXENABLED.CAPTION=Enabled
  • trunk/Forms/UFormImportSource.pas

    r28 r29  
    1717    ButtonOk: TButton;
    1818    ButtonCancel: TButton;
     19    CheckBoxEnabled: TCheckBox;
    1920    ComboBox1: TComboBox;
    2021    EditName: TEdit;
     
    7879  if (ComboBox1.ItemIndex = -1) and (ComboBox1.Items.Count > 0) then
    7980    ComboBox1.ItemIndex := 0;
     81  CheckBoxEnabled.Checked := ImportSource.Enabled;
    8082end;
    8183
     
    8587  ImportSource.URL := EditURL.Text;
    8688  ImportSource.Format := TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex]);
     89  ImportSource.Enabled := CheckBoxEnabled.Checked;
    8790end;
    8891
  • trunk/Forms/UFormImportSources.lfm

    r22 r29  
    1515    Width = 577
    1616    Anchors = [akTop, akLeft, akRight, akBottom]
     17    Checkboxes = True
    1718    Columns = <   
    1819      item
  • trunk/Forms/UFormImportSources.pas

    r28 r29  
    6767    Item.Data := ImportSources[Item.Index];
    6868    Item.SubItems.Add(URL);
     69    Item.Checked := Enabled;
    6970  end;
    7071end;
  • trunk/Forms/UFormMain.pas

    r28 r29  
    259259begin
    260260  TotalItemCount := 0;
    261   for I := 0 to AcronymDb.ImportSources.Count - 1 do begin
    262     TImportSource(AcronymDb.ImportSources[I]).Process;
    263     TotalItemCount := TotalItemCount + TImportSource(AcronymDb.ImportSources[I]).ItemCount;
     261  for I := 0 to AcronymDb.ImportSources.Count - 1 do
     262  with TImportSource(AcronymDb.ImportSources[I]) do
     263  if Enabled then begin
     264    Process;
     265    TotalItemCount := TotalItemCount + ItemCount;
    264266  end;
    265267  ShowMessage(Format(SAddedCount, [TotalItemCount]));
  • trunk/Languages/AcronymDecoder.cs.po

    r28 r29  
    200200#: tformimportformat.amovedown.caption
    201201msgid "Move down"
    202 msgstr ""
     202msgstr "Přesunout níže"
    203203
    204204#: tformimportformat.amoveup.caption
    205205msgid "Move up"
    206 msgstr ""
     206msgstr "Přesounout výše"
    207207
    208208#: tformimportformat.aremove.caption
     
    247247#: tformimportformat.listviewitemrules.columns[0].caption
    248248msgid "Start string"
    249 msgstr ""
     249msgstr "Počáteční řetězec"
    250250
    251251#: tformimportformat.listviewitemrules.columns[1].caption
    252252msgid "End string"
    253 msgstr ""
     253msgstr "Koncový řetězec"
    254254
    255255#: tformimportformat.listviewitemrules.columns[2].caption
    256256msgid "Action"
    257 msgstr ""
     257msgstr "Akce"
    258258
    259259#: tformimportformat.listviewitemrules.columns[3].caption
    260260msgid "Variable"
    261 msgstr ""
     261msgstr "Proměnná"
    262262
    263263#: tformimportformat.listviewitemrules.columns[4].caption
    264264msgctxt "tformimportformat.listviewitemrules.columns[4].caption"
    265265msgid "Repetition"
    266 msgstr ""
     266msgstr "Opakování"
    267267
    268268#: tformimportformats.aadd.caption
     
    305305#: tformimportpattern.caption
    306306msgid "Import pattern"
    307 msgstr ""
     307msgstr "Vzor importu"
    308308
    309309#: tformimportpattern.checkboxrepetition.caption
    310310msgctxt "tformimportpattern.checkboxrepetition.caption"
    311311msgid "Repetition"
    312 msgstr ""
     312msgstr "Opakování"
    313313
    314314#: tformimportpattern.label10.caption
    315315msgid "Action:"
    316 msgstr ""
     316msgstr "Akce"
    317317
    318318#: tformimportpattern.label11.caption
    319319msgid "Variable:"
    320 msgstr ""
     320msgstr "Proměnná"
    321321
    322322#: tformimportpattern.label8.caption
    323323msgid "Start string:"
    324 msgstr ""
     324msgstr "Počáteční řetězec"
    325325
    326326#: tformimportpattern.label9.caption
    327327msgid "End string:"
    328 msgstr ""
     328msgstr "Koncový řetězec"
    329329
    330330#: tformimportsource.buttoncancel.caption
     
    340340#: tformimportsource.buttonshowformat.caption
    341341msgid "Configure"
    342 msgstr ""
     342msgstr "Nastavit"
    343343
    344344#: tformimportsource.caption
     
    347347msgstr "Zdroj importu"
    348348
     349#: tformimportsource.checkboxenabled.caption
     350msgid "Enabled"
     351msgstr ""
     352
    349353#: tformimportsource.label1.caption
    350354msgctxt "tformimportsource.label1.caption"
     
    603607#: uformimportformat.sno
    604608msgid "No"
    605 msgstr ""
     609msgstr "Ne"
    606610
    607611#: uformimportformat.sremoveimportpattern
    608612msgid "Remove import pattern"
    609 msgstr ""
     613msgstr "Odstranit vzory importu"
    610614
    611615#: uformimportformat.sremoveimportpatternquery
    612616msgid "Do you really want to remove selected import patterns?"
    613 msgstr ""
     617msgstr "Opravdu chcete odstranit vybrané vzory importu?"
    614618
    615619#: uformimportformat.syes
    616620msgid "Yes"
    617 msgstr ""
     621msgstr "Ano"
    618622
    619623#: uformimportformats.simportformatalreadyexists
     
    646650#: uformmain.saddedcount
    647651msgid "Imported %d acronyms"
    648 msgstr ""
     652msgstr "Importováno %d zkratek"
    649653
    650654#: uformmain.sappexit
  • trunk/Languages/AcronymDecoder.po

    r28 r29  
    330330msgstr ""
    331331
     332#: tformimportsource.checkboxenabled.caption
     333msgid "Enabled"
     334msgstr ""
     335
    332336#: tformimportsource.label1.caption
    333337msgctxt "TFORMIMPORTSOURCE.LABEL1.CAPTION"
  • trunk/UAcronym.pas

    r28 r29  
    163163    procedure DoPassword(Sender: TObject; var RepeatRequest : Boolean);
    164164  public
     165    Enabled: Boolean;
    165166    Name: string;
    166167    URL: string;
     
    618619procedure TImportSource.Assign(Source: TImportSource);
    619620begin
     621  Enabled := Source.Enabled;
    620622  Name := Source.Name;
    621623  URL := Source.URL;
    622624  Format := Source.Format;
     625  LastTime := Source.LastTime;
     626  ItemCount := Source.ItemCount;
    623627end;
    624628
     
    629633  if Assigned(Format) then WriteInteger(Node, 'ImportFormat', Format.Id)
    630634    else WriteInteger(Node, 'ImportFormat', -1);
     635  WriteBoolean(Node, 'Enabled', Enabled);
    631636end;
    632637
     
    636641  URL := ReadString(Node, 'URL', '');
    637642  Format := Sources.AcronymDb.ImportFormats.SearchById(ReadInteger(Node, 'ImportFormat', -1));
     643  Enabled := ReadBoolean(Node, 'Enabled', True);
    638644end;
    639645
     
    641647begin
    642648  Format := nil;
     649  Enabled := True;
    643650end;
    644651
Note: See TracChangeset for help on using the changeset viewer.