p_main_interface = _p_main_interface;
b_init = 0;
+ var_AddCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
+
/* Register callback for the intf-popupmenu variable */
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist != NULL )
- {
- var_AddCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
- var_AddCallback( p_playlist, "intf-show", IntfShowCB, p_intf );
- vlc_object_release( p_playlist );
- }
+ var_AddCallback( p_intf->p_libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
Start( 100 /*milliseconds*/, wxTIMER_CONTINUOUS );
}
Timer::~Timer()
{
+ var_DelCallback( p_intf->p_libvlc, "intf-show", IntfShowCB, p_intf );
+
/* Unregister callback */
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist != NULL )
- {
- var_DelCallback( p_playlist, "intf-popupmenu", PopupMenuCB, p_intf );
- var_DelCallback( p_playlist, "intf-show", IntfShowCB, p_intf );
- vlc_object_release( p_playlist );
- }
+ var_DelCallback( p_intf->p_libvlc, "intf-popupmenu", PopupMenuCB, p_intf );
}
/*****************************************************************************
if( !b_init )
{
p_main_interface->Init();
- b_init = VLC_TRUE;
+ b_init = true;
}
#endif
{
p_main_interface->Raise();
p_main_interface->Show();
- p_intf->p_sys->b_intf_show = VLC_FALSE;
+ p_intf->p_sys->b_intf_show = false;
}
if( intf_ShouldDie( p_intf ) )
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
intf_thread_t *p_intf = (intf_thread_t *)param;
- p_intf->p_sys->b_intf_show = VLC_TRUE;
+ p_intf->p_sys->b_intf_show = true;
return VLC_SUCCESS;
}