[vlc-commits] commit: Qt forced default value is different than libvlc's saved ( Francois Cartegnie )

git at videolan.org git at videolan.org
Wed Jul 28 20:06:38 CEST 2010


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jul  9 18:19:13 2010 +0200| [eadc598d144c7c4b6c5e7843b10a2b530c9162cb] | committer: Francois Cartegnie 

Qt forced default value is different than libvlc's saved

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eadc598d144c7c4b6c5e7843b10a2b530c9162cb
---

 modules/gui/qt4/components/simple_preferences.cpp |    2 +-
 modules/gui/qt4/qt4.cpp                           |    3 +++
 modules/gui/qt4/qt4.hpp                           |    4 ++++
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 22e1af7..ee7aedc 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -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 ) );
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 676a82b..d689c4a 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -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 )
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index 8678b79..577d434 100644
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -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 );



More information about the vlc-commits mailing list