提交 9e3408db 编写于 作者: D Daniel Imms

Merge pull request #6985 from Microsoft/tyriar/june

Tyriar changes for June
......@@ -270,6 +270,7 @@ function prepareDebPackage(arch) {
return function () {
var desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename('usr/share/applications/' + product.applicationName + '.desktop'));
......@@ -340,6 +341,7 @@ function prepareRpmPackage(arch) {
return function () {
var desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '.desktop'));
......
......@@ -2,11 +2,11 @@
Name=@@NAME_LONG@@
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/bin/@@NAME@@ %U
Exec=/usr/share/@@NAME@@/@@NAME@@ %U
Icon=@@NAME@@
Type=Application
StartupNotify=true
StartupWMClass=@@NAME@@
StartupWMClass=@@NAME_SHORT@@
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;
Actions=new-window;
......@@ -22,5 +22,5 @@ Name[ko]=새 창
Name[ru]=Новое окно
Name[zh_CN]=新建窗口
Name[zh_TW]=開新視窗
Exec=/usr/bin/@@NAME@@ --new-window %U
Exec=/usr/share/@@NAME@@/@@NAME@@ --new-window %U
Icon=@@NAME@@
......@@ -202,29 +202,42 @@ export class TerminalPanel extends Panel {
this.focusTerminal();
}
}));
this.toDispose.push(DOM.addDisposableListener(this.parentDomElement, 'keyup', (event: KeyboardEvent) => {
// Keep terminal open on escape
if (event.keyCode === 27) {
event.stopPropagation();
}
}));
this.toDispose.push(this.themeService.onDidThemeChange((themeId) => {
this.setTerminalTheme(themeId);
this.setTerminalTheme();
}));
this.toDispose.push(this.configurationService.onDidUpdateConfiguration((e) => {
this.setTerminalFont();
}));
this.terminal.open(this.terminalDomElement);
this.parentDomElement.appendChild(terminalScrollbar.getDomNode());
let config = this.configurationService.getConfiguration<ITerminalConfiguration>();
this.terminalDomElement.style.fontFamily = config.terminal.integrated.fontFamily;
this.setTerminalTheme(this.themeService.getTheme());
this.setTerminalFont();
this.setTerminalTheme();
resolve(void 0);
});
}
private setTerminalTheme(themeId: string) {
private setTerminalTheme() {
if (!this.terminal) {
return;
}
let baseThemeId = getBaseThemeId(themeId);
let baseThemeId = getBaseThemeId(this.themeService.getTheme());
this.terminal.colors = DEFAULT_ANSI_COLORS[baseThemeId];
this.terminal.refresh(0, this.terminal.rows);
}
private setTerminalFont() {
let config = this.configurationService.getConfiguration<ITerminalConfiguration>();
this.terminalDomElement.style.fontFamily = config.terminal.integrated.fontFamily;
}
public focus(): void {
this.focusTerminal(true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册