diff options
-rw-r--r-- | ui/tray.go | 5 | ||||
-rw-r--r-- | ui/tunnelspage.go | 1 |
2 files changed, 4 insertions, 2 deletions
@@ -63,12 +63,13 @@ func (tray *Tray) setup() error { enabled bool hidden bool separator bool + defawlt bool }{ {label: "Status: Unknown"}, {label: "Networks: None", hidden: true}, {separator: true}, {separator: true}, - {label: "&Manage tunnels...", handler: tray.onManageTunnels, enabled: true}, + {label: "&Manage tunnels...", handler: tray.onManageTunnels, enabled: true, defawlt: 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}, @@ -82,6 +83,7 @@ func (tray *Tray) setup() error { action.SetText(item.label) action.SetEnabled(item.enabled) action.SetVisible(!item.hidden) + action.SetDefault(item.defawlt) if item.handler != nil { action.Triggered().Attach(item.handler) } @@ -292,7 +294,6 @@ func (tray *Tray) UpdateFound() { if icon, err := iconProvider.UpdateAvailableImage(); err == nil { action.SetImage(icon) } - //TODO: Make bold action.Triggered().Attach(func() { tray.mtw.Show() tray.mtw.tabs.SetCurrentIndex(2) diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go index 18e9e255..dc86d776 100644 --- a/ui/tunnelspage.go +++ b/ui/tunnelspage.go @@ -134,6 +134,7 @@ func (tp *TunnelsPage) CreateToolbar() { importActionImage, _ := walk.NewBitmapFromIcon(importActionIcon, imageSize) importAction.SetImage(importActionImage) importAction.SetShortcut(walk.Shortcut{walk.ModControl, walk.KeyO}) + importAction.SetDefault(true) importAction.Triggered().Attach(tp.onImport) addAction := walk.NewAction() addAction.SetText("Add empty tunnel") |