[MPlayer-cvslog] CVS: main/Gui interface.c, 1.105, 1.106 interface.h, 1.38, 1.39
Oded Shimon CVS
syncmail at mplayerhq.hu
Sat Sep 3 17:19:55 CEST 2005
CVS change done by Oded Shimon CVS
Update of /cvsroot/mplayer/main/Gui
In directory mail:/var2/tmp/cvs-serv22174/Gui
Modified Files:
interface.c interface.h
Log Message:
Remove many annoying GTK includes in every compile line and remove GTK
stuff from mp_msg by using a wrapper function.
Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- interface.c 1 Jun 2005 09:01:41 -0000 1.105
+++ interface.c 3 Sep 2005 15:19:52 -0000 1.106
@@ -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
+ }
+}
Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- interface.h 27 Dec 2004 19:34:42 -0000 1.38
+++ interface.h 3 Sep 2005 15:19:52 -0000 1.39
@@ -150,6 +150,7 @@
extern void guiEventHandling( void );
extern void guiLoadFont( void );
extern void guiLoadSubtitle( char * name );
+extern void guiMessageBox(int level, char * str);
typedef struct _plItem
{
More information about the MPlayer-cvslog
mailing list