]> git.sesse.net Git - vlc/commitdiff
Qt: manage the volume with the core
authorJean-Baptiste Kempf <jb@videolan.org>
Sat, 24 Sep 2011 11:30:58 +0000 (13:30 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sat, 24 Sep 2011 11:34:50 +0000 (13:34 +0200)
Close #3351

modules/gui/qt4/components/controller_widget.cpp
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/qt4.cpp

index e765462693a057bb410df365ec769df6fc701f40..967d50b5cb5e4a60443801f6b2c4fdce8c5ee451 100644 (file)
@@ -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 );
index dfe137687cd22ebe1ddd03993e07377edac46894..3b9beb7e2071ece225b4eeacd06fc1f0c4e5e1b4 100644 (file)
@@ -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 ) );
index 8f3cd21ddd4865b6f1cf1106d7af91efc7259784..c8a32b77c7ae9a09a581eb6b79a98577b8dfefd5 100644 (file)
@@ -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()