Skip to content

Commit

Permalink
Merge pull request #2 from jonathanschneider/dev
Browse files Browse the repository at this point in the history
Bug fix
  • Loading branch information
jonathanschneider authored Apr 10, 2021
2 parents da63031 + e2fb549 commit 4682fb6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
27 changes: 18 additions & 9 deletions lib/editPro7.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,20 @@ async function fillNotesSub(presentation) {
// Filter slides with text
if (action.type === 'ACTION_TYPE_PRESENTATION_SLIDE' && action.slide.presentation.baseSlide.elements !== undefined) {

// Get text from RTF
let text = await getText(action.slide.presentation.baseSlide.elements[0].element.text.rtfData);

// Reassemble RTF for notes
let buffer = Buffer.from(notesStyle + text + '}'); // Encode base64
action.slide.presentation.notes = {
'rtfData': buffer.toString('base64')
};
if (process.platform === 'darwin') { // If platform is macOS extract text from RTF and copy to slide notes with pre-defined formatting
// Get text from RTF
let text = await getText(action.slide.presentation.baseSlide.elements[0].element.text.rtfData);

// Reassemble RTF for notes
let buffer = Buffer.from(notesStyle + text + '}'); // Encode base64
action.slide.presentation.notes = {
'rtfData': buffer.toString('base64')
};
} else { // If platform is Windows simply copy text with formatting to slide notes
action.slide.presentation.notes = {
'rtfData': action.slide.presentation.baseSlide.elements[0].element.text.rtfData
};
}
}
}
}
Expand All @@ -68,7 +74,10 @@ async function mergeLanguages(paths) {

// cues Array does not represent order of slides; order of slides is defined in cueGroups Array
// Create lists of cue identifiers from cueGroups Array with index of cue in cues Array
let cueIds = [[], []];
let cueIds = [
[],
[]
];
presentations.forEach((presentation, i) => {
presentation.cueGroups.forEach(cueGroup => {
cueGroup.cueIdentifiers.forEach(id => {
Expand Down
8 changes: 6 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 700,
height: 550,
height: 507,
useContentSize: true,
minWidth: 700,
minHeight: 507,
autoHideMenuBar: true
});

// and load the index.html of the app.
Expand Down Expand Up @@ -57,7 +61,7 @@ ipcMain.on('open-file-dialog', (event, selection) => {
});

// Show error messages
ipcMain.on('open-error-dialog', (event, error) => {
ipcMain.on('open-error-dialog', (event, error) => {
console.error('Error:', error); // Log for developing purposes
dialog.showErrorBox('Oops! Something went wrong!', error);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ProPresenter-Suite",
"productName": "ProPresenter Suite",
"description": "Functions to manipulate ProPresenter 6/7 files",
"version": "2.0.0",
"version": "2.0.1",
"main": "main.js",
"scripts": {
"start": "electron .",
Expand Down

0 comments on commit 4682fb6

Please sign in to comment.