changeset 3590:52f83f131b3d

fix bug, if dvd titles is 'none', vagymi
author pontscho
date Tue, 18 Dec 2001 22:00:25 +0000
parents 3a32e55f0138
children f7fa59e4da4f
files Gui/mplayer/gtk/menu.c
diffstat 1 files changed, 21 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/gtk/menu.c	Tue Dec 18 21:50:35 2001 +0000
+++ b/Gui/mplayer/gtk/menu.c	Tue Dec 18 22:00:25 2001 +0000
@@ -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 );