Code

Added update command.
authorKalle Wallin <kaw@linux.se>
Sat, 27 Mar 2004 16:52:36 +0000 (16:52 +0000)
committerKalle Wallin <kaw@linux.se>
Sat, 27 Mar 2004 16:52:36 +0000 (16:52 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@513 09075e82-0dd4-0310-85a5-a0d7c8717e4f

command.c
command.h
screen_file.c
screen_help.c

index d254c4e031b840dcd9c5ac6030a85b5560373363..d2d1e68253d60403061678e58518b66141fcd6e3 100644 (file)
--- 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 },  
 
index 485b7534731c05b14e73c8f2d2709dd5278bf734..a7e08555b6cc0f35867536f45e806521f8b61e70 100644 (file)
--- 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,
index 762752e0acbb7dfd8f5272e734b3ea7bf7460976..19230e0ce5d9f403d11a9ebae32db789787901f1 100644 (file)
@@ -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:
index de5bfe3e28147c233a385519fab1a67a8cad37a0..09349a361b1242a037af9bb5d6d5b05bd59d263a 100644 (file)
@@ -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 },