]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/dialogs/extended.cpp
Qt4: Only scroll messages if required
[vlc] / modules / gui / qt4 / dialogs / extended.cpp
index c44bcbd213744c2a6d76aecaf7cd367a0f37d645..8e7756515ffc2ffe7439c2ebd2a4019020b01ecb 100644 (file)
 
 #include <QTabWidget>
 #include <QGridLayout>
-
-ExtendedDialog *ExtendedDialog::instance = NULL;
+#include <vlc_modules.h>
 
 ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
 {
     setWindowFlags( Qt::Tool );
-    setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) );
+    setWindowOpacity( var_InheritFloat( p_intf, "qt-opacity" ) );
     setWindowTitle( qtr( "Adjustments and Effects" ) );
     setWindowRole( "vlc-extended" );
 
@@ -56,6 +55,9 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
     equal = new Equalizer( p_intf, audioTab );
     audioTab->addTab( equal, qtr( "Graphic Equalizer" ) );
 
+    Compressor *compres = new Compressor( p_intf, audioTab );
+    audioTab->addTab( compres, qtr( "Compressor" ) );
+
     Spatializer *spatial = new Spatializer( p_intf, audioTab );
     audioTab->addTab( spatial, qtr( "Spatializer" ) );
     audioLayout->addWidget( audioTab );
@@ -89,12 +91,12 @@ ExtendedDialog::ExtendedDialog( intf_thread_t *_p_intf ): QVLCFrame( _p_intf )
     CONNECT( closeButton, clicked(), this, close() );
 
     /* Restore geometry or move this dialog on the left pane of the MI */
-    if( !restoreGeometry(getSettings()->value("EPanel/geometry").toByteArray()))
+    if( !restoreGeometry( getSettings()->value("EPanel/geometry").toByteArray() ) )
     {
         resize( QSize( 400, 280 ) );
 
         MainInterface *p_mi = p_intf->p_sys->p_mi;
-        if( p_mi )
+        if( p_mi && p_mi->x() > 50 )
             move( ( p_mi->x() - frameGeometry().width() - 10 ), p_mi->y() );
         else
             move ( 450 , 0 );