#include <QPushButton>
#include <QProgressBar>
#include <QMessageBox>
+#include <QDialogButtonBox>
#include <assert.h>
else
/* Custom box, finish it */
{
- QVLCFrame::doButtons( dialog, layout,
- &defaultButton, p_dialog->psz_default_button,
- &altButton, p_dialog->psz_alternate_button,
- &otherButton, p_dialog->psz_other_button );
+ QDialogButtonBox *buttonBox = new QDialogButtonBox;
+
+ if( p_dialog->psz_default_button )
+ {
+ defaultButton = new QPushButton;
+ defaultButton->setFocus();
+ defaultButton->setText( qfu( p_dialog->psz_default_button ) );
+ buttonBox->addButton( defaultButton, QDialogButtonBox::AcceptRole );
+ }
+ if( p_dialog->psz_alternate_button )
+ {
+ altButton = new QPushButton;
+ altButton->setText( qfu( p_dialog->psz_alternate_button ) );
+ buttonBox->addButton( altButton, QDialogButtonBox::RejectRole );
+ }
+ if( p_dialog->psz_other_button )
+ {
+ otherButton = new QPushButton;
+ otherButton->setText( qfu( p_dialog->psz_other_button ) );
+ buttonBox->addButton( otherButton, QDialogButtonBox::ActionRole );
+ }
+ layout->addWidget( buttonBox );
if( p_dialog->psz_default_button )
BUTTONACT( defaultButton, defaultB() );
if( p_dialog->psz_alternate_button )
{
assert( progressBar );
progressBar->setValue( (int)(p_dialog->val.f_float*1000) );
- fprintf (stderr, "Setting progress to %i\n", progressBar->value() );
+ msg_Err( p_intf, "Setting progress to %i\n", progressBar->value() );
}
}