From 2d25c1f7c3edc14df30c355b28b58825c14515d9 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 30 Mar 2009 00:32:11 +1100 Subject: [PATCH] Add / (like H/L) mappings to Player mode. Also the appropriate prefix to Player mode help tags. --- xulmus/content/player.js | 13 ++++------- xulmus/locale/en-US/index.txt | 5 +++- xulmus/locale/en-US/player.txt | 42 +++++++++++++++++----------------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/xulmus/content/player.js b/xulmus/content/player.js index 52656a4c..909284c7 100644 --- a/xulmus/content/player.js +++ b/xulmus/content/player.js @@ -1,5 +1,3 @@ -// Import Artist List as this can be huge - function Player() // {{{ { //////////////////////////////////////////////////////////////////////////////// @@ -52,13 +50,12 @@ function Player() // {{{ } // Get the artist names before hand. - let artists = getArtistsArray(); const pageService = Components.classes["@songbirdnest.com/Songbird/MediaPageManager;1"] .getService(Components.interfaces.sbIMediaPageManager); - // Register Callbacks for searching. + // Register Callbacks for searching. liberator.registerCallback("change", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);}); liberator.registerCallback("submit", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);}); //liberator.registerCallback("cancel", modes.SEARCH_VIEW_FORWARD, function (command) { player.searchView(command);}); @@ -175,12 +172,12 @@ function Player() // {{{ { flags: Mappings.flags.COUNT }); mappings.add([modes.PLAYER], - ["H"], "Seek -1m", + ["H", ""], "Seek -1m", function (count) { player.seekBackward(Math.max(1, count) * 60000); }, { flags: Mappings.flags.COUNT }); mappings.add([modes.PLAYER], - ["L"], "Seek +1m", + ["L", ""], "Seek +1m", function (count) { player.seekForward(Math.max(1, count) * 60000); }, { flags: Mappings.flags.COUNT }); @@ -217,7 +214,7 @@ function Player() // {{{ ////////////////////// COMMANDS //////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ - // TODO: presumably this will eventually just filter the library view like cmus? --djk + // TODO: rename :Filter to :filter and move this functionality into :tqueue etc? --djk commands.add(["f[ilter]"], "Filter and play tracks", function (args) @@ -591,7 +588,7 @@ function Player() // {{{ } else { - liberator.echoerr("E486 Pattern not found: "+searchString, commandline.FORCE_SINGLELINE); + liberator.echoerr("E486 Pattern not found: " + searchString, commandline.FORCE_SINGLELINE); } }, diff --git a/xulmus/locale/en-US/index.txt b/xulmus/locale/en-US/index.txt index b6380322..4f5e37f0 100644 --- a/xulmus/locale/en-US/index.txt +++ b/xulmus/locale/en-US/index.txt @@ -17,14 +17,17 @@ section:Player{nbsp}mode[player-index] ||[m]f[m]|| Filter and play tracks + ||[m]F[m]|| Filter and show the tracks as a view + ||[m]h[m]|| Seek -10s + +||[m][m]|| Seek -10s + ||[m]l[m]|| Seek +10s + +||[m][m]|| Seek -10s + ||[m]H[m]|| Seek -1m + +||[m][m]|| Seek -10s + ||[m]L[m]|| Seek +1m + +||[m][m]|| Seek -10s + ||[m]+[m]|| Increase volume by 10% + ||[m]-[m]|| Decrease volume by 10% + ||[m]/[m]|| Search forward for a track + -//||[m]?[m]|| Search backward for a track + ||[m]n[m]|| Find the next track + ||[m]N[m]|| Find the previous track + diff --git a/xulmus/locale/en-US/player.txt b/xulmus/locale/en-US/player.txt index ab9d5a0f..08324382 100644 --- a/xulmus/locale/en-US/player.txt +++ b/xulmus/locale/en-US/player.txt @@ -7,14 +7,14 @@ tab has focus. section:Playing{nbsp}tracks[playing-tracks] -|x| |:playerp| |:playerplay| +|p_x| |:playerp| |:playerplay| ||:playerp[lay]|| + ||x|| ________________________________________________________________________________ Play the current track. ________________________________________________________________________________ -|z| |:playerpr| |:playerprev| +|p_z| |:playerpr| |:playerprev| ||:playerpr[ev]|| + ||z|| ________________________________________________________________________________ @@ -22,7 +22,7 @@ Play the previous track. ________________________________________________________________________________ -|b| |:playern| |:playernext| +|p_b| |:playern| |:playernext| ||:playern[ext]|| + ||b|| ________________________________________________________________________________ @@ -30,7 +30,7 @@ Play the next track. ________________________________________________________________________________ -|c| |:playerpa| |:playerpause| +|p_c| |:playerpa| |:playerpause| ||:playerpa[use]|| + ||c|| ________________________________________________________________________________ @@ -38,7 +38,7 @@ Pause/unpause the current track. ________________________________________________________________________________ -|v| |:players| |:playerstop| +|p_v| |:players| |:playerstop| ||:players[top]|| + ||v|| ________________________________________________________________________________ @@ -46,21 +46,21 @@ Stop playing the current track. ________________________________________________________________________________ -|x| +|p_x| ||x|| ________________________________________________________________________________ Toggle shuffle mode. ________________________________________________________________________________ -|r| +|p_r| ||r|| ________________________________________________________________________________ Toggle repeat mode. ________________________________________________________________________________ -|i| +|p_i| ||i|| ________________________________________________________________________________ Select the currently playing track. @@ -68,7 +68,7 @@ ________________________________________________________________________________ section:Filtering{nbsp}the{nbsp}library[filter,filtering] -|f| |:f| |:filter| +|p_f| |:f| |:filter| ||:f[ilter] {artist} [a][album][a] [a][track][a]|| + ||f|| ________________________________________________________________________________ @@ -79,7 +79,7 @@ tracks for that album are played. A specific track can be specified with ________________________________________________________________________________ -|F| |:F| |:Filter| +|p_F| |:F| |:Filter| ||:F[ilter] {keywords}|| + ||F|| ________________________________________________________________________________ @@ -90,28 +90,28 @@ ________________________________________________________________________________ section:Seeking{nbsp}to{nbsp}a{nbsp}track{nbsp}position[seeking] -|| |h| +|p_| |p_h| ||[count]h|| ________________________________________________________________________________ Seek +10s. ________________________________________________________________________________ -|| |l| +|p_| |p_l| ||[count]l|| ________________________________________________________________________________ Seek -10s. ________________________________________________________________________________ -|H| +|p_| |p_H| ||[count]H|| ________________________________________________________________________________ Seek +1m. ________________________________________________________________________________ -|L| +|p_| |p_L| ||[count]L|| ________________________________________________________________________________ Seek -1m. @@ -132,7 +132,7 @@ ________________________________________________________________________________ section:Adjusting{nbsp}the{nbsp}volume[volume] -|+| |=| +|p_+| |p_=| ||+|| + ||=|| ________________________________________________________________________________ @@ -140,7 +140,7 @@ Increase volume by 10%. ________________________________________________________________________________ -|-| +|p_-| ||-|| + ________________________________________________________________________________ Decrease volume by 10%. @@ -175,26 +175,26 @@ ________________________________________________________________________________ section:Search{nbsp}commands[search] -|/| +|p_/| ||/{pattern}|| + ________________________________________________________________________________ Search forward for a track matching {pattern} in the visible media view. ________________________________________________________________________________ -//|?| +//|p_?| //||?{pattern}|| + //________________________________________________________________________________ //Search backwards for a track matching {pattern} in the visible media view. //________________________________________________________________________________ -|n| +|p_n| ||n|| + ________________________________________________________________________________ Find the next track. Repeats the last search. If the search hits BOTTOM of the view, it continues from TOP. ________________________________________________________________________________ -|N| +|p_N| ||N|| + ________________________________________________________________________________ Find the previous track. Repeats the last search in the opposite direction. If @@ -203,7 +203,7 @@ ________________________________________________________________________________ section:Rating{nbsp}tracks[rating] -|| || || || || || +|p_| |p_| |p_| |p_| |p_| |p_| |||| + |||| + |||| +