p_new->i_type = INTERACT_DIALOG_TWOWAY;
p_new->psz_title = strdup( psz_title );
p_new->psz_description = strdup( psz_description );
- p_new->psz_default_button = strdup( _("Ok" ) );
+ p_new->psz_default_button = strdup( _("OK" ) );
p_new->psz_alternate_button = strdup( _("Cancel" ) );
p_new->i_flags = DIALOG_LOGIN_PW_OK_CANCEL;
/* Make sure we haven't yet created an interaction object */
assert( libvlc_priv(p_libvlc)->p_interaction == NULL );
- p_interaction = vlc_custom_create( p_libvlc, sizeof( *p_interaction ),
+ p_interaction = vlc_custom_create( VLC_OBJECT(p_libvlc),
+ sizeof( *p_interaction ),
VLC_OBJECT_GENERIC, "interaction" );
if( !p_interaction )
return NULL;
return p_interaction;
}
+void interaction_Destroy( interaction_t *p_interaction )
+{
+ if( !p_interaction )
+ return;
+
+ vlc_object_kill( p_interaction );
+ vlc_thread_join( p_interaction );
+ vlc_object_release( p_interaction );
+}
+
/**********************************************************************
* The following functions are local
**********************************************************************/
if( p_dialog->i_id == 0 )
p_dialog->i_id = ++p_interaction->i_last_id;
- if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT ) return VLC_EGENERIC;
+ if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT )
+ {
+ vlc_object_release( p_interaction );
+ return VLC_EGENERIC;
+ }
if( config_GetInt( p_this, "interact" ) ||
p_dialog->i_flags & DIALOG_BLOCKING_ERROR ||