void ToolbarEditDialog::close()
{
msg_Dbg( p_intf, "Close and save" );
- hide();
getSettings()->setValue( "MainWindow/ToolbarPos",
positionCombo->itemData( positionCombo->currentIndex() ).toInt() );
getSettings()->setValue( "MainWindow/MainToolbar1", controller1->getValue() );
getSettings()->setValue( "MainWindow/AdvToolbar", controllerA->getValue() );
getSettings()->setValue( "MainWindow/InputToolbar", controller->getValue() );
getSettings()->setValue( "MainWindow/FSCtoolbar", controllerFSC->getValue() );
+ getSettings()->sync();
+ accept();
}
void ToolbarEditDialog::cancel()
{
- hide();
+ reject();
}
/************************************************
}
CONNECT( this, askUpdate(), this, doComponentsUpdate() );
+ CONNECT( THEDP, toolBarConfUpdated(), this, recreateToolbars() );
/* Size and placement of interface */
settings->beginGroup( "MainWindow" );
}
}
+void MainInterface::recreateToolbars()
+{
+ settings->beginGroup( "MainWindow" );
+ delete controls;
+ delete inputC;
+ controls = new ControlsWidget( p_intf, false, this ); /* FIXME */
+ CONNECT( controls, advancedControlsToggled( bool ),
+ this, doComponentsUpdate() );
+ CONNECT( controls, sizeChanged(),
+ this, doComponentsUpdate() );
+ inputC = new InputControlsWidget( p_intf, this );
+
+ mainLayout->insertWidget( 2, inputC, 0, Qt::AlignBottom );
+ mainLayout->insertWidget( settings->value( "ToolbarPos", 0 ).toInt() ? 0: 3,
+ controls, 0, Qt::AlignBottom );
+ settings->endGroup();
+}
+
void MainInterface::handleMainUi( QSettings *settings )
{
/* Create the main Widget and the mainLayout */
mainLayout->setSpacing( 0 );
mainLayout->setMargin( 0 );
- /* Create the CONTROLS Widget */
- controls = new ControlsWidget( p_intf,
- settings->value( "adv-controls", false ).toBool(), this );
- CONNECT( controls, advancedControlsToggled( bool ),
- this, doComponentsUpdate() );
- CONNECT( controls, sizeChanged(),
- this, doComponentsUpdate() );
- inputC = new InputControlsWidget( p_intf, this );
-
- /* Visualisation */
+ /* Visualisation */
/* Disabled for now, they SUCK */
#if 0
visualSelector = new VisualSelector( p_intf );
if( videoEmbeddedFlag )
videoWidget = new VideoWidget( p_intf );
+ /* Create the CONTROLS Widget */
+ controls = new ControlsWidget( p_intf,
+ settings->value( "adv-controls", false ).toBool(), this );
+ CONNECT( controls, advancedControlsToggled( bool ),
+ this, doComponentsUpdate() );
+ CONNECT( controls, sizeChanged(),
+ this, doComponentsUpdate() );
+ inputC = new InputControlsWidget( p_intf, this );
+
+
/* Add the controls Widget to the main Widget */
mainLayout->insertWidget( 0, bgWidget );
if( videoWidget ) mainLayout->insertWidget( 0, videoWidget, 10 );