Skip to content

Commit

Permalink
Updated fore release 2.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Nov 1, 2020
1 parent 0295561 commit a33d1b4
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 23 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ An open source UI for [OpenXLIFF Filters](https://github.com/rmraya/OpenXLIFF) w

Version | Comment | Release Date
--------|---------|-------------
2.5.1 | Fixed JSON encoding and import of XLIFF matches | November 1, 2020
2.5.0 | Added support for JSON files | October 1, 2020
2.4.1 | Fixed support for TXLF files and improved XML catalog handling | September 5, 2020
2.4.0 | Allowed conversion of 3rd party XLIFF and improved support for XLIFF 2.0 | August 26, 2020
2.3.0 | Upgraded OpenXLIFF and TypeScript; updated layout and theme handling | August 14, 2020
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "xliffmanager",
"productName": "XLIFF Manager",
"version": "2.5.0",
"version": "2.5.1",
"description": "XLIFF Manager",
"main": "js/app.js",
"scripts": {
Expand All @@ -22,7 +22,7 @@
"url": "https://github.com/rmraya/XLIFFManager.git"
},
"devDependencies": {
"electron": "^10.1.3",
"typescript": "^4.0.3"
"electron": "^10.1.5",
"typescript": "^4.0.5"
}
}
6 changes: 2 additions & 4 deletions ts/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ class About {
(document.getElementById('theme') as HTMLLinkElement).href = arg;
});

this.electron.ipcRenderer.on('get-height', () => {
let body: HTMLBodyElement = document.getElementById('body') as HTMLBodyElement;
this.electron.ipcRenderer.send('about-height', { width: body.clientWidth, height: (body.clientHeight + 20) });
});
let body: HTMLBodyElement = document.getElementById('body') as HTMLBodyElement;
this.electron.ipcRenderer.send('about-height', { width: body.clientWidth, height: (body.clientHeight + 20) });
}
}

Expand Down
12 changes: 7 additions & 5 deletions ts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class App {
App.defaultsFile = App.path.join(app.getPath('appData'), app.name, 'defaults.json');
if (process.platform === 'win32') {
App.javapath = App.path.join(app.getAppPath(), 'bin', 'java.exe');
App.verticalPadding = 56;
} else {
App.javapath = App.path.join(app.getAppPath(), 'bin', 'java');
}
Expand All @@ -85,7 +86,7 @@ class App {
this.createMenu();
this.loadDefaults();
App.mainWindow.once('ready-to-show', (event: IpcMainEvent) => {
event.sender.send('get-height');
App.mainWindow.show();
setTimeout(() => {
App.checkUpdates(true);
}, 1000);
Expand Down Expand Up @@ -264,7 +265,6 @@ class App {
let rect: Rectangle = window.getBounds();
rect.height = arg.height + App.verticalPadding;
window.setBounds(rect);
window.show();
}

createWindow(): void {
Expand All @@ -282,7 +282,9 @@ class App {

saveDefaults(defaults: any): void {
writeFileSync(App.defaultsFile, JSON.stringify(defaults));
App.settingsWindow.close();
App.settingsWindow.hide();
App.settingsWindow.destroy();
App.mainWindow.focus();
this.loadDefaults();
this.setTheme();
}
Expand Down Expand Up @@ -750,7 +752,7 @@ class App {
App.aboutWindow.setMenu(null);
App.aboutWindow.loadURL('file://' + App.path.join(app.getAppPath(), 'html', 'about.html'));
App.aboutWindow.once('ready-to-show', (event: IpcMainEvent) => {
event.sender.send('get-height');
App.aboutWindow.show();
});
}

Expand Down Expand Up @@ -791,7 +793,7 @@ class App {
App.settingsWindow.setMenu(null);
App.settingsWindow.loadURL('file://' + App.path.join(app.getAppPath(), 'html', 'settings.html'));
App.settingsWindow.once('ready-to-show', (event: IpcMainEvent) => {
event.sender.send('get-height');
App.settingsWindow.show();
});
}

Expand Down
9 changes: 3 additions & 6 deletions ts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class Main {

electron = require('electron');
electron = require('electron');
languagesChanged: boolean = false;

constructor() {
Expand Down Expand Up @@ -42,11 +42,6 @@ class Main {
(document.getElementById('theme') as HTMLLinkElement).href = arg;
});

this.electron.ipcRenderer.on('get-height', () => {
let body: HTMLBodyElement = document.getElementById('body') as HTMLBodyElement;
this.electron.ipcRenderer.send('main-height', { width: body.clientWidth, height: body.clientHeight });
});

this.electron.ipcRenderer.on('add-source-file', (event: Electron.IpcRendererEvent, arg: any) => {
this.addSourceFile(arg);
});
Expand Down Expand Up @@ -122,6 +117,8 @@ class Main {
this.electron.ipcRenderer.on('add-ditaval-file', (event: Electron.IpcRendererEvent, arg: any) => {
(document.getElementById('ditavalFile') as HTMLInputElement).value = arg;
});
let body: HTMLBodyElement = document.getElementById('body') as HTMLBodyElement;
this.electron.ipcRenderer.send('main-height', { width: body.clientWidth, height: body.clientHeight });
}

startWaiting(): void {
Expand Down
7 changes: 2 additions & 5 deletions ts/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ class Settings {
(document.getElementById('theme') as HTMLLinkElement).href = arg;
});

this.electron.ipcRenderer.on('get-height', () => {
let body: HTMLBodyElement = document.getElementById('body') as HTMLBodyElement;
this.electron.ipcRenderer.send('settings-height', { width: body.clientWidth, height: body.clientHeight });
});

this.electron.ipcRenderer.on('set-defaultTheme', (event: Electron.IpcRendererEvent, arg: any) => {
(document.getElementById('themeColor') as HTMLSelectElement).value = arg;
});
Expand All @@ -56,6 +51,8 @@ class Settings {
this.electron.ipcRenderer.on('srx-received', (event: Electron.IpcRendererEvent, arg: any) => {
(document.getElementById('defaultSRX') as HTMLInputElement).value = arg;
});
let body: HTMLBodyElement = document.getElementById('body') as HTMLBodyElement;
this.electron.ipcRenderer.send('settings-height', { width: body.clientWidth, height: body.clientHeight });
}

languagesReceived(arg: any): void {
Expand Down

0 comments on commit a33d1b4

Please sign in to comment.