[vlc-commits] Qt: manage the volume with the core

Jean-Baptiste Kempf git at videolan.org
Sat Sep 24 13:35:30 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Sep 24 13:30:58 2011 +0200| [6cd3385995645c795021dbfda75486e192f1ee1f] | committer: Jean-Baptiste Kempf

Qt: manage the volume with the core

Close #3351

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

 modules/gui/qt4/components/controller_widget.cpp  |    5 ++---
 modules/gui/qt4/components/simple_preferences.cpp |    2 +-
 modules/gui/qt4/qt4.cpp                           |   21 +++++----------------
 3 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/modules/gui/qt4/components/controller_widget.cpp b/modules/gui/qt4/components/controller_widget.cpp
index e765462..967d50b 100644
--- a/modules/gui/qt4/components/controller_widget.cpp
+++ b/modules/gui/qt4/components/controller_widget.cpp
@@ -89,7 +89,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
     {
         volumeSlider = new SoundSlider( this,
             config_GetInt( p_intf, "volume-step" ),
-            var_InheritBool( p_intf, "qt-volume-complete" ),
+            false,
             var_InheritString( p_intf, "qt-slider-colours" ) );
     }
     else
@@ -98,8 +98,7 @@ SoundWidget::SoundWidget( QWidget *_parent, intf_thread_t * _p_intf,
         volumeSlider->setAttribute( Qt::WA_MacSmallSize);
         volumeSlider->setOrientation( b_special ? Qt::Vertical
                                                 : Qt::Horizontal );
-        volumeSlider->setMaximum( var_InheritBool( p_intf, "qt-volume-complete" )
-                                  ? 400 : 200 );
+        volumeSlider->setMaximum( 200 );
     }
 
     volumeSlider->setFocusPolicy( Qt::NoFocus );
diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index dfe1376..3b9beb7 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -315,7 +315,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 
             /* Audio Options */
             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 );
             CONNECT( ui.defaultVolume, valueChanged( int ),
                      this, updateAudioVolume( int ) );
diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index 8f3cd21..c8a32b7 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -124,14 +124,7 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
                             "two weeks." )
 #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 STARTVOL_TEXT N_( "Default start volume" )
 
 #define PRIVACY_TEXT N_( "Ask for network policy at start" )
 
@@ -236,13 +229,8 @@ vlc_module_begin ()
                  UPDATER_DAYS_TEXT, false )
 #endif
 
-    add_bool( "qt-volume-complete", false, COMPLETEVOL_TEXT,
-              COMPLETEVOL_LONGTEXT, true )
     add_bool( "qt-autosave-volume", false, SAVEVOL_TEXT,
               SAVEVOL_TEXT, true )
-    add_integer_with_range( "qt-startvolume", QT_VOLUME_DEFAULT, 0,
-               QT_VOLUME_MAX, STARTVOL_TEXT, STARTVOL_TEXT, true )
-
 #ifdef WIN32
     add_bool( "qt-disable-volume-keys"             /* name */,
               true                                 /* default value */,
@@ -278,13 +266,14 @@ vlc_module_begin ()
     add_bool( "qt-bgcone-expands", false, QT_BGCONE_EXPANDS_TEXT,
               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_bool( "qt-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true )
-
-    add_obsolete_bool( "qt-adv-options" ) /* Since 1.2.0 */
+    add_obsolete_bool( "qt-adv-options" )     /* Since 1.2.0 */
+    add_obsolete_bool( "qt-volume-complete" ) /* Since 1.2.0 */
+    add_obsolete_integer( "qt-startvolume" )  /* Since 1.2.0 */
 
     cannot_unload_broken_library()
 



More information about the vlc-commits mailing list