aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-06 15:44:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-07 11:31:53 +0200
commit6f9a7593646c6af0d4f19af2f669ce28b6e30cab (patch)
treedd1e16a34fafff9635381e21e99c65421ed5cbf4 /ui
parenttunnel: perform full stop on shutdown (diff)
downloadwireguard-windows-6f9a7593646c6af0d4f19af2f669ce28b6e30cab.tar.xz
wireguard-windows-6f9a7593646c6af0d4f19af2f669ce28b6e30cab.zip
global: cleanup TODO comment spacing
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--ui/editdialog.go2
-rw-r--r--ui/iconprovider.go6
-rw-r--r--ui/listview.go4
-rw-r--r--ui/tray.go2
-rw-r--r--ui/tunnelspage.go4
5 files changed, 9 insertions, 9 deletions
diff --git a/ui/editdialog.go b/ui/editdialog.go
index 27c22eb3..f1d7fac5 100644
--- a/ui/editdialog.go
+++ b/ui/editdialog.go
@@ -118,7 +118,7 @@ func runTunnelEditDialog(owner walk.Form, tunnel *manager.Tunnel, clone bool) *c
}
if tunnel != nil && !clone {
- dlg.nameEdit.SetFocus() //TODO: This works around a walk issue with scrolling in weird ways <https://github.com/lxn/walk/issues/505>. We should fix this in walk instead of here.
+ dlg.nameEdit.SetFocus() // TODO: This works around a walk issue with scrolling in weird ways <https://github.com/lxn/walk/issues/505>. We should fix this in walk instead of here.
dlg.Starting().Attach(func() {
dlg.syntaxEdit.SetFocus()
diff --git a/ui/iconprovider.go b/ui/iconprovider.go
index 9a9d7aeb..c38eac69 100644
--- a/ui/iconprovider.go
+++ b/ui/iconprovider.go
@@ -36,7 +36,7 @@ func iconWithOverlayForState(state manager.TunnelState, size int) (icon walk.Ima
}
if state == manager.TunnelStopped {
- return wireguardIcon, err //TODO: if we find something prettier than the gray dot, then remove this clause
+ return wireguardIcon, err // TODO: if we find something prettier than the gray dot, then remove this clause
}
iconSize := wireguardIcon.Size()
@@ -74,9 +74,9 @@ func iconForState(state manager.TunnelState, size int) (icon *walk.Icon, err err
case manager.TunnelStarted:
icon, err = loadSystemIcon("imageres", 101, size)
case manager.TunnelStopped:
- icon, err = walk.NewIconFromResourceWithSize("dot-gray.ico", walk.Size{size, size}) //TODO: replace with real icon
+ icon, err = walk.NewIconFromResourceWithSize("dot-gray.ico", walk.Size{size, size}) // TODO: replace with real icon
default:
- icon, err = loadSystemIcon("shell32", 238, size) //TODO: this doesn't look that great overlayed on the app icon
+ icon, err = loadSystemIcon("shell32", 238, size) // TODO: this doesn't look that great overlayed on the app icon
}
if err == nil {
cachedIconsForWidthAndState[widthAndState{size, state}] = icon
diff --git a/ui/listview.go b/ui/listview.go
index 71e5df48..9a15e725 100644
--- a/ui/listview.go
+++ b/ui/listview.go
@@ -198,10 +198,10 @@ func (tv *ListView) Load(asyncUI bool) {
for tunnel := range oldTunnels {
if !newTunnels[tunnel] {
for i, t := range tv.model.tunnels {
- //TODO: this is inefficient. Use a map here instead.
+ // TODO: this is inefficient. Use a map here instead.
if t.Name == tunnel.Name {
tv.model.tunnels = append(tv.model.tunnels[:i], tv.model.tunnels[i+1:]...)
- tv.model.PublishRowsRemoved(i, i) //TODO: Do we have to call that everytime or can we pass a range?
+ tv.model.PublishRowsRemoved(i, i) // TODO: Do we have to call that everytime or can we pass a range?
delete(tv.model.lastObservedState, t)
break
}
diff --git a/ui/tray.go b/ui/tray.go
index c08c06c5..26e06c4d 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -294,7 +294,7 @@ func (tray *Tray) SetTunnelState(tunnel *manager.Tunnel, state manager.TunnelSta
case manager.TunnelStopped:
tunnelAction.SetChecked(false)
if wasChecked && showNotifications {
- icon, _ := loadSystemIcon("imageres", 26, 128) //TODO: this icon isn't very good...
+ icon, _ := loadSystemIcon("imageres", 26, 128) // TODO: this icon isn't very good...
tray.ShowCustom("WireGuard Deactivated", fmt.Sprintf("The %s tunnel has been deactivated.", tunnel.Name), icon)
}
}
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go
index 11b2acd6..bbeb203c 100644
--- a/ui/tunnelspage.go
+++ b/ui/tunnelspage.go
@@ -55,7 +55,7 @@ func NewTunnelsPage() (*TunnelsPage, error) {
vlayout.SetSpacing(0)
tp.listContainer.SetLayout(vlayout)
- //TODO: deal with remaining disposables in case the next line fails
+ // TODO: deal with remaining disposables in case the next line fails
if tp.listView, err = NewListView(tp.listContainer); err != nil {
return nil, err
@@ -97,7 +97,7 @@ func NewTunnelsPage() (*TunnelsPage, error) {
disposables.Spare()
- //TODO: expose walk.TableView.itemCountChangedPublisher.Event()
+ // TODO: expose walk.TableView.itemCountChangedPublisher.Event()
tp.listView.Property("ItemCount").Changed().Attach(tp.onTunnelsChanged)
tp.listView.SelectedIndexesChanged().Attach(tp.onSelectedTunnelsChanged)
tp.listView.ItemActivated().Attach(tp.onTunnelsViewItemActivated)