main process: add debug logs
This commit is contained in:
5
index.js
5
index.js
@@ -95,6 +95,7 @@ function createMainWindow () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addTorrentFromPaste () {
|
function addTorrentFromPaste () {
|
||||||
|
debug('addTorrentFromPaste')
|
||||||
var torrentIds = electron.clipboard.readText().split('\n')
|
var torrentIds = electron.clipboard.readText().split('\n')
|
||||||
torrentIds.forEach(function (torrentId) {
|
torrentIds.forEach(function (torrentId) {
|
||||||
torrentId = torrentId.trim()
|
torrentId = torrentId.trim()
|
||||||
@@ -104,18 +105,21 @@ function addTorrentFromPaste () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setBounds (bounds) {
|
function setBounds (bounds) {
|
||||||
|
debug('setBounds %o', bounds)
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.setBounds(bounds, true)
|
mainWindow.setBounds(bounds, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAspectRatio (aspectRatio, extraSize) {
|
function setAspectRatio (aspectRatio, extraSize) {
|
||||||
|
debug('setAspectRatio %o %o', aspectRatio, extraSize)
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
mainWindow.setAspectRatio(aspectRatio, extraSize)
|
mainWindow.setAspectRatio(aspectRatio, extraSize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleDevTools (win) {
|
function toggleDevTools (win) {
|
||||||
|
debug('toggleDevTools')
|
||||||
win = win || electron.BrowserWindow.getFocusedWindow()
|
win = win || electron.BrowserWindow.getFocusedWindow()
|
||||||
|
|
||||||
if (win) {
|
if (win) {
|
||||||
@@ -124,6 +128,7 @@ function toggleDevTools (win) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function reloadWindow (win) {
|
function reloadWindow (win) {
|
||||||
|
debug('reloadWindow')
|
||||||
win = win || electron.BrowserWindow.getFocusedWindow()
|
win = win || electron.BrowserWindow.getFocusedWindow()
|
||||||
|
|
||||||
if (win) {
|
if (win) {
|
||||||
|
|||||||
Reference in New Issue
Block a user