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

ib subversion at mplayerhq.hu
Tue Apr 3 19:18:41 EEST 2018


Author: ib
Date: Tue Apr  3 19:18:41 2018
New Revision: 38031

Log:
Make DVD subtitle menu item "(none)" a check menu item.

This is supposed to indicate that it is possible to disable DVD
subtitles.

However, in order to disable DVD subtitles, dvdsub_id must be set -2,
because -1 means that a suitable subtitle (e.g. suitable for option
'slang') will be selected.

Consequently, the check cannot be performed using dvdsub_id but has to
be performed using the actual selected subtitle ID stored in MPContext's
d_sub->id.

Modified:
   trunk/gui/dialog/menu.c

Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c	Tue Apr  3 18:52:24 2018	(r38030)
+++ trunk/gui/dialog/menu.c	Tue Apr  3 19:18:41 2018	(r38031)
@@ -768,13 +768,13 @@ GtkWidget * CreatePopUpMenu( void )
        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 );
+       AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_, guiInfo.mpcontext->d_sub->id == -2, ( -2 << 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.mpcontext->d_sub->id == guiInfo.Subtitle[i].id,
                            ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle );
         }
       }


More information about the MPlayer-cvslog mailing list