mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
adopt browser window and dialog
This commit is contained in:
@@ -18,10 +18,7 @@ import {IStorageService} from 'vs/platform/storage/common/storage';
|
||||
import {IEventService} from 'vs/platform/event/common/event';
|
||||
import {IWorkspaceContextService} from 'vs/platform/workspace/common/workspace';
|
||||
|
||||
import remote = require('remote');
|
||||
import {ipcRenderer as ipc, shell} from 'electron';
|
||||
|
||||
const Dialog = remote.require('dialog');
|
||||
import {ipcRenderer as ipc, shell, remote} from 'electron';
|
||||
|
||||
export interface IWindowConfiguration {
|
||||
window: {
|
||||
@@ -32,10 +29,10 @@ export interface IWindowConfiguration {
|
||||
}
|
||||
|
||||
export class ElectronWindow {
|
||||
private win: remote.BrowserWindow;
|
||||
private win: Electron.BrowserWindow;
|
||||
|
||||
constructor(
|
||||
win: remote.BrowserWindow,
|
||||
win: Electron.BrowserWindow,
|
||||
shellContainer: HTMLElement,
|
||||
@IWorkspaceContextService private contextService: IWorkspaceContextService,
|
||||
@IEventService private eventService: IEventService,
|
||||
@@ -157,8 +154,8 @@ export class ElectronWindow {
|
||||
this.win.close();
|
||||
}
|
||||
|
||||
public showMessageBox(options: remote.IMessageBoxOptions): number {
|
||||
return Dialog.showMessageBox(this.win, options);
|
||||
public showMessageBox(options: Electron.Dialog.ShowMessageBoxOptions): number {
|
||||
return remote.dialog.showMessageBox(this.win, options);
|
||||
}
|
||||
|
||||
public setFullScreen(fullscreen: boolean): void {
|
||||
@@ -166,7 +163,7 @@ export class ElectronWindow {
|
||||
}
|
||||
|
||||
public openDevTools(): void {
|
||||
this.win.openDevTools();
|
||||
this.win.webContents.openDevTools();
|
||||
}
|
||||
|
||||
public isFullScreen(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user