aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/tunnelspage.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/tunnelspage.go')
-rw-r--r--ui/tunnelspage.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go
index 10bf2f8e..d104f598 100644
--- a/ui/tunnelspage.go
+++ b/ui/tunnelspage.go
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
- * Copyright (C) 2019-2021 WireGuard LLC. All Rights Reserved.
+ * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
*/
package ui
@@ -91,8 +91,9 @@ func NewTunnelsPage() (*TunnelsPage, error) {
if err != nil {
return nil, err
}
- controlsContainer.SetLayout(walk.NewHBoxLayout())
- controlsContainer.Layout().SetMargins(walk.Margins{})
+ hlayout = walk.NewHBoxLayout()
+ hlayout.SetMargins(walk.Margins{})
+ controlsContainer.SetLayout(hlayout)
walk.NewHSpacer(controlsContainer)
@@ -279,7 +280,7 @@ func (tp *TunnelsPage) updateConfView() {
func (tp *TunnelsPage) importFiles(paths []string) {
go func() {
- syncedMsgBox := func(title string, message string, flags walk.MsgBoxStyle) {
+ syncedMsgBox := func(title, message string, flags walk.MsgBoxStyle) {
tp.Synchronize(func() {
walk.MsgBox(tp.Form(), title, message, flags)
})
@@ -421,7 +422,6 @@ func (tp *TunnelsPage) addTunnel(config *conf.Config) {
if err != nil {
showErrorCustom(tp.Form(), l18n.Sprintf("Unable to create tunnel"), err.Error())
}
-
}
// Handlers
@@ -518,7 +518,6 @@ func (tp *TunnelsPage) onDelete() {
tunnelsToDelete := make([]manager.Tunnel, len(indices))
for i, j := range indices {
tunnelsToDelete[i] = tp.listView.model.tunnels[j]
-
}
go func() {
tp.listView.SetSuspendTunnelsUpdate(true)