Changeset 104 for trunk/Forms
- Timestamp:
- Feb 9, 2022, 5:07:14 PM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.pas
r103 r104 685 685 if EditHomeAddressCity.Text <> '' then Address := Address + ' ' + EditHomeAddressCity.Text; 686 686 if EditHomeAddressCountry.Text <> '' then Address := Address + ' ' + EditHomeAddressCountry.Text; 687 OpenURL(Core.MapUrl + URLEncode(Trim(Address))); 687 if Trim(Address) <> '' then 688 OpenURL(Core.MapUrl + URLEncode(Trim(Address))); 688 689 end; 689 690 … … 704 705 if EditWorkAddressCity.Text <> '' then Address := Address + ' ' + EditWorkAddressCity.Text; 705 706 if EditWorkAddressCountry.Text <> '' then Address := Address + ' ' + EditWorkAddressCountry.Text; 706 OpenURL(Core.MapUrl + URLEncode(Trim(Address))); 707 if Trim(Address) <> '' then 708 OpenURL(Core.MapUrl + URLEncode(Trim(Address))); 707 709 end; 708 710 -
trunk/Forms/UFormContacts.pas
r103 r104 258 258 Text: string; 259 259 SelectedCount: Integer; 260 begin 260 Selected: Boolean; 261 begin 262 Selected := Assigned(ListView1.Selected); 261 263 AAdd.Enabled := Assigned(Contacts); 262 AModify.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected); 263 ARemove.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected); 264 AModify.Enabled := Assigned(Contacts) and Selected; 265 ARemove.Enabled := Assigned(Contacts) and Selected; 266 AAdd.Enabled := Assigned(Contacts); 267 AModify.Enabled := Assigned(Contacts) and Selected; 268 AClone.Enabled := Assigned(Contacts) and Selected; 269 ARemove.Enabled := Assigned(Contacts) and Selected; 270 ASelectAll.Enabled := ListView1.Items.Count > 0; 271 ALoadFromFile.Enabled := Assigned(Contacts) and Selected; 272 ASaveToFile.Enabled := Assigned(Contacts) and Selected; 273 ACopy.Enabled := Assigned(Contacts) and Selected; 274 ACut.Enabled := Assigned(Contacts) and Selected; 275 APaste.Enabled := Assigned(Contacts) and (Clipboard.AsText <> ''); 264 276 265 277 Text := ''; … … 273 285 end; 274 286 StatusBar1.Panels[0].Text := Text; 287 288 UpdateColumns; 275 289 end; 276 290 … … 613 627 begin 614 628 if FUpdateCount = 0 then DoUpdateInterface; 615 AAdd.Enabled := Assigned(Contacts);616 AModify.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected);617 AClone.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected);618 ARemove.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected);619 ASelectAll.Enabled := ListView1.Items.Count > 0;620 ALoadFromFile.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected);621 ASaveToFile.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected);622 ACopy.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected);623 ACut.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected);624 APaste.Enabled := Assigned(Contacts) and (Clipboard.AsText <> '');625 626 UpdateColumns;627 629 end; 628 630 -
trunk/Forms/UFormProperties.pas
r103 r104 369 369 Text: string; 370 370 SelectedCount: Integer; 371 begin 371 Selected: Boolean; 372 begin 373 Selected := Assigned(ListView1.Selected); 372 374 AAdd.Enabled := Assigned(Properties); 373 AModify.Enabled := Assigned(Properties) and Assigned(ListView1.Selected);374 AClone.Enabled := Assigned(Properties) and Assigned(ListView1.Selected);;375 ARemove.Enabled := Assigned(Properties) and Assigned(ListView1.Selected);376 ALoadValueFromFile.Enabled := Assigned(Properties) and Assigned(ListView1.Selected);377 ASaveValueToFile.Enabled := Assigned(Properties) and Assigned(ListView1.Selected);375 AModify.Enabled := Assigned(Properties) and Selected; 376 AClone.Enabled := Assigned(Properties) and Selected; 377 ARemove.Enabled := Assigned(Properties) and Selected; 378 ALoadValueFromFile.Enabled := Assigned(Properties) and Selected; 379 ASaveValueToFile.Enabled := Assigned(Properties) and Selected; 378 380 ASelectAll.Enabled := ListView1.Items.Count > 0; 379 381 -
trunk/Forms/UFormTest.pas
r103 r104 76 76 77 77 procedure TFormTest.UpdateInterface; 78 begin 79 ARun.Enabled := Assigned(ListViewTestCases.Selected); 80 AShow.Enabled := Assigned(ListViewTestCases.Selected); 78 var 79 Selected: Boolean; 80 begin 81 Selected := Assigned(ListViewTestCases.Selected); 82 ARun.Enabled := Selected; 83 AShow.Enabled := Selected; 81 84 end; 82 85
Note:
See TracChangeset
for help on using the changeset viewer.