# HG changeset patch # User reynaldo # Date 1143700858 0 # Node ID 6927fabaef92320bef2f0c3a2c1aa1f941d9771c # Parent 98eb966a4024f171abd1fe5a5aed79bd8f288c45 Part1 of several printf2mp_msg changes in patch from Otvos Attila oattila AT chello DOT hu diff -r 98eb966a4024 -r 6927fabaef92 help/help_mp-en.h --- a/help/help_mp-en.h Thu Mar 30 02:52:54 2006 +0000 +++ b/help/help_mp-en.h Thu Mar 30 06:40:58 2006 +0000 @@ -1066,6 +1066,7 @@ #define MSGTR_AO_OSS_CantUseGetospace "[AO OSS] audio_setup: driver doesn't support SNDCTL_DSP_GETOSPACE :-(\n" #define MSGTR_AO_OSS_CantUseSelect "[AO OSS]\n *** Your audio driver DOES NOT support select() ***\n Recompile MPlayer with #undef HAVE_AUDIO_SELECT in config.h !\n\n" #define MSGTR_AO_OSS_CantReopen "[AO OSS]\nFatal error: *** CANNOT RE-OPEN / RESET AUDIO DEVICE *** %s\n" +#define MSGTR_AO_OSS_UnknownUnsupportedFormat "[AO OSS] Unknown/Unsupported OSS format: %x.\n" // ao_arts.c #define MSGTR_AO_ARTS_CantInit "[AO ARTS] %s\n" @@ -1430,3 +1431,59 @@ #define MSGTR_MPDEMUX_NW_NoPasswdProvidedTryingBlank "No password provided, trying blank password.\n" #define MSGTR_MPDEMUX_NW_ErrServerReturned "Server return %d: %s\n" #define MSGTR_MPDEMUX_NW_CacheSizeSetTo "Cache size set to %d KBytes\n" + +// ========================== LIBMPMENU =================================== + +// libmenu/menu.c +#define MSGTR_LIBMENU_SyntaxErrorAtLine "[MENU] Syntax error at line: %d\n" +#define MSGTR_LIBMENU_MenuDefinitionsNeedANameAttrib "[MENU] Menu definitions need a name attribute (line %d)\n" +#define MSGTR_LIBMENU_BadAttrib "[MENU] Bad attribute %s=%s in menu '%s' at line %d\n" +#define MSGTR_LIBMENU_UnknownMenuType "[MENU] Unknown menu type '%s' at line %d\n" +#define MSGTR_LIBMENU_CantOpenConfigFile "[MENU] Can't open menu config file: %s\n" +#define MSGTR_LIBMENU_ConfigFileIsTooBig "[MENU] Config file is too big (> %d KB)\n" +#define MSGTR_LIBMENU_ConfigFileIsEmpty "[MENU] Config file is empty\n" +#define MSGTR_LIBMENU_MenuNotFound "[MENU] Menu %s not found.\n" +#define MSGTR_LIBMENU_MenuInitFailed "[MENU] Menu '%s': init failed\n" +#define MSGTR_LIBMENU_UnsupportedOutformat "[MENU] Unsupported output format!!!!\n" + +// libmenu/menu_cmdlist.c +#define MSGTR_LIBMENU_NoEntryFoundInTheMenuDefinition "[MENU] No entry found in the menu definition.\n" +#define MSGTR_LIBMENU_ListMenuEntryDefinitionsNeedAName "[MENU] List menu entry definitions needs a name (line %d).\n" +#define MSGTR_LIBMENU_ListMenuNeedAnArgument "[MENU] List menu needs an argument.\n" + +// libmenu/menu_console.c +#define MSGTR_LIBMENU_WaitPidError "[MENU] Waitpid error: %s.\n" +#define MSGTR_LIBMENU_SelectError "[MENU] Select error.\n" +#define MSGTR_LIBMENU_ReadErrorOnChilds "[MENU] Read error on child's: %s.\n" +#define MSGTR_LIBMENU_ConsoleRun "[MENU] Console run: %s ...\n" +#define MSGTR_LIBMENU_AChildIsAlreadyRunning "[MENU] A child is alredy running.\n" +#define MSGTR_LIBMENU_ForkFailed "[MENU] Fork failed !!!\n" +#define MSGTR_LIBMENU_WriteError "[MENU] Write error.\n" + +// libmenu/menu_filesel.c +#define MSGTR_LIBMENU_OpendirError "[MENU] Opendir error: %s.\n" +#define MSGTR_LIBMENU_ReallocError "[MENU] Realloc error: %s.\n" +#define MSGTR_LIBMENU_MallocError "[MENU] Memory allocation error: %s.\n" +#define MSGTR_LIBMENU_ReaddirError "[MENU] Readdir error: %s.\n" +#define MSGTR_LIBMENU_CantOpenDirectory "[MENU] Can't open directory %s\n" + +// libmenu/menu_param.c +#define MSGTR_LIBMENU_NoEntryFoundInTheMenuDefinition "[MENU] No entry found in the menu definition.\n" +#define MSGTR_LIBMENU_SubmenuDefinitionNeedAMenuAttribut "[MENU] Submenu definition needs a 'menu' attribute.\n" +#define MSGTR_LIBMENU_PrefMenuEntryDefinitionsNeed "[MENU] Pref menu entry definitions need a valid 'property' attribute (line %d).\n" +#define MSGTR_LIBMENU_PrefMenuNeedAnArgument "[MENU] Pref menu needs an argument.\n" + +// libmenu/menu_pt.c +#define MSGTR_LIBMENU_CantfindTheTargetItem "[MENU] Can't find the target item ????\n" +#define MSGTR_LIBMENU_FailedToBuildCommand "[MENU] Failed to build command: %s.\n" + +// libmenu/menu_txt.c +#define MSGTR_LIBMENU_MenuTxtNeedATxtFileName "[MENU] Text menu needs a txt file name (param file).\n" +#define MSGTR_LIBMENU_MenuTxtCantOpen "[MENU] Can't open: %s.\n" +#define MSGTR_LIBMENU_WarningTooLongLineSplitting "[MENU] Warning, line too long. Splitting it.\n" +#define MSGTR_LIBMENU_ParsedLines "[MENU] Parsed %d lines.\n" + +// libmenu/vf_menu.c +#define MSGTR_LIBMENU_UnknownMenuCommand "[MENU] Unknown command: '%s'.\n" +#define MSGTR_LIBMENU_FailedToOpenMenu "[MENU] Failed to open menu: '%s'.\n" + diff -r 98eb966a4024 -r 6927fabaef92 libao2/ao_oss.c --- a/libao2/ao_oss.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libao2/ao_oss.c Thu Mar 30 06:40:58 2006 +0000 @@ -140,7 +140,7 @@ case AFMT_AC3: return AF_FORMAT_AC3; #endif } - printf("Unknown/not supported OSS format: %x\n", format); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_AO_OSS_UnknownUnsupportedFormat, format); return -1; } diff -r 98eb966a4024 -r 6927fabaef92 libao2/audio_out.c --- a/libao2/audio_out.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libao2/audio_out.c Thu Mar 30 06:40:58 2006 +0000 @@ -139,9 +139,9 @@ mp_msg(MSGT_GLOBAL, MSGL_INFO, "ID_AUDIO_OUTPUTS\n"); while (audio_out_drivers[i]) { const ao_info_t *info = audio_out_drivers[i++]->info; - printf("\t%s\t%s\n", info->short_name, info->name); + mp_msg(MSGT_GLOBAL, MSGL_INFO,"\t%s\t%s\n", info->short_name, info->name); } - printf("\n"); + mp_msg(MSGT_GLOBAL, MSGL_INFO,"\n"); } ao_functions_t* init_best_audio_out(char** ao_list,int use_plugin,int rate,int channels,int format,int flags){ diff -r 98eb966a4024 -r 6927fabaef92 libmenu/menu.c --- a/libmenu/menu.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/menu.c Thu Mar 30 06:40:58 2006 +0000 @@ -1,5 +1,7 @@ #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include #include @@ -63,7 +65,7 @@ while(1) { r = asx_get_element(parser,&buffer,&element,&body,&attribs); if(r < 0) { - printf("Syntax error at line %d\n",parser->line); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_SyntaxErrorAtLine,parser->line); asx_parser_free(parser); return 0; } else if(r == 0) { @@ -73,7 +75,7 @@ // Has it a name ? name = asx_get_attrib("name",attribs); if(!name) { - printf("Menu definitions need a name attrib (line %d)\n",parser->line); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuDefinitionsNeedANameAttrib,parser->line); free(element); if(body) free(body); asx_free_attribs(attribs); @@ -98,13 +100,13 @@ for(i = 0 ; attribs[2*i] ; i++) { if(strcasecmp(attribs[2*i],"name") == 0) continue; if(!m_struct_set(&minfo->priv_st,menu_list[mcount].cfg,attribs[2*i], attribs[2*i+1])) - printf("Bad attrib %s=%s in menu %s at line %d\n",attribs[2*i],attribs[2*i+1], + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_BadAttrib,attribs[2*i],attribs[2*i+1], name,parser->line); } mcount++; memset(&menu_list[mcount],0,sizeof(menu_def_t)); } else { - printf("Unknown menu type %s at line %d\n",element,parser->line); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnknownMenuType,element,parser->line); free(name); if(body) free(body); } @@ -130,7 +132,7 @@ #endif fd = open(cfg_file, O_RDONLY); if(fd < 0) { - printf("Can't open menu config file: %s\n",cfg_file); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_CantOpenConfigFile,cfg_file); return 0; } buffer = malloc(bl); @@ -138,7 +140,7 @@ int r; if(bl - br < BUF_MIN) { if(bl >= BUF_MAX) { - printf("Menu config file is too big (> %d KB)\n",BUF_MAX/1024); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ConfigFileIsTooBig,BUF_MAX/1024); close(fd); free(buffer); return 0; @@ -151,7 +153,7 @@ br += r; } if(!br) { - printf("Menu config file is empty\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ConfigFileIsEmpty); return 0; } buffer[br-1] = '\0'; @@ -208,7 +210,7 @@ break; } if(menu_list[i].name == NULL) { - printf("Menu %s not found\n",name); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuNotFound,name); return NULL; } m = calloc(1,sizeof(menu_t)); @@ -219,7 +221,7 @@ if(m->priv) m_struct_free(m->priv_st,m->priv); free(m); - printf("Menu %s: init failed\n",name); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuInitFailed,name); return NULL; } @@ -301,7 +303,7 @@ int font; if(!draw_alpha) { - printf("Unsupported outformat !!!!\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnsupportedOutformat); return; } @@ -332,7 +334,7 @@ draw_alpha_f draw_alpha = get_draw_alpha(mpi->imgfmt); if(!draw_alpha) { - printf("Unsupported outformat !!!!\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnsupportedOutformat); return; } diff -r 98eb966a4024 -r 6927fabaef92 libmenu/menu_cmdlist.c --- a/libmenu/menu_cmdlist.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/menu_cmdlist.c Thu Mar 30 06:40:58 2006 +0000 @@ -1,5 +1,7 @@ #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include #include @@ -106,19 +108,19 @@ while(1) { r = asx_get_element(parser,&args,&element,&body,&attribs); if(r < 0) { - printf("Syntax error at line %d\n",parser->line); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_SyntaxErrorAtLine,parser->line); asx_parser_free(parser); return -1; } else if(r == 0) { asx_parser_free(parser); if(!m) - printf("No entry found in the menu definition\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_NoEntryFoundInTheMenuDefinition); return m ? 1 : 0; } // Has it a name ? name = asx_get_attrib("name",attribs); if(!name) { - printf("List menu entry definitions need a name (line %d)\n",parser->line); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ListMenuEntryDefinitionsNeedAName,parser->line); free(element); if(body) free(body); asx_free_attribs(attribs); @@ -145,7 +147,7 @@ menu->close = close; if(!args) { - printf("List menu need an argument\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_ListMenuNeedAnArgument); return 0; } diff -r 98eb966a4024 -r 6927fabaef92 libmenu/menu_console.c --- a/libmenu/menu_console.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/menu_console.c Thu Mar 30 06:40:58 2006 +0000 @@ -1,5 +1,7 @@ #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include #include @@ -260,10 +262,10 @@ mpriv->prompt = mpriv->mp_prompt; //add_line(mpriv,"Child process exited"); } - else printf("waitpid error: %s\n",strerror(errno)); + else mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_WaitPidError,strerror(errno)); } } else if(r < 0) { - printf("select error\n"); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_SelectError); return; } @@ -273,7 +275,7 @@ if(w) mpriv->add_line = 1; r = read(mpriv->child_fd[i],buffer,255); if(r < 0) - printf("Read error on child's %s \n", i == 1 ? "stdout":"stderr"); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ReadErrorOnChilds, i == 1 ? "stdout":"stderr"); else if(r>0) { buffer[r] = '\0'; add_string(mpriv,buffer); @@ -291,9 +293,9 @@ #ifndef __MINGW32__ int in[2],out[2],err[2]; - printf("Console run %s ...\n",cmd); + mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_LIBMENU_ConsoleRun,cmd); if(mpriv->child) { - printf("A child is alredy running\n"); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_AChildIsAlreadyRunning); return 0; } @@ -303,7 +305,7 @@ mpriv->child = fork(); if(mpriv->child < 0) { - printf("Fork failed !!!\n"); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ForkFailed); close_pipe(in); close_pipe(out); close_pipe(err); @@ -377,14 +379,14 @@ while(l > 0) { int w = write(mpriv->child_fd[0],str,l); if(w < 0) { - printf("Write error\n"); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_WriteError); break; } l -= w; str += w; } if(write(mpriv->child_fd[0],"\n",1) < 0) - printf("Write error\n"); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_WriteError); enter_cmd(menu); return; } diff -r 98eb966a4024 -r 6927fabaef92 libmenu/menu_filesel.c --- a/libmenu/menu_filesel.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/menu_filesel.c Thu Mar 30 06:40:58 2006 +0000 @@ -12,6 +12,8 @@ #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include "m_struct.h" #include "m_option.h" @@ -142,7 +144,7 @@ mpriv->p.title = replace_path(mpriv->title,mpriv->dir); if ((dirp = opendir (mpriv->dir)) == NULL){ - printf("opendir error: %s", strerror(errno)); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_OpendirError, strerror(errno)); return 0; } @@ -155,7 +157,7 @@ if(n%20 == 0){ // Get some more mem if((tp = (char **) realloc(namelist, (n+20) * sizeof (char *))) == NULL) { - printf("realloc error: %s", strerror(errno)); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ReallocError, strerror(errno)); n--; goto bailout; } @@ -164,7 +166,7 @@ namelist[n] = (char *) malloc(strlen(dp->d_name) + 2); if(namelist[n] == NULL){ - printf("malloc error: %s", strerror(errno)); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_MallocError, strerror(errno)); n--; goto bailout; } @@ -182,7 +184,7 @@ qsort(namelist, n, sizeof(char *), (kill_warn)compare); if (n < 0) { - printf("readdir error: %s\n",strerror(errno)); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_ReaddirError,strerror(errno)); return 0; } while(n--) { @@ -193,7 +195,7 @@ e->d = 1; menu_list_add_entry(menu,e); }else{ - printf("malloc error: %s", strerror(errno)); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_MallocError, strerror(errno)); } free(namelist[n]); } @@ -237,7 +239,7 @@ } menu_list_uninit(menu,free_entry); if(!open_dir(menu,p)) { - printf("Can't open directory %s\n",p); + mp_msg(MSGT_GLOBAL,MSGL_ERR,MSGTR_LIBMENU_CantOpenDirectory,p); menu->cl = 1; } free(p); diff -r 98eb966a4024 -r 6927fabaef92 libmenu/menu_param.c --- a/libmenu/menu_param.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/menu_param.c Thu Mar 30 06:40:58 2006 +0000 @@ -97,13 +97,13 @@ while(1) { r = asx_get_element(parser,&args,&element,&body,&attribs); if(r < 0) { - mp_msg(MSGT_OSD_MENU,MSGL_ERR,"Syntax error at line %d\n",parser->line); + mp_msg(MSGT_OSD_MENU,MSGL_ERR,MSGTR_LIBMENU_SyntaxErrorAtLine,parser->line); asx_parser_free(parser); return -1; } else if(r == 0) { asx_parser_free(parser); if(!m) - mp_msg(MSGT_OSD_MENU,MSGL_WARN,"No entry found in the menu definition\n"); + mp_msg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_NoEntryFoundInTheMenuDefinition); m = calloc(1,sizeof(struct list_entry_s)); m->p.txt = strdup("Back"); menu_list_add_entry(menu,m); @@ -112,7 +112,7 @@ if(!strcmp(element,"menu")) { name = asx_get_attrib("menu",attribs); if(!name) { - mp_msg(MSGT_OSD_MENU,MSGL_WARN,"Submenu definition need a 'menu' attribut.\n"); + mp_msg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_SubmenuDefinitionNeedAMenuAttribut); goto next_element; } m = calloc(1,sizeof(struct list_entry_s)); @@ -127,8 +127,7 @@ name = asx_get_attrib("property",attribs); opt = name ? mp_property_find(name) : NULL; if(!opt) { - mp_msg(MSGT_OSD_MENU,MSGL_WARN,"Pref menu entry definitions need a valid 'property'" - " attribut (line %d)\n",parser->line); + mp_msg(MSGT_OSD_MENU,MSGL_WARN,MSGTR_LIBMENU_PrefMenuEntryDefinitionsNeed,parser->line); goto next_element; } m = calloc(1,sizeof(struct list_entry_s)); @@ -239,7 +238,7 @@ if(!args) { - mp_msg(MSGT_OSD_MENU,MSGL_ERR,"Pref menu need an argument\n"); + mp_msg(MSGT_OSD_MENU,MSGL_ERR,MSGTR_LIBMENU_PrefMenuNeedAnArgument); return 0; } diff -r 98eb966a4024 -r 6927fabaef92 libmenu/menu_pt.c --- a/libmenu/menu_pt.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/menu_pt.c Thu Mar 30 06:40:58 2006 +0000 @@ -5,6 +5,8 @@ //#include #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include "img_format.h" #include "mp_image.h" @@ -77,7 +79,7 @@ d--; } if(i == NULL) { - printf("Can't find the target item ????\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_CantfindTheTargetItem); break; } } @@ -87,7 +89,7 @@ if(c) mp_input_queue_cmd(c); else - printf("Failed to build command %s\n",str); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_FailedToBuildCommand,str); } break; default: menu_list_read_cmd(menu,cmd); diff -r 98eb966a4024 -r 6927fabaef92 libmenu/menu_txt.c --- a/libmenu/menu_txt.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/menu_txt.c Thu Mar 30 06:40:58 2006 +0000 @@ -1,5 +1,7 @@ #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include #include @@ -129,13 +131,13 @@ menu->read_key = read_key; if(!mpriv->file) { - printf("Menu txt need a txt file name (param file)\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuTxtNeedATxtFileName); return 0; } fd = fopen(mpriv->file,"r"); if(!fd) { - printf("Menu txt can't open: %s\n",mpriv->file); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_MenuTxtCantOpen,mpriv->file); return 0; } @@ -166,7 +168,7 @@ mpriv->num_lines++; } if(pos >= BUF_SIZE-1) { - printf("Warning too long line, splitting it\n"); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_WarningTooLongLineSplitting); mpriv->lines = realloc(mpriv->lines,(mpriv->num_lines + 1)*sizeof(char*)); mpriv->lines[mpriv->num_lines] = strdup(buf); mpriv->num_lines++; @@ -174,7 +176,7 @@ } } - printf("Parsed %d lines\n",mpriv->num_lines); + mp_msg(MSGT_GLOBAL,MSGL_INFO,MSGTR_LIBMENU_ParsedLines,mpriv->num_lines); return 1; } diff -r 98eb966a4024 -r 6927fabaef92 libmenu/vf_menu.c --- a/libmenu/vf_menu.c Thu Mar 30 02:52:54 2006 +0000 +++ b/libmenu/vf_menu.c Thu Mar 30 06:40:58 2006 +0000 @@ -1,5 +1,7 @@ #include "config.h" +#include "mp_msg.h" +#include "help_mp.h" #include #include @@ -116,7 +118,7 @@ else if(strcmp(arg,"hide") == 0) priv->current->show = 0; else - printf("Unknown menu command: '%s'\n",arg); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnknownMenuCommand,arg); return 1; } case MP_CMD_SET_MENU : { @@ -124,7 +126,7 @@ menu_t* l = priv->current; priv->current = menu_open(menu); if(!priv->current) { - printf("Failed to open menu '%s'\n",menu); + mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_FailedToOpenMenu,menu); priv->current = l; priv->current->show = 0; } else {