aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-08-29 14:33:30 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-30 08:47:21 -0600
commitc61896ee2718cefba3b02fa6c69ad4a71e688caa (patch)
tree87e2e3739e1a893e6d1fe09a43874d3e8d8c8d55 /ui
parentmain: display localized "Administrators" group name (diff)
downloadwireguard-windows-c61896ee2718cefba3b02fa6c69ad4a71e688caa.tar.xz
wireguard-windows-c61896ee2718cefba3b02fa6c69ad4a71e688caa.zip
ui: add label mnemonics
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'ui')
-rw-r--r--ui/aboutdialog.go6
-rw-r--r--ui/confview.go4
-rw-r--r--ui/editdialog.go8
-rw-r--r--ui/logpage.go2
-rw-r--r--ui/managewindow.go2
-rw-r--r--ui/tray.go2
-rw-r--r--ui/tunnelspage.go18
7 files changed, 20 insertions, 22 deletions
diff --git a/ui/aboutdialog.go b/ui/aboutdialog.go
index 89b55669..5a7d6127 100644
--- a/ui/aboutdialog.go
+++ b/ui/aboutdialog.go
@@ -108,15 +108,13 @@ func runAboutDialog(owner walk.Form) error {
}
closePB.SetAlignment(walk.AlignHCenterVNear)
closePB.SetText("Close")
- closePB.Clicked().Attach(func() {
- dlg.Accept()
- })
+ closePB.Clicked().Attach(dlg.Accept)
donatePB, err := walk.NewPushButton(buttonCP)
if err != nil {
return err
}
donatePB.SetAlignment(walk.AlignHCenterVNear)
- donatePB.SetText("♥ Donate!")
+ donatePB.SetText("♥ &Donate!")
donatePB.Clicked().Attach(func() {
if easterEggIndex == -1 {
easterEggIndex = 0
diff --git a/ui/confview.go b/ui/confview.go
index 6d088fdc..c748d2af 100644
--- a/ui/confview.go
+++ b/ui/confview.go
@@ -220,9 +220,9 @@ func (tal *toggleActiveLine) update(state manager.TunnelState) {
switch state {
case manager.TunnelStarted:
- text = "Deactivate"
+ text = "&Deactivate"
case manager.TunnelStopped:
- text = "Activate"
+ text = "&Activate"
case manager.TunnelStarting, manager.TunnelStopping:
text = textForState(state, true)
default:
diff --git a/ui/editdialog.go b/ui/editdialog.go
index fec2f4d2..142d47a2 100644
--- a/ui/editdialog.go
+++ b/ui/editdialog.go
@@ -86,7 +86,7 @@ func newEditDialog(owner walk.Form, tunnel *manager.Tunnel) (*EditDialog, error)
}
layout.SetRange(nameLabel, walk.Rectangle{0, 0, 1, 1})
nameLabel.SetTextAlignment(walk.AlignHFarVCenter)
- nameLabel.SetText("Name:")
+ nameLabel.SetText("&Name:")
if dlg.nameEdit, err = walk.NewLineEdit(dlg); err != nil {
return nil, err
@@ -100,7 +100,7 @@ func newEditDialog(owner walk.Form, tunnel *manager.Tunnel) (*EditDialog, error)
}
layout.SetRange(pubkeyLabel, walk.Rectangle{0, 1, 1, 1})
pubkeyLabel.SetTextAlignment(walk.AlignHFarVCenter)
- pubkeyLabel.SetText("Public key:")
+ pubkeyLabel.SetText("&Public key:")
if dlg.pubkeyEdit, err = walk.NewLineEdit(dlg); err != nil {
return nil, err
@@ -125,7 +125,7 @@ func newEditDialog(owner walk.Form, tunnel *manager.Tunnel) (*EditDialog, error)
if dlg.blockUntunneledTrafficCB, err = walk.NewCheckBox(buttonsContainer); err != nil {
return nil, err
}
- dlg.blockUntunneledTrafficCB.SetText("Block untunneled traffic (kill-switch)")
+ dlg.blockUntunneledTrafficCB.SetText("&Block untunneled traffic (kill-switch)")
dlg.blockUntunneledTrafficCB.SetToolTipText("When a configuration has exactly one peer, and that peer has an allowed IPs containing at least one of 0.0.0.0/0 or ::/0, then the tunnel service engages a firewall ruleset to block all traffic that is neither to nor from the tunnel interface, with special exceptions for DHCP and NDP.")
dlg.blockUntunneledTrafficCB.SetVisible(false)
dlg.blockUntunneledTrafficCB.CheckedChanged().Attach(dlg.onBlockUntunneledTrafficCBCheckedChanged)
@@ -135,7 +135,7 @@ func newEditDialog(owner walk.Form, tunnel *manager.Tunnel) (*EditDialog, error)
if dlg.saveButton, err = walk.NewPushButton(buttonsContainer); err != nil {
return nil, err
}
- dlg.saveButton.SetText("Save")
+ dlg.saveButton.SetText("&Save")
dlg.saveButton.Clicked().Attach(dlg.onSaveButtonClicked)
cancelButton, err := walk.NewPushButton(buttonsContainer)
diff --git a/ui/logpage.go b/ui/logpage.go
index e4cfe603..a4ad8e1c 100644
--- a/ui/logpage.go
+++ b/ui/logpage.go
@@ -106,7 +106,7 @@ func NewLogPage() (*LogPage, error) {
if err != nil {
return nil, err
}
- saveButton.SetText("Save")
+ saveButton.SetText("&Save")
saveButton.Clicked().Attach(lp.onSave)
disposables.Spare()
diff --git a/ui/managewindow.go b/ui/managewindow.go
index 963fc70d..0a4a5114 100644
--- a/ui/managewindow.go
+++ b/ui/managewindow.go
@@ -112,7 +112,7 @@ func NewManageTunnelsWindow() (*ManageTunnelsWindow, error) {
CbSize: uint32(unsafe.Sizeof(win.MENUITEMINFO{})),
FMask: win.MIIM_ID | win.MIIM_STRING | win.MIIM_FTYPE,
FType: win.MIIM_STRING,
- DwTypeData: windows.StringToUTF16Ptr("About WireGuard..."),
+ DwTypeData: windows.StringToUTF16Ptr("&About WireGuard..."),
WID: uint32(aboutWireGuardCmd),
})
win.InsertMenuItem(systemMenu, 1, true, &win.MENUITEMINFO{
diff --git a/ui/tray.go b/ui/tray.go
index 93b12c4c..2d6814e1 100644
--- a/ui/tray.go
+++ b/ui/tray.go
@@ -84,7 +84,7 @@ func (tray *Tray) setup() error {
{label: "&Import tunnel(s) from file...", handler: tray.onImport, enabled: true},
{separator: true},
{label: "&About WireGuard...", handler: tray.onAbout, enabled: true},
- {label: "&Exit", handler: onQuit, enabled: true},
+ {label: "E&xit", handler: onQuit, enabled: true},
} {
var action *walk.Action
if item.separator {
diff --git a/ui/tunnelspage.go b/ui/tunnelspage.go
index 09acec3d..3d86dc86 100644
--- a/ui/tunnelspage.go
+++ b/ui/tunnelspage.go
@@ -101,7 +101,7 @@ func NewTunnelsPage() (*TunnelsPage, error) {
tp.listView.CurrentIndexChanged().Attach(func() {
editTunnel.SetEnabled(tp.listView.CurrentIndex() > -1)
})
- editTunnel.SetText("Edit")
+ editTunnel.SetText("&Edit")
editTunnel.Clicked().Attach(tp.onEditTunnel)
disposables.Spare()
@@ -142,7 +142,7 @@ func (tp *TunnelsPage) CreateToolbar() error {
}
tp.AddDisposable(addMenu)
importAction := walk.NewAction()
- importAction.SetText("Import tunnel(s) from file...")
+ importAction.SetText("&Import tunnel(s) from file...")
importActionIcon, _ := loadSystemIcon("imageres", 3, 16)
importAction.SetImage(importActionIcon)
importAction.SetShortcut(walk.Shortcut{walk.ModControl, walk.KeyO})
@@ -150,7 +150,7 @@ func (tp *TunnelsPage) CreateToolbar() error {
importAction.Triggered().Attach(tp.onImport)
addMenu.Actions().Add(importAction)
addAction := walk.NewAction()
- addAction.SetText("Add empty tunnel...")
+ addAction.SetText("Add &empty tunnel...")
addActionIcon, _ := loadSystemIcon("imageres", 2, 16)
addAction.SetImage(addActionIcon)
addAction.SetShortcut(walk.Shortcut{walk.ModControl, walk.KeyN})
@@ -201,37 +201,37 @@ func (tp *TunnelsPage) CreateToolbar() error {
contextMenu.Actions().Add(toggleAction)
contextMenu.Actions().Add(walk.NewSeparatorAction())
importAction2 := walk.NewAction()
- importAction2.SetText("Import tunnel(s) from file...")
+ importAction2.SetText("&Import tunnel(s) from file...")
importAction2.SetShortcut(walk.Shortcut{walk.ModControl, walk.KeyO})
importAction2.Triggered().Attach(tp.onImport)
contextMenu.Actions().Add(importAction2)
tp.ShortcutActions().Add(importAction2)
addAction2 := walk.NewAction()
- addAction2.SetText("Add empty tunnel...")
+ addAction2.SetText("Add &empty tunnel...")
addAction2.SetShortcut(walk.Shortcut{walk.ModControl, walk.KeyN})
addAction2.Triggered().Attach(tp.onAddTunnel)
contextMenu.Actions().Add(addAction2)
tp.ShortcutActions().Add(addAction2)
exportAction2 := walk.NewAction()
- exportAction2.SetText("Export all tunnels to zip...")
+ exportAction2.SetText("Export all tunnels to &zip...")
exportAction2.Triggered().Attach(tp.onExportTunnels)
contextMenu.Actions().Add(exportAction2)
contextMenu.Actions().Add(walk.NewSeparatorAction())
editAction := walk.NewAction()
- editAction.SetText("Edit selected tunnel...")
+ editAction.SetText("Edit &selected tunnel...")
editAction.SetShortcut(walk.Shortcut{walk.ModControl, walk.KeyE})
editAction.Triggered().Attach(tp.onEditTunnel)
contextMenu.Actions().Add(editAction)
tp.ShortcutActions().Add(editAction)
deleteAction2 := walk.NewAction()
- deleteAction2.SetText("Remove selected tunnel(s)")
+ deleteAction2.SetText("&Remove selected tunnel(s)")
deleteAction2.SetShortcut(walk.Shortcut{0, walk.KeyDelete})
deleteAction2.Triggered().Attach(tp.onDelete)
contextMenu.Actions().Add(deleteAction2)
tp.listView.ShortcutActions().Add(deleteAction2)
tp.listView.SetContextMenu(contextMenu)
selectAllAction := walk.NewAction()
- selectAllAction.SetText("Select all")
+ selectAllAction.SetText("Select &all")
selectAllAction.SetShortcut(walk.Shortcut{walk.ModControl, walk.KeyA})
selectAllAction.Triggered().Attach(tp.onSelectAll)
contextMenu.Actions().Add(selectAllAction)