Commit 6cd33859 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: manage the volume with the core

Close #3351
parent e578075a
...@@ -89,7 +89,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf, ...@@ -89,7 +89,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
{ {
volumeSlider = new SoundSlider( this, volumeSlider = new SoundSlider( this,
config_GetInt( p_intf, "volume-step" ), config_GetInt( p_intf, "volume-step" ),
var_InheritBool( p_intf, "qt-volume-complete" ), false,
var_InheritString( p_intf, "qt-slider-colours" ) ); var_InheritString( p_intf, "qt-slider-colours" ) );
} }
else else
...@@ -98,8 +98,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf, ...@@ -98,8 +98,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
volumeSlider->setAttribute( Qt::WA_MacSmallSize); volumeSlider->setAttribute( Qt::WA_MacSmallSize);
volumeSlider->setOrientation( b_special ? Qt::Vertical volumeSlider->setOrientation( b_special ? Qt::Vertical
: Qt::Horizontal ); : Qt::Horizontal );
volumeSlider->setMaximum( var_InheritBool( p_intf, "qt-volume-complete" ) volumeSlider->setMaximum( 200 );
? 400 : 200 );
} }
volumeSlider->setFocusPolicy( Qt::NoFocus ); volumeSlider->setFocusPolicy( Qt::NoFocus );
......
...@@ -315,7 +315,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -315,7 +315,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
/* Audio Options */ /* Audio Options */
ui.volumeValue->setMaximum( QT_VOLUME_MAX / QT_VOLUME_DEFAULT * 100 ); ui.volumeValue->setMaximum( QT_VOLUME_MAX / QT_VOLUME_DEFAULT * 100 );
CONFIG_GENERIC_NO_BOOL( "qt-startvolume" , IntegerRangeSlider, NULL, CONFIG_GENERIC_NO_BOOL( "volume" , IntegerRangeSlider, NULL,
defaultVolume ); defaultVolume );
CONNECT( ui.defaultVolume, valueChanged( int ), CONNECT( ui.defaultVolume, valueChanged( int ),
this, updateAudioVolume( int ) ); this, updateAudioVolume( int ) );
......
...@@ -124,14 +124,7 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -124,14 +124,7 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
"two weeks." ) "two weeks." )
#define UPDATER_DAYS_TEXT N_("Number of days between two update checks") #define UPDATER_DAYS_TEXT N_("Number of days between two update checks")
#define COMPLETEVOL_TEXT N_( "Allow the volume to be set to 400%" )
#define COMPLETEVOL_LONGTEXT N_( "Allow the volume to have range from 0% to " \
"400%, instead of 0% to 200%. This option " \
"can distort the audio, since it uses " \
"software amplification." )
#define SAVEVOL_TEXT N_( "Automatically save the volume on exit" ) #define SAVEVOL_TEXT N_( "Automatically save the volume on exit" )
#define STARTVOL_TEXT N_( "Default start volume" )
#define PRIVACY_TEXT N_( "Ask for network policy at start" ) #define PRIVACY_TEXT N_( "Ask for network policy at start" )
...@@ -236,13 +229,8 @@ vlc_module_begin () ...@@ -236,13 +229,8 @@ vlc_module_begin ()
UPDATER_DAYS_TEXT, false ) UPDATER_DAYS_TEXT, false )
#endif #endif
add_bool( "qt-volume-complete", false, COMPLETEVOL_TEXT,
COMPLETEVOL_LONGTEXT, true )
add_bool( "qt-autosave-volume", false, SAVEVOL_TEXT, add_bool( "qt-autosave-volume", false, SAVEVOL_TEXT,
SAVEVOL_TEXT, true ) SAVEVOL_TEXT, true )
add_integer_with_range( "qt-startvolume", QT_VOLUME_DEFAULT, 0,
QT_VOLUME_MAX, STARTVOL_TEXT, STARTVOL_TEXT, true )
#ifdef WIN32 #ifdef WIN32
add_bool( "qt-disable-volume-keys" /* name */, add_bool( "qt-disable-volume-keys" /* name */,
true /* default value */, true /* default value */,
...@@ -278,13 +266,14 @@ vlc_module_begin () ...@@ -278,13 +266,14 @@ vlc_module_begin ()
add_bool( "qt-bgcone-expands", false, QT_BGCONE_EXPANDS_TEXT, add_bool( "qt-bgcone-expands", false, QT_BGCONE_EXPANDS_TEXT,
QT_BGCONE_EXPANDS_LONGTEXT, true ) QT_BGCONE_EXPANDS_LONGTEXT, true )
add_bool( "qt-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true )
add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */ add_obsolete_bool( "qt-blingbling" ) /* Suppressed since 1.0.0 */
add_obsolete_integer( "qt-display-mode" ) /* Suppressed since 1.1.0 */ add_obsolete_integer( "qt-display-mode" ) /* Suppressed since 1.1.0 */
add_bool( "qt-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true ) add_obsolete_bool( "qt-adv-options" ) /* Since 1.2.0 */
add_obsolete_bool( "qt-volume-complete" ) /* Since 1.2.0 */
add_obsolete_bool( "qt-adv-options" ) /* Since 1.2.0 */ add_obsolete_integer( "qt-startvolume" ) /* Since 1.2.0 */
cannot_unload_broken_library() cannot_unload_broken_library()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment