/* First Move */
QRect rect1 = getSettings()->value( "FullScreen/screen" ).toRect();
QPoint pos1 = getSettings()->value( "FullScreen/pos" ).toPoint();
- int number = config_GetInt( p_intf, "qt-fullscreen-screennumber" );
+ int number = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" );
if( number == -1 || number > QApplication::desktop()->numScreens() )
number = QApplication::desktop()->screenNumber( p_intf->p_sys->p_mi );
}
#if HAVE_TRANSPARENCY
- setWindowOpacity( config_GetFloat( p_intf, "qt-fs-opacity" ) );
+ setWindowOpacity( var_InheritFloat( p_intf, "qt-fs-opacity" ) );
#endif
show();
{
volumeSlider = new SoundSlider( this,
config_GetInt( p_intf, "volume-step" ),
- config_GetInt( p_intf, "qt-volume-complete" ),
- config_GetPsz( p_intf, "qt-slider-colours" ) );
+ var_InheritInteger( p_intf, "qt-volume-complete" ),
+ var_InheritString( p_intf, "qt-slider-colours" ) );
}
else
{
volumeSlider = new QSlider( NULL );
volumeSlider->setOrientation( b_special ? Qt::Vertical
: Qt::Horizontal );
- volumeSlider->setMaximum( config_GetInt( p_intf, "qt-volume-complete" )
+ volumeSlider->setMaximum( var_InheritBool( p_intf, "qt-volume-complete" )
? 400 : 200 );
}
if( volumeSlider->orientation() == Qt::Horizontal )
if( b_fs )
{ /* Go full-screen */
- int numscreen = config_GetInt( p_intf, "qt-fullscreen-screennumber" );
+ int numscreen = var_InheritInteger( p_intf, "qt-fullscreen-screennumber" );
/* if user hasn't defined screennumber, or screennumber that is bigger
* than current number of screens, take screennumber where current interface
* is
QCompleter *fileCompleter = new QCompleter( fileCompleteList, this );
fileCompleter->setModel( new QDirModel( fileCompleter ) );
lineFileEdit->setCompleter( fileCompleter );*/
- if( config_GetInt( p_intf, "qt-embedded-open" ) )
+ if( var_InheritBool( p_intf, "qt-embedded-open" ) )
{
ui.tempWidget->hide();
BuildOldPanel();
ui.setupUi( this );
/* Get the default configuration path for the devices */
- psz_dvddiscpath = config_GetPsz( p_intf, "dvd" );
- psz_vcddiscpath = config_GetPsz( p_intf, "vcd" );
- psz_cddadiscpath = config_GetPsz( p_intf, "cd-audio" );
+ psz_dvddiscpath = var_InheritString( p_intf, "dvd" );
+ psz_vcddiscpath = var_InheritString( p_intf, "vcd" );
+ psz_cddadiscpath = var_InheritString( p_intf, "cd-audio" );
/* State to avoid overwritting the users changes with the configuration */
b_firstdvd = true;
/* CONNECTs */
CONNECT( ui.urlText, textChanged( const QString& ), this, updateMRL());
- if( config_GetInt( p_intf, "qt-recentplay" ) )
+ if( var_InheritBool( p_intf, "qt-recentplay" ) )
{
mrlList = new QStringListModel(
getSettings()->value( "Open/netMRL" ).toStringList() );
BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf ):QVLCFrame( _p_intf )
{
setWindowFlags( Qt::Tool );
- setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
+ setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
setWindowTitle( qtr( "Edit Bookmarks" ) );
setWindowRole( "vlc-bookmarks" );
ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
{
setWindowFlags( Qt::Tool );
- setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
+ setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
setWindowTitle( qtr( "Adjustments and Effects" ) );
setWindowRole( "vlc-extended" );
const dialog_fatal_t *dialog = (const dialog_fatal_t *)value.p_address;
DialogHandler *self = static_cast<DialogHandler *>(data);
- if (config_GetInt (obj, "qt-error-dialogs"))
+ if (var_InheritBool (obj, "qt-error-dialogs"))
emit self->error (qfu(dialog->title), qfu(dialog->message));
return VLC_SUCCESS;
}
{
if( getSettings()->value( "IsFirstRun", 1 ).toInt() )
{
- if( config_GetInt( p_intf, "qt-privacy-ask") )
+ if( var_InheritBool( p_intf, "qt-privacy-ask") )
{
new FirstRun( _p, p_intf );
}
verbosityBox = new QSpinBox();
verbosityBox->setRange( 0, 2 );
- verbosityBox->setValue( config_GetInt( p_intf, "verbose" ) );
+ verbosityBox->setValue( var_InheritInteger( p_intf, "verbose" ) );
verbosityBox->setWrapping( true );
verbosityBox->setMaximumWidth( 50 );
BUTTONACT( cancelButton, cancel() );
/* Hide the advancedPanel */
- if( !config_GetInt( p_intf, "qt-adv-options" ) )
+ if( !var_InheritBool( p_intf, "qt-adv-options" ) )
ui.advancedFrame->hide();
else
ui.advancedCheckBox->setChecked( true );
if( ui.slaveCheckbox->isChecked() ) {
mrl += " :input-slave=" + ui.slaveText->text();
}
- int i_cache = config_GetInt( p_intf, qtu( storedMethod ) );
- if( i_cache != ui.cacheSpinBox->value() ) {
- mrl += QString( " :%1=%2" ).arg( storedMethod ).
- arg( ui.cacheSpinBox->value() );
- }
+ mrl += QString( " :%1=%2" ).arg( storedMethod ).
+ arg( ui.cacheSpinBox->value() );
if( ui.startTimeDoubleSpinBox->value() ) {
mrl += " :start-time=" + QString::number( ui.startTimeDoubleSpinBox->value() );
}
{
if( method != storedMethod ) {
storedMethod = method;
- int i_value = config_GetInt( p_intf, qtu( storedMethod ) );
+ int i_value = var_InheritInteger( p_intf, qtu( storedMethod ) );
ui.cacheSpinBox->setValue( i_value );
}
}
setCentralWidget( main );
setWindowTitle( qtr( "Playlist" ) );
setWindowRole( "vlc-playlist" );
- setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
+ setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
QHBoxLayout *l = new QHBoxLayout( centralWidget() );
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();
void InputManager::jumpFwd()
{
- int i_interval = config_GetInt( p_input, "short-jump-size" );
+ int i_interval = var_InheritInteger( p_input, "short-jump-size" );
if( i_interval > 0 )
{
mtime_t val = (mtime_t)(i_interval) * 1000000L;
void InputManager::jumpBwd()
{
- int i_interval = config_GetInt( p_input, "short-jump-size" );
+ int i_interval = var_InheritInteger( p_input, "short-jump-size" );
if( i_interval > 0 )
{
mtime_t val = -1 *(mtime_t)(i_interval) * 1000000L;
setAcceptDrops( true );
setWindowRole( "vlc-main" );
setWindowIcon( QApplication::windowIcon() );
- setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
+ setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
/* Set The Video In emebedded Mode or not */
- videoEmbeddedFlag = config_GetInt( p_intf, "embedded-video" );
+ videoEmbeddedFlag = var_InheritBool( p_intf, "embedded-video" );
/* Does the interface resize to video size or the opposite */
- b_keep_size = !config_GetInt( p_intf, "qt-video-autoresize" );
+ b_keep_size = !var_InheritBool( p_intf, "qt-video-autoresize" );
/* Are we in the enhanced always-video mode or not ? */
- i_visualmode = config_GetInt( p_intf, "qt-display-mode" );
+ i_visualmode = var_InheritInteger( p_intf, "qt-display-mode" );
/* Do we want anoying popups or not */
- notificationEnabled = (bool)config_GetInt( p_intf, "qt-notification" );
+ notificationEnabled = (bool)var_InheritBool( p_intf, "qt-notification" );
/* Set the other interface settings */
settings = getSettings();
}
#endif
/* and title of the Main Interface*/
- if( config_GetInt( p_intf, "qt-name-in-title" ) )
+ if( var_InheritBool( p_intf, "qt-name-in-title" ) )
{
CONNECT( THEMIM->getIM(), nameChanged( const QString& ),
this, setVLCWindowsTitle( const QString& ) );
if ( depth() > 8 )
#endif
/* Create the FULLSCREEN CONTROLS Widget */
- if( config_GetInt( p_intf, "qt-fs-controller" ) )
+ if( var_InheritBool( p_intf, "qt-fs-controller" ) )
{
fullscreenControls = new FullscreenControllerWidget( p_intf, this );
CONNECT( fullscreenControls, keyPressed( QKeyEvent * ),
{
#ifndef HAVE_MAEMO
bool b_systrayAvailable = QSystemTrayIcon::isSystemTrayAvailable();
- bool b_systrayWanted = config_GetInt( p_intf, "qt-system-tray" );
+ bool b_systrayWanted = var_InheritBool( p_intf, "qt-system-tray" );
- if( config_GetInt( p_intf, "qt-start-minimized") > 0 )
+ if( var_InheritBool( p_intf, "qt-start-minimized") )
{
if( b_systrayAvailable )
{
addDPStaticEntry( menu, qtr( "Open &Location from clipboard" ),
NULL, SLOT( openUrlDialog() ), "Ctrl+V" );
- if( config_GetInt( p_intf, "qt-recentplay" ) )
+ if( var_InheritBool( p_intf, "qt-recentplay" ) )
{
recentsMenu = new QMenu( qtr( "&Recent Media" ), menu );
updateRecents( p_intf );
#ifdef UPDATE_CHECK
/* Checking for VLC updates */
- if( config_GetInt( p_intf, "qt-updates-notif" ) &&
- !config_GetInt( p_intf, "qt-privacy-ask" ) )
+ if( var_InheritBool( p_intf, "qt-updates-notif" ) &&
+ !var_InheritBool( p_intf, "qt-privacy-ask" ) )
{
- int interval = config_GetInt( p_intf, "qt-updates-days" );
+ int interval = var_InheritInteger( p_intf, "qt-updates-days" );
if( QDate::currentDate() >
getSettings()->value( "updatedate" ).toDate().addDays( interval ) )
{
playMRL( const QString & ) );
/* Load the filter psz */
- char* psz_tmp = config_GetPsz( p_intf, "qt-recentplay-filter" );
+ char* psz_tmp = var_InheritString( p_intf, "qt-recentplay-filter" );
if( psz_tmp && *psz_tmp )
filter = new QRegExp( psz_tmp, Qt::CaseInsensitive );
else
free( psz_tmp );
load();
- isActive = config_GetInt( p_intf, "qt-recentplay" );
+ isActive = var_InheritBool( p_intf, "qt-recentplay" );
if( !isActive ) clear();
}