1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 13:44:12 +01:00

Restore PLAYER mode in Melodactyl.

A quick fix to ascertain the status of player features.

--HG--
extra : rebase_source : e941b9f0f3a822b2584ddec66875ec421dd7865c
This commit is contained in:
Doug Kearns
2010-10-15 10:27:10 +11:00
parent 83a29fa978
commit 0abc4fbc33

View File

@@ -1,12 +1,13 @@
// Copyright (c) 2009 by Martin Stubenschrott <stubenschrott@vimperator.org> // Copyright (c) 2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2009 by Prathyush Thota <prathyushthota@gmail.com> // Copyright (c) 2009 by Prathyush Thota <prathyushthota@gmail.com>
// Copyright (c) 2009 by Doug Kearns <dougkearns@gmail.com> // Copyright (c) 2009-2010 by Doug Kearns <dougkearns@gmail.com>
// Copyright (c) 2009-2010 by Kris Maglione <maglione.k@gmail.com>
// //
// This work is licensed for reuse under an MIT license. Details are // This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file. // given in the LICENSE.txt file included with this file.
"use strict"; "use strict";
Components.utils.import("resource://gre/modules/utils.js"); // XXX Components.utils.import("resource://gre/modules/utils.js"); // XXX: PlacesUtils
const Config = Module("config", ConfigBase, { const Config = Module("config", ConfigBase, {
init: function init() { init: function init() {
@@ -103,12 +104,14 @@ const Config = Module("config", ConfigBase, {
function () { SBSubscribe(); }] function () { SBSubscribe(); }]
}, },
focusChange: function () { // TODO: clean this up
focusChange: function (win) {
// Switch to -- PLAYER -- mode for Songbird Media Player. // Switch to -- PLAYER -- mode for Songbird Media Player.
if (config.isPlayerWindow) if (config.isPlayerWindow)
dactyl.mode = modes.PLAYER; modes.set(modes.PLAYER);
else else
dactyl.mode = modes.NORMAL; if (modes.main == modes.PLAYER)
modes.pop();
}, },
hasTabbrowser: true, hasTabbrowser: true,
@@ -268,6 +271,7 @@ const Config = Module("config", ConfigBase, {
"<Up>": modes.NORMAL | modes.INSERT, "<Up>": modes.NORMAL | modes.INSERT,
"<Down>": modes.NORMAL | modes.INSERT "<Down>": modes.NORMAL | modes.INSERT
}; };
config.modes.forEach(function (mode) { modes.addMode.apply(modes, mode); }); // XXX
}, },
options: function () { options: function () {
// TODO: SB doesn't explicitly support an offline mode. Should we? --djk // TODO: SB doesn't explicitly support an offline mode. Should we? --djk