Commit 843ab7ad authored by Eric Petit's avatar Eric Petit

modules/gui/beos/* : fixed "Goto Menu" menuitem enabling

parent d1208fa6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface * InterfaceWindow.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * 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 <polux@via.ecp.fr> * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -858,8 +858,7 @@ InterfaceWindow::_SetMenusEnabled(bool hasFile, bool hasChapters, bool hasTitles ...@@ -858,8 +858,7 @@ InterfaceWindow::_SetMenusEnabled(bool hasFile, bool hasChapters, bool hasTitles
if ( fSpeedMenu->IsEnabled() != hasFile ) if ( fSpeedMenu->IsEnabled() != hasFile )
fSpeedMenu->SetEnabled( hasFile ); fSpeedMenu->SetEnabled( hasFile );
// "goto menu" menu item // "goto menu" menu item
bool hasMenu = config_GetInt( p_intf, "beos-dvdmenus" ) ? bool hasMenu = p_wrapper->IsUsingMenus();
hasTitles : false;
if ( fGotoMenuMI->IsEnabled() != hasMenu ) if ( fGotoMenuMI->IsEnabled() != hasMenu )
fGotoMenuMI->SetEnabled( hasMenu ); fGotoMenuMI->SetEnabled( hasMenu );
Unlock(); Unlock();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port) * VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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 <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -809,12 +809,22 @@ bool VlcWrapper::IsMuted() ...@@ -809,12 +809,22 @@ bool VlcWrapper::IsMuted()
* DVD * * DVD *
*******/ *******/
bool VlcWrapper::IsUsingMenus()
{
if( !p_input )
return false;
if( !strncmp( PlaylistItemName( PlaylistCurrent() ), "dvdplay:", 8 ) )
return true;
return false;
}
bool VlcWrapper::HasTitles() bool VlcWrapper::HasTitles()
{ {
if( !p_input ) if( !p_input )
{
return false; return false;
}
return ( p_input->stream.i_area_nb > 1 ); return ( p_input->stream.i_area_nb > 1 );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port) * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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 <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -66,9 +66,8 @@ public: ...@@ -66,9 +66,8 @@ public:
VlcWrapper( intf_thread_t *p_intf ); VlcWrapper( intf_thread_t *p_intf );
~VlcWrapper(); ~VlcWrapper();
void UpdateInput();
/* Input */ /* Input */
void UpdateInput();
bool HasInput(); bool HasInput();
int InputStatus(); int InputStatus();
int InputRate(); int InputRate();
...@@ -126,6 +125,7 @@ public: ...@@ -126,6 +125,7 @@ public:
bool IsMuted(); bool IsMuted();
/* DVD */ /* DVD */
bool IsUsingMenus();
bool HasTitles(); bool HasTitles();
BList * GetTitles(); BList * GetTitles();
void PrevTitle(); void PrevTitle();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment