mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user