aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/tray.go
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2019-04-24 15:29:38 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-04-24 15:42:51 +0200
commit4a0ee91473619db8a2c8a100758f1c24c39e7e39 (patch)
tree5df163a3e81b948fdf05f26429739d12b41ffc2e /ui/tray.go
parentui: programmatically compute colors (diff)
downloadwireguard-windows-4a0ee91473619db8a2c8a100758f1c24c39e7e39.tar.xz
wireguard-windows-4a0ee91473619db8a2c8a100758f1c24c39e7e39.zip
ui: use tabs in main window and refactor tunnels ui and log dialog into tab pages
requires https://github.com/lxn/walk/commit/edb74ee350e9585ddd212acad445ec383950f2cc for status image background Signed-off-by: Alexander Neumann <alexander.neumann@picos-software.com>
Diffstat (limited to 'ui/tray.go')
-rw-r--r--ui/tray.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/tray.go b/ui/tray.go
index e15d2549..2650530d 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -68,7 +68,7 @@ func (tray *Tray) setup() error {
{separator: true},
{separator: true},
{label: "&Manage tunnels...", handler: tray.mtw.Show, enabled: true},
- {label: "&Import tunnel(s) from file...", handler: tray.mtw.onImport, enabled: true},
+ {label: "&Import tunnel(s) from file...", handler: tray.mtw.tunnelsPage.onImport, enabled: true},
{separator: true},
{label: "&About WireGuard", handler: func() { onAbout(tray.mtw) }, enabled: true},
{label: "&Quit", handler: onQuit, enabled: true},
@@ -98,8 +98,8 @@ func (tray *Tray) setup() error {
tray.addTunnelAction(tunnel.Name)
}
- tray.mtw.TunnelAdded().Attach(tray.addTunnelAction)
- tray.mtw.TunnelDeleted().Attach(tray.removeTunnelAction)
+ tray.mtw.tunnelsPage.TunnelAdded().Attach(tray.addTunnelAction)
+ tray.mtw.tunnelsPage.TunnelDeleted().Attach(tray.removeTunnelAction)
return nil
}
@@ -110,7 +110,7 @@ func (tray *Tray) addTunnelAction(tunnelName string) {
tunnelAction.SetEnabled(true)
tunnelAction.SetCheckable(true)
tunnelAction.Triggered().Attach(func() {
- if activeTunnel := tray.mtw.tunnelTracker.activeTunnel; activeTunnel != nil && activeTunnel.Name == tunnelName {
+ if activeTunnel := tray.mtw.tunnelsPage.tunnelTracker.activeTunnel; activeTunnel != nil && activeTunnel.Name == tunnelName {
tray.onDeactivateTunnel()
} else {
tray.onActivateTunnel(tunnelName)
@@ -148,7 +148,7 @@ func (tray *Tray) SetTunnelState(tunnel *service.Tunnel, state service.TunnelSta
}
func (tray *Tray) SetTunnelStateWithNotification(tunnel *service.Tunnel, state service.TunnelState, showNotifications bool) {
- if icon, err := tray.mtw.tunnelsView.imageProvider.IconWithOverlayForState(tray.icon, state); err == nil {
+ if icon, err := tray.mtw.tunnelsPage.tunnelsView.imageProvider.IconWithOverlayForState(tray.icon, state); err == nil {
tray.SetIcon(icon)
}