Skip to content

Commit 7f6f229

Browse files
authored
Merge branch 'main' into tyriar/210757_interrupt__cmdline
2 parents 21d25a3 + dd4b103 commit 7f6f229

34 files changed

+105968
-287
lines changed

build/win32/Cargo.lock

Lines changed: 98 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/win32/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "inno_updater"
3-
version = "0.11.0"
3+
version = "0.11.1"
44
authors = ["Microsoft <[email protected]>"]
55
build = "build.rs"
66

@@ -9,7 +9,7 @@ byteorder = "1.4.3"
99
crc = "3.0.1"
1010
slog = "2.7.0"
1111
slog-async = "2.7.0"
12-
slog-term = "2.9.0"
12+
slog-term = "2.9.1"
1313

1414
[target.'cfg(windows)'.dependencies.windows-sys]
1515
version = "0.42"

build/win32/inno_updater.exe

-5 KB
Binary file not shown.

src/vs/base/browser/ui/hover/hoverWidget.ts

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,8 @@ export class HoverAction extends Disposable {
6767
const label = dom.append(this.action, $('span'));
6868
label.textContent = keybindingLabel ? `${actionOptions.label} (${keybindingLabel})` : actionOptions.label;
6969

70-
this._register(dom.addDisposableListener(this.actionContainer, dom.EventType.CLICK, e => {
71-
e.stopPropagation();
72-
e.preventDefault();
73-
actionOptions.run(this.actionContainer);
74-
}));
75-
76-
this._register(dom.addDisposableListener(this.actionContainer, dom.EventType.KEY_DOWN, e => {
77-
const event = new StandardKeyboardEvent(e);
78-
if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) {
79-
e.stopPropagation();
80-
e.preventDefault();
81-
actionOptions.run(this.actionContainer);
82-
}
83-
}));
84-
70+
this._store.add(new ClickAction(this.actionContainer, actionOptions.run));
71+
this._store.add(new KeyDownAction(this.actionContainer, actionOptions.run, [KeyCode.Enter, KeyCode.Space]));
8572
this.setEnabled(true);
8673
}
8774

@@ -99,3 +86,28 @@ export class HoverAction extends Disposable {
9986
export function getHoverAccessibleViewHint(shouldHaveHint?: boolean, keybinding?: string | null): string | undefined {
10087
return shouldHaveHint && keybinding ? localize('acessibleViewHint', "Inspect this in the accessible view with {0}.", keybinding) : shouldHaveHint ? localize('acessibleViewHintNoKbOpen', "Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding.") : '';
10188
}
89+
90+
export class ClickAction extends Disposable {
91+
constructor(container: HTMLElement, run: (container: HTMLElement) => void) {
92+
super();
93+
this._register(dom.addDisposableListener(container, dom.EventType.CLICK, e => {
94+
e.stopPropagation();
95+
e.preventDefault();
96+
run(container);
97+
}));
98+
}
99+
}
100+
101+
export class KeyDownAction extends Disposable {
102+
constructor(container: HTMLElement, run: (container: HTMLElement) => void, keyCodes: KeyCode[]) {
103+
super();
104+
this._register(dom.addDisposableListener(container, dom.EventType.KEY_DOWN, e => {
105+
const event = new StandardKeyboardEvent(e);
106+
if (keyCodes.some(keyCode => event.equals(keyCode))) {
107+
e.stopPropagation();
108+
e.preventDefault();
109+
run(container);
110+
}
111+
}));
112+
}
113+
}

0 commit comments

Comments
 (0)