Skip to content

Commit

Permalink
Move terminalPanel, electron-browser->browser
Browse files Browse the repository at this point in the history
Part of #69115
  • Loading branch information
Tyriar committed Mar 5, 2019
1 parent 5b7bdac commit 3760c27
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/tsconfig.strictNullChecks.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@
"./vs/workbench/contrib/terminal/browser/terminalActions.ts",
"./vs/workbench/contrib/terminal/browser/terminalFindWidget.ts",
"./vs/workbench/contrib/terminal/browser/terminalLinkHandler.ts",
"./vs/workbench/contrib/terminal/browser/terminalPanel.ts",
"./vs/workbench/contrib/terminal/browser/terminalQuickOpen.ts",
"./vs/workbench/contrib/terminal/browser/terminalTab.ts",
"./vs/workbench/contrib/terminal/browser/terminalWidgetManager.ts",
Expand All @@ -292,7 +293,6 @@
"./vs/workbench/contrib/terminal/common/terminalService.ts",
"./vs/workbench/contrib/terminal/electron-browser/terminalConfigHelper.ts",
"./vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts",
"./vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts",
"./vs/workbench/contrib/terminal/electron-browser/terminalProcessManager.ts",
"./vs/workbench/contrib/terminal/node/terminal.ts",
"./vs/workbench/contrib/terminal/node/terminalCommandTracker.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { URI } from 'vs/base/common/uri';
import { TERMINAL_BACKGROUND_COLOR, TERMINAL_BORDER_COLOR } from 'vs/workbench/contrib/terminal/common/terminalColorRegistry';
import { DataTransfers } from 'vs/base/browser/dnd';
import { INotificationService, IPromptChoice, Severity } from 'vs/platform/notification/common/notification';
import { TerminalConfigHelper } from 'vs/workbench/contrib/terminal/electron-browser/terminalConfigHelper';
import { IStorageService } from 'vs/platform/storage/common/storage';

const FIND_FOCUS_CLASS = 'find-focused';
Expand Down Expand Up @@ -82,14 +81,12 @@ export class TerminalPanel extends Panel {

if (e.affectsConfiguration('terminal.integrated.fontFamily') || e.affectsConfiguration('editor.fontFamily')) {
const configHelper = this._terminalService.configHelper;
if (configHelper instanceof TerminalConfigHelper) {
if (!configHelper.configFontIsMonospace()) {
const choices: IPromptChoice[] = [{
label: nls.localize('terminal.useMonospace', "Use 'monospace'"),
run: () => this._configurationService.updateValue('terminal.integrated.fontFamily', 'monospace'),
}];
this._notificationService.prompt(Severity.Warning, nls.localize('terminal.monospaceOnly', "The terminal only supports monospace fonts."), choices);
}
if (!configHelper.configFontIsMonospace()) {
const choices: IPromptChoice[] = [{
label: nls.localize('terminal.useMonospace', "Use 'monospace'"),
run: () => this._configurationService.updateValue('terminal.integrated.fontFamily', 'monospace'),
}];
this._notificationService.prompt(Severity.Warning, nls.localize('terminal.monospaceOnly', "The terminal only supports monospace fonts."), choices);
}
}
}));
Expand Down
1 change: 1 addition & 0 deletions src/vs/workbench/contrib/terminal/common/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export interface ITerminalConfiguration {

export interface ITerminalConfigHelper {
config: ITerminalConfiguration;
configFontIsMonospace(): boolean;
getFont(): ITerminalFont;
/**
* Merges the default shell path and args into the provided launch configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { getQuickNavigateHandler } from 'vs/workbench/browser/parts/quickopen/qu
import { IQuickOpenRegistry, Extensions as QuickOpenExtensions, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen';
import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actions';
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import { TerminalPanel } from 'vs/workbench/contrib/terminal/electron-browser/terminalPanel';
import { TerminalPanel } from 'vs/workbench/contrib/terminal/browser/terminalPanel';
import { TerminalPickerHandler } from 'vs/workbench/contrib/terminal/browser/terminalQuickOpen';
import { setupTerminalCommands, TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminalCommands';
import { setupTerminalMenu } from 'vs/workbench/contrib/terminal/common/terminalMenu';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { TerminalConfigHelper } from 'vs/workbench/contrib/terminal/electron-bro
import Severity from 'vs/base/common/severity';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { getDefaultShell } from 'vs/workbench/contrib/terminal/node/terminal';
import { TerminalPanel } from 'vs/workbench/contrib/terminal/electron-browser/terminalPanel';
import { TerminalPanel } from 'vs/workbench/contrib/terminal/browser/terminalPanel';
import { TerminalTab } from 'vs/workbench/contrib/terminal/browser/terminalTab';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { INotificationService } from 'vs/platform/notification/common/notification';
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/workbench.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ import 'vs/workbench/contrib/output/browser/outputPanel';
// Terminal
import 'vs/workbench/contrib/terminal/electron-browser/terminal.contribution';
import 'vs/workbench/contrib/terminal/browser/terminalQuickOpen';
import 'vs/workbench/contrib/terminal/electron-browser/terminalPanel';
import 'vs/workbench/contrib/terminal/browser/terminalPanel';

// Relauncher
import 'vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution';
Expand Down

0 comments on commit 3760c27

Please sign in to comment.