]> git.sesse.net Git - vlc/commitdiff
Qt: cache some config variables
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Sep 2011 22:41:05 +0000 (00:41 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 25 Sep 2011 22:41:05 +0000 (00:41 +0200)
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index 193bf7f5143e978fc2da47e079cf9b6abda77923..c5623068b9fee19426bc152b3674138edbd42620 100644 (file)
@@ -121,6 +121,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
     /* Do we want anoying popups or not */
     b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" );
 
     /* Do we want anoying popups or not */
     b_notificationEnabled = var_InheritBool( p_intf, "qt-notification" );
 
+    b_pauseOnMinimize = var_InheritBool( p_intf, "qt-pause-minimized" );
+
     /* Set the other interface settings */
     settings = getSettings();
     settings->beginGroup( "MainWindow" );
     /* Set the other interface settings */
     settings = getSettings();
     settings->beginGroup( "MainWindow" );
@@ -1128,9 +1130,8 @@ void MainInterface::changeEvent(QEvent *event)
             b_hasPausedWhenMinimized = false;
 
             if( THEMIM->getIM()->playingStatus() == PLAYING_S &&
             b_hasPausedWhenMinimized = false;
 
             if( THEMIM->getIM()->playingStatus() == PLAYING_S &&
-                THEMIM->getIM()->hasVideo() &&
-                !THEMIM->getIM()->hasVisualisation() &&
-                var_InheritBool( p_intf, "qt-pause-minimized" ) )
+                THEMIM->getIM()->hasVideo() && !THEMIM->getIM()->hasVisualisation() &&
+                b_pauseOnMinimize )
             {
                 b_hasPausedWhenMinimized = true;
                 THEMIM->pause();
             {
                 b_hasPausedWhenMinimized = true;
                 THEMIM->pause();
index cfac21f77e278daa1cd2a37df194a083abde9c05..59389fa501a5561e66983da60cf0eb312a8accee 100644 (file)
@@ -161,6 +161,7 @@ private:
     bool                 b_hideAfterCreation;
     bool                 b_minimalView;         ///< Minimal video
     bool                 b_interfaceFullScreen;
     bool                 b_hideAfterCreation;
     bool                 b_minimalView;         ///< Minimal video
     bool                 b_interfaceFullScreen;
+    bool                 b_pauseOnMinimize;
 
     /* States */
     bool                 playlistVisible;       ///< Is the playlist visible ?
 
     /* States */
     bool                 playlistVisible;       ///< Is the playlist visible ?