char *psz_intf = config_GetPsz( p_intf, "intf" );
if( psz_intf )
{
- msg_Dbg( p_intf, "Interface in config file: %s", psz_intf );
if( strstr( psz_intf, "skin" ) )
ui.skins->setChecked( true );
else if( strstr( psz_intf, "qt" ) )
/* Function called from the main Preferences dialog on each SPrefs Panel */
void SPrefsPanel::apply()
{
- msg_Dbg( p_intf, "Trying to save the %i simple panel", number );
-
/* Generic save for ever panel */
QList<ConfigControl *>::Iterator i;
for( i = controls.begin() ; i != controls.end() ; i++ )
int i_comboValue = cachingCombo->itemData( cachingCombo->currentIndex() ).toInt();
if( i_comboValue )
{
- msg_Dbg( p_intf, "Adjusting all cache values at: %i", i_comboValue );
CaC( "udp-caching" );
if (module_Exists (p_intf, "dvdread" ))
CaC( "dvdread-caching" );
buttonsBox->addButton( save, QDialogButtonBox::AcceptRole );
buttonsBox->addButton( cancel, QDialogButtonBox::RejectRole );
- buttonsBox->addButton( reset, QDialogButtonBox::ActionRole );
+ buttonsBox->addButton( reset, QDialogButtonBox::ResetRole );
/* Layout */
main_layout->addWidget( tree_panel, 0, 0, 3, 1 );
/* Save to file */
config_SaveConfigFile( p_intf, NULL );
+ destroyPanels();
+
+ hide();
+}
+
+void PrefsDialog::destroyPanels()
+{
+ msg_Dbg( p_intf, "Destroying the Panels" );
/* Delete the other panel in order to force its reload after clicking
on apply. In fact, if we don't do that, the preferences from the other
panels won't be accurate, so we would have to recreate the whole dialog,
}
current_simple_panel = NULL;
}
-
- hide();
}
+
/* Clean the preferences, dunno if it does something really */
void PrefsDialog::cancel()
{
{
config_ResetAll( p_intf );
config_SaveConfigFile( p_intf, NULL );
+ /* FIXME reset the panels */
+ destroyPanels();
}
}