From 843ab7adfd5adf8121cbc5e9f8a8aab08c7f648e Mon Sep 17 00:00:00 2001 From: Eric Petit Date: Fri, 30 May 2003 18:43:31 +0000 Subject: [PATCH] modules/gui/beos/* : fixed "Goto Menu" menuitem enabling --- modules/gui/beos/InterfaceWindow.cpp | 5 ++--- modules/gui/beos/VlcWrapper.cpp | 16 +++++++++++++--- modules/gui/beos/VlcWrapper.h | 6 +++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/modules/gui/beos/InterfaceWindow.cpp b/modules/gui/beos/InterfaceWindow.cpp index b96500da87..3c6776bc8a 100644 --- a/modules/gui/beos/InterfaceWindow.cpp +++ b/modules/gui/beos/InterfaceWindow.cpp @@ -2,7 +2,7 @@ * InterfaceWindow.cpp: beos interface ***************************************************************************** * Copyright (C) 1999, 2000, 2001 VideoLAN - * $Id: InterfaceWindow.cpp,v 1.40 2003/05/30 17:30:54 titer Exp $ + * $Id: InterfaceWindow.cpp,v 1.41 2003/05/30 18:43:31 titer Exp $ * * Authors: Jean-Marc Dressler * Samuel Hocevar @@ -858,8 +858,7 @@ InterfaceWindow::_SetMenusEnabled(bool hasFile, bool hasChapters, bool hasTitles if ( fSpeedMenu->IsEnabled() != hasFile ) fSpeedMenu->SetEnabled( hasFile ); // "goto menu" menu item - bool hasMenu = config_GetInt( p_intf, "beos-dvdmenus" ) ? - hasTitles : false; + bool hasMenu = p_wrapper->IsUsingMenus(); if ( fGotoMenuMI->IsEnabled() != hasMenu ) fGotoMenuMI->SetEnabled( hasMenu ); Unlock(); diff --git a/modules/gui/beos/VlcWrapper.cpp b/modules/gui/beos/VlcWrapper.cpp index 1f7ac5e9d7..e33cb386cb 100644 --- a/modules/gui/beos/VlcWrapper.cpp +++ b/modules/gui/beos/VlcWrapper.cpp @@ -2,7 +2,7 @@ * VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port) ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: VlcWrapper.cpp,v 1.31 2003/05/30 17:30:54 titer Exp $ + * $Id: VlcWrapper.cpp,v 1.32 2003/05/30 18:43:31 titer Exp $ * * Authors: Florian G. Pflug * Jon Lech Johansen @@ -809,12 +809,22 @@ bool VlcWrapper::IsMuted() * DVD * *******/ +bool VlcWrapper::IsUsingMenus() +{ + if( !p_input ) + return false; + + if( !strncmp( PlaylistItemName( PlaylistCurrent() ), "dvdplay:", 8 ) ) + return true; + + return false; +} + bool VlcWrapper::HasTitles() { if( !p_input ) - { return false; - } + return ( p_input->stream.i_area_nb > 1 ); } diff --git a/modules/gui/beos/VlcWrapper.h b/modules/gui/beos/VlcWrapper.h index 89a1f28aba..0af0afdf51 100644 --- a/modules/gui/beos/VlcWrapper.h +++ b/modules/gui/beos/VlcWrapper.h @@ -2,7 +2,7 @@ * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port) ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: VlcWrapper.h,v 1.24 2003/05/30 17:30:54 titer Exp $ + * $Id: VlcWrapper.h,v 1.25 2003/05/30 18:43:31 titer Exp $ * * Authors: Florian G. Pflug * Jon Lech Johansen @@ -66,9 +66,8 @@ public: VlcWrapper( intf_thread_t *p_intf ); ~VlcWrapper(); - void UpdateInput(); - /* Input */ + void UpdateInput(); bool HasInput(); int InputStatus(); int InputRate(); @@ -126,6 +125,7 @@ public: bool IsMuted(); /* DVD */ + bool IsUsingMenus(); bool HasTitles(); BList * GetTitles(); void PrevTitle(); -- 2.39.5