[vlc-commits] commit: Qt: translate external dialogs buttons too (Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Mon Apr 26 01:13:39 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Apr 26 01:10:50 2010 +0200| [0fa46e2b1163741732440d1e17b09095e7c2cb4d] | committer: Jean-Baptiste Kempf 

Qt: translate external dialogs buttons too

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0fa46e2b1163741732440d1e17b09095e7c2cb4d
---

 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