summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-03 15:19:52 +0000
committerods15 <ods15@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-09-03 15:19:52 +0000
commit4d58623130453489e7b7e185ee2ea82962d639dd (patch)
tree722024c4e73110181591f84e9cf0d6943faeea7c /Gui
parent2a57b62b04a64cbd1eb671aff43319f1e8bcc14b (diff)
downloadmpv-4d58623130453489e7b7e185ee2ea82962d639dd.tar.bz2
mpv-4d58623130453489e7b7e185ee2ea82962d639dd.tar.xz
Remove many annoying GTK includes in every compile line and remove GTK
stuff from mp_msg by using a wrapper function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16375 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/interface.c21
-rw-r--r--Gui/interface.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/Gui/interface.c b/Gui/interface.c
index 555b02b850..58e85c4687 100644
--- a/Gui/interface.c
+++ b/Gui/interface.c
@@ -1292,3 +1292,24 @@ int import_playtree_playlist_into_gui(play_tree_t* my_playtree, m_config_t* conf
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
+ }
+}
diff --git a/Gui/interface.h b/Gui/interface.h
index d9410c90cd..d3c3d2d313 100644
--- a/Gui/interface.h
+++ b/Gui/interface.h
@@ -150,6 +150,7 @@ extern int guiGetEvent( int type,char * arg );
extern void guiEventHandling( void );
extern void guiLoadFont( void );
extern void guiLoadSubtitle( char * name );
+extern void guiMessageBox(int level, char * str);
typedef struct _plItem
{