changeset 34455:00cf27b14c15

Replace goto label by an internal event case expression.
author ib
date Thu, 12 Jan 2012 10:31:39 +0000
parents 5a45efc630b8
children d04da1858866
files gui/app.h gui/ui/main.c gui/win32/skinload.h
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gui/app.h	Thu Jan 12 10:08:25 2012 +0000
+++ b/gui/app.h	Thu Jan 12 10:31:39 2012 +0000
@@ -88,6 +88,7 @@
 #define ivSetCDTrack      5014
 
 #define ivRedraw          7002
+#define ivPlayDVD         7003
 
 typedef struct {
     int message;
--- a/gui/ui/main.c	Thu Jan 12 10:08:25 2012 +0000
+++ b/gui/ui/main.c	Thu Jan 12 10:31:39 2012 +0000
@@ -177,27 +177,27 @@
 #ifdef CONFIG_DVDREAD
    case ivSetDVDSubtitle:
         dvdsub_id=iparam;
-        goto play_dvd_2;
+        uiEventHandling( ivPlayDVD, 0 );
         break;
    case ivSetDVDAudio:
         audio_id=iparam;
-        goto play_dvd_2;
+        uiEventHandling( ivPlayDVD, 0 );
         break;
    case ivSetDVDChapter:
         guiInfo.Chapter=iparam;
-        goto play_dvd_2;
+        uiEventHandling( ivPlayDVD, 0 );
         break;
    case ivSetDVDTitle:
         guiInfo.Track=iparam;
         guiInfo.Chapter=1;
         guiInfo.Angle=1;
-        goto play_dvd_2;
+        uiEventHandling( ivPlayDVD, 0 );
         break;
    case evPlayDVD:
         guiInfo.Track=1;
         guiInfo.Chapter=1;
         guiInfo.Angle=1;
-play_dvd_2:
+   case ivPlayDVD:
  	guiInfoMediumClear( CLEAR_ALL - CLEAR_DVD );
         guiInfo.StreamType=STREAMTYPE_DVD;
 	goto play;
@@ -393,7 +393,7 @@
 	 }
 	wsClearWindow( guiApp.subWindow );
 #ifdef CONFIG_DVDREAD
-	if ( guiInfo.StreamType == STREAMTYPE_VCD || guiInfo.StreamType == STREAMTYPE_DVD ) goto play_dvd_2;
+	if ( guiInfo.StreamType == STREAMTYPE_VCD || guiInfo.StreamType == STREAMTYPE_DVD ) uiEventHandling( ivPlayDVD, 0 );
 	 else
 #endif
 	 guiInfo.NewPlay=GUI_FILE_NEW;
--- a/gui/win32/skinload.h	Thu Jan 12 10:08:25 2012 +0000
+++ b/gui/win32/skinload.h	Thu Jan 12 10:31:39 2012 +0000
@@ -195,5 +195,6 @@
 #define ivSetCDTrack      5014
 
 #define ivRedraw          7002
+#define ivPlayDVD         7003
 
 #endif /* MPLAYER_GUI_SKINLOAD_H */