Fix Mouse Wheel Volume in cross-board quotes.

This commit is contained in:
ccd0 2015-02-17 15:56:49 -08:00
parent 1fa364e783
commit 3497b983d3

View File

@ -11,8 +11,18 @@ Volume =
Conf['Default Volume'] = x
Volume.inputs?.volume.value = x
if Conf['Mouse Wheel Volume']
Post.callbacks.push
name: 'Mouse Wheel Volume'
cb: @node
return unless g.BOARD.ID in ['gif', 'wsg']
if Conf['Mouse Wheel Volume']
CatalogThread.callbacks.push
name: 'Mouse Wheel Volume'
cb: @catalogNode
unmuteEntry = UI.checkbox 'Allow Sound', 'Allow Sound'
unmuteEntry.title = Config.main['Images and Videos']['Allow Sound'][1]
@ -31,14 +41,6 @@ Volume =
Header.menu.addEntry {el: unmuteEntry, order: 200}
Header.menu.addEntry {el: volumeEntry, order: 201}
if Conf['Mouse Wheel Volume']
Post.callbacks.push
name: 'Mouse Wheel Volume'
cb: @node
CatalogThread.callbacks.push
name: 'Mouse Wheel Volume'
cb: @catalogNode
setup: (video) ->
video.muted = !Conf['Allow Sound']
video.volume = Conf['Default Volume']
@ -58,7 +60,7 @@ Volume =
Volume.inputs.volume.value = volume
node: ->
return unless @file?.isVideo
return unless @board.ID in ['gif', 'wsg'] and @file?.isVideo
$.on @file.thumb, 'wheel', Volume.wheel.bind(Header.hover)
$.on $('a', @file.text), 'wheel', Volume.wheel.bind(@file.thumb.parentNode)