diff options
Diffstat (limited to 'src/app/stateChange.cpp')
-rw-r--r-- | src/app/stateChange.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/app/stateChange.cpp b/src/app/stateChange.cpp index 49adc55..73f77d0 100644 --- a/src/app/stateChange.cpp +++ b/src/app/stateChange.cpp @@ -13,6 +13,8 @@ #include <tqlabel.h> #include <tqpopupmenu.h> #include <tqslider.h> +#include <tqwidgetstack.h> +#include "audioView.h" #include "theStream.h" #include "videoSettings.h" //FIXME unfortunate #include "xineEngine.h" @@ -104,8 +106,18 @@ MainWindow::engineStateChanged( Engine::State state ) /// update statusBar { using namespace Engine; - m_analyzer->setShown( state & (Playing | Paused) && TheStream::hasAudio() ); - m_timeLabel->setShown( state & (Playing | Paused) ); + m_analyzer->setShown(state & (Playing | Paused) && (TheStream::hasVideo() && TheStream::hasAudio())); + m_timeLabel->setShown(state & (Playing | Paused)); + } + + // Update the current widget shown. + if (TheStream::hasVideo() || (state & (Engine::Empty))) + { + m_widgetStack->raiseWidget(videoWindow()); + } + else if (TheStream::hasAudio()) + { + m_widgetStack->raiseWidget(m_audioView); } |