aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-04-21 08:32:47 +0000
committerKalle Wallin <kaw@linux.se>2004-04-21 08:32:47 +0000
commitbc7ff931d73eb8dce62781657ee111c3e2978836 (patch)
tree10ac8089d98ae1dc92e59fd336b7d175e79b0642
parent5f2cb3d4b5d5024fc33c797ff6afdf0d569a3b20 (diff)
downloadmpd-bc7ff931d73eb8dce62781657ee111c3e2978836.tar.gz
mpd-bc7ff931d73eb8dce62781657ee111c3e2978836.tar.xz
mpd-bc7ff931d73eb8dce62781657ee111c3e2978836.zip
Added seek, crossfade commands.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@861 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--command.c8
-rw-r--r--command.h3
-rw-r--r--doc/ncmpc.lirc32
-rw-r--r--screen_help.c78
4 files changed, 95 insertions, 26 deletions
diff --git a/command.c b/command.c
index 75dd75ee9..2ad85d0ce 100644
--- a/command.c
+++ b/command.c
@@ -67,6 +67,10 @@ static command_definition_t cmds[] =
"Next track" },
{ { '<', 0, 0 }, CMD_TRACK_PREVIOUS, "prev",
"Previous track" },
+ { { 'f', 0, 0 }, CMD_SEEK_FORWARD, "seek-forward",
+ "Seek forward" },
+ { { 'b', 0, 0 }, CMD_SEEK_BACKWARD, "seek-backward",
+ "Seek backward" },
{ { '+', RGHT, 0 }, CMD_VOLUME_UP, "volume-up",
"Increase volume" },
@@ -90,6 +94,8 @@ static command_definition_t cmds[] =
"Toggle repeat mode" },
{ { 'z', 0, 0 }, CMD_RANDOM, "random",
"Toggle random mode" },
+ { { 'x', 0, 0 }, CMD_CROSSFADE, "crossfade",
+ "Toggle crossfade mode" },
{ { 'S', 0, 0 }, CMD_SAVE_PLAYLIST, "save",
"Save playlist" },
@@ -131,7 +137,7 @@ static command_definition_t cmds[] =
"Update screen" },
#ifdef ENABLE_KEYDEF_SCREEN
{ {'K', 0, 0 }, CMD_SCREEN_KEYDEF, "screen-keyedit",
- "Key edit screen" },
+ "Key configuration screen" },
#endif
{ { 'q', 0, 0 }, CMD_QUIT, "quit",
diff --git a/command.h b/command.h
index d0ec67f24..7b6bf3098 100644
--- a/command.h
+++ b/command.h
@@ -12,11 +12,14 @@ typedef enum
CMD_STOP,
CMD_TRACK_NEXT,
CMD_TRACK_PREVIOUS,
+ CMD_SEEK_FORWARD,
+ CMD_SEEK_BACKWARD,
CMD_SHUFFLE,
CMD_RANDOM,
CMD_CLEAR,
CMD_DELETE,
CMD_REPEAT,
+ CMD_CROSSFADE,
CMD_VOLUME_UP,
CMD_VOLUME_DOWN,
CMD_SAVE_PLAYLIST,
diff --git a/doc/ncmpc.lirc b/doc/ncmpc.lirc
index bdf7b7dc6..409b95182 100644
--- a/doc/ncmpc.lirc
+++ b/doc/ncmpc.lirc
@@ -22,6 +22,22 @@ begin
config = +
end
+Begin
+ remote = *
+ button = CD_SEEK_BACK
+ prog = irpty
+ repeat = 1
+ config = b
+end
+
+begin
+ remote = *
+ button = CD_SEEL_FORW
+ prog = irpty
+ repeat = 1
+ config = f
+end
+
begin
remote = *
button = CD_STOP
@@ -190,4 +206,20 @@ begin
config = r
end
+# crossfade
+begin
+ remote = *
+ button = CD_TIME_FADE
+ prog = irpty
+ repeat = 0
+ config = x
+end
+
+begin
+ remote = *
+ button = CD_TIME
+ prog = irpty
+ repeat = 0
+ config = t
+end
diff --git a/screen_help.c b/screen_help.c
index c19049717..d69aff0bc 100644
--- a/screen_help.c
+++ b/screen_help.c
@@ -29,6 +29,7 @@
#include "screen_utils.h"
#include "screen_help.h"
+
typedef struct
{
signed char highlight;
@@ -38,27 +39,14 @@ typedef struct
static help_text_row_t help_text[] =
{
- { 1, CMD_NONE, " Keys " },
- { 0, CMD_NONE, " --------" },
- { 0, CMD_STOP, NULL },
- { 0, CMD_PAUSE, NULL },
- { 0, CMD_TRACK_NEXT, NULL },
- { 0, CMD_TRACK_PREVIOUS, NULL },
- { 0, CMD_VOLUME_DOWN, NULL },
- { 0, CMD_VOLUME_UP, NULL },
- { 0, CMD_NONE, NULL },
+ { 1, CMD_NONE, " Movement keys " },
+ { 0, CMD_NONE, " -----------------" },
{ 0, CMD_LIST_PREVIOUS, NULL },
{ 0, CMD_LIST_NEXT, NULL },
{ 0, CMD_LIST_PREVIOUS_PAGE, NULL },
{ 0, CMD_LIST_NEXT_PAGE, NULL },
{ 0, CMD_LIST_FIRST, NULL },
{ 0, CMD_LIST_LAST, NULL },
-
- { 0, CMD_LIST_FIND, NULL },
- { 0, CMD_LIST_RFIND, NULL },
- { 0, CMD_LIST_FIND_NEXT, NULL },
- { 0, CMD_LIST_RFIND_NEXT, NULL },
- { 0, CMD_TOGGLE_FIND_WRAP, NULL },
{ 0, CMD_NONE, NULL },
{ 0, CMD_SCREEN_NEXT, NULL },
{ 0, CMD_SCREEN_HELP, NULL },
@@ -67,31 +55,71 @@ static help_text_row_t help_text[] =
#ifdef ENABLE_KEYDEF_SCREEN
{ 0, CMD_SCREEN_KEYDEF, NULL },
#endif
+
+ { 0, CMD_NONE, NULL },
+ { 0, CMD_NONE, NULL },
+ { 1, CMD_NONE, " General keys " },
+ { 0, CMD_NONE, " ----------------" },
+ { 0, CMD_STOP, NULL },
+ { 0, CMD_PAUSE, NULL },
+ { 0, CMD_TRACK_NEXT, NULL },
+ { 0, CMD_TRACK_PREVIOUS, NULL },
+ { 0, CMD_SEEK_FORWARD, NULL },
+ { 0, CMD_SEEK_BACKWARD, NULL },
+ { 0, CMD_VOLUME_DOWN, NULL },
+ { 0, CMD_VOLUME_UP, NULL },
+ { 0, CMD_NONE, NULL },
+ { 0, CMD_SHUFFLE, NULL },
+ { 0, CMD_REPEAT, NULL },
+ { 0, CMD_RANDOM, NULL },
+ { 0, CMD_CROSSFADE, NULL },
+ { 0, CMD_NONE, NULL },
{ 0, CMD_QUIT, NULL },
+
{ 0, CMD_NONE, NULL },
{ 0, CMD_NONE, NULL },
- { 1, CMD_NONE, " Keys - Playlist screen " },
- { 0, CMD_NONE, " --------------------------" },
+ { 1, CMD_NONE, " Keys - Playlist screen " },
+ { 0, CMD_NONE, " --------------------------" },
{ 0, CMD_PLAY, "Play" },
{ 0, CMD_DELETE, NULL },
- { 0, CMD_SHUFFLE, NULL },
{ 0, CMD_CLEAR, NULL },
{ 0, CMD_SAVE_PLAYLIST, NULL },
- { 0, CMD_REPEAT, NULL },
- { 0, CMD_RANDOM, NULL },
{ 0, CMD_SCREEN_UPDATE, "Center" },
{ 0, CMD_TOGGLE_AUTOCENTER, NULL },
+
{ 0, CMD_NONE, NULL },
{ 0, CMD_NONE, NULL },
- { 1, CMD_NONE, " Keys - Browse screen " },
- { 0, CMD_NONE, " ------------------------" },
+ { 1, CMD_NONE, " Keys - Browse screen " },
+ { 0, CMD_NONE, " ------------------------" },
{ 0, CMD_PLAY, "Enter directory" },
{ 0, CMD_SELECT, NULL },
{ 0, CMD_DELETE, NULL },
{ 0, CMD_SCREEN_UPDATE, NULL },
+
+ { 0, CMD_NONE, NULL },
+ { 0, CMD_NONE, NULL },
+ { 1, CMD_NONE, " Find keys " },
+ { 0, CMD_NONE, " -------------" },
+ { 0, CMD_LIST_FIND, NULL },
+ { 0, CMD_LIST_RFIND, NULL },
+ { 0, CMD_LIST_FIND_NEXT, NULL },
+ { 0, CMD_LIST_RFIND_NEXT, NULL },
+ { 0, CMD_TOGGLE_FIND_WRAP, NULL },
+ { 0, CMD_TOGGLE_FIND_WRAP, NULL },
+
+ { 0, CMD_NONE, NULL },
{ 0, CMD_NONE, NULL },
+ { 1, CMD_NONE, " ncmpc build information " },
+ { 0, CMD_NONE, " ---------------------------" },
+ { 0, CMD_NONE, " Version : " VERSION },
+ { 0, CMD_NONE, " Configuration dirs : ~/.ncmpc, " SYSCONFDIR "/" PACKAGE },
+#ifdef ENABLE_KEYDEF_SCREEN
+ { 0, CMD_NONE, " Key Editor : yes" },
+#else
+ { 0, CMD_NONE, " Key Editor : no" },
+#endif
+
{ 0, CMD_NONE, NULL },
- { 1, CMD_NONE, " " PACKAGE " version " VERSION },
{-1, CMD_NONE, NULL }
};
@@ -124,12 +152,12 @@ list_callback(int index, int *highlight, void *data)
}
if( help_text[index].text )
snprintf(buf, 256,
- "%20s : %s",
+ "%20s : %s ",
get_key_names(help_text[index].command, TRUE),
help_text[index].text);
else
snprintf(buf, 256,
- "%20s : %s",
+ "%20s : %s ",
get_key_names(help_text[index].command, TRUE),
get_key_description(help_text[index].command));
return buf;