Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for OpenRaster format. #505

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
"electron-mocha": "4.0.0",
"mocha": "3.5.0",
"mock-fs": "4.4.1",
"tmp": "0.0.33"
"tmp": "0.0.33",
"ora.js": "github:banbury/ora.js"
},
"dependencies": {
"ag-psd": "^1.2.0",
Expand Down
20 changes: 12 additions & 8 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ app.on('ready', () => {
console.error('Could not load', filePath)
}
}

// this only works on mac.
if (toBeOpenedPath) {
openFile(toBeOpenedPath)
Expand All @@ -134,7 +134,7 @@ let openKeyCommandWindow = ()=> {

app.on('activate', ()=> {
if (!mainWindow && !welcomeWindow) openWelcomeWindow()

})

let openNewWindow = () => {
Expand Down Expand Up @@ -279,7 +279,7 @@ let openDialogue = () => {
let importImagesDialogue = () => {
dialog.showOpenDialog(
{
title:"Import Boards",
title:"Import Boards",
filters:[
{name: 'Images', extensions: ['png', 'jpg', 'jpeg', 'psd']},
],
Expand Down Expand Up @@ -314,7 +314,7 @@ let importImagesDialogue = () => {
handleDirectory(filepath)
}
}

mainWindow.webContents.send('insertNewBoardsWithFiles', filepathsRecursive)
}
}
Expand All @@ -324,7 +324,7 @@ let importImagesDialogue = () => {
let importWorksheetDialogue = () => {
dialog.showOpenDialog(
{
title:"Import Worksheet",
title:"Import Worksheet",
filters:[
{name: 'Images', extensions: ['png', 'jpg', 'jpeg']},
],
Expand Down Expand Up @@ -359,7 +359,7 @@ let processFountainData = (data, create, update) => {
break
case 'scene':
metadata.sceneCount++
let id
let id
if (node.scene_id) {
id = node.scene_id.split('-')
if (id.length>1) {
Expand Down Expand Up @@ -442,7 +442,7 @@ let createNewGivenAspectRatio = aspectRatio => {
tasks = tasks.then(() => trash(filename)).catch(err => reject(err))
} else {
dialog.showMessageBox(null, {
message: "Could not overwrite file " + path.basename(filename) + ". Only folders can be overwritten."
message: "Could not overwrite file " + path.basename(filename) + ". Only folders can be overwritten."
})
return reject(null)
}
Expand Down Expand Up @@ -530,7 +530,7 @@ let loadStoryboarderWindow = (filename, scriptData, locations, characters, board
experimentalCanvasFeatures: true,
devTools: true,
plugins: true
}
}
})

let projectName = path.basename(filename, path.extname(filename))
Expand Down Expand Up @@ -696,6 +696,10 @@ ipcMain.on('openInEditor', (e, arg)=> {
mainWindow.webContents.send('openInEditor')
})

ipcMain.on('openInOraEditor', (e, arg)=> {
mainWindow.webContents.send('openInOraEditor')
})

ipcMain.on('goPreviousBoard', (e, arg)=> {
mainWindow.webContents.send('goPreviousBoard')
})
Expand Down
9 changes: 8 additions & 1 deletion src/js/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,13 @@ const template = [
click ( item, focusedWindow, event) {
ipcRenderer.send('openInEditor')
}
},
{
label: 'Edit in Ora Editor',
accelerator: 'CmdOrCtrl+,',
click ( item, focusedWindow, event) {
ipcRenderer.send('openInOraEditor')
}
}
]
},
Expand Down Expand Up @@ -713,4 +720,4 @@ const menu = {
}
}

module.exports = menu
module.exports = menu
3 changes: 2 additions & 1 deletion src/js/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const defaultPrefs = {
enableAutoSave: true,
import: {
offset: [0, 0]
}
},
editor: "PSD"
}

// For slow computers, override the defaults here.
Expand Down
Loading