[vlc-devel] [PATCH] Qt: InputManager: Split playback state change and item change (fix #8510)
Francois Cartegnie
fcvlcdev at free.fr
Sat May 25 20:43:59 CEST 2013
Alternative fix to which adresses the root of the problem (ItemChanged Event being
triggered for both "state" & "activity" vars changes, and ItemStateChanged hooked on
"state" var ).
This fix is valid if we have the guarantee that input's event INPUT_EVENT_STATE
always matchs a "state" var change.
---
modules/gui/qt4/input_manager.cpp | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 86176b7..aa87c80 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -209,11 +209,7 @@ void InputManager::customEvent( QEvent *event )
}
break;
case IMEvent::ItemStateChanged:
- // TODO: Fusion with above state
UpdateStatus();
- // UpdateName();
- // UpdateNavigation(); This shouldn't be useful now
- // UpdateTeletext(); Same
break;
case IMEvent::NameChanged:
UpdateName();
@@ -274,15 +270,11 @@ void InputManager::customEvent( QEvent *event )
inline void InputManager::addCallbacks()
{
var_AddCallback( p_input, "intf-event", InputEvent, this );
- if( !p_intf->p_sys->b_isDialogProvider )
- var_AddCallback( p_input, "state", PLItemChanged, THEMIM );
}
/* Delete the callbacks on Input. Self explanatory */
inline void InputManager::delCallbacks()
{
- if( !p_intf->p_sys->b_isDialogProvider )
- var_DelCallback( p_input, "state", PLItemChanged, THEMIM );
var_DelCallback( p_input, "intf-event", InputEvent, this );
}
@@ -1192,7 +1184,7 @@ bool MainInputManager::hasEmptyPlaylist()
* Static callbacks for MIM *
****************************/
static int PLItemChanged( vlc_object_t *p_this, const char *psz_var,
- vlc_value_t oldval, vlc_value_t, void *param )
+ vlc_value_t oldval, vlc_value_t val, void *param )
{
VLC_UNUSED( p_this ); VLC_UNUSED( psz_var ); VLC_UNUSED( oldval );
--
1.8.1.4
More information about the vlc-devel
mailing list