Skip to content

Commit eadd849

Browse files
committed
Addressed first batch of comments
Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
1 parent cfabf39 commit eadd849

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

packages/core/i18n/nls.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -445,24 +445,12 @@
445445
"confirmCloseNever": "Never confirm.",
446446
"enableCopy": "Enable ctrl-c (cmd-c on macOS) to copy selected text",
447447
"enablePaste": "Enable ctrl-v (cmd-v on macOS) to paste from clipboard",
448-
"profileNew": "New Terminal...",
449-
"profileDefault": "Choose Default Profile...",
450-
"selectProfile": "Select a profile for the new terminal",
451448
"shellArgsLinux": "The command line arguments to use when on the Linux terminal.",
452449
"shellArgsOsx": "The command line arguments to use when on the macOS terminal.",
453450
"shellArgsWindows": "The command line arguments to use when on the Windows terminal.",
454451
"shellLinux": "The path of the shell that the terminal uses on Linux (default: '{0}'}).",
455452
"shellOsx": "The path of the shell that the terminal uses on macOS (default: '{0}'}).",
456453
"shellWindows": "The path of the shell that the terminal uses on Windows. (default: '{0}').",
457-
"shell.deprecated": "This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in 'terminal.integrated.profiles.{0}' and setting its profile name as the default in 'terminal.integrated.defaultProfile.{0}'.",
458-
"defaultProfile": "The default profile used on {0}",
459-
"profiles": "The profiles to present when creating a new terminal. Set the path property manually with optional args. \n\nSet an existing profile to `null` to hide the profile from the list, for example: `{0}: null`.",
460-
"profilePath": "The path of the shell that this profile uses.",
461-
"profileSource": "A profile source that will auto detect the paths to the shell. Note that non-standard executable locations are not supported and must be created manually in a new profile.",
462-
"profileArgs": "The shell arguments that this profile uses.",
463-
"profileEnv": "An object with environment variables that will be added to the terminal profile process. Set to `null` to delete environment variables from the base environment.",
464-
"profileIcon": "A codicon ID to associate with the terminal icon. \nterminal-tmux:\"$(terminal-tmux)\"",
465-
"profileColor": "A terminal theme color ID to associate with the terminal.",
466454
"terminate": "Terminate",
467455
"terminateActive": "Do you want to terminate the active terminal session?",
468456
"terminateActiveMultiple": "Do you want to terminate the {0} active terminal sessions?"

packages/terminal/src/browser/terminal-frontend-contribution.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import {
2727
Emitter,
2828
Event,
2929
ViewColumn,
30-
OS,
31-
isWindows
30+
OS
3231
} from '@theia/core/lib/common';
3332
import {
3433
ApplicationShell, KeybindingContribution, KeyCode, Key, WidgetManager, PreferenceService,
@@ -258,7 +257,7 @@ export class TerminalFrontendContribution implements FrontendApplicationContribu
258257
this.profileService.onAdded(id => {
259258
// extension contributions get read after this point: need to set the default profile if necessary
260259
let defaultProfileId;
261-
switch (OS.type()) {
260+
switch (OS.backend.type()) {
262261
case OS.Type.Windows: {
263262
defaultProfileId = this.terminalPreferences['terminal.integrated.defaultProfile.windows'];
264263
break;
@@ -277,7 +276,7 @@ export class TerminalFrontendContribution implements FrontendApplicationContribu
277276
}
278277

279278
async contributeDefaultProfiles(): Promise<void> {
280-
if (isWindows) {
279+
if (OS.backend.isWindows) {
281280
this.contributedProfileStore.registerTerminalProfile('cmd', new ShellTerminalProfile(this, {
282281
shellPath: await this.resolveShellPath([
283282
'${env:windir}\\Sysnative\\cmd.exe',
@@ -300,7 +299,7 @@ export class TerminalFrontendContribution implements FrontendApplicationContribu
300299
let legacyShellPath: string | undefined;
301300
let legacyShellArgs: string[] | undefined;
302301
const removed = new Set(this.userProfileStore.all.map(([id, profile]) => id));
303-
switch (OS.type()) {
302+
switch (OS.backend.type()) {
304303
case OS.Type.Windows: {
305304
profiles = this.terminalPreferences['terminal.integrated.profiles.windows'];
306305
defaultProfile = this.terminalPreferences['terminal.integrated.defaultProfile.windows'];
@@ -968,7 +967,7 @@ export class TerminalFrontendContribution implements FrontendApplicationContribu
968967
return;
969968
}
970969

971-
this.preferenceService.set(`terminal.integrated.defaultProfile.${OS.type().toLowerCase()}`, result[0], PreferenceScope.User);
970+
this.preferenceService.set(`terminal.integrated.defaultProfile.${OS.backend.type().toLowerCase()}`, result[0], PreferenceScope.User);
972971
}
973972

974973
protected async openActiveWorkspaceTerminal(options?: ApplicationShell.WidgetOptions): Promise<void> {

packages/terminal/src/browser/terminal-preferences.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const commonProfileProperties: PreferenceSchemaProperties = {
3838
},
3939
icon: {
4040
type: 'string',
41-
markdownDescription: nls.localize('theia/terminal/profileIcon', 'A codicon ID to associate with the terminal icon. \nterminal-tmux:"$(terminal-tmux)"')
41+
markdownDescription: nls.localize('theia/terminal/profileIcon', 'A codicon ID to associate with the terminal icon.\nterminal-tmux:"$(terminal-tmux)"')
4242
},
4343
color: {
4444
type: 'string',

packages/terminal/src/browser/terminal-widget-impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ export class TerminalWidgetImpl extends TerminalWidget implements StatefulWidget
492492
const { cols, rows } = this.term;
493493

494494
const terminalId = await this.shellTerminalServer.create({
495-
shell: this.options.shellPath || this.shellPreferences.shell[OS.type()],
496-
args: this.options.shellArgs || this.shellPreferences.shellArgs[OS.type()],
495+
shell: this.options.shellPath || this.shellPreferences.shell[OS.backend.type()],
496+
args: this.options.shellArgs || this.shellPreferences.shellArgs[OS.backend.type()],
497497
env: this.options.env,
498498
strictEnv: this.options.strictEnv,
499499
isPseudo: this.options.isPseudoTerminal,

0 commit comments

Comments
 (0)