#include "dialogs/preferences.hpp"
#include "util/qvlcframe.hpp"
+#include "dialogs/errors.hpp"
#include "components/complete_preferences.hpp"
#include "components/simple_preferences.hpp"
QGridLayout *main_layout = new QGridLayout( this );
setWindowTitle( qtr( "Preferences" ) );
setWindowRole( "vlc-preferences" );
+ setWindowModality( Qt::WindowModal );
/* Whether we want it or not, we need to destroy on close to get
consistency when reset */
setMaximumHeight( p_intf->p_sys->i_screenHeight );
for( int i = 0; i < SPrefsMax ; i++ ) simple_panels[i] = NULL;
- if( config_GetInt( p_intf, "qt-advanced-pref" ) || config_GetInt( p_intf, "advanced" ) )
+ if( var_InheritBool( p_intf, "qt-advanced-pref" )
+ || var_InheritBool( p_intf, "advanced" ) )
setAdvanced();
else
setSmall();
}
/* Save to file */
- config_SaveConfigFile( p_intf, NULL );
+ if( config_SaveConfigFile( p_intf, NULL ) != 0 )
+ {
+ ErrorsDialog::getInstance (p_intf)->addError( qtr( "Cannot save Configuration" ),
+ qtr("Preferences file could not be saved") );
+ }
accept();
}