main process: add debug logs
This commit is contained in:
parent
4bf7996ab7
commit
b4aec8bb19
1 changed files with 5 additions and 0 deletions
5
index.js
5
index.js
|
|
@ -95,6 +95,7 @@ function createMainWindow () {
|
|||
}
|
||||
|
||||
function addTorrentFromPaste () {
|
||||
debug('addTorrentFromPaste')
|
||||
var torrentIds = electron.clipboard.readText().split('\n')
|
||||
torrentIds.forEach(function (torrentId) {
|
||||
torrentId = torrentId.trim()
|
||||
|
|
@ -104,18 +105,21 @@ function addTorrentFromPaste () {
|
|||
}
|
||||
|
||||
function setBounds (bounds) {
|
||||
debug('setBounds %o', bounds)
|
||||
if (mainWindow) {
|
||||
mainWindow.setBounds(bounds, true)
|
||||
}
|
||||
}
|
||||
|
||||
function setAspectRatio (aspectRatio, extraSize) {
|
||||
debug('setAspectRatio %o %o', aspectRatio, extraSize)
|
||||
if (mainWindow) {
|
||||
mainWindow.setAspectRatio(aspectRatio, extraSize)
|
||||
}
|
||||
}
|
||||
|
||||
function toggleDevTools (win) {
|
||||
debug('toggleDevTools')
|
||||
win = win || electron.BrowserWindow.getFocusedWindow()
|
||||
|
||||
if (win) {
|
||||
|
|
@ -124,6 +128,7 @@ function toggleDevTools (win) {
|
|||
}
|
||||
|
||||
function reloadWindow (win) {
|
||||
debug('reloadWindow')
|
||||
win = win || electron.BrowserWindow.getFocusedWindow()
|
||||
|
||||
if (win) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue