(m *core.Scene)
| 86 | } |
| 87 | |
| 88 | func (tn *Node) ContextMenu(m *core.Scene) { |
| 89 | vd := core.NewButton(m).SetText("View Diffs").SetIcon(icons.Add) |
| 90 | vd.Styler(func(s *styles.Style) { |
| 91 | s.SetState(!tn.HasSelection(), states.Disabled) |
| 92 | }) |
| 93 | vd.OnClick(func(e events.Event) { |
| 94 | br := tn.Browser() |
| 95 | if br == nil { |
| 96 | return |
| 97 | } |
| 98 | sels := tn.GetSelectedNodes() |
| 99 | sn := sels[len(sels)-1].(*Node) |
| 100 | br.ViewDiff(sn) |
| 101 | }) |
| 102 | } |
| 103 | |
| 104 | // DiffDirs creates a tree of files within the two paths, |
| 105 | // where the files have the same names, yet differ in content. |
nothing calls this directly
no test coverage detected