From 6ba2d51e5da45ca6a30709b902c6f4369e2b409a Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Fri, 20 Jun 2008 16:36:08 +0200 Subject: [PATCH] Fix toggling of transparency on teletext pages. Keep in mind that the subpicture core seems to be broken. It doesn't remove old subpictures with the ephemer setting as it used to do. --- modules/gui/qt4/components/interface_widgets.cpp | 2 +- modules/gui/qt4/input_manager.cpp | 6 ++++-- modules/gui/qt4/input_manager.hpp | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp index e01ea529f8..4ba788d366 100644 --- a/modules/gui/qt4/components/interface_widgets.cpp +++ b/modules/gui/qt4/components/interface_widgets.cpp @@ -504,7 +504,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, BUTTON_SET_ACT_I( telexTransparent, "", tvtelx.png, qtr( "Teletext" ), toggleTeletextTransparency() ); CONNECT( telexTransparent, clicked( bool ), - THEMIM->getIM(), telexSetTransparency( bool ) ); + THEMIM->getIM(), telexSetTransparency() ); CONNECT( THEMIM->getIM(), teletextEnabled( bool ), telexFrame, setVisible( bool ) ); diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index b7b510cba7..cb655df00e 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -63,6 +63,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) : p_input = NULL; i_rate = 0; i_input_id = 0; + b_transparentTelextext = false; } InputManager::~InputManager() @@ -440,7 +441,7 @@ void InputManager::telexToggle( bool b_enabled ) telexGotoPage( i_page ); } -void InputManager::telexSetTransparency( bool b_transp ) +void InputManager::telexSetTransparency() { if( hasInput() ) { @@ -449,7 +450,8 @@ void InputManager::telexSetTransparency( bool b_transp ) "zvbi", FIND_ANYWHERE ); if( p_vbi ) { - var_SetBool( p_input->p_libvlc, "vbi-opaque", b_transp ); + var_SetBool( p_vbi, "vbi-opaque", b_transparentTelextext ); + b_transparentTelextext = !b_transparentTelextext; vlc_object_release( p_vbi ); } } diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp index 402dfe6f7d..1cf835b0d8 100644 --- a/modules/gui/qt4/input_manager.hpp +++ b/modules/gui/qt4/input_manager.hpp @@ -77,6 +77,7 @@ private: QString old_name; QString artUrl; int i_rate; + bool b_transparentTelextext; void customEvent( QEvent * ); void addCallbacks(); @@ -102,7 +103,7 @@ public slots: void sectionMenu(); void telexGotoPage( int ); ///< Goto teletext page void telexToggle( bool ); ///< Enable disable teletext buttons - void telexSetTransparency( bool ); ///< Set transparency on teletext background + void telexSetTransparency(); ///< Set transparency on teletext background signals: /// Send new position, new time and new length -- 2.39.2