[MPlayer-cvslog] r38030 - trunk/gui/dialog/menu.c

ib subversion at mplayerhq.hu
Tue Apr 3 18:52:24 EEST 2018


Author: ib
Date: Tue Apr  3 18:52:24 2018
New Revision: 38030

Log:
Integrate the DVD subtitle menu into the ordinary subtitle menu.

It makes no sense to have two different menus for subtitles
(and a special one for DVDs).

Modified:
   trunk/gui/dialog/menu.c

Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c	Tue Apr  3 14:48:42 2018	(r38029)
+++ trunk/gui/dialog/menu.c	Tue Apr  3 18:52:24 2018	(r38030)
@@ -580,24 +580,6 @@ GtkWidget * CreatePopUpMenu( void )
         MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDAudioLanguageMenu,MSGTR_GUI__none_,evNone );
         gtk_widget_set_sensitive( MenuItem,FALSE );
        }
-    DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)subtitle_xpm, DVDSubMenu,MSGTR_GUI_Subtitles );
-     if ( guiInfo.Subtitles && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
-      {
-       char tmp[64]; int i;
-       AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle );
-       for ( i=0;i < guiInfo.Subtitles;i++ )
-        {
-         av_strlcpy( tmp,GetLanguage( &guiInfo.Subtitle[i].language, GET_LANG_INT ),sizeof(tmp) );
-         AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
-         dvdsub_id == guiInfo.Subtitle[i].id,
-         ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle );
-        }
-      }
-      else
-       {
-        MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,evNone );
-        gtk_widget_set_sensitive( MenuItem,FALSE );
-       }
 #endif
 #if defined(CONFIG_LIBCDIO) || defined(CONFIG_DVDREAD)
     AddMenuItem( window1, (const char*)playimage_xpm, SubMenu,MSGTR_GUI_Image"...    ", evPlayImage );
@@ -780,6 +762,24 @@ GtkWidget * CreatePopUpMenu( void )
      }
    }
 
+#ifdef CONFIG_DVDREAD
+     if ( guiInfo.Subtitles && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
+      {
+       char tmp[64]; int i;
+
+       DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)subtitle_xpm, Menu,MSGTR_GUI_Subtitles );
+       AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle );
+
+       for ( i=0;i < guiInfo.Subtitles;i++ )
+        {
+         av_strlcpy( tmp,GetLanguage( &guiInfo.Subtitle[i].language, GET_LANG_INT ),sizeof(tmp) );
+         AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
+                           dvdsub_id == guiInfo.Subtitle[i].id,
+                           ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle );
+        }
+      }
+#endif
+
   /* cheap subtitle switching for non-DVD streams */
 
   mpctx_get_global_sub_info(guiInfo.mpcontext, &subs, &sub_pos);


More information about the MPlayer-cvslog mailing list