Clean up thumbar (thumbnail) code (#670)
* Cleanup thumbnail bar code - rename thumbnail method names for succinctness - Get rid of 'updateThumbnailBar' event -- use existing events - Get rid of 'blockPowerSave' and 'unblockPowerSave' events -- use a new combined 'onPlayerPlay' and 'onPlayerPause' events which apply to power save and updating the thumbbar * Consistent naming for enable/disable methods
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
module.exports = {
|
||||
onPlayerClose,
|
||||
onPlayerOpen
|
||||
disable,
|
||||
enable
|
||||
}
|
||||
|
||||
var electron = require('electron')
|
||||
var windows = require('./windows')
|
||||
|
||||
function onPlayerOpen () {
|
||||
function enable () {
|
||||
// Register play/pause media key, available on some keyboards.
|
||||
electron.globalShortcut.register(
|
||||
'MediaPlayPause',
|
||||
@@ -14,7 +14,7 @@ function onPlayerOpen () {
|
||||
)
|
||||
}
|
||||
|
||||
function onPlayerClose () {
|
||||
function disable () {
|
||||
// Return the media key to the OS, so other apps can use it.
|
||||
electron.globalShortcut.unregister('MediaPlayPause')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user