MCPcopy Create free account
hub / github.com/cogentcore/core / editRecentPaths

Method editRecentPaths

core/filepicker.go:692–703  ·  view source on GitHub ↗

editRecentPaths displays a dialog allowing the user to edit the recent paths list.

()

Source from the content-addressed store, hash-verified

690// editRecentPaths displays a dialog allowing the user to
691// edit the recent paths list.
692func (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].

Callers 1

addChooserPathsMethod · 0.95

Calls 12

NewBodyFunction · 0.85
NewListFunction · 0.85
saveRecentPathsFunction · 0.85
AddTextMethod · 0.80
AddTitleMethod · 0.80
AddBottomBarMethod · 0.80
AddCancelMethod · 0.80
AddOKMethod · 0.80
RunDialogMethod · 0.80
UpdateMethod · 0.65
SetSliceMethod · 0.45
OnClickMethod · 0.45

Tested by

no test coverage detected