X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fgui%2Fqt4%2Fdialogs%2Finteraction.cpp;h=2ee8f3f0c82fa34a0e4a3b0213c041a67f986bdc;hb=75369351b33f14f29beba0ce02e85d95355f1233;hp=1d843cbbc5f39066de8692992277bc1d325d5894;hpb=cbd55ac4fff860730ff1d61bd77a7c70d7bbf139;p=vlc diff --git a/modules/gui/qt4/dialogs/interaction.cpp b/modules/gui/qt4/dialogs/interaction.cpp index 1d843cbbc5..2ee8f3f0c8 100644 --- a/modules/gui/qt4/dialogs/interaction.cpp +++ b/modules/gui/qt4/dialogs/interaction.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -136,10 +137,28 @@ InteractionDialog::InteractionDialog( intf_thread_t *_p_intf, 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 ) @@ -157,7 +176,7 @@ void InteractionDialog::update() { 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() ); } }