[vlc-commits] commit: Qt: translate external dialogs buttons too (Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Mon Apr 26 01:16:57 CEST 2010
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Apr 26 01:10:50 2010 +0200| [15d6b7a96678998d96f906909849f206bd405fdd] | committer: Jean-Baptiste Kempf
Qt: translate external dialogs buttons too
(cherry picked from commit 0fa46e2b1163741732440d1e17b09095e7c2cb4d)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=15d6b7a96678998d96f906909849f206bd405fdd
---
modules/gui/qt4/dialogs/external.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/gui/qt4/dialogs/external.cpp b/modules/gui/qt4/dialogs/external.cpp
index 5402010..67c6f1c 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 */
More information about the vlc-commits
mailing list