Code

screen_keydef: parent directory command
authorJeffrey Middleton <jefromi@gmail.com>
Mon, 23 Mar 2009 14:59:10 +0000 (09:59 -0500)
committerJeffrey Middleton <jefromi@gmail.com>
Mon, 23 Mar 2009 14:59:10 +0000 (09:59 -0500)
Allow CMD_GO_PARENT_DIRECTORY on the keydef screen (for returning from
subcmd to command list).

src/screen_keydef.c

index 1ffee6b1659ad1fe01eb0ea86181992693ba8756..2cec0f4a26bbca5ebc94fa6ed291175475d739b6 100644 (file)
@@ -339,6 +339,16 @@ keydef_cmd(G_GNUC_UNUSED mpdclient_t *c, command_t cmd)
                                               lw->selected - STATIC_SUB_ITEMS);
                }
                return true;
+       case CMD_GO_PARENT_DIRECTORY:
+               if (subcmd >=0) {
+                       lw->selected = subcmd;
+                       lw->selected_start = lw->selected;
+                       lw->selected_end = lw->selected;
+                       subcmd = -1;
+
+                       keydef_repaint();
+               }
+               break;
        case CMD_DELETE:
                if (subcmd >= 0 && lw->selected >= STATIC_SUB_ITEMS)
                        delete_key(subcmd, lw->selected - STATIC_SUB_ITEMS);