aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/tunnelspage.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-25 19:41:55 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-26 13:28:17 +0200
commit37acc66edce0d76ac364d9121d4491853f2e2542 (patch)
tree4a95b67fc1ac9bae321a0a4f6997f245070e2cea /ui/tunnelspage.go
parentui: bind shortcuts using new api (diff)
downloadwireguard-windows-37acc66edce0d76ac364d9121d4491853f2e2542.tar.xz
wireguard-windows-37acc66edce0d76ac364d9121d4491853f2e2542.zip
ui: remove clone
Diffstat (limited to 'ui/tunnelspage.go')
-rw-r--r--ui/tunnelspage.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go
index 26a0a291..64b081de 100644
--- a/ui/tunnelspage.go
+++ b/ui/tunnelspage.go
@@ -203,10 +203,6 @@ func (tp *TunnelsPage) CreateToolbar() {
editAction.Triggered().Attach(tp.onEditTunnel)
contextMenu.Actions().Add(editAction)
tp.ShortcutActions().Add(editAction)
- cloneAction := walk.NewAction()
- cloneAction.SetText("Clone selected tunnel...")
- cloneAction.Triggered().Attach(tp.onCloneTunnel)
- contextMenu.Actions().Add(cloneAction)
deleteAction2 := walk.NewAction()
deleteAction2.SetText("Remove selected tunnel(s)")
deleteAction2.SetShortcut(walk.Shortcut{0, walk.KeyDelete})
@@ -230,7 +226,6 @@ func (tp *TunnelsPage) CreateToolbar() {
toggleAction.SetEnabled(selected == 1)
selectAllAction.SetEnabled(selected < all)
editAction.SetEnabled(selected == 1)
- cloneAction.SetEnabled(selected == 1)
}
tp.listView.SelectedIndexesChanged().Attach(setSelectionOrientedOptions)
setSelectionOrientedOptions()
@@ -424,7 +419,7 @@ func (tp *TunnelsPage) onEditTunnel() {
return
}
- if config := runTunnelEditDialog(tp.Form(), tunnel, false); config != nil {
+ if config := runTunnelEditDialog(tp.Form(), tunnel); config != nil {
go func() {
priorState, err := tunnel.State()
tunnel.Delete()
@@ -437,20 +432,8 @@ func (tp *TunnelsPage) onEditTunnel() {
}
}
-func (tp *TunnelsPage) onCloneTunnel() {
- tunnel := tp.listView.CurrentTunnel()
- if tunnel == nil {
- return
- }
-
- if config := runTunnelEditDialog(tp.Form(), tunnel, true); config != nil {
- // Save new
- tp.addTunnel(config)
- }
-}
-
func (tp *TunnelsPage) onAddTunnel() {
- if config := runTunnelEditDialog(tp.Form(), nil, false); config != nil {
+ if config := runTunnelEditDialog(tp.Form(), nil); config != nil {
// Save new
tp.addTunnel(config)
}