diff options
Diffstat (limited to 'libmenu/menu_cmdlist.c')
-rw-r--r-- | libmenu/menu_cmdlist.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libmenu/menu_cmdlist.c b/libmenu/menu_cmdlist.c index e146a4e9db..60146e31f1 100644 --- a/libmenu/menu_cmdlist.c +++ b/libmenu/menu_cmdlist.c @@ -71,21 +71,21 @@ static void read_cmd(menu_t* menu,int cmd) { switch(cmd) { case MENU_CMD_RIGHT: if(mpriv->p.current->right) { - mp_input_parse_and_queue_cmds(mpriv->p.current->right); + mp_input_parse_and_queue_cmds(menu->input_ctx, mpriv->p.current->right); break; } // fallback on ok if right is not defined case MENU_CMD_OK: if (mpriv->p.current->ok) - mp_input_parse_and_queue_cmds(mpriv->p.current->ok); + mp_input_parse_and_queue_cmds(menu->input_ctx, mpriv->p.current->ok); break; case MENU_CMD_LEFT: if(mpriv->p.current->left) { - mp_input_parse_and_queue_cmds(mpriv->p.current->left); + mp_input_parse_and_queue_cmds(menu->input_ctx, mpriv->p.current->left); break; } // fallback on cancel if left is not defined case MENU_CMD_CANCEL: if(mpriv->p.current->cancel) { - mp_input_parse_and_queue_cmds(mpriv->p.current->cancel); + mp_input_parse_and_queue_cmds(menu->input_ctx, mpriv->p.current->cancel); break; } default: @@ -114,24 +114,24 @@ static int parse_args(menu_t* menu,char* args) { char *element,*body, **attribs, *name; list_entry_t* m = NULL; int r; - ASX_Parser_t* parser = asx_parser_new(); + ASX_Parser_t* parser = asx_parser_new(menu->mconfig); while(1) { r = asx_get_element(parser,&args,&element,&body,&attribs); if(r < 0) { - mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_SyntaxErrorAtLine,parser->line); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] syntax error at line: %d\n",parser->line); asx_parser_free(parser); return -1; } else if(r == 0) { asx_parser_free(parser); if(!m) - mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_NoEntryFoundInTheMenuDefinition); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] No entry found in the menu definition.\n"); return m ? 1 : 0; } // Has it a name ? name = asx_get_attrib("name",attribs); if(!name) { - mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ListMenuEntryDefinitionsNeedAName,parser->line); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] List menu entry definitions need a name (line %d).\n",parser->line); free(element); if(body) free(body); asx_free_attribs(attribs); @@ -157,7 +157,7 @@ static int open_cmdlist(menu_t* menu, char* args) { menu->close = close_menu; if(!args) { - mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ListMenuNeedsAnArgument); + mp_tmsg(MSGT_GLOBAL,MSGL_WARN,"[MENU] List menu needs an argument.\n"); return 0; } |