- Timestamp:
- Nov 25, 2021, 1:51:20 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContacts.lfm
r32 r34 14 14 object ListView1: TListView 15 15 Left = 0 16 Height = 8 3716 Height = 810 17 17 Top = 0 18 18 Width = 1210 … … 58 58 Left = 0 59 59 Height = 39 60 Top = 8 6960 Top = 842 61 61 Width = 1210 62 62 Align = alBottom … … 83 83 Left = 0 84 84 Height = 32 85 Top = 8 3785 Top = 810 86 86 Width = 1210 87 87 OnChange = ListViewFilter1Change 88 88 Align = alBottom 89 end 90 object StatusBar1: TStatusBar 91 Left = 0 92 Height = 27 93 Top = 881 94 Width = 1210 95 Panels = < 96 item 97 Width = 50 98 end> 99 SimplePanel = False 89 100 end 90 101 object PopupMenuContact: TPopupMenu -
trunk/Forms/UFormContacts.pas
r32 r34 27 27 MenuItem4: TMenuItem; 28 28 PopupMenuContact: TPopupMenu; 29 StatusBar1: TStatusBar; 29 30 ToolBar1: TToolBar; 30 31 ToolButton1: TToolButton; … … 70 71 SRemoveContacts = 'Remove contacts'; 71 72 SRemoveContactsQuery = 'Do you want to remove selected contacts?'; 73 STotal = 'Total'; 74 SFiltered = 'Filtered'; 75 SSelected = 'Selected'; 72 76 73 77 { TFormContacts } … … 83 87 Item.SubItems.Add(Fields[cfTelCell]); 84 88 Item.SubItems.Add(Fields[cfTelHome]); 85 Item.Data := Contacts[Item.Index];89 Item.Data := ListViewSort1.List[Item.Index]; 86 90 end; 87 91 end; … … 101 105 begin 102 106 ReloadList; 107 UpdateInterface; 103 108 end; 104 109 … … 244 249 begin 245 250 ListView1.SelectAll; 251 UpdateInterface; 246 252 end; 247 253 … … 263 269 264 270 procedure TFormContacts.UpdateInterface; 271 var 272 Text: string; 273 SelectedCount: Integer; 265 274 begin 266 275 AAdd.Enabled := Assigned(Contacts); 267 276 AModify.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected); 268 277 ARemove.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected); 278 279 Text := ''; 280 if Assigned(Contacts) then begin 281 Text := STotal + ': ' + IntToStr(Contacts.Count); 282 if ListView1.Items.Count < Contacts.Count then 283 Text := Text + ', ' + SFiltered + ': ' + IntToStr(ListView1.Items.Count); 284 SelectedCount := ListView1.SelCount; 285 if SelectedCount > 0 then 286 Text := Text + ', ' + SSelected + ': ' + IntToStr(SelectedCount); 287 end; 288 StatusBar1.Panels[0].Text := Text; 269 289 end; 270 290 -
trunk/Forms/UFormMain.lfm
r21 r34 14 14 OnDestroy = FormDestroy 15 15 OnShow = FormShow 16 LCLVersion = '2.0. 0.4'16 LCLVersion = '2.0.12.0' 17 17 object CoolBar1: TCoolBar 18 18 Left = 0 … … 107 107 end 108 108 end 109 object StatusBar1: TStatusBar110 Left = 0111 Height = 28112 Top = 734113 Width = 1178114 Panels = <115 item116 Width = 300117 end>118 ParentFont = False119 SimplePanel = False120 end121 109 object MainMenu1: TMainMenu 122 110 Images = Core.ImageList1 123 left = 192124 top = 120111 Left = 192 112 Top = 120 125 113 object MenuItemFile: TMenuItem 126 114 Caption = 'File' … … 187 175 end 188 176 object PopupMenuOpenRecent: TPopupMenu 189 left = 420190 top = 120177 Left = 420 178 Top = 120 191 179 end 192 180 end -
trunk/Forms/UFormMain.pas
r21 r34 37 37 MenuItemFile: TMenuItem; 38 38 PopupMenuOpenRecent: TPopupMenu; 39 StatusBar1: TStatusBar;40 39 ToolBarOther: TToolBar; 41 40 ToolBarFile: TToolBar; … … 71 70 72 71 resourcestring 73 SCount = 'Count:';74 72 SModified = 'Modified'; 75 73 … … 153 151 UpdateFormTitle; 154 152 CoolBar1.Visible := MenuItemToolbar.Checked; 155 if Assigned(Core.DataFile) then156 StatusBar1.Panels[0].Text := SCount + ' ' + IntToStr(TcontactsFile(Core.DataFile).Contacts.Count)157 else StatusBar1.Panels[0].Text := '';158 153 end; 159 154 -
trunk/Languages/vCardStudio.cs.po
r33 r34 185 185 #: tformcontact.label5.caption 186 186 msgid "Last name" 187 msgstr "Příjmení :"187 msgstr "Příjmení" 188 188 189 189 #: tformcontact.label6.caption … … 621 621 msgstr "Upravit pole" 622 622 623 #: uformcontacts.sfiltered 624 msgid "Filtered" 625 msgstr "Filtrovaných" 626 623 627 #: uformcontacts.sremovecontacts 624 628 msgid "Remove contacts" … … 629 633 msgstr "Opravdu chcete odstranit vybrané kontakty?" 630 634 631 #: uformmain.scount 632 msgctxt "uformmain.scount" 633 msgid "Count:" 634 msgstr "Počet:" 635 #: uformcontacts.sselected 636 msgid "Selected" 637 msgstr "Vybraných" 638 639 #: uformcontacts.stotal 640 msgid "Total" 641 msgstr "Celkem" 635 642 636 643 #: uformmain.smodified -
trunk/Languages/vCardStudio.po
r33 r34 605 605 msgstr "" 606 606 607 #: uformcontacts.sfiltered 608 msgid "Filtered" 609 msgstr "" 610 607 611 #: uformcontacts.sremovecontacts 608 612 msgid "Remove contacts" … … 613 617 msgstr "" 614 618 615 #: uformmain.scount 616 msgctxt "uformmain.scount" 617 msgid "Count:" 619 #: uformcontacts.sselected 620 msgid "Selected" 621 msgstr "" 622 623 #: uformcontacts.stotal 624 msgid "Total" 618 625 msgstr "" 619 626 -
trunk/UContact.pas
r33 r34 302 302 I: Integer; 303 303 begin 304 List.Clear; 304 while List.Count > Count do List.Delete(List.Count - 1); 305 while List.Count < Count do List.Add(nil); 305 306 for I := 0 to Count - 1 do 306 List .Add(Items[I]);307 List[I] := Items[I]; 307 308 end; 308 309 … … 425 426 426 427 procedure TContact.Assign(Source: TContact); 427 begin 428 Properties.Assign(Source.Properties); 428 var 429 I: Integer; 430 begin 431 while Properties.Count < Source.Properties.Count do 432 Properties.Add(TContactProperty.Create); 433 while Properties.Count > Source.Properties.Count do 434 Properties.Delete(Properties.Count - 1); 435 for I := 0 to Properties.Count - 1 do 436 Properties[I].Assign(Source.Properties[I]); 429 437 end; 430 438 -
trunk/UCore.pas
r31 r34 364 364 Result.Loaded := TempFile.Contacts.Count; 365 365 for I := 0 to TempFile.Contacts.Count - 1 do begin 366 NewContact := TContactsFile(DataFile).Contacts.Search(T Contact(TempFile.Contacts[I]).Fields[cfFullName]);366 NewContact := TContactsFile(DataFile).Contacts.Search(TempFile.Contacts[I].Fields[cfFullName]); 367 367 if not Assigned(NewContact) then begin 368 368 NewContact := TContact.Create; 369 369 NewContact.Parent := TContactsFile(DataFile); 370 NewContact.Assign(T Contact(TempFile.Contacts[I]));370 NewContact.Assign(TempFile.Contacts[I]); 371 371 TContactsFile(DataFile).Contacts.Add(NewContact); 372 372 Inc(Result.New); 373 373 end else begin 374 if NewContact.UpdateFrom(T Contact(TempFile.Contacts[I])) then374 if NewContact.UpdateFrom(TempFile.Contacts[I]) then 375 375 Inc(Result.Updated); 376 376 end; … … 402 402 else FormContacts.Contacts := nil; 403 403 FormContacts.ReloadList; 404 FormContacts.UpdateInterface; 404 405 end; 405 406 end;
Note:
See TracChangeset
for help on using the changeset viewer.