[PATCH v2 07/25] menu: Use a switch statement