[vlc-commits] commit: Qt: errors dialog: use standard buttons. pack controls. ( Francois Cartegnie )
git at videolan.org
git at videolan.org
Sat Sep 25 22:29:49 CEST 2010
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 24 23:18:24 2010 +0200| [0ab13a3aba48c5428286acb4c568886ea5077392] | committer: Francois Cartegnie
Qt: errors dialog: use standard buttons. pack controls.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ab13a3aba48c5428286acb4c568886ea5077392
---
modules/gui/qt4/dialogs/errors.cpp | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt4/dialogs/errors.cpp b/modules/gui/qt4/dialogs/errors.cpp
index 0d4edcc..797a67e 100644
--- a/modules/gui/qt4/dialogs/errors.cpp
+++ b/modules/gui/qt4/dialogs/errors.cpp
@@ -43,10 +43,9 @@ ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf )
QGridLayout *layout = new QGridLayout( this );
- QDialogButtonBox *buttonBox = new QDialogButtonBox;
- QPushButton *closeButton = new QPushButton( qtr( "&Close" ) );
+ QDialogButtonBox *buttonBox =
+ new QDialogButtonBox( QDialogButtonBox::Close, Qt::Horizontal, this );
QPushButton *clearButton = new QPushButton( qtr( "&Clear" ) );
- buttonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
buttonBox->addButton( clearButton, QDialogButtonBox::ActionRole );
messages = new QTextEdit();
@@ -56,10 +55,9 @@ ErrorsDialog::ErrorsDialog( intf_thread_t *_p_intf )
layout->addWidget( messages, 0, 0, 1, 3 );
layout->addWidget( stopShowing, 1, 0 );
- layout->addItem( new QSpacerItem( 200, 20, QSizePolicy::Expanding ), 2,0 );
- layout->addWidget( buttonBox, 2, 2 );
+ layout->addWidget( buttonBox, 1, 2 );
- CONNECT( buttonBox, accepted(), this, close() );
+ CONNECT( buttonBox, rejected(), this, close() );
BUTTONACT( clearButton, clear() );
BUTTONACT( stopShowing, dontShow() );
}
More information about the vlc-commits
mailing list