Refresh master with initial release/0.24 snapshot (#332)

* Initial port of release/0.24 source code

* Fix additional headers

* Fix a typo in launch.json
This commit is contained in:
Karl Burtram
2017-12-15 15:38:57 -08:00
committed by GitHub
parent 271b3a0b82
commit 6ad0df0e3e
7118 changed files with 107999 additions and 56466 deletions

View File

@@ -47,7 +47,7 @@ export class ContextMenuService implements IContextMenuService {
y = elementPosition.top + elementPosition.height;
} else {
const pos = <{ x: number; y: number; }>anchor;
x = pos.x;
x = pos.x + 1; /* prevent first item from being selected automatically under mouse */
y = pos.y;
}
@@ -55,7 +55,7 @@ export class ContextMenuService implements IContextMenuService {
x *= zoom;
y *= zoom;
menu.popup(remote.getCurrentWindow(), Math.floor(x), Math.floor(y));
menu.popup(remote.getCurrentWindow(), { x: Math.floor(x), y: Math.floor(y), positioningItem: delegate.autoSelectFirstItem ? 0 : void 0 });
if (delegate.onHide) {
delegate.onHide(undefined);
}
@@ -78,7 +78,7 @@ export class ContextMenuService implements IContextMenuService {
menu.append(submenu);
} else {
const options: Electron.MenuItemOptions = {
const options: Electron.MenuItemConstructorOptions = {
label: unmnemonicLabel(e.label),
checked: !!e.checked || !!e.radio,
type: !!e.checked ? 'checkbox' : !!e.radio ? 'radio' : void 0,
@@ -111,6 +111,12 @@ export class ContextMenuService implements IContextMenuService {
}
private runAction(actionRunner: IActionRunner, actionToRun: IAction, delegate: IContextMenuDelegate, event: IEvent): void {
/* __GDPR__
"workbenchActionExecuted" : {
"id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.telemetryService.publicLog('workbenchActionExecuted', { id: actionToRun.id, from: 'contextMenu' });
const context = delegate.getActionsContext ? delegate.getActionsContext(event) : event;