return VLC_EGENERIC; \
va_end( args )
+static inline int DialogFireForget( interaction_dialog_t *d )
+{
+ int ret = DialogSend( d );
+ if( ret == VLC_EGENERIC )
+ DialogDestroy( d );
+ return ret;
+}
+
/**
* Send an error message, both in a blocking and non-blocking way
*
else
p_new->i_flags = DIALOG_NONBLOCKING_ERROR;
- return DialogSend( p_new );
+ return DialogFireForget( p_new );
}
/**
p_new->i_flags = DIALOG_WARNING;
- return DialogSend( p_new );
+ return DialogFireForget( p_new );
}
/**
p_new->psz_alternate_button = strdup( psz_alternate );
p_new->psz_other_button = psz_other ? strdup( psz_other ) : NULL;
- return DialogSend( p_new );
+ return DialogFireForget( p_new );
}
/**
i_ret = DialogSend( p_new );
- if( i_ret != DIALOG_CANCELLED && i_ret != VLC_EGENERIC )
+ if( i_ret == VLC_EGENERIC )
+ DialogDestroy( p_new );
+ else if( i_ret != DIALOG_CANCELLED )
{
*ppsz_login = p_new->psz_returned[0]?
strdup( p_new->psz_returned[0] ) : NULL;
i_ret = DialogSend( p_new );
- if( i_ret != DIALOG_CANCELLED )
+ if( i_ret == VLC_EGENERIC )
+ DialogDestroy( p_new );
+ else if( i_ret != DIALOG_CANCELLED )
{
*ppsz_usersString = p_new->psz_returned[0]?
strdup( p_new->psz_returned[0] ) : NULL;