[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk menu.c,1.5,1.6

Zoltan Ponekker pontscho at mplayer.dev.hu
Tue Dec 18 23:00:27 CET 2001


Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mplayer:/var/tmp.root/cvs-serv32335/Gui/mplayer/gtk

Modified Files:
	menu.c 
Log Message:
fix bug, if dvd titles is 'none', vagymi

Index: menu.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/menu.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- menu.c	18 Dec 2001 21:33:02 -0000	1.5
+++ menu.c	18 Dec 2001 22:00:25 -0000	1.6
@@ -258,6 +258,7 @@
 {
  GtkWidget * Menu = NULL;
  GtkWidget * SubMenu = NULL;
+ GtkWidget * MenuItem = NULL;
 
  Menu=gtk_menu_new();
 
@@ -301,7 +302,11 @@
          AddMenuItem( DVDTitleMenu,tmp,( (i+1) << 16 ) + evSetDVDTitle );
         }
       }
-      else AddMenuItem( DVDTitleMenu,MSGTR_MENU_None,evNone );
+      else 
+       {
+        MenuItem=AddMenuItem( DVDTitleMenu,MSGTR_MENU_None,evNone );
+        gtk_widget_set_sensitive( MenuItem,FALSE );
+       }
     DVDChapterMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_Chapters );
      if ( gtkShMem->DVD.chapters )
       {
@@ -312,7 +317,11 @@
          AddMenuItem( DVDChapterMenu,tmp,( (i+1) << 16 ) + evSetDVDChapter );
         }
       }
-      else DVDChapterMenu=AddMenuItem( DVDChapterMenu,MSGTR_MENU_None,evNone );
+      else 
+       {
+        MenuItem=AddMenuItem( DVDChapterMenu,MSGTR_MENU_None,evNone );
+        gtk_widget_set_sensitive( MenuItem,FALSE );
+       }
     DVDAudioLanguageMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_AudioLanguages );
      if ( gtkShMem->DVD.nr_of_audio_channels )
       {
@@ -323,7 +332,11 @@
          AddMenuItem( DVDAudioLanguageMenu,tmp,( gtkShMem->DVD.audio_streams[i].id << 16 ) + evSetDVDAudio );
         }
       }
-      else DVDChapterMenu=AddMenuItem( DVDAudioLanguageMenu,MSGTR_MENU_None,evNone );
+      else 
+       {
+        MenuItem=AddMenuItem( DVDAudioLanguageMenu,MSGTR_MENU_None,evNone );
+        gtk_widget_set_sensitive( MenuItem,FALSE );
+       }
     DVDSubtitleLanguageMenu=AddSubMenu( DVDSubMenu,MSGTR_MENU_SubtitleLanguages );
      if ( gtkShMem->DVD.nr_of_subtitles )
       {
@@ -334,7 +347,11 @@
          AddMenuItem( DVDSubtitleLanguageMenu,tmp,( gtkShMem->DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle );
         }
       }
-      else DVDChapterMenu=AddMenuItem( DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone );
+      else 
+       {
+        MenuItem=AddMenuItem( DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone );
+        gtk_widget_set_sensitive( MenuItem,FALSE );
+       }
 #endif
   AddSeparator( Menu );
   AddMenuItem( Menu,MSGTR_MENU_PlayList, evPlayList );




More information about the MPlayer-cvslog mailing list