]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/interaction.cpp
Qt4 - Strings changes by tonsofpcs.
[vlc] / modules / gui / qt4 / dialogs / interaction.cpp
index 1d843cbbc5f39066de8692992277bc1d325d5894..2ee8f3f0c82fa34a0e4a3b0213c041a67f986bdc 100644 (file)
@@ -31,6 +31,7 @@
 #include <QPushButton>
 #include <QProgressBar>
 #include <QMessageBox>
+#include <QDialogButtonBox>
 
 #include <assert.h>
 
@@ -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() );
     }
 }