Keyboard shortcuts: volume shortcuts should be local
`globalShortcut` will register the shortcut at the OS level, even when the app is not focused. Using `localShortcut` would work, but let's put it in the top menu instead, where all the other shortcuts are.
This commit is contained in:
@@ -716,10 +716,30 @@ function openPlayer (torrentSummary, index, cb) {
|
||||
// otherwise, play the video
|
||||
state.window.title = torrentSummary.name
|
||||
update()
|
||||
|
||||
ipcRenderer.send('onPlayerOpen')
|
||||
|
||||
cb()
|
||||
})
|
||||
}
|
||||
|
||||
function closePlayer (cb) {
|
||||
state.window.title = config.APP_WINDOW_TITLE
|
||||
update()
|
||||
|
||||
if (state.window.isFullScreen) {
|
||||
dispatch('toggleFullScreen', false)
|
||||
}
|
||||
restoreBounds()
|
||||
stopServer()
|
||||
update()
|
||||
|
||||
ipcRenderer.send('unblockPowerSave')
|
||||
ipcRenderer.send('onPlayerClose')
|
||||
|
||||
cb()
|
||||
}
|
||||
|
||||
function openFile (torrentSummary, index) {
|
||||
var torrent = state.client.get(torrentSummary.infoHash)
|
||||
if (!torrent) return
|
||||
@@ -743,22 +763,6 @@ function openFolder (torrentSummary) {
|
||||
})
|
||||
}
|
||||
|
||||
function closePlayer (cb) {
|
||||
state.window.title = config.APP_WINDOW_TITLE
|
||||
update()
|
||||
|
||||
if (state.window.isFullScreen) {
|
||||
dispatch('toggleFullScreen', false)
|
||||
}
|
||||
restoreBounds()
|
||||
stopServer()
|
||||
update()
|
||||
|
||||
ipcRenderer.send('unblockPowerSave')
|
||||
|
||||
cb()
|
||||
}
|
||||
|
||||
function toggleTorrent (torrentSummary) {
|
||||
if (torrentSummary.status === 'paused') {
|
||||
torrentSummary.status = 'new'
|
||||
|
||||
Reference in New Issue
Block a user