aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-03-27 16:52:36 +0000
committerKalle Wallin <kaw@linux.se>2004-03-27 16:52:36 +0000
commit95b5a376967fa1767e6503b2bc1b9594d6c910e9 (patch)
tree8f1e3cd1f0dbba5d9a01fb5b3fadf0ce51291c4b
parentfe441717ab5bbebbf3bb3d518079636c14ef9357 (diff)
downloadmpd-95b5a376967fa1767e6503b2bc1b9594d6c910e9.tar.gz
mpd-95b5a376967fa1767e6503b2bc1b9594d6c910e9.tar.xz
mpd-95b5a376967fa1767e6503b2bc1b9594d6c910e9.zip
Added update command.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@513 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--command.c2
-rw-r--r--command.h1
-rw-r--r--screen_file.c6
-rw-r--r--screen_help.c1
4 files changed, 9 insertions, 1 deletions
diff --git a/command.c b/command.c
index d254c4e03..d2d1e6825 100644
--- a/command.c
+++ b/command.c
@@ -72,12 +72,14 @@ static command_definition_t cmds[] =
{ { '?', 0, 0 }, CMD_LIST_RFIND, "Backward Find" },
{ { 'p', 0, 0 }, CMD_LIST_RFIND_NEXT, "Backward Find Previous" },
+
{ { TAB, 0, 0 }, CMD_SCREEN_NEXT, "Next screen" },
{ { STAB, 0, 0 }, CMD_SCREEN_PREVIOUS, "Previous screen" },
{ { F1, '1', 'h' }, CMD_SCREEN_HELP, "Help screen" },
{ { F2, '2', 0 }, CMD_SCREEN_PLAY, "Playlist screen" },
{ { F3, '3', 0 }, CMD_SCREEN_FILE, "Browse screen" },
// { { F4, '4', 0 }, CMD_SCREEN_SEARCH, "Search screen" },
+ { {'u', 0, 0 }, CMD_SCREEN_UPDATE, "Update screen" },
{ { 'q', 0, 0 }, CMD_QUIT, "Quit " PACKAGE },
diff --git a/command.h b/command.h
index 485b75347..a7e08555b 100644
--- a/command.h
+++ b/command.h
@@ -27,6 +27,7 @@ typedef enum
CMD_LIST_FIND_NEXT,
CMD_LIST_RFIND,
CMD_LIST_RFIND_NEXT,
+ CMD_SCREEN_UPDATE,
CMD_SCREEN_PREVIOUS,
CMD_SCREEN_NEXT,
CMD_SCREEN_PLAY,
diff --git a/screen_file.c b/screen_file.c
index 762752e0a..19230e0ce 100644
--- a/screen_file.c
+++ b/screen_file.c
@@ -396,8 +396,12 @@ file_cmd(screen_t *screen, mpd_client_t *c, command_t cmd)
break;
case CMD_DELETE:
handle_delete(screen, c);
- return 1;
break;
+ case CMD_SCREEN_UPDATE:
+ mpc_update_filelist(c);
+ list_window_check_selected(screen->filelist, c->filelist_length);
+ screen_status_printf("Screen updated!");
+ return 1;
case CMD_LIST_FIND:
case CMD_LIST_RFIND:
case CMD_LIST_FIND_NEXT:
diff --git a/screen_help.c b/screen_help.c
index de5bfe3e2..09349a361 100644
--- a/screen_help.c
+++ b/screen_help.c
@@ -60,6 +60,7 @@ static help_text_row_t help_text[] =
{ 0, CMD_PLAY, "Enter directory/Load playlist" },
{ 0, CMD_SELECT, "Add/remove song from playlist" },
{ 0, CMD_DELETE, "Delete playlist" },
+ { 0, CMD_SCREEN_UPDATE, "Update" },
{ 0, CMD_NONE, " " },
{ 0, CMD_NONE, " " },
{ 1, CMD_NONE, " " PACKAGE " version " VERSION },