Skip to content

Commit

Permalink
Merge pull request #1272 from unfoldingWord-dev/joel/fix/1268/copy-paste
Browse files Browse the repository at this point in the history
Fixes copy paste on macOS
  • Loading branch information
da1nerd authored Oct 14, 2019
2 parents fd7d47d + 3f656cb commit 4fd40bd
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
40 changes: 39 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const {dialog, app, BrowserWindow, ipcMain} = require(
const {dialog, app, Menu, BrowserWindow, ipcMain} = require(
'electron');
const path = require('path');

Expand All @@ -11,6 +11,40 @@ let mainWindow = null;
let academyWindow;
let scrollToId;

const menuTemplate = [
{
label: 'Window',
role: 'window',
submenu: [
{
label: 'Minimize',
accelerator: 'CmdOrCtrl+M',
role: 'minimize'
},
{
label: 'Reload',
accelerator: 'CmdOrCtrl+R',
click: function(item, focusedWindow) {
if (focusedWindow) {
focusedWindow.reload();
}
}
},
{
label: 'Toggle Developer Tools',
accelerator:
process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
click: function(item, focusedWindow) {
if (focusedWindow) {
focusedWindow.webContents.toggleDevTools();
}
}
}
]
},
{ role: 'editMenu' }
];

function initialize() {
makeSingleInstance();

Expand Down Expand Up @@ -41,6 +75,10 @@ function initialize() {
}
});

// build menu
const menu = Menu.buildFromTemplate(menuTemplate);
Menu.setApplicationMenu(menu);

ipcMain.on('loading-status', function(event, status) {
splashScreen && splashScreen.webContents.send('loading-status', status);
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "translationstudio",
"productName": "translationStudio",
"version": "12.0.0",
"build": "140",
"version": "12.0.1",
"build": "142",
"description": "A utility for translating the Bible and biblical content into any language.",
"keywords": [],
"homepage": "https://github.com/unfoldingWord-dev/ts-desktop",
Expand Down
2 changes: 0 additions & 2 deletions src/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ process.stdout.write = console.log.bind(console);
try {
const DATA_PATH = ipcRenderer.sendSync('main-window', 'dataPath');

setMsg(DATA_PATH);

// stub globals
let path = null;
let fs = null;
Expand Down

0 comments on commit 4fd40bd

Please sign in to comment.