Commit 2f7f4a74 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: toolbar editor, show the saved positionCombo item at start.

parent 5a428d9e
...@@ -77,6 +77,8 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf) ...@@ -77,6 +77,8 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf)
positionCombo = new QComboBox; positionCombo = new QComboBox;
positionCombo->addItem( qtr( "Under the Video" ), QVariant( 0 ) ); positionCombo->addItem( qtr( "Under the Video" ), QVariant( 0 ) );
positionCombo->addItem( qtr( "Above the Video" ), QVariant( 1 ) ); positionCombo->addItem( qtr( "Above the Video" ), QVariant( 1 ) );
positionCombo->setCurrentIndex( positionCombo->findData(
getSettings()->value( "MainWindow/ToolbarPos", 0 ).toInt() ) );
mainTboxLayout->addWidget( positionCombo, 0, 2, 1, 1 ); mainTboxLayout->addWidget( positionCombo, 0, 2, 1, 1 );
QLabel *line1Label = new QLabel( "Line 1:" ); QLabel *line1Label = new QLabel( "Line 1:" );
...@@ -134,6 +136,7 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf) ...@@ -134,6 +136,7 @@ ToolbarEditDialog::ToolbarEditDialog( intf_thread_t *_p_intf)
/* Buttons */ /* Buttons */
QDialogButtonBox *okCancel = new QDialogButtonBox; QDialogButtonBox *okCancel = new QDialogButtonBox;
QPushButton *okButton = new QPushButton( qtr( "Cl&ose" ), this ); QPushButton *okButton = new QPushButton( qtr( "Cl&ose" ), this );
okButton->setDefault( true );
QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ), this ); QPushButton *cancelButton = new QPushButton( qtr( "&Cancel" ), this );
okCancel->addButton( okButton, QDialogButtonBox::AcceptRole ); okCancel->addButton( okButton, QDialogButtonBox::AcceptRole );
okCancel->addButton( cancelButton, QDialogButtonBox::RejectRole ); okCancel->addButton( cancelButton, QDialogButtonBox::RejectRole );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment