[Mplayer-cvslog] CVS: main/Gui/mplayer psignal.c,1.14,1.15 widgets.c,1.9,1.10 widgets.h,1.5,1.6
Zoltan Ponekker
pontscho at mplayer.dev.hu
Thu Sep 20 12:27:26 CEST 2001
Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mplayer:/var/tmp.root/cvs-serv12064/Gui/mplayer
Modified Files:
psignal.c widgets.c widgets.h
Log Message:
add gui error handling jol.
Index: psignal.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/psignal.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- psignal.c 17 Sep 2001 21:16:00 -0000 1.14
+++ psignal.c 20 Sep 2001 10:27:24 -0000 1.15
@@ -95,7 +95,25 @@
break;
case evMessageBox:
gtk_label_set_text( gtkMessageBoxText,(char *)gtkShMem->mb.str );
- if ( gtkVisibleMessageBox ) gtk_widget_hide( MessageBox );
+ if( gtkVisibleMessageBox ) gtk_widget_hide( MessageBox );
+ switch( gtkShMem->mb.type)
+ {
+ case GTK_MB_FATAL:
+ gtk_window_set_title (GTK_WINDOW (MessageBox), "fatal error ...");
+ gtk_widget_hide( WarningPixmap );
+ gtk_widget_show( ErrorPixmap );
+ break;
+ case GTK_MB_ERROR:
+ gtk_window_set_title (GTK_WINDOW (MessageBox), "error ...");
+ gtk_widget_hide( WarningPixmap );
+ gtk_widget_show( ErrorPixmap );
+ break;
+ case GTK_MB_WARNING:
+ gtk_window_set_title (GTK_WINDOW (MessageBox), "warning ...");
+ gtk_widget_show( WarningPixmap );
+ gtk_widget_hide( ErrorPixmap );
+ break;
+ }
gtk_widget_show( MessageBox );
gtkVisibleMessageBox=1;
break;
Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- widgets.c 17 Sep 2001 21:16:00 -0000 1.9
+++ widgets.c 20 Sep 2001 10:27:24 -0000 1.10
@@ -25,18 +25,20 @@
#include "pixmaps/up.xpm"
#include "pixmaps/dir.xpm"
#include "pixmaps/file.xpm"
-#include "pixmaps/logo.xpm"
#include "pixmaps/about.xpm"
-#include "pixmaps/stop.xpm"
#include "pixmaps/error.xpm"
#include "pixmaps/warning.xpm"
GtkWidget * SkinBrowser;
GtkWidget * PlayList;
GtkWidget * FileSelect;
-GtkWidget * MessageBox;
GtkWidget * AboutBox;
GtkWidget * Options;
+
+GtkWidget * MessageBox;
+
+GtkWidget * WarningPixmap;
+GtkWidget * ErrorPixmap;
int gtkVisibleSkinBrowser = 0;
int gtkVisiblePlayList = 0;
Index: widgets.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- widgets.h 17 Sep 2001 21:16:00 -0000 1.5
+++ widgets.h 20 Sep 2001 10:27:24 -0000 1.6
@@ -59,10 +59,14 @@
extern GtkWidget * SkinBrowser;
extern GtkWidget * PlayList;
extern GtkWidget * FileSelect;
-extern GtkWidget * MessageBox;
extern GtkWidget * AboutBox;
extern GtkWidget * Options;
+extern GtkWidget * MessageBox;
+
+extern GtkWidget * WarningPixmap;
+extern GtkWidget * ErrorPixmap;
+
extern GtkWidget * SkinList;
extern GtkWidget * gtkMessageBoxText;
@@ -86,4 +90,4 @@
extern void gtkSetDefaultToCList( GtkWidget * list,char * item );
extern int gtkFindCList( GtkWidget * list,char * item );
-#endif
\ No newline at end of file
+#endif
More information about the MPlayer-cvslog
mailing list