35 var mousewheel_volume = {};
36 mousewheel_volume.init_once = 0;
37 mousewheel_volume.deinit_once = 0;
38 mousewheel_volume.onLoad =
function()
40 if (mousewheel_volume.init_once++) { dump(
"WARNING: mousewheel_volume double init!!\n");
return; }
41 window.addEventListener(
"DOMMouseScroll", mousewheel_volume.onDOMMouseScroll,
false);
43 mousewheel_volume.onUnload =
function()
45 if (mousewheel_volume.deinit_once++) { dump(
"WARNING: mousewheel_volume double deinit!!\n");
return; }
46 window.removeEventListener(
"DOMMouseScroll", mousewheel_volume.onDOMMouseScroll,
false);
47 window.removeEventListener(
"load", mousewheel_volume.onLoad,
false);
48 window.removeEventListener(
"unload", mousewheel_volume.onUnload,
false);
52 window.addEventListener(
"load", mousewheel_volume.onLoad,
false);
53 window.addEventListener(
"unload", mousewheel_volume.onUnload,
false);
56 mousewheel_volume.onDOMMouseScroll =
function(evt)
60 var
node = evt.originalTarget;
61 while (node != document && node !=
null)
67 if (node.tagName ==
"tree")
return;
68 if (node.tagName ==
"xul:tree")
return;
69 if (node.tagName ==
"listbox")
return;
70 if (node.tagName ==
"xul:listbox")
return;
71 if (node.tagName ==
"browser")
return;
72 if (node.tagName ==
"xul:browser")
return;
74 if (node.getAttribute &&
75 node.getAttribute(
"wheelvolume") ==
"false")
77 node = node.parentNode;
89 Components.classes[
"@songbirdnest.com/Songbird/Mediacore/Manager;1"]
90 .getService(Components.interfaces.sbIMediacoreManager);
93 var curVol = mm.volumeControl.volume;
94 var v = curVol + ((evt.detail > 0) ? -0.03 : 0.03);
97 mm.volumeControl.volume = v;
102 dump(
"onMouseWheelVolume - " + err);
108 dump(
"mouseWheelVolume.js - " + err);
function SBDataSetStringValue(aKey, aStringValue)
Set a string value. Changes the value of the data remote to the boolean passed in, regardless of its value before.