From: Jean-Baptiste Kempf Date: Mon, 5 Nov 2007 23:12:08 +0000 (+0000) Subject: Qt4 - make GNOME and KDE people happy. X-Git-Tag: 0.9.0-test0~4685 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=0b8e11bd3f39d15873133711aabe190f47b98fa1;p=vlc Qt4 - make GNOME and KDE people happy. --- diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp index 4a5058bb88..f488406fa7 100644 --- a/modules/gui/qt4/components/preferences_widgets.cpp +++ b/modules/gui/qt4/components/preferences_widgets.cpp @@ -45,6 +45,7 @@ #include #include #include +#include QString formatTooltip(const QString & tooltip) { @@ -1120,6 +1121,7 @@ KeyInputDialog::KeyInputDialog( QList& _values, values = _values; conflicts = false; keyToChange = _keyToChange; + setWindowTitle( qtr( "Hotkey for " ) + qfu( keyToChange) ); QVBoxLayout *l = new QVBoxLayout( this ); @@ -1128,16 +1130,16 @@ KeyInputDialog::KeyInputDialog( QList& _values, l->addWidget( selected , Qt::AlignCenter ); l->addWidget( warning, Qt::AlignCenter ); - QHBoxLayout *l2 = new QHBoxLayout(); + QDialogButtonBox *buttonBox = new QDialogButtonBox; QPushButton *ok = new QPushButton( qtr("OK") ); - l2->addWidget( ok ); QPushButton *cancel = new QPushButton( qtr("Cancel") ); - l2->addWidget( cancel ); - - BUTTONACT( ok, accept() ); - BUTTONACT( cancel, reject() ); + buttonBox->addButton( ok, QDialogButtonBox::AcceptRole ); + buttonBox->addButton( cancel, QDialogButtonBox::RejectRole ); - l->addLayout( l2 ); + l->addWidget( buttonBox ); + + CONNECT( buttonBox, accepted(), this, accept() ); + CONNECT( buttonBox, rejected(), this, reject() ); } void KeyInputDialog::checkForConflicts( int i_vlckey )