Mercurial > mplayer.hg
diff Gui/interface.c @ 16374:e2e231134056
Remove many annoying GTK includes in every compile line and remove GTK
stuff from mp_msg by using a wrapper function.
author | ods15 |
---|---|
date | Sat, 03 Sep 2005 15:19:52 +0000 |
parents | 2d1ad16b6021 |
children | 0e1471d9da74 |
line wrap: on
line diff
--- a/Gui/interface.c Sat Sep 03 14:41:09 2005 +0000 +++ b/Gui/interface.c Sat Sep 03 15:19:52 2005 +0000 @@ -1292,3 +1292,24 @@ return result; } + +// wrapper function for mp_msg to display a message box for errors and warnings. + +void guiMessageBox(int level, char * str) { + switch(level) { + case MSGL_FATAL: + gtkMessageBox(GTK_MB_FATAL|GTK_MB_SIMPLE, str); + break; + case MSGL_ERR: + gtkMessageBox(GTK_MB_ERROR|GTK_MB_SIMPLE, str); + break; +#if 0 +// WARNING! Do NOT enable this! There are too many non-critical messages with +// MSGL_WARN, for example: broken SPU packets, codec's bit error messages, +// etc etc, they should not raise up a new window every time. + case MSGL_WARN: + gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, str); + break; +#endif + } +}