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:
Feross Aboukhadijeh
2016-06-28 06:32:28 -07:00
committed by DC
parent c44943cef7
commit 349c5ee22e
7 changed files with 81 additions and 68 deletions

View File

@@ -16,7 +16,6 @@ var config = require('../config')
var dialog = require('./dialog')
var shell = require('./shell')
var windows = require('./windows')
var thumbnail = require('./thumbnail')
var menu
@@ -34,8 +33,6 @@ function onPlayerClose () {
getMenuItem('Increase Speed').enabled = false
getMenuItem('Decrease Speed').enabled = false
getMenuItem('Add Subtitles File...').enabled = false
thumbnail.showPlayerThumbnailBar()
}
function onPlayerOpen () {
@@ -47,8 +44,6 @@ function onPlayerOpen () {
getMenuItem('Increase Speed').enabled = true
getMenuItem('Decrease Speed').enabled = true
getMenuItem('Add Subtitles File...').enabled = true
thumbnail.hidePlayerThumbnailBar()
}
function onToggleAlwaysOnTop (flag) {