From: Jean-Baptiste Kempf Date: Sun, 25 Apr 2010 23:10:50 +0000 (+0200) Subject: Qt: translate external dialogs buttons too X-Git-Tag: 1.2.0-pre1~6887 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=0fa46e2b1163741732440d1e17b09095e7c2cb4d;p=vlc Qt: translate external dialogs buttons too --- diff --git a/modules/gui/qt4/dialogs/external.cpp b/modules/gui/qt4/dialogs/external.cpp index 540201090b..67c6f1c18b 100644 --- a/modules/gui/qt4/dialogs/external.cpp +++ b/modules/gui/qt4/dialogs/external.cpp @@ -128,11 +128,14 @@ void DialogHandler::requestLogin (vlc_object_t *, void *value) layout->addWidget (panel); /* OK, Cancel buttons */ - QDialogButtonBox *buttonBox; - buttonBox = new QDialogButtonBox (QDialogButtonBox::Ok - | QDialogButtonBox::Cancel); - connect (buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); - connect (buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); + QDialogButtonBox *buttonBox = new QDialogButtonBox; + QPushButton *okButton = new QPushButton( "&Ok" ); + QPushButton *cancelButton = new QPushButton( "&Cancel" ); + buttonBox->addButton( okButton, QDialogButtonBox::AcceptRole ); + buttonBox->addButton( cancelButton, QDialogButtonBox::RejectRole ); + + CONNECT( okButton, accepted(), dialog, accept() ); + CONNECT( cancelButton, rejected(), dialog, reject() ); layout->addWidget (buttonBox); /* Run the dialog */