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