Commit c49d1212 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Improve behavour on teletext buttons.

parent 82744463
...@@ -468,7 +468,6 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -468,7 +468,6 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
* Telextext QFrame * Telextext QFrame
* TODO: Merge with upper menu in a StackLayout * TODO: Merge with upper menu in a StackLayout
**/ **/
#ifdef ZVBI_COMPILED
telexFrame = new QWidget( this ); telexFrame = new QWidget( this );
QHBoxLayout *telexLayout = new QHBoxLayout( telexFrame ); QHBoxLayout *telexLayout = new QHBoxLayout( telexFrame );
telexLayout->setSpacing( 0 ); telexLayout->setSpacing( 0 );
...@@ -504,7 +503,6 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -504,7 +503,6 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
THEMIM->getIM(), telexSetTransparency( bool ) ); THEMIM->getIM(), telexSetTransparency( bool ) );
CONNECT( THEMIM->getIM(), teletextEnabled( bool ), CONNECT( THEMIM->getIM(), teletextEnabled( bool ),
telexFrame, setVisible( bool ) ); telexFrame, setVisible( bool ) );
#endif
/** Play Buttons **/ /** Play Buttons **/
QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); QSizePolicy sizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
...@@ -839,9 +837,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, ...@@ -839,9 +837,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i,
fsLayout->addWidget( discFrame, 1, 4 ); fsLayout->addWidget( discFrame, 1, 4 );
#ifdef ZVBI_COMPILED
fsLayout->addWidget( telexFrame, 1, 5 ); fsLayout->addWidget( telexFrame, 1, 5 );
#endif
fsLayout->addWidget( advControls, 1, 6, Qt::AlignVCenter ); fsLayout->addWidget( advControls, 1, 6, Qt::AlignVCenter );
......
...@@ -325,22 +325,16 @@ bool InputManager::hasVideo() ...@@ -325,22 +325,16 @@ bool InputManager::hasVideo()
void InputManager::UpdateSPU() void InputManager::UpdateSPU()
{ {
#ifdef ZVBI_COMPILED
if( hasInput() ) if( hasInput() )
{ {
vlc_value_t val; vlc_value_t val;
var_Change( p_input, "spu-es", VLC_VAR_CHOICESCOUNT, &val, NULL ); var_Change( p_input, "spu-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
telexToggle( val.i_int > 0 );
/* Update teletext status*/
emit teletextEnabled( val.i_int > 0 );/* FIXME */
telexToggle( true );
} }
else else
{ {
emit teletextEnabled( false );
telexToggle( false ); telexToggle( false );
} }
#endif
} }
void InputManager::UpdateArt() void InputManager::UpdateArt()
...@@ -408,7 +402,6 @@ void InputManager::sectionMenu() ...@@ -408,7 +402,6 @@ void InputManager::sectionMenu()
} }
} }
#ifdef ZVBI_COMPILED
void InputManager::telexGotoPage( int page ) void InputManager::telexGotoPage( int page )
{ {
if( hasInput() ) if( hasInput() )
...@@ -430,6 +423,7 @@ void InputManager::telexToggle( bool b_enabled ) ...@@ -430,6 +423,7 @@ void InputManager::telexToggle( bool b_enabled )
if( hasInput() ) if( hasInput() )
{ {
vlc_value_t val;
vlc_object_t *p_vbi; vlc_object_t *p_vbi;
p_vbi = (vlc_object_t *) vlc_object_find_name( p_input, p_vbi = (vlc_object_t *) vlc_object_find_name( p_input,
"zvbi", FIND_ANYWHERE ); "zvbi", FIND_ANYWHERE );
...@@ -438,7 +432,10 @@ void InputManager::telexToggle( bool b_enabled ) ...@@ -438,7 +432,10 @@ void InputManager::telexToggle( bool b_enabled )
i_page = var_GetInteger( p_vbi, "vbi-page" ); i_page = var_GetInteger( p_vbi, "vbi-page" );
vlc_object_release( p_vbi ); vlc_object_release( p_vbi );
} }
var_Change( p_input, "spu-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
b_enabled = (val.i_int > 0);
} }
emit teletextEnabled( b_enabled );
i_page = b_enabled ? i_page : 0; i_page = b_enabled ? i_page : 0;
telexGotoPage( i_page ); telexGotoPage( i_page );
} }
...@@ -457,7 +454,6 @@ void InputManager::telexSetTransparency( bool b_transp ) ...@@ -457,7 +454,6 @@ void InputManager::telexSetTransparency( bool b_transp )
} }
} }
} }
#endif
void InputManager::slower() void InputManager::slower()
{ {
......
...@@ -100,11 +100,9 @@ public slots: ...@@ -100,11 +100,9 @@ public slots:
void sectionNext(); void sectionNext();
void sectionPrev(); void sectionPrev();
void sectionMenu(); void sectionMenu();
#ifdef ZVBI_COMPILED void telexGotoPage( int ); ///< Goto teletext page
void telexGotoPage( int ); void telexToggle( bool ); ///< Enable disable teletext buttons
void telexToggle( bool ); void telexSetTransparency( bool ); ///< Set transparency on teletext background
void telexSetTransparency( bool );
#endif
signals: signals:
/// Send new position, new time and new length /// Send new position, new time and new length
...@@ -118,9 +116,8 @@ signals: ...@@ -118,9 +116,8 @@ signals:
void artChanged( QString ); void artChanged( QString );
/// Controll of fullscreen controller /// Controll of fullscreen controller
void inputUnset(); void inputUnset();
#ifdef ZVBI_COMPILED /// Teletext
void teletextEnabled( bool ); void teletextEnabled( bool );
#endif
}; };
class MainInputManager : public QObject class MainInputManager : public QObject
......
...@@ -665,7 +665,7 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu, ...@@ -665,7 +665,7 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
":/pixmaps/previous_16px.png", SLOT( prev() ) ); ":/pixmaps/previous_16px.png", SLOT( prev() ) );
addMIMStaticEntry( p_intf, menu, qtr( "Next" ), "", addMIMStaticEntry( p_intf, menu, qtr( "Next" ), "",
":/pixmaps/next_16px.png", SLOT( next() ) ); ":/pixmaps/next_16px.png", SLOT( next() ) );
} }
void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu ) void QVLCMenu::PopupMenuStaticEntries( intf_thread_t *p_intf, QMenu *menu )
{ {
......
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