14
main/ipc.js
14
main/ipc.js
@@ -35,21 +35,21 @@ function addTorrentFromPaste () {
|
|||||||
torrentIds.forEach(function (torrentId) {
|
torrentIds.forEach(function (torrentId) {
|
||||||
torrentId = torrentId.trim()
|
torrentId = torrentId.trim()
|
||||||
if (torrentId.length === 0) return
|
if (torrentId.length === 0) return
|
||||||
windows.mainWindow.send('addTorrent', torrentId)
|
windows.main.send('addTorrent', torrentId)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function setBounds (bounds) {
|
function setBounds (bounds) {
|
||||||
debug('setBounds %o', bounds)
|
debug('setBounds %o', bounds)
|
||||||
if (windows.mainWindow) {
|
if (windows.main) {
|
||||||
windows.mainWindow.setBounds(bounds, true)
|
windows.main.setBounds(bounds, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setAspectRatio (aspectRatio, extraSize) {
|
function setAspectRatio (aspectRatio, extraSize) {
|
||||||
debug('setAspectRatio %o %o', aspectRatio, extraSize)
|
debug('setAspectRatio %o %o', aspectRatio, extraSize)
|
||||||
if (windows.mainWindow) {
|
if (windows.main) {
|
||||||
windows.mainWindow.setAspectRatio(aspectRatio, extraSize)
|
windows.main.setAspectRatio(aspectRatio, extraSize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ function setBadge (text) {
|
|||||||
// Show progress bar. Valid range is [0, 1]. Remove when < 0; indeterminate when > 1.
|
// Show progress bar. Valid range is [0, 1]. Remove when < 0; indeterminate when > 1.
|
||||||
function setProgress (progress) {
|
function setProgress (progress) {
|
||||||
debug('setProgress %s', progress)
|
debug('setProgress %s', progress)
|
||||||
if (windows.mainWindow) {
|
if (windows.main) {
|
||||||
windows.mainWindow.setProgressBar(progress)
|
windows.main.setProgressBar(progress)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user