Commit 249ce1ea authored by Stephan Assmus's avatar Stephan Assmus

fixed flickering of skip buttons (and consequently crashing if you pressed them)

parent bcd17b18
...@@ -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.13 2003/01/08 02:09:15 titer Exp $ * $Id: InterfaceWindow.cpp,v 1.14 2003/01/11 19:33:09 stippi 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>
...@@ -178,7 +178,8 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name, ...@@ -178,7 +178,8 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name,
fMenuBar->AddItem( fSettingsMenu ); fMenuBar->AddItem( fSettingsMenu );
// prepare fow showing // prepare fow showing
_SetMenusEnabled(false); _SetMenusEnabled( false );
p_mediaControl->SetEnabled( false );
_RestoreSettings(); _RestoreSettings();
...@@ -481,6 +482,7 @@ void InterfaceWindow::updateInterface() ...@@ -481,6 +482,7 @@ void InterfaceWindow::updateInterface()
} }
else if ( Lock() ) else if ( Lock() )
{ {
// p_mediaControl->SetEnabled( true );
bool hasTitles = p_wrapper->HasTitles(); bool hasTitles = p_wrapper->HasTitles();
bool hasChapters = p_wrapper->HasChapters(); bool hasChapters = p_wrapper->HasChapters();
p_mediaControl->SetStatus( p_wrapper->InputStatus(), p_mediaControl->SetStatus( p_wrapper->InputStatus(),
...@@ -513,15 +515,11 @@ void InterfaceWindow::updateInterface() ...@@ -513,15 +515,11 @@ void InterfaceWindow::updateInterface()
fPlaylistWindow->Unlock(); fPlaylistWindow->Unlock();
} }
} }
else else
_SetMenusEnabled(false); {
_SetMenusEnabled( false );
if ( Lock() ) // p_mediaControl->SetEnabled( false );
{ }
p_mediaControl->SetEnabled( p_wrapper->PlaylistSize() );
Unlock();
}
/* always force the user-specified volume */ /* always force the user-specified volume */
/* FIXME : I'm quite sure there is a cleaner way to do this */ /* FIXME : I'm quite sure there is a cleaner way to do this */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* MediaControlView.cpp: beos interface * MediaControlView.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.cpp,v 1.8 2002/11/27 05:36:41 titer Exp $ * $Id: MediaControlView.cpp,v 1.9 2003/01/11 19:33:09 stippi Exp $
* *
* Authors: Tony Castley <tony@castley.net> * Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com> * Stephan Aßmus <stippi@yellowbites.com>
...@@ -325,15 +325,19 @@ MediaControlView::SetStatus(int status, int rate) ...@@ -325,15 +325,19 @@ MediaControlView::SetStatus(int status, int rate)
void void
MediaControlView::SetEnabled(bool enabled) MediaControlView::SetEnabled(bool enabled)
{ {
fSkipBack->SetEnabled(enabled); if ( LockLooper() )
fPlayPause->SetEnabled(enabled); {
fSkipForward->SetEnabled(enabled); fSkipBack->SetEnabled( enabled );
fStop->SetEnabled(enabled); fPlayPause->SetEnabled( enabled );
fMute->SetEnabled(enabled); fSkipForward->SetEnabled( enabled );
fVolumeSlider->SetEnabled(enabled); fStop->SetEnabled( enabled );
fSeekSlider->SetEnabled(enabled); fMute->SetEnabled( enabled );
fRewind->SetEnabled(enabled); fVolumeSlider->SetEnabled( enabled );
fForward->SetEnabled(enabled); fSeekSlider->SetEnabled( enabled );
fRewind->SetEnabled( enabled );
fForward->SetEnabled( enabled );
UnlockLooper();
}
} }
// SetAudioEnabled // SetAudioEnabled
......
...@@ -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.15 2003/01/08 02:09:15 titer Exp $ * $Id: VlcWrapper.cpp,v 1.16 2003/01/11 19:33:09 stippi 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>
...@@ -105,7 +105,8 @@ bool VlcWrapper::UpdateInputAndAOut() ...@@ -105,7 +105,8 @@ bool VlcWrapper::UpdateInputAndAOut()
bool VlcWrapper::HasInput() bool VlcWrapper::HasInput()
{ {
return( p_input != NULL ); return ( p_input != NULL );
// return ( PlaylistSize() > 0 );
} }
/* status (UNDEF_S, PLAYING_S, PAUSE_S, FORWARD_S, BACKWARD_S, /* status (UNDEF_S, PLAYING_S, PAUSE_S, FORWARD_S, BACKWARD_S,
......
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