Commit eadc598d authored by Francois Cartegnie's avatar Francois Cartegnie

Qt forced default value is different than libvlc's saved

parent 8c213790
......@@ -310,7 +310,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
#undef audioCommon
/* Audio Options */
CONFIG_GENERIC_NO_BOOL( "volume" , IntegerRangeSlider, NULL,
CONFIG_GENERIC_NO_BOOL( "qt-startvolume" , IntegerRangeSlider, NULL,
defaultVolume );
CONNECT( ui.defaultVolume, valueChanged( int ),
this, updateAudioVolume( int ) );
......
......@@ -128,6 +128,7 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
"software amplification." )
#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" )
......@@ -200,6 +201,8 @@ vlc_module_begin ()
COMPLETEVOL_LONGTEXT, true )
add_bool( "qt-autosave-volume", false, NULL, SAVEVOL_TEXT,
SAVEVOL_TEXT, true )
add_integer_with_range( "qt-startvolume", QT_VOLUME_DEFAULT, 0,
QT_VOLUME_MAX, NULL, STARTVOL_TEXT, STARTVOL_TEXT, true )
add_bool( "qt-embedded-open", false, NULL, QT_NATIVEOPEN_TEXT,
QT_NATIVEOPEN_TEXT, false )
......
......@@ -32,6 +32,7 @@
#include <vlc_common.h> /* VLC_COMMON_MEMBERS for vlc_interface.h */
#include <vlc_interface.h> /* intf_thread_t */
#include <vlc_playlist.h> /* playlist_t */
#include <vlc_aout.h> /* AOUT_VOLUME_ */
#define QT_NO_CAST_TO_ASCII
#include <QString>
......@@ -117,6 +118,9 @@ struct intf_sys_t
#define getSettings() p_intf->p_sys->mainSettings
#define QT_VOLUME_DEFAULT AOUT_VOLUME_DEFAULT
#define QT_VOLUME_MAX (AOUT_VOLUME_DEFAULT * 2)
static inline QString QVLCUserDir( vlc_userdir_t type )
{
char *dir = config_GetUserDir( type );
......
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