]> git.sesse.net Git - vlc/commitdiff
Qt: translate external dialogs buttons too
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Apr 2010 23:10:50 +0000 (01:10 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Apr 2010 23:13:35 +0000 (01:13 +0200)
modules/gui/qt4/dialogs/external.cpp

index 540201090bcea298904cfa1eca4c57cf535568f0..67c6f1c18b1d9ff9a9564d545c515c6d18de2f15 100644 (file)
@@ -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 */