QGridLayout *layout = new QGridLayout( this );
- QDialogButtonBox *buttonBox =
- new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
- QPushButton *clearButton = new QPushButton( qtr( "&Clear" ) );
+ QDialogButtonBox *buttonBox = new QDialogButtonBox( Qt::Horizontal, this );
+ QPushButton *clearButton = new QPushButton( qtr( "Cl&ear" ), this );
buttonBox->addButton( clearButton, QDialogButtonBox::ActionRole );
+ buttonBox->addButton( new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
messages = new QTextEdit();
messages->setReadOnly( true );
#include <QTabWidget>
#include <QGridLayout>
#include <QDialogButtonBox>
+#include <QPushButton>
#include <vlc_modules.h>
ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
layout->addWidget( mainTabW );
- QDialogButtonBox *closeButtonBox =
- new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
+ QDialogButtonBox *closeButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
+ closeButtonBox->addButton(
+ new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
layout->addWidget( closeButtonBox );
CONNECT( closeButtonBox, rejected(), this, close() );
QTextBrowser *helpBrowser = new QTextBrowser( this );
helpBrowser->setOpenExternalLinks( true );
helpBrowser->setHtml( qtr(I_LONGHELP) );
- QDialogButtonBox *closeButtonBox =
- new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
+ QDialogButtonBox *closeButtonBox = new QDialogButtonBox( Qt::Horizontal, this );
+ closeButtonBox->addButton(
+ new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
closeButtonBox->setFocus();
layout->addWidget( helpBrowser );
{
/* Build UI */
ui.setupUi( this );
+ ui.closeButtonBox->addButton(
+ new QPushButton( qtr("&Close"), this ), QDialogButtonBox::RejectRole );
setWindowTitle( qtr( "About" ) );
setWindowRole( "vlc-about" );
{
/* build Ui */
ui.setupUi( this );
+ ui.updateDialogButtonBox->addButton( new QPushButton( qtr("&Close"), this ),
+ QDialogButtonBox::RejectRole );
+ QPushButton *recheckButton = new QPushButton( qtr("&Recheck version"), this );
+ ui.updateDialogButtonBox->addButton( recheckButton, QDialogButtonBox::ActionRole );
+
+ ui.updateNotifyButtonBox->addButton( new QPushButton( qtr("&Yes"), this ),
+ QDialogButtonBox::AcceptRole );
+ ui.updateNotifyButtonBox->addButton( new QPushButton( qtr("&No"), this ),
+ QDialogButtonBox::RejectRole );
+
setWindowTitle( qtr( "VLC media player updates" ) );
setWindowRole( "vlc-update" );
- QList<QAbstractButton *> buttonsList = ui.updateDialogButtonBox->buttons();
- QAbstractButton *currentButton;
- for ( int i = 0; i < buttonsList.size() ; ++i )
- {
- currentButton = buttonsList.at( i );
- if ( ui.updateDialogButtonBox->standardButton( currentButton )
- == QDialogButtonBox::Retry )
- {
- currentButton->setText( qtr( "&Recheck version" ) );
- qobject_cast<QPushButton *>(currentButton)->setDefault( true );
- }
- }
-
- CONNECT( ui.updateDialogButtonBox, accepted(), this, UpdateOrDownload() );
+ BUTTONACT( recheckButton, UpdateOrDownload() );
CONNECT( ui.updateDialogButtonBox, rejected(), this, close() );
CONNECT( ui.updateNotifyButtonBox, accepted(), this, UpdateOrDownload() );
<tr>
<td style="border: none;">
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans'; font-size:10pt;"></p></td></tr></table></body></html></string>
</property>
<item row="1" column="0">
<widget class="QDialogButtonBox" name="closeButtonBox">
<property name="standardButtons">
- <set>QDialogButtonBox::Close</set>
+ <set>QDialogButtonBox::NoButton</set>
</property>
</widget>
</item>