diff gui/interface.c @ 33024:21e0de9c355f

Show GUI message when GUI must exit. Besides, change exit() to exit_player().
author ib
date Fri, 25 Mar 2011 11:28:25 +0000
parents ba432e34dc7e
children 7f06781043d9
line wrap: on
line diff
--- a/gui/interface.c	Fri Mar 25 10:33:48 2011 +0000
+++ b/gui/interface.c	Fri Mar 25 11:28:25 2011 +0000
@@ -219,12 +219,12 @@
 
     switch (i) {
     case -1:
-        mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName);
-        exit(0);
+        gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName);
+        exit_player(EXIT_ERROR);
 
     case -2:
-        mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_SKIN_SKINCFG_SkinCfgReadError, skinName);
-        exit(0);
+        gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinCfgReadError, skinName);
+        exit_player(EXIT_ERROR);
     }
 
     // initialize windows
@@ -232,8 +232,8 @@
     mplDrawBuffer = malloc(appMPlayer.main.Bitmap.ImageSize);
 
     if (!mplDrawBuffer) {
-        fprintf(stderr, MSGTR_NEMDB); // NOTE TO MYSELF: (g)mp_msg this
-        exit(0);
+        gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB);
+        exit_player(EXIT_ERROR);
     }
 
     if (gui_save_pos) {
@@ -887,7 +887,7 @@
         }
 
         if (!video_driver_list && !video_driver_list[0]) {
-            gtkMessageBox(GTK_MB_FATAL, MSGTR_IDFGCVD);
+            gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_IDFGCVD);
             exit_player(EXIT_ERROR);
         }