editRecentPaths displays a dialog allowing the user to edit the recent paths list.
()
| 690 | // editRecentPaths displays a dialog allowing the user to |
| 691 | // edit the recent paths list. |
| 692 | func (fp *FilePicker) editRecentPaths() { |
| 693 | d := NewBody().AddTitle("Recent file paths").AddText("You can delete paths you no longer use") |
| 694 | NewList(d).SetSlice(&recentPaths) |
| 695 | d.AddBottomBar(func(parent Widget) { |
| 696 | d.AddCancel(parent) |
| 697 | d.AddOK(parent).OnClick(func(e events.Event) { |
| 698 | saveRecentPaths() |
| 699 | fp.Update() |
| 700 | }) |
| 701 | }) |
| 702 | d.RunDialog(fp) |
| 703 | } |
| 704 | |
| 705 | // Filename is used to specify an file path. |
| 706 | // It results in a [FileButton] [Value]. |
no test coverage detected