1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-25 16:15:45 +01:00

Normalise case of player command and mapping descriptions.

This commit is contained in:
Doug Kearns
2009-03-22 16:08:18 +11:00
parent 2216878c9d
commit 032b5be2ae
2 changed files with 29 additions and 25 deletions

View File

@@ -497,6 +497,7 @@ const config = { //{{{
window.toJavaScriptConsole = function () { window.toJavaScriptConsole = function () {
toOpenWindowByType("global:console", "chrome://global/content/console.xul"); toOpenWindowByType("global:console", "chrome://global/content/console.xul");
} }
window.BrowserStop = function () { window.BrowserStop = function () {
getBrowser().mCurrentBrowser.stop(); getBrowser().mCurrentBrowser.stop();
} }

View File

@@ -46,7 +46,7 @@ function Player() // {{{
function () { player.previous(); }); function () { player.previous(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["c"], "Pause/Unpause track", ["c"], "Pause/unpause track",
function () { player.togglePlayPause(); }); function () { player.togglePlayPause(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
@@ -58,7 +58,7 @@ function Player() // {{{
function () { player.stop(); }); function () { player.stop(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["f"], "Filter Library", ["f"], "Filter library",
function () { commandline.open(":", "filter ", modes.EX); }); function () { commandline.open(":", "filter ", modes.EX); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
@@ -66,11 +66,11 @@ function Player() // {{{
function () { commandline.open(":", "Filter ", modes.EX); }); function () { commandline.open(":", "Filter ", modes.EX); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["s"], "Toggle Shuffle", ["s"], "Toggle shuffle",
function () { player.toggleShuffle(); }); function () { player.toggleShuffle(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["r"], "Toggle Repeat", ["r"], "Toggle repeat",
function () { player.toggleRepeat(); }); function () { player.toggleRepeat(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
@@ -94,11 +94,11 @@ function Player() // {{{
{ flags: Mappings.flags.COUNT }); { flags: Mappings.flags.COUNT });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["=", "+"], "Increase Volume by 10%", ["=", "+"], "Increase volume by 10%",
function () { player.increaseVolume(); }); function () { player.increaseVolume(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["-"], "Decrease Volume by 10%", ["-"], "Decrease volume by 10%",
function () { player.decreaseVolume(); }); function () { player.decreaseVolume(); });
////////////////// ///////////////////////////////////////////////////////////}}} ////////////////// ///////////////////////////////////////////////////////////}}}
@@ -161,7 +161,7 @@ function Player() // {{{
//completer: function (context, args) completion.tracks(context, args); //completer: function (context, args) completion.tracks(context, args);
}); });
// TODO: better off as a single command, or cmus compatible E.g. :player-next? --djk // TODO: better off as a single command (:player play) or cmus compatible (:player-play)? --djk
commands.add(["playerp[lay]"], commands.add(["playerp[lay]"],
"Play track", "Play track",
function () { player.play(); }); function () { player.play(); });
@@ -201,7 +201,7 @@ function Player() // {{{
player.volume = Math.min(Math.max(level, 0), 1); player.volume = Math.min(Math.max(level, 0), 1);
}, },
{ argCount: 1 }); { argCount: "1" });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION ////////////////////////////////////////// ////////////////////// PUBLIC SECTION //////////////////////////////////////////
@@ -325,6 +325,7 @@ function Player() // {{{
tracksList[i] = [trackName, "Album : " + albumName + " Artist : " + artistName]; tracksList[i] = [trackName, "Album : " + albumName + " Artist : " + artistName];
} }
return tracksList; return tracksList;
}, },
// TODO: Use this for implementing "/" and "?". -ken // TODO: Use this for implementing "/" and "?". -ken
@@ -334,10 +335,12 @@ function Player() // {{{
let mediaItemList = currentView.mediaList; let mediaItemList = currentView.mediaList;
let search = _getSearchString(currentView); let search = _getSearchString(currentView);
let searchString = ""; let searchString = "";
if (search != "") if (search != "")
searchString = args + " " + search; searchString = args + " " + search;
else else
searchString = args; searchString = args;
let myView = LibraryUtils.createStandardMediaListView(mediaItemList, searchString); let myView = LibraryUtils.createStandardMediaListView(mediaItemList, searchString);
focusTrack(myView.getItemByIndex(0)); focusTrack(myView.getItemByIndex(0));
} }