#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 */
/* Margins */
tree_panel_l->setMargin( 1 );
- main_panel_l->setLayoutMargins( 6, 0, 0, 3, 3 );
+ main_panel_l->setContentsMargins( 6, 0, 0, 3 );
b_small = (p_intf->p_sys->i_screenHeight < 750);
if( b_small ) msg_Dbg( p_intf, "Small");
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();
}